~vcs-imports/x-unikey/trunk

1 by pklong
Initial revision
1
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
# Do all the work for Automake.                            -*- Autoconf -*-
15
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things.  But this isn't really a big deal.
18
19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
# Free Software Foundation, Inc.
21
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
25
# any later version.
26
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
# GNU General Public License for more details.
31
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35
# 02111-1307, USA.
36
37
# serial 10
38
39
AC_PREREQ([2.54])
40
41
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42
# the ones we care about.
43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
# AM_INIT_AUTOMAKE([OPTIONS])
47
# -----------------------------------------------
48
# The call with PACKAGE and VERSION arguments is the old style
49
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50
# and VERSION should now be passed to AC_INIT and removed from
51
# the call to AM_INIT_AUTOMAKE.
52
# We support both call styles for the transition.  After
53
# the next Automake release, Autoconf can make the AC_INIT
54
# arguments mandatory, and then we can depend on a new Autoconf
55
# release and drop the old call support.
56
AC_DEFUN([AM_INIT_AUTOMAKE],
57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
 AC_REQUIRE([AC_PROG_INSTALL])dnl
59
# test to see if srcdir already configured
60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
   test -f $srcdir/config.status; then
62
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63
fi
64
65
# test whether we have cygpath
66
if test -z "$CYGPATH_W"; then
67
  if (cygpath --version) >/dev/null 2>/dev/null; then
68
    CYGPATH_W='cygpath -w'
69
  else
70
    CYGPATH_W=echo
71
  fi
72
fi
73
AC_SUBST([CYGPATH_W])
74
75
# Define the identity of the package.
76
dnl Distinguish between old-style and new-style calls.
77
m4_ifval([$2],
78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
 AC_SUBST([PACKAGE], [$1])dnl
80
 AC_SUBST([VERSION], [$2])],
81
[_AM_SET_OPTIONS([$1])dnl
82
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
85
_AM_IF_OPTION([no-define],,
86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
89
# Some tools Automake needs.
90
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
AM_MISSING_PROG(AUTOCONF, autoconf)
94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
AM_MISSING_PROG(AMTAR, tar)
98
AM_PROG_INSTALL_SH
99
AM_PROG_INSTALL_STRIP
100
# We need awk for the "check" target.  The system "awk" is bad on
101
# some platforms.
102
AC_REQUIRE([AC_PROG_AWK])dnl
103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
106
_AM_IF_OPTION([no-dependencies],,
107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
                  [_AM_DEPENDENCIES(CC)],
109
                  [define([AC_PROG_CC],
110
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
                  [_AM_DEPENDENCIES(CXX)],
113
                  [define([AC_PROG_CXX],
114
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115
])
116
])
117
118
119
# When config.status generates a header, we must update the stamp-h file.
120
# This file resides in the same directory as the config header
121
# that is generated.  The stamp files are numbered to have different names.
122
123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
# loop where config.status creates the headers, so we can generate
125
# our stamp files there.
126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
[# Compute $1's index in $config_headers.
128
_am_stamp_count=1
129
for _am_header in $config_headers :; do
130
  case $_am_header in
131
    $1 | $1:* )
132
      break ;;
133
    * )
134
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135
  esac
136
done
137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
139
# Copyright 2002  Free Software Foundation, Inc.
140
141
# This program is free software; you can redistribute it and/or modify
142
# it under the terms of the GNU General Public License as published by
143
# the Free Software Foundation; either version 2, or (at your option)
144
# any later version.
145
146
# This program is distributed in the hope that it will be useful,
147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149
# GNU General Public License for more details.
150
151
# You should have received a copy of the GNU General Public License
152
# along with this program; if not, write to the Free Software
153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154
155
# AM_AUTOMAKE_VERSION(VERSION)
156
# ----------------------------
157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
# generated from the m4 files accompanying Automake X.Y.
159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160
161
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
# -------------------------------
163
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
	 [AM_AUTOMAKE_VERSION([1.7.9])])
167
168
# Helper functions for option handling.                    -*- Autoconf -*-
169
170
# Copyright 2001, 2002  Free Software Foundation, Inc.
171
172
# This program is free software; you can redistribute it and/or modify
173
# it under the terms of the GNU General Public License as published by
174
# the Free Software Foundation; either version 2, or (at your option)
175
# any later version.
176
177
# This program is distributed in the hope that it will be useful,
178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180
# GNU General Public License for more details.
181
182
# You should have received a copy of the GNU General Public License
183
# along with this program; if not, write to the Free Software
184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185
# 02111-1307, USA.
186
187
# serial 2
188
189
# _AM_MANGLE_OPTION(NAME)
190
# -----------------------
191
AC_DEFUN([_AM_MANGLE_OPTION],
192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
194
# _AM_SET_OPTION(NAME)
195
# ------------------------------
196
# Set option NAME.  Presently that only means defining a flag for this option.
197
AC_DEFUN([_AM_SET_OPTION],
198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
200
# _AM_SET_OPTIONS(OPTIONS)
201
# ----------------------------------
202
# OPTIONS is a space-separated list of Automake options.
203
AC_DEFUN([_AM_SET_OPTIONS],
204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
# -------------------------------------------
208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
AC_DEFUN([_AM_IF_OPTION],
210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
212
#
213
# Check to make sure that the build environment is sane.
214
#
215
216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
218
# This program is free software; you can redistribute it and/or modify
219
# it under the terms of the GNU General Public License as published by
220
# the Free Software Foundation; either version 2, or (at your option)
221
# any later version.
222
223
# This program is distributed in the hope that it will be useful,
224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226
# GNU General Public License for more details.
227
228
# You should have received a copy of the GNU General Public License
229
# along with this program; if not, write to the Free Software
230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231
# 02111-1307, USA.
232
233
# serial 3
234
235
# AM_SANITY_CHECK
236
# ---------------
237
AC_DEFUN([AM_SANITY_CHECK],
238
[AC_MSG_CHECKING([whether build environment is sane])
239
# Just in case
240
sleep 1
241
echo timestamp > conftest.file
242
# Do `set' in a subshell so we don't clobber the current shell's
243
# arguments.  Must try -L first in case configure is actually a
244
# symlink; some systems play weird games with the mod time of symlinks
245
# (eg FreeBSD returns the mod time of the symlink's containing
246
# directory).
247
if (
248
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
   if test "$[*]" = "X"; then
250
      # -L didn't work.
251
      set X `ls -t $srcdir/configure conftest.file`
252
   fi
253
   rm -f conftest.file
254
   if test "$[*]" != "X $srcdir/configure conftest.file" \
255
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
257
      # If neither matched, then we have a broken ls.  This can happen
258
      # if, for instance, CONFIG_SHELL is bash and it inherits a
259
      # broken ls alias from the environment.  This has actually
260
      # happened.  Such a system could not be considered "sane".
261
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262
alias in your environment])
263
   fi
264
265
   test "$[2]" = conftest.file
266
   )
267
then
268
   # Ok.
269
   :
270
else
271
   AC_MSG_ERROR([newly created file is older than distributed files!
272
Check your system clock])
273
fi
274
AC_MSG_RESULT(yes)])
275
276
#  -*- Autoconf -*-
277
278
279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
281
# This program is free software; you can redistribute it and/or modify
282
# it under the terms of the GNU General Public License as published by
283
# the Free Software Foundation; either version 2, or (at your option)
284
# any later version.
285
286
# This program is distributed in the hope that it will be useful,
287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289
# GNU General Public License for more details.
290
291
# You should have received a copy of the GNU General Public License
292
# along with this program; if not, write to the Free Software
293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294
# 02111-1307, USA.
295
296
# serial 3
297
298
# AM_MISSING_PROG(NAME, PROGRAM)
299
# ------------------------------
300
AC_DEFUN([AM_MISSING_PROG],
301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
$1=${$1-"${am_missing_run}$2"}
303
AC_SUBST($1)])
304
305
306
# AM_MISSING_HAS_RUN
307
# ------------------
308
# Define MISSING if not defined so far and test if it supports --run.
309
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
AC_DEFUN([AM_MISSING_HAS_RUN],
311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
# Use eval to expand $SHELL
314
if eval "$MISSING --run true"; then
315
  am_missing_run="$MISSING --run "
316
else
317
  am_missing_run=
318
  AC_MSG_WARN([`missing' script is too old or missing])
319
fi
320
])
321
322
# AM_AUX_DIR_EXPAND
323
324
# Copyright 2001 Free Software Foundation, Inc.
325
326
# This program is free software; you can redistribute it and/or modify
327
# it under the terms of the GNU General Public License as published by
328
# the Free Software Foundation; either version 2, or (at your option)
329
# any later version.
330
331
# This program is distributed in the hope that it will be useful,
332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334
# GNU General Public License for more details.
335
336
# You should have received a copy of the GNU General Public License
337
# along with this program; if not, write to the Free Software
338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339
# 02111-1307, USA.
340
341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344
#
345
# Of course, Automake must honor this variable whenever it calls a
346
# tool from the auxiliary directory.  The problem is that $srcdir (and
347
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
# depending on how configure is run.  This is pretty annoying, since
349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
# source directory, any form will work fine, but in subdirectories a
351
# relative path needs to be adjusted first.
352
#
353
# $ac_aux_dir/missing
354
#    fails when called from a subdirectory if $ac_aux_dir is relative
355
# $top_srcdir/$ac_aux_dir/missing
356
#    fails if $ac_aux_dir is absolute,
357
#    fails when called from a subdirectory in a VPATH build with
358
#          a relative $ac_aux_dir
359
#
360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
# are both prefixed by $srcdir.  In an in-source build this is usually
362
# harmless because $srcdir is `.', but things will broke when you
363
# start a VPATH build or use an absolute $srcdir.
364
#
365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
# and then we would define $MISSING as
369
#   MISSING="\${SHELL} $am_aux_dir/missing"
370
# This will work as long as MISSING is not called from configure, because
371
# unfortunately $(top_srcdir) has no meaning in configure.
372
# However there are other variables, like CC, which are often used in
373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
374
#
375
# Another solution, used here, is to always expand $ac_aux_dir to an
376
# absolute PATH.  The drawback is that using absolute paths prevent a
377
# configured tree to be moved without reconfiguration.
378
379
# Rely on autoconf to set up CDPATH properly.
380
AC_PREREQ([2.50])
381
382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
# expand $ac_aux_dir to an absolute path
384
am_aux_dir=`cd $ac_aux_dir && pwd`
385
])
386
387
# AM_PROG_INSTALL_SH
388
# ------------------
389
# Define $install_sh.
390
391
# Copyright 2001 Free Software Foundation, Inc.
392
393
# This program is free software; you can redistribute it and/or modify
394
# it under the terms of the GNU General Public License as published by
395
# the Free Software Foundation; either version 2, or (at your option)
396
# any later version.
397
398
# This program is distributed in the hope that it will be useful,
399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401
# GNU General Public License for more details.
402
403
# You should have received a copy of the GNU General Public License
404
# along with this program; if not, write to the Free Software
405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406
# 02111-1307, USA.
407
408
AC_DEFUN([AM_PROG_INSTALL_SH],
409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
AC_SUBST(install_sh)])
412
413
# AM_PROG_INSTALL_STRIP
414
415
# Copyright 2001 Free Software Foundation, Inc.
416
417
# This program is free software; you can redistribute it and/or modify
418
# it under the terms of the GNU General Public License as published by
419
# the Free Software Foundation; either version 2, or (at your option)
420
# any later version.
421
422
# This program is distributed in the hope that it will be useful,
423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425
# GNU General Public License for more details.
426
427
# You should have received a copy of the GNU General Public License
428
# along with this program; if not, write to the Free Software
429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430
# 02111-1307, USA.
431
432
# One issue with vendor `install' (even GNU) is that you can't
433
# specify the program used to strip binaries.  This is especially
434
# annoying in cross-compiling environments, where the build's strip
435
# is unlikely to handle the host's binaries.
436
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
# always use install-sh in `make install-strip', and initialize
438
# STRIPPROG with the value of the STRIP variable (set by the user).
439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
# Installed binaries are usually stripped using `strip' when the user
442
# run `make install-strip'.  However `strip' might not be the right
443
# tool to use in cross-compilation environments, therefore Automake
444
# will honor the `STRIP' environment variable to overrule this program.
445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
if test "$cross_compiling" != no; then
447
  AC_CHECK_TOOL([STRIP], [strip], :)
448
fi
449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
452
#                                                          -*- Autoconf -*-
453
# Copyright (C) 2003  Free Software Foundation, Inc.
454
455
# This program is free software; you can redistribute it and/or modify
456
# it under the terms of the GNU General Public License as published by
457
# the Free Software Foundation; either version 2, or (at your option)
458
# any later version.
459
460
# This program is distributed in the hope that it will be useful,
461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463
# GNU General Public License for more details.
464
465
# You should have received a copy of the GNU General Public License
466
# along with this program; if not, write to the Free Software
467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468
# 02111-1307, USA.
469
470
# serial 1
471
472
# Check whether the underlying file-system supports filenames
473
# with a leading dot.  For instance MS-DOS doesn't.
474
AC_DEFUN([AM_SET_LEADING_DOT],
475
[rm -rf .tst 2>/dev/null
476
mkdir .tst 2>/dev/null
477
if test -d .tst; then
478
  am__leading_dot=.
479
else
480
  am__leading_dot=_
481
fi
482
rmdir .tst 2>/dev/null
483
AC_SUBST([am__leading_dot])])
484
485
# serial 5						-*- Autoconf -*-
486
487
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
492
# any later version.
493
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497
# GNU General Public License for more details.
498
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502
# 02111-1307, USA.
503
504
505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
# written in clear, in which case automake, when reading aclocal.m4,
507
# will think it sees a *use*, and therefore will trigger all it's
508
# C support machinery.  Also note that it means that autoscan, seeing
509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
511
512
513
# _AM_DEPENDENCIES(NAME)
514
# ----------------------
515
# See how the compiler implements dependency checking.
516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
# We try a few techniques and use that to set a single cache variable.
518
#
519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
# dependency, and given that the user is not expected to run this macro,
522
# just rely on AC_PROG_CC.
523
AC_DEFUN([_AM_DEPENDENCIES],
524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
AC_REQUIRE([AM_DEP_TRACK])dnl
528
529
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533
                   [depcc="$$1"   am_compiler_list=])
534
535
AC_CACHE_CHECK([dependency style of $depcc],
536
               [am_cv_$1_dependencies_compiler_type],
537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
  # We make a subdir and do the tests there.  Otherwise we can end up
539
  # making bogus files that we don't know about and never remove.  For
540
  # instance it was reported that on HP-UX the gcc test will end up
541
  # making a dummy file named `D' -- because `-MD' means `put the output
542
  # in D'.
543
  mkdir conftest.dir
544
  # Copy depcomp to subdir because otherwise we won't find it if we're
545
  # using a relative directory.
546
  cp "$am_depcomp" conftest.dir
547
  cd conftest.dir
548
  # We will build objects and dependencies in a subdirectory because
549
  # it helps to detect inapplicable dependency modes.  For instance
550
  # both Tru64's cc and ICC support -MD to output dependencies as a
551
  # side effect of compilation, but ICC will put the dependencies in
552
  # the current directory while Tru64 will put them in the object
553
  # directory.
554
  mkdir sub
555
556
  am_cv_$1_dependencies_compiler_type=none
557
  if test "$am_compiler_list" = ""; then
558
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559
  fi
560
  for depmode in $am_compiler_list; do
561
    # Setup a source with many dependencies, because some compilers
562
    # like to wrap large dependency lists on column 80 (with \), and
563
    # we should not choose a depcomp mode which is confused by this.
564
    #
565
    # We need to recreate these files for each test, as the compiler may
566
    # overwrite some of them when testing with obscure command lines.
567
    # This happens at least with the AIX C compiler.
568
    : > sub/conftest.c
569
    for i in 1 2 3 4 5 6; do
570
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571
      : > sub/conftst$i.h
572
    done
573
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574
575
    case $depmode in
576
    nosideeffect)
577
      # after this tag, mechanisms are not by side-effect, so they'll
578
      # only be used when explicitly requested
579
      if test "x$enable_dependency_tracking" = xyes; then
580
	continue
581
      else
582
	break
583
      fi
584
      ;;
585
    none) break ;;
586
    esac
587
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
588
    # mode.  It turns out that the SunPro C++ compiler does not properly
589
    # handle `-M -o', and we need to detect this.
590
    if depmode=$depmode \
591
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594
         >/dev/null 2>conftest.err &&
595
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598
      # icc doesn't choke on unknown options, it will just issue warnings
599
      # (even with -Werror).  So we grep stderr for any message
600
      # that says an option was ignored.
601
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602
        am_cv_$1_dependencies_compiler_type=$depmode
603
        break
604
      fi
605
    fi
606
  done
607
608
  cd ..
609
  rm -rf conftest.dir
610
else
611
  am_cv_$1_dependencies_compiler_type=none
612
fi
613
])
614
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615
AM_CONDITIONAL([am__fastdep$1], [
616
  test "x$enable_dependency_tracking" != xno \
617
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618
])
619
620
621
# AM_SET_DEPDIR
622
# -------------
623
# Choose a directory name for dependency files.
624
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625
AC_DEFUN([AM_SET_DEPDIR],
626
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628
])
629
630
631
# AM_DEP_TRACK
632
# ------------
633
AC_DEFUN([AM_DEP_TRACK],
634
[AC_ARG_ENABLE(dependency-tracking,
635
[  --disable-dependency-tracking Speeds up one-time builds
636
  --enable-dependency-tracking  Do not reject slow dependency extractors])
637
if test "x$enable_dependency_tracking" != xno; then
638
  am_depcomp="$ac_aux_dir/depcomp"
639
  AMDEPBACKSLASH='\'
640
fi
641
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642
AC_SUBST([AMDEPBACKSLASH])
643
])
644
645
# Generate code to set up dependency tracking.   -*- Autoconf -*-
646
647
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648
649
# This program is free software; you can redistribute it and/or modify
650
# it under the terms of the GNU General Public License as published by
651
# the Free Software Foundation; either version 2, or (at your option)
652
# any later version.
653
654
# This program is distributed in the hope that it will be useful,
655
# but WITHOUT ANY WARRANTY; without even the implied warranty of
656
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657
# GNU General Public License for more details.
658
659
# You should have received a copy of the GNU General Public License
660
# along with this program; if not, write to the Free Software
661
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662
# 02111-1307, USA.
663
664
#serial 2
665
666
# _AM_OUTPUT_DEPENDENCY_COMMANDS
667
# ------------------------------
668
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669
[for mf in $CONFIG_FILES; do
670
  # Strip MF so we end up with the name of the file.
671
  mf=`echo "$mf" | sed -e 's/:.*$//'`
672
  # Check whether this is an Automake generated Makefile or not.
673
  # We used to match only the files named `Makefile.in', but
674
  # some people rename them; so instead we look at the file content.
675
  # Grep'ing the first line is not enough: some people post-process
676
  # each Makefile.in and add a new line on top of each file to say so.
677
  # So let's grep whole file.
678
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679
    dirpart=`AS_DIRNAME("$mf")`
680
  else
681
    continue
682
  fi
683
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684
  # Extract the definition of DEP_FILES from the Makefile without
685
  # running `make'.
686
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687
  test -z "$DEPDIR" && continue
688
  # When using ansi2knr, U may be empty or an underscore; expand it
689
  U=`sed -n -e '/^U = / s///p' < "$mf"`
690
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691
  # We invoke sed twice because it is the simplest approach to
692
  # changing $(DEPDIR) to its actual value in the expansion.
693
  for file in `sed -n -e '
694
    /^DEP_FILES = .*\\\\$/ {
695
      s/^DEP_FILES = //
696
      :loop
697
	s/\\\\$//
698
	p
699
	n
700
	/\\\\$/ b loop
701
      p
702
    }
703
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705
    # Make sure the directory exists.
706
    test -f "$dirpart/$file" && continue
707
    fdir=`AS_DIRNAME(["$file"])`
708
    AS_MKDIR_P([$dirpart/$fdir])
709
    # echo "creating $dirpart/$file"
710
    echo '# dummy' > "$dirpart/$file"
711
  done
712
done
713
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714
715
716
# AM_OUTPUT_DEPENDENCY_COMMANDS
717
# -----------------------------
718
# This macro should only be invoked once -- use via AC_REQUIRE.
719
#
720
# This code is only required when automatic dependency tracking
721
# is enabled.  FIXME.  This creates each `.P' file that we will
722
# need in order to bootstrap the dependency handling code.
723
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724
[AC_CONFIG_COMMANDS([depfiles],
725
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727
])
728
729
# Check to see how 'make' treats includes.	-*- Autoconf -*-
730
731
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732
733
# This program is free software; you can redistribute it and/or modify
734
# it under the terms of the GNU General Public License as published by
735
# the Free Software Foundation; either version 2, or (at your option)
736
# any later version.
737
738
# This program is distributed in the hope that it will be useful,
739
# but WITHOUT ANY WARRANTY; without even the implied warranty of
740
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741
# GNU General Public License for more details.
742
743
# You should have received a copy of the GNU General Public License
744
# along with this program; if not, write to the Free Software
745
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746
# 02111-1307, USA.
747
748
# serial 2
749
750
# AM_MAKE_INCLUDE()
751
# -----------------
752
# Check to see how make treats includes.
753
AC_DEFUN([AM_MAKE_INCLUDE],
754
[am_make=${MAKE-make}
755
cat > confinc << 'END'
756
am__doit:
757
	@echo done
758
.PHONY: am__doit
759
END
760
# If we don't find an include directive, just comment out the code.
761
AC_MSG_CHECKING([for style of include used by $am_make])
762
am__include="#"
763
am__quote=
764
_am_result=none
765
# First try GNU make style include.
766
echo "include confinc" > confmf
767
# We grep out `Entering directory' and `Leaving directory'
768
# messages which can occur if `w' ends up in MAKEFLAGS.
769
# In particular we don't look at `^make:' because GNU make might
770
# be invoked under some other name (usually "gmake"), in which
771
# case it prints its new name instead of `make'.
772
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773
   am__include=include
774
   am__quote=
775
   _am_result=GNU
776
fi
777
# Now try BSD make style include.
778
if test "$am__include" = "#"; then
779
   echo '.include "confinc"' > confmf
780
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781
      am__include=.include
782
      am__quote="\""
783
      _am_result=BSD
784
   fi
785
fi
786
AC_SUBST([am__include])
787
AC_SUBST([am__quote])
788
AC_MSG_RESULT([$_am_result])
789
rm -f confinc confmf
790
])
791
792
# AM_CONDITIONAL                                              -*- Autoconf -*-
793
794
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795
796
# This program is free software; you can redistribute it and/or modify
797
# it under the terms of the GNU General Public License as published by
798
# the Free Software Foundation; either version 2, or (at your option)
799
# any later version.
800
801
# This program is distributed in the hope that it will be useful,
802
# but WITHOUT ANY WARRANTY; without even the implied warranty of
803
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804
# GNU General Public License for more details.
805
806
# You should have received a copy of the GNU General Public License
807
# along with this program; if not, write to the Free Software
808
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809
# 02111-1307, USA.
810
811
# serial 5
812
813
AC_PREREQ(2.52)
814
815
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816
# -------------------------------------
817
# Define a conditional.
818
AC_DEFUN([AM_CONDITIONAL],
819
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821
AC_SUBST([$1_TRUE])
822
AC_SUBST([$1_FALSE])
823
if $2; then
824
  $1_TRUE=
825
  $1_FALSE='#'
826
else
827
  $1_TRUE='#'
828
  $1_FALSE=
829
fi
830
AC_CONFIG_COMMANDS_PRE(
831
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832
  AC_MSG_ERROR([conditional "$1" was never defined.
833
Usually this means the macro was only invoked conditionally.])
834
fi])])
835
836
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
837
95 by pklong
Unified with UniKey 4.0
838
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
1 by pklong
Initial revision
839
840
841
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
842
# -----------------------------------------------------------
843
# If this macro is not defined by Autoconf, define it here.
844
m4_ifdef([AC_PROVIDE_IFELSE],
845
         [],
846
         [m4_define([AC_PROVIDE_IFELSE],
847
	         [m4_ifdef([AC_PROVIDE_$1],
848
		           [$2], [$3])])])
849
850
851
# AC_PROG_LIBTOOL
852
# ---------------
853
AC_DEFUN([AC_PROG_LIBTOOL],
854
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
855
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
856
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
857
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
858
    [AC_LIBTOOL_CXX],
859
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
860
  ])])
861
dnl And a similar setup for Fortran 77 support
862
  AC_PROVIDE_IFELSE([AC_PROG_F77],
863
    [AC_LIBTOOL_F77],
864
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
865
])])
866
867
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
868
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
869
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
870
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
871
    [AC_LIBTOOL_GCJ],
872
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873
      [AC_LIBTOOL_GCJ],
874
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
875
	[AC_LIBTOOL_GCJ],
876
      [ifdef([AC_PROG_GCJ],
877
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
878
       ifdef([A][M_PROG_GCJ],
879
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880
       ifdef([LT_AC_PROG_GCJ],
881
	     [define([LT_AC_PROG_GCJ],
882
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
883
])])# AC_PROG_LIBTOOL
884
885
886
# _AC_PROG_LIBTOOL
887
# ----------------
888
AC_DEFUN([_AC_PROG_LIBTOOL],
889
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
890
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
891
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
892
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
893
894
# This can be used to rebuild libtool when needed
895
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
896
897
# Always use our own libtool.
898
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
899
AC_SUBST(LIBTOOL)dnl
900
901
# Prevent multiple expansion
902
define([AC_PROG_LIBTOOL], [])
903
])# _AC_PROG_LIBTOOL
904
905
906
# AC_LIBTOOL_SETUP
907
# ----------------
908
AC_DEFUN([AC_LIBTOOL_SETUP],
909
[AC_PREREQ(2.50)dnl
910
AC_REQUIRE([AC_ENABLE_SHARED])dnl
911
AC_REQUIRE([AC_ENABLE_STATIC])dnl
912
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913
AC_REQUIRE([AC_CANONICAL_HOST])dnl
914
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
915
AC_REQUIRE([AC_PROG_CC])dnl
916
AC_REQUIRE([AC_PROG_LD])dnl
917
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
918
AC_REQUIRE([AC_PROG_NM])dnl
919
920
AC_REQUIRE([AC_PROG_LN_S])dnl
921
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
922
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
923
AC_REQUIRE([AC_OBJEXT])dnl
924
AC_REQUIRE([AC_EXEEXT])dnl
925
dnl
926
927
AC_LIBTOOL_SYS_MAX_CMD_LEN
928
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
929
AC_LIBTOOL_OBJDIR
930
931
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
932
_LT_AC_PROG_ECHO_BACKSLASH
933
934
case $host_os in
935
aix3*)
936
  # AIX sometimes has problems with the GCC collect2 program.  For some
937
  # reason, if we set the COLLECT_NAMES environment variable, the problems
938
  # vanish in a puff of smoke.
939
  if test "X${COLLECT_NAMES+set}" != Xset; then
940
    COLLECT_NAMES=
941
    export COLLECT_NAMES
942
  fi
943
  ;;
944
esac
945
946
# Sed substitution that helps us do robust quoting.  It backslashifies
947
# metacharacters that are still active within double-quoted strings.
30 by pklong
moved byteio to upper dir
948
Xsed='sed -e 1s/^X//'
1 by pklong
Initial revision
949
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
950
951
# Same as above, but do not quote variable references.
952
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
953
954
# Sed substitution to delay expansion of an escaped shell variable in a
955
# double_quote_subst'ed string.
956
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
957
958
# Sed substitution to avoid accidental globbing in evaled expressions
959
no_glob_subst='s/\*/\\\*/g'
960
961
# Constants:
962
rm="rm -f"
963
964
# Global variables:
965
default_ofile=libtool
966
can_build_shared=yes
967
30 by pklong
moved byteio to upper dir
968
# All known linkers require a `.a' archive for static linking (except MSVC,
1 by pklong
Initial revision
969
# which needs '.lib').
970
libext=a
971
ltmain="$ac_aux_dir/ltmain.sh"
972
ofile="$default_ofile"
973
with_gnu_ld="$lt_cv_prog_gnu_ld"
974
975
AC_CHECK_TOOL(AR, ar, false)
976
AC_CHECK_TOOL(RANLIB, ranlib, :)
977
AC_CHECK_TOOL(STRIP, strip, :)
978
979
old_CC="$CC"
980
old_CFLAGS="$CFLAGS"
981
982
# Set sane defaults for various variables
983
test -z "$AR" && AR=ar
984
test -z "$AR_FLAGS" && AR_FLAGS=cru
985
test -z "$AS" && AS=as
986
test -z "$CC" && CC=cc
987
test -z "$LTCC" && LTCC=$CC
95 by pklong
Unified with UniKey 4.0
988
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1 by pklong
Initial revision
989
test -z "$DLLTOOL" && DLLTOOL=dlltool
990
test -z "$LD" && LD=ld
991
test -z "$LN_S" && LN_S="ln -s"
992
test -z "$MAGIC_CMD" && MAGIC_CMD=file
993
test -z "$NM" && NM=nm
994
test -z "$SED" && SED=sed
995
test -z "$OBJDUMP" && OBJDUMP=objdump
996
test -z "$RANLIB" && RANLIB=:
997
test -z "$STRIP" && STRIP=:
998
test -z "$ac_objext" && ac_objext=o
999
1000
# Determine commands to create old-style static archives.
1001
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1002
old_postinstall_cmds='chmod 644 $oldlib'
1003
old_postuninstall_cmds=
1004
1005
if test -n "$RANLIB"; then
1006
  case $host_os in
1007
  openbsd*)
95 by pklong
Unified with UniKey 4.0
1008
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1 by pklong
Initial revision
1009
    ;;
1010
  *)
95 by pklong
Unified with UniKey 4.0
1011
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1 by pklong
Initial revision
1012
    ;;
1013
  esac
1014
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1015
fi
1016
30 by pklong
moved byteio to upper dir
1017
_LT_CC_BASENAME([$compiler])
1018
1 by pklong
Initial revision
1019
# Only perform the check for file, if the check method requires it
1020
case $deplibs_check_method in
1021
file_magic*)
1022
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1023
    AC_PATH_MAGIC
1024
  fi
1025
  ;;
1026
esac
1027
1028
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1029
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1030
enable_win32_dll=yes, enable_win32_dll=no)
1031
1032
AC_ARG_ENABLE([libtool-lock],
1033
    [AC_HELP_STRING([--disable-libtool-lock],
1034
	[avoid locking (might break parallel builds)])])
1035
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1036
1037
AC_ARG_WITH([pic],
1038
    [AC_HELP_STRING([--with-pic],
1039
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1040
    [pic_mode="$withval"],
1041
    [pic_mode=default])
1042
test -z "$pic_mode" && pic_mode=default
1043
1044
# Use C for the default configuration in the libtool script
1045
tagname=
1046
AC_LIBTOOL_LANG_C_CONFIG
1047
_LT_AC_TAGCONFIG
1048
])# AC_LIBTOOL_SETUP
1049
1050
1051
# _LT_AC_SYS_COMPILER
1052
# -------------------
1053
AC_DEFUN([_LT_AC_SYS_COMPILER],
1054
[AC_REQUIRE([AC_PROG_CC])dnl
1055
1056
# If no C compiler was specified, use CC.
1057
LTCC=${LTCC-"$CC"}
1058
95 by pklong
Unified with UniKey 4.0
1059
# If no C compiler flags were specified, use CFLAGS.
1060
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1061
1 by pklong
Initial revision
1062
# Allow CC to be a program name with arguments.
1063
compiler=$CC
1064
])# _LT_AC_SYS_COMPILER
1065
1066
30 by pklong
moved byteio to upper dir
1067
# _LT_CC_BASENAME(CC)
1068
# -------------------
1069
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1070
AC_DEFUN([_LT_CC_BASENAME],
1071
[for cc_temp in $1""; do
1072
  case $cc_temp in
1073
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1074
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1075
    \-*) ;;
1076
    *) break;;
1077
  esac
1078
done
1079
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1080
])
1081
1082
1083
# _LT_COMPILER_BOILERPLATE
1084
# ------------------------
1085
# Check for compiler boilerplate output or warnings with
1086
# the simple compiler test code.
1087
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1088
[ac_outfile=conftest.$ac_objext
1089
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
95 by pklong
Unified with UniKey 4.0
1090
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
30 by pklong
moved byteio to upper dir
1091
_lt_compiler_boilerplate=`cat conftest.err`
1092
$rm conftest*
1093
])# _LT_COMPILER_BOILERPLATE
1094
1095
1096
# _LT_LINKER_BOILERPLATE
1097
# ----------------------
1098
# Check for linker boilerplate output or warnings with
1099
# the simple link test code.
1100
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1101
[ac_outfile=conftest.$ac_objext
1102
printf "$lt_simple_link_test_code" >conftest.$ac_ext
95 by pklong
Unified with UniKey 4.0
1103
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
30 by pklong
moved byteio to upper dir
1104
_lt_linker_boilerplate=`cat conftest.err`
1105
$rm conftest*
1106
])# _LT_LINKER_BOILERPLATE
1107
1108
1 by pklong
Initial revision
1109
# _LT_AC_SYS_LIBPATH_AIX
1110
# ----------------------
1111
# Links a minimal program and checks the executable
1112
# for the system default hardcoded library path. In most cases,
1113
# this is /usr/lib:/lib, but when the MPI compilers are used
1114
# the location of the communication and MPI libs are included too.
1115
# If we don't find anything, use the default library path according
1116
# to the aix ld manual.
1117
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1118
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1119
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1120
}'`
1121
# Check for a 64-bit object if we didn't find anything.
1122
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1123
}'`; fi],[])
1124
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1125
])# _LT_AC_SYS_LIBPATH_AIX
1126
1127
1128
# _LT_AC_SHELL_INIT(ARG)
1129
# ----------------------
1130
AC_DEFUN([_LT_AC_SHELL_INIT],
1131
[ifdef([AC_DIVERSION_NOTICE],
1132
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1133
	 [AC_DIVERT_PUSH(NOTICE)])
1134
$1
1135
AC_DIVERT_POP
1136
])# _LT_AC_SHELL_INIT
1137
1138
1139
# _LT_AC_PROG_ECHO_BACKSLASH
1140
# --------------------------
1141
# Add some code to the start of the generated configure script which
1142
# will find an echo command which doesn't interpret backslashes.
1143
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1144
[_LT_AC_SHELL_INIT([
1145
# Check that we are running under the correct shell.
1146
SHELL=${CONFIG_SHELL-/bin/sh}
1147
1148
case X$ECHO in
1149
X*--fallback-echo)
1150
  # Remove one level of quotation (which was required for Make).
1151
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1152
  ;;
1153
esac
1154
1155
echo=${ECHO-echo}
1156
if test "X[$]1" = X--no-reexec; then
1157
  # Discard the --no-reexec flag, and continue.
1158
  shift
1159
elif test "X[$]1" = X--fallback-echo; then
1160
  # Avoid inline document here, it may be left over
1161
  :
1162
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1163
  # Yippee, $echo works!
1164
  :
1165
else
1166
  # Restart under the correct shell.
1167
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1168
fi
1169
1170
if test "X[$]1" = X--fallback-echo; then
1171
  # used as fallback echo
1172
  shift
1173
  cat <<EOF
1174
[$]*
1175
EOF
1176
  exit 0
1177
fi
1178
1179
# The HP-UX ksh and POSIX shell print the target directory to stdout
1180
# if CDPATH is set.
30 by pklong
moved byteio to upper dir
1181
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1 by pklong
Initial revision
1182
1183
if test -z "$ECHO"; then
1184
if test "X${echo_test_string+set}" != Xset; then
1185
# find a string as large as possible, as long as the shell can cope with it
1186
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1187
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
30 by pklong
moved byteio to upper dir
1188
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1189
       echo_test_string=`eval $cmd` &&
1 by pklong
Initial revision
1190
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1191
    then
1192
      break
1193
    fi
1194
  done
1195
fi
1196
1197
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1198
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1199
   test "X$echo_testing_string" = "X$echo_test_string"; then
1200
  :
1201
else
1202
  # The Solaris, AIX, and Digital Unix default echo programs unquote
1203
  # backslashes.  This makes it impossible to quote backslashes using
1204
  #   echo "$something" | sed 's/\\/\\\\/g'
1205
  #
1206
  # So, first we look for a working echo in the user's PATH.
1207
1208
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1209
  for dir in $PATH /usr/ucb; do
1210
    IFS="$lt_save_ifs"
1211
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1212
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1213
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1214
       test "X$echo_testing_string" = "X$echo_test_string"; then
1215
      echo="$dir/echo"
1216
      break
1217
    fi
1218
  done
1219
  IFS="$lt_save_ifs"
1220
1221
  if test "X$echo" = Xecho; then
1222
    # We didn't find a better echo, so look for alternatives.
1223
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1224
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1225
       test "X$echo_testing_string" = "X$echo_test_string"; then
1226
      # This shell has a builtin print -r that does the trick.
1227
      echo='print -r'
1228
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1229
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1230
      # If we have ksh, try running configure again with it.
1231
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1232
      export ORIGINAL_CONFIG_SHELL
1233
      CONFIG_SHELL=/bin/ksh
1234
      export CONFIG_SHELL
1235
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1236
    else
1237
      # Try using printf.
1238
      echo='printf %s\n'
1239
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1240
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1241
	 test "X$echo_testing_string" = "X$echo_test_string"; then
1242
	# Cool, printf works
1243
	:
1244
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1245
	   test "X$echo_testing_string" = 'X\t' &&
1246
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1247
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1248
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1249
	export CONFIG_SHELL
1250
	SHELL="$CONFIG_SHELL"
1251
	export SHELL
1252
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1253
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1254
	   test "X$echo_testing_string" = 'X\t' &&
1255
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1256
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1257
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1258
      else
1259
	# maybe with a smaller string...
1260
	prev=:
1261
1262
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1263
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1264
	  then
1265
	    break
1266
	  fi
1267
	  prev="$cmd"
1268
	done
1269
1270
	if test "$prev" != 'sed 50q "[$]0"'; then
1271
	  echo_test_string=`eval $prev`
1272
	  export echo_test_string
1273
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1274
	else
1275
	  # Oops.  We lost completely, so just stick with echo.
1276
	  echo=echo
1277
	fi
1278
      fi
1279
    fi
1280
  fi
1281
fi
1282
fi
1283
1284
# Copy echo and quote the copy suitably for passing to libtool from
1285
# the Makefile, instead of quoting the original, which is used later.
1286
ECHO=$echo
1287
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1288
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1289
fi
1290
1291
AC_SUBST(ECHO)
1292
])])# _LT_AC_PROG_ECHO_BACKSLASH
1293
1294
1295
# _LT_AC_LOCK
1296
# -----------
1297
AC_DEFUN([_LT_AC_LOCK],
1298
[AC_ARG_ENABLE([libtool-lock],
1299
    [AC_HELP_STRING([--disable-libtool-lock],
1300
	[avoid locking (might break parallel builds)])])
1301
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1302
1303
# Some flags need to be propagated to the compiler or linker for good
1304
# libtool support.
1305
case $host in
1306
ia64-*-hpux*)
1307
  # Find out which ABI we are using.
1308
  echo 'int i;' > conftest.$ac_ext
1309
  if AC_TRY_EVAL(ac_compile); then
1310
    case `/usr/bin/file conftest.$ac_objext` in
1311
    *ELF-32*)
1312
      HPUX_IA64_MODE="32"
1313
      ;;
1314
    *ELF-64*)
1315
      HPUX_IA64_MODE="64"
1316
      ;;
1317
    esac
1318
  fi
1319
  rm -rf conftest*
1320
  ;;
1321
*-*-irix6*)
1322
  # Find out which ABI we are using.
1323
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1324
  if AC_TRY_EVAL(ac_compile); then
1325
   if test "$lt_cv_prog_gnu_ld" = yes; then
1326
    case `/usr/bin/file conftest.$ac_objext` in
1327
    *32-bit*)
1328
      LD="${LD-ld} -melf32bsmip"
1329
      ;;
1330
    *N32*)
1331
      LD="${LD-ld} -melf32bmipn32"
1332
      ;;
1333
    *64-bit*)
1334
      LD="${LD-ld} -melf64bmip"
1335
      ;;
1336
    esac
1337
   else
1338
    case `/usr/bin/file conftest.$ac_objext` in
1339
    *32-bit*)
1340
      LD="${LD-ld} -32"
1341
      ;;
1342
    *N32*)
1343
      LD="${LD-ld} -n32"
1344
      ;;
1345
    *64-bit*)
1346
      LD="${LD-ld} -64"
1347
      ;;
1348
    esac
1349
   fi
1350
  fi
1351
  rm -rf conftest*
1352
  ;;
1353
1354
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1355
  # Find out which ABI we are using.
1356
  echo 'int i;' > conftest.$ac_ext
1357
  if AC_TRY_EVAL(ac_compile); then
30 by pklong
moved byteio to upper dir
1358
    case `/usr/bin/file conftest.o` in
1 by pklong
Initial revision
1359
    *32-bit*)
1360
      case $host in
1361
        x86_64-*linux*)
1362
          LD="${LD-ld} -m elf_i386"
1363
          ;;
1364
        ppc64-*linux*|powerpc64-*linux*)
1365
          LD="${LD-ld} -m elf32ppclinux"
1366
          ;;
1367
        s390x-*linux*)
1368
          LD="${LD-ld} -m elf_s390"
1369
          ;;
1370
        sparc64-*linux*)
1371
          LD="${LD-ld} -m elf32_sparc"
1372
          ;;
1373
      esac
1374
      ;;
1375
    *64-bit*)
1376
      case $host in
1377
        x86_64-*linux*)
1378
          LD="${LD-ld} -m elf_x86_64"
1379
          ;;
1380
        ppc*-*linux*|powerpc*-*linux*)
1381
          LD="${LD-ld} -m elf64ppc"
1382
          ;;
1383
        s390*-*linux*)
1384
          LD="${LD-ld} -m elf64_s390"
1385
          ;;
1386
        sparc*-*linux*)
1387
          LD="${LD-ld} -m elf64_sparc"
1388
          ;;
1389
      esac
1390
      ;;
1391
    esac
1392
  fi
1393
  rm -rf conftest*
1394
  ;;
1395
1396
*-*-sco3.2v5*)
1397
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1398
  SAVE_CFLAGS="$CFLAGS"
1399
  CFLAGS="$CFLAGS -belf"
1400
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1401
    [AC_LANG_PUSH(C)
1402
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1403
     AC_LANG_POP])
1404
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1405
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1406
    CFLAGS="$SAVE_CFLAGS"
1407
  fi
1408
  ;;
95 by pklong
Unified with UniKey 4.0
1409
sparc*-*solaris*)
1410
  # Find out which ABI we are using.
1411
  echo 'int i;' > conftest.$ac_ext
1412
  if AC_TRY_EVAL(ac_compile); then
1413
    case `/usr/bin/file conftest.o` in
1414
    *64-bit*)
1415
      case $lt_cv_prog_gnu_ld in
1416
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1417
      *)    LD="${LD-ld} -64" ;;
1418
      esac
1419
      ;;
1420
    esac
1421
  fi
1422
  rm -rf conftest*
1423
  ;;
1424
1 by pklong
Initial revision
1425
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1426
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1427
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1428
  AC_CHECK_TOOL(AS, as, false)
1429
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1430
  ;;
1431
  ])
1432
esac
1433
1434
need_locks="$enable_libtool_lock"
1435
1436
])# _LT_AC_LOCK
1437
1438
1439
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1440
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1441
# ----------------------------------------------------------------
1442
# Check whether the given compiler option works
1443
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1444
[AC_REQUIRE([LT_AC_PROG_SED])
1445
AC_CACHE_CHECK([$1], [$2],
1446
  [$2=no
1447
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1448
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1449
   lt_compiler_flag="$3"
1450
   # Insert the option either (1) after the last *FLAGS variable, or
1451
   # (2) before a word containing "conftest.", or (3) at the end.
1452
   # Note that $ac_compile itself does not contain backslashes and begins
1453
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1454
   # The option is referenced via a variable to avoid confusing sed.
1455
   lt_compile=`echo "$ac_compile" | $SED \
30 by pklong
moved byteio to upper dir
1456
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1 by pklong
Initial revision
1457
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1458
   -e 's:$: $lt_compiler_flag:'`
1459
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1460
   (eval "$lt_compile" 2>conftest.err)
1461
   ac_status=$?
1462
   cat conftest.err >&AS_MESSAGE_LOG_FD
1463
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1464
   if (exit $ac_status) && test -s "$ac_outfile"; then
1465
     # The compiler can only warn and ignore the option if not recognized
30 by pklong
moved byteio to upper dir
1466
     # So say no if there are warnings other than the usual output.
95 by pklong
Unified with UniKey 4.0
1467
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1468
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1469
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1 by pklong
Initial revision
1470
       $2=yes
1471
     fi
1472
   fi
1473
   $rm conftest*
1474
])
1475
1476
if test x"[$]$2" = xyes; then
1477
    ifelse([$5], , :, [$5])
1478
else
1479
    ifelse([$6], , :, [$6])
1480
fi
1481
])# AC_LIBTOOL_COMPILER_OPTION
1482
1483
1484
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1485
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1486
# ------------------------------------------------------------
1487
# Check whether the given compiler option works
1488
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1489
[AC_CACHE_CHECK([$1], [$2],
1490
  [$2=no
1491
   save_LDFLAGS="$LDFLAGS"
1492
   LDFLAGS="$LDFLAGS $3"
1493
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1494
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
30 by pklong
moved byteio to upper dir
1495
     # The linker can only warn and ignore the option if not recognized
1 by pklong
Initial revision
1496
     # So say no if there are warnings
1497
     if test -s conftest.err; then
1498
       # Append any errors to the config.log.
1499
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
95 by pklong
Unified with UniKey 4.0
1500
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1501
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
30 by pklong
moved byteio to upper dir
1502
       if diff conftest.exp conftest.er2 >/dev/null; then
1503
         $2=yes
1504
       fi
1 by pklong
Initial revision
1505
     else
1506
       $2=yes
1507
     fi
1508
   fi
1509
   $rm conftest*
1510
   LDFLAGS="$save_LDFLAGS"
1511
])
1512
1513
if test x"[$]$2" = xyes; then
1514
    ifelse([$4], , :, [$4])
1515
else
1516
    ifelse([$5], , :, [$5])
1517
fi
1518
])# AC_LIBTOOL_LINKER_OPTION
1519
1520
1521
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1522
# --------------------------
1523
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1524
[# find the maximum length of command line arguments
1525
AC_MSG_CHECKING([the maximum length of command line arguments])
1526
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1527
  i=0
21 by pklong
New ukengine
1528
  teststring="ABCD"
1 by pklong
Initial revision
1529
1530
  case $build_os in
1531
  msdosdjgpp*)
1532
    # On DJGPP, this test can blow up pretty badly due to problems in libc
1533
    # (any single argument exceeding 2000 bytes causes a buffer overrun
1534
    # during glob expansion).  Even if it were fixed, the result of this
1535
    # check would be larger than it should be.
1536
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1537
    ;;
1538
1539
  gnu*)
1540
    # Under GNU Hurd, this test is not required because there is
1541
    # no limit to the length of command line arguments.
1542
    # Libtool will interpret -1 as no limit whatsoever
1543
    lt_cv_sys_max_cmd_len=-1;
1544
    ;;
1545
1546
  cygwin* | mingw*)
1547
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1548
    # about 5 minutes as the teststring grows exponentially.
1549
    # Worse, since 9x/ME are not pre-emptively multitasking,
1550
    # you end up with a "frozen" computer, even though with patience
1551
    # the test eventually succeeds (with a max line length of 256k).
1552
    # Instead, let's just punt: use the minimum linelength reported by
1553
    # all of the supported platforms: 8192 (on NT/2K/XP).
1554
    lt_cv_sys_max_cmd_len=8192;
1555
    ;;
1556
1557
  amigaos*)
1558
    # On AmigaOS with pdksh, this test takes hours, literally.
1559
    # So we just punt and use a minimum line length of 8192.
1560
    lt_cv_sys_max_cmd_len=8192;
1561
    ;;
1562
30 by pklong
moved byteio to upper dir
1563
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1564
    # This has been around since 386BSD, at least.  Likely further.
1565
    if test -x /sbin/sysctl; then
1566
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1567
    elif test -x /usr/sbin/sysctl; then
1568
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1569
    else
1570
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1571
    fi
1572
    # And add a safety zone
1573
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1574
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1575
    ;;
95 by pklong
Unified with UniKey 4.0
1576
1577
  interix*)
1578
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1579
    lt_cv_sys_max_cmd_len=196608
1580
    ;;
1581
30 by pklong
moved byteio to upper dir
1582
  osf*)
1583
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1584
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1585
    # nice to cause kernel panics so lets avoid the loop below.
1586
    # First set a reasonable default.
1587
    lt_cv_sys_max_cmd_len=16384
1588
    #
1589
    if test -x /sbin/sysconfig; then
1590
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1591
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1592
      esac
1593
    fi
1594
    ;;
95 by pklong
Unified with UniKey 4.0
1595
  sco3.2v5*)
1596
    lt_cv_sys_max_cmd_len=102400
1597
    ;;
1598
  sysv5* | sco5v6* | sysv4.2uw2*)
1599
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1600
    if test -n "$kargmax"; then
1601
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1602
    else
1603
      lt_cv_sys_max_cmd_len=32768
1604
    fi
1605
    ;;
30 by pklong
moved byteio to upper dir
1606
  *)
1 by pklong
Initial revision
1607
    # If test is not a shell built-in, we'll probably end up computing a
1608
    # maximum length that is only half of the actual maximum length, but
1609
    # we can't tell.
30 by pklong
moved byteio to upper dir
1610
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1611
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
21 by pklong
New ukengine
1612
	       = "XX$teststring") >/dev/null 2>&1 &&
1613
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
1 by pklong
Initial revision
1614
	    lt_cv_sys_max_cmd_len=$new_result &&
1615
	    test $i != 17 # 1/2 MB should be enough
1616
    do
1617
      i=`expr $i + 1`
21 by pklong
New ukengine
1618
      teststring=$teststring$teststring
1 by pklong
Initial revision
1619
    done
21 by pklong
New ukengine
1620
    teststring=
1 by pklong
Initial revision
1621
    # Add a significant safety factor because C++ compilers can tack on massive
1622
    # amounts of additional arguments before passing them to the linker.
1623
    # It appears as though 1/2 is a usable value.
1624
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1625
    ;;
1626
  esac
1627
])
1628
if test -n $lt_cv_sys_max_cmd_len ; then
1629
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1630
else
1631
  AC_MSG_RESULT(none)
1632
fi
1633
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1634
1635
1636
# _LT_AC_CHECK_DLFCN
95 by pklong
Unified with UniKey 4.0
1637
# ------------------
1 by pklong
Initial revision
1638
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1639
[AC_CHECK_HEADERS(dlfcn.h)dnl
1640
])# _LT_AC_CHECK_DLFCN
1641
1642
1643
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1644
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
95 by pklong
Unified with UniKey 4.0
1645
# ---------------------------------------------------------------------
1 by pklong
Initial revision
1646
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1647
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1648
if test "$cross_compiling" = yes; then :
1649
  [$4]
1650
else
1651
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1652
  lt_status=$lt_dlunknown
1653
  cat > conftest.$ac_ext <<EOF
1654
[#line __oline__ "configure"
1655
#include "confdefs.h"
1656
1657
#if HAVE_DLFCN_H
1658
#include <dlfcn.h>
1659
#endif
1660
1661
#include <stdio.h>
1662
1663
#ifdef RTLD_GLOBAL
1664
#  define LT_DLGLOBAL		RTLD_GLOBAL
1665
#else
1666
#  ifdef DL_GLOBAL
1667
#    define LT_DLGLOBAL		DL_GLOBAL
1668
#  else
1669
#    define LT_DLGLOBAL		0
1670
#  endif
1671
#endif
1672
1673
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1674
   find out it does not work in some platform. */
1675
#ifndef LT_DLLAZY_OR_NOW
1676
#  ifdef RTLD_LAZY
1677
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1678
#  else
1679
#    ifdef DL_LAZY
1680
#      define LT_DLLAZY_OR_NOW		DL_LAZY
1681
#    else
1682
#      ifdef RTLD_NOW
1683
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1684
#      else
1685
#        ifdef DL_NOW
1686
#          define LT_DLLAZY_OR_NOW	DL_NOW
1687
#        else
1688
#          define LT_DLLAZY_OR_NOW	0
1689
#        endif
1690
#      endif
1691
#    endif
1692
#  endif
1693
#endif
1694
1695
#ifdef __cplusplus
1696
extern "C" void exit (int);
1697
#endif
1698
1699
void fnord() { int i=42;}
1700
int main ()
1701
{
1702
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1703
  int status = $lt_dlunknown;
1704
1705
  if (self)
1706
    {
1707
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1708
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1709
      /* dlclose (self); */
1710
    }
95 by pklong
Unified with UniKey 4.0
1711
  else
1712
    puts (dlerror ());
1 by pklong
Initial revision
1713
1714
    exit (status);
1715
}]
1716
EOF
1717
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
30 by pklong
moved byteio to upper dir
1718
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1 by pklong
Initial revision
1719
    lt_status=$?
1720
    case x$lt_status in
1721
      x$lt_dlno_uscore) $1 ;;
1722
      x$lt_dlneed_uscore) $2 ;;
95 by pklong
Unified with UniKey 4.0
1723
      x$lt_dlunknown|x*) $3 ;;
1 by pklong
Initial revision
1724
    esac
1725
  else :
1726
    # compilation failed
1727
    $3
1728
  fi
1729
fi
1730
rm -fr conftest*
1731
])# _LT_AC_TRY_DLOPEN_SELF
1732
1733
1734
# AC_LIBTOOL_DLOPEN_SELF
95 by pklong
Unified with UniKey 4.0
1735
# ----------------------
1 by pklong
Initial revision
1736
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1737
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1738
if test "x$enable_dlopen" != xyes; then
1739
  enable_dlopen=unknown
1740
  enable_dlopen_self=unknown
1741
  enable_dlopen_self_static=unknown
1742
else
1743
  lt_cv_dlopen=no
1744
  lt_cv_dlopen_libs=
1745
1746
  case $host_os in
1747
  beos*)
1748
    lt_cv_dlopen="load_add_on"
1749
    lt_cv_dlopen_libs=
1750
    lt_cv_dlopen_self=yes
1751
    ;;
1752
1753
  mingw* | pw32*)
1754
    lt_cv_dlopen="LoadLibrary"
1755
    lt_cv_dlopen_libs=
1756
   ;;
1757
1758
  cygwin*)
1759
    lt_cv_dlopen="dlopen"
1760
    lt_cv_dlopen_libs=
1761
   ;;
1762
1763
  darwin*)
1764
  # if libdl is installed we need to link against it
1765
    AC_CHECK_LIB([dl], [dlopen],
1766
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1767
    lt_cv_dlopen="dyld"
1768
    lt_cv_dlopen_libs=
1769
    lt_cv_dlopen_self=yes
1770
    ])
1771
   ;;
1772
1773
  *)
1774
    AC_CHECK_FUNC([shl_load],
1775
	  [lt_cv_dlopen="shl_load"],
1776
      [AC_CHECK_LIB([dld], [shl_load],
1777
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1778
	[AC_CHECK_FUNC([dlopen],
1779
	      [lt_cv_dlopen="dlopen"],
1780
	  [AC_CHECK_LIB([dl], [dlopen],
1781
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1782
	    [AC_CHECK_LIB([svld], [dlopen],
1783
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1784
	      [AC_CHECK_LIB([dld], [dld_link],
1785
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1786
	      ])
1787
	    ])
1788
	  ])
1789
	])
1790
      ])
1791
    ;;
1792
  esac
1793
1794
  if test "x$lt_cv_dlopen" != xno; then
1795
    enable_dlopen=yes
1796
  else
1797
    enable_dlopen=no
1798
  fi
1799
1800
  case $lt_cv_dlopen in
1801
  dlopen)
1802
    save_CPPFLAGS="$CPPFLAGS"
1803
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1804
1805
    save_LDFLAGS="$LDFLAGS"
95 by pklong
Unified with UniKey 4.0
1806
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1 by pklong
Initial revision
1807
1808
    save_LIBS="$LIBS"
1809
    LIBS="$lt_cv_dlopen_libs $LIBS"
1810
1811
    AC_CACHE_CHECK([whether a program can dlopen itself],
1812
	  lt_cv_dlopen_self, [dnl
1813
	  _LT_AC_TRY_DLOPEN_SELF(
1814
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1815
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1816
    ])
1817
1818
    if test "x$lt_cv_dlopen_self" = xyes; then
95 by pklong
Unified with UniKey 4.0
1819
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1 by pklong
Initial revision
1820
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1821
    	  lt_cv_dlopen_self_static, [dnl
1822
	  _LT_AC_TRY_DLOPEN_SELF(
1823
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1824
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1825
      ])
1826
    fi
1827
1828
    CPPFLAGS="$save_CPPFLAGS"
1829
    LDFLAGS="$save_LDFLAGS"
1830
    LIBS="$save_LIBS"
1831
    ;;
1832
  esac
1833
1834
  case $lt_cv_dlopen_self in
1835
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1836
  *) enable_dlopen_self=unknown ;;
1837
  esac
1838
1839
  case $lt_cv_dlopen_self_static in
1840
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1841
  *) enable_dlopen_self_static=unknown ;;
1842
  esac
1843
fi
1844
])# AC_LIBTOOL_DLOPEN_SELF
1845
1846
1847
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1848
# ---------------------------------
1849
# Check to see if options -c and -o are simultaneously supported by compiler
1850
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1851
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1852
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1853
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1854
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1855
   $rm -r conftest 2>/dev/null
1856
   mkdir conftest
1857
   cd conftest
1858
   mkdir out
1859
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1860
1861
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1862
   # Insert the option either (1) after the last *FLAGS variable, or
1863
   # (2) before a word containing "conftest.", or (3) at the end.
1864
   # Note that $ac_compile itself does not contain backslashes and begins
1865
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1866
   lt_compile=`echo "$ac_compile" | $SED \
30 by pklong
moved byteio to upper dir
1867
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1 by pklong
Initial revision
1868
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1869
   -e 's:$: $lt_compiler_flag:'`
1870
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1871
   (eval "$lt_compile" 2>out/conftest.err)
1872
   ac_status=$?
1873
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1874
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1875
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1876
   then
1877
     # The compiler can only warn and ignore the option if not recognized
1878
     # So say no if there are warnings
95 by pklong
Unified with UniKey 4.0
1879
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1880
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1881
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1 by pklong
Initial revision
1882
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1883
     fi
1884
   fi
30 by pklong
moved byteio to upper dir
1885
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1 by pklong
Initial revision
1886
   $rm conftest*
1887
   # SGI C++ compiler will create directory out/ii_files/ for
1888
   # template instantiation
1889
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1890
   $rm out/* && rmdir out
1891
   cd ..
1892
   rmdir conftest
1893
   $rm conftest*
1894
])
1895
])# AC_LIBTOOL_PROG_CC_C_O
1896
1897
1898
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1899
# -----------------------------------------
1900
# Check to see if we can do hard links to lock some files if needed
1901
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1902
[AC_REQUIRE([_LT_AC_LOCK])dnl
1903
1904
hard_links="nottested"
1905
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1906
  # do not overwrite the value of need_locks provided by the user
1907
  AC_MSG_CHECKING([if we can lock with hard links])
1908
  hard_links=yes
1909
  $rm conftest*
1910
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1911
  touch conftest.a
1912
  ln conftest.a conftest.b 2>&5 || hard_links=no
1913
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1914
  AC_MSG_RESULT([$hard_links])
1915
  if test "$hard_links" = no; then
1916
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1917
    need_locks=warn
1918
  fi
1919
else
1920
  need_locks=no
1921
fi
1922
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1923
1924
1925
# AC_LIBTOOL_OBJDIR
1926
# -----------------
1927
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1928
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1929
[rm -f .libs 2>/dev/null
1930
mkdir .libs 2>/dev/null
1931
if test -d .libs; then
1932
  lt_cv_objdir=.libs
1933
else
1934
  # MS-DOS does not allow filenames that begin with a dot.
1935
  lt_cv_objdir=_libs
1936
fi
1937
rmdir .libs 2>/dev/null])
1938
objdir=$lt_cv_objdir
1939
])# AC_LIBTOOL_OBJDIR
1940
1941
1942
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1943
# ----------------------------------------------
1944
# Check hardcoding attributes.
1945
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1946
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1947
_LT_AC_TAGVAR(hardcode_action, $1)=
1948
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
30 by pklong
moved byteio to upper dir
1949
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1950
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1 by pklong
Initial revision
1951
1952
  # We can hardcode non-existant directories.
1953
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1954
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1955
     # have to relink, otherwise we might link with an installed library
1956
     # when we should be linking with a yet-to-be-installed one
1957
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1958
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1959
    # Linking always hardcodes the temporary library directory.
1960
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1961
  else
1962
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1963
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1964
  fi
1965
else
1966
  # We cannot hardcode anything, or else we can only hardcode existing
1967
  # directories.
1968
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1969
fi
1970
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1971
1972
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1973
  # Fast installation is not supported
1974
  enable_fast_install=no
1975
elif test "$shlibpath_overrides_runpath" = yes ||
1976
     test "$enable_shared" = no; then
1977
  # Fast installation is not necessary
1978
  enable_fast_install=needless
1979
fi
1980
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1981
1982
1983
# AC_LIBTOOL_SYS_LIB_STRIP
1984
# ------------------------
1985
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1986
[striplib=
1987
old_striplib=
1988
AC_MSG_CHECKING([whether stripping libraries is possible])
1989
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1990
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1991
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1992
  AC_MSG_RESULT([yes])
1993
else
1994
# FIXME - insert some real tests, host_os isn't really good enough
1995
  case $host_os in
1996
   darwin*)
1997
       if test -n "$STRIP" ; then
1998
         striplib="$STRIP -x"
1999
         AC_MSG_RESULT([yes])
2000
       else
2001
  AC_MSG_RESULT([no])
2002
fi
2003
       ;;
2004
   *)
2005
  AC_MSG_RESULT([no])
2006
    ;;
2007
  esac
2008
fi
2009
])# AC_LIBTOOL_SYS_LIB_STRIP
2010
2011
2012
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2013
# -----------------------------
2014
# PORTME Fill in your ld.so characteristics
2015
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2016
[AC_MSG_CHECKING([dynamic linker characteristics])
2017
library_names_spec=
2018
libname_spec='lib$name'
2019
soname_spec=
21 by pklong
New ukengine
2020
shrext_cmds=".so"
1 by pklong
Initial revision
2021
postinstall_cmds=
2022
postuninstall_cmds=
2023
finish_cmds=
2024
finish_eval=
2025
shlibpath_var=
2026
shlibpath_overrides_runpath=unknown
2027
version_type=none
2028
dynamic_linker="$host_os ld.so"
2029
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2030
if test "$GCC" = yes; then
2031
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2032
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2033
    # if the path contains ";" then we assume it to be the separator
2034
    # otherwise default to the standard path separator (i.e. ":") - it is
2035
    # assumed that no part of a normal pathname contains ";" but that should
2036
    # okay in the real world where ";" in dirpaths is itself problematic.
2037
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2038
  else
2039
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2040
  fi
2041
else
2042
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2043
fi
2044
need_lib_prefix=unknown
2045
hardcode_into_libs=no
2046
2047
# when you set need_version to no, make sure it does not cause -set_version
2048
# flags to be left without arguments
2049
need_version=unknown
2050
2051
case $host_os in
2052
aix3*)
2053
  version_type=linux
2054
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2055
  shlibpath_var=LIBPATH
2056
2057
  # AIX 3 has no versioning support, so we append a major version to the name.
2058
  soname_spec='${libname}${release}${shared_ext}$major'
2059
  ;;
2060
2061
aix4* | aix5*)
2062
  version_type=linux
2063
  need_lib_prefix=no
2064
  need_version=no
2065
  hardcode_into_libs=yes
2066
  if test "$host_cpu" = ia64; then
2067
    # AIX 5 supports IA64
2068
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2069
    shlibpath_var=LD_LIBRARY_PATH
2070
  else
2071
    # With GCC up to 2.95.x, collect2 would create an import file
2072
    # for dependence libraries.  The import file would start with
2073
    # the line `#! .'.  This would cause the generated library to
2074
    # depend on `.', always an invalid library.  This was fixed in
2075
    # development snapshots of GCC prior to 3.0.
2076
    case $host_os in
2077
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2078
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2079
	   echo ' yes '
2080
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2081
	:
2082
      else
2083
	can_build_shared=no
2084
      fi
2085
      ;;
2086
    esac
2087
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2088
    # soname into executable. Probably we can add versioning support to
2089
    # collect2, so additional links can be useful in future.
2090
    if test "$aix_use_runtimelinking" = yes; then
2091
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2092
      # instead of lib<name>.a to let people know that these are not
2093
      # typical AIX shared libraries.
2094
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2095
    else
2096
      # We preserve .a as extension for shared libraries through AIX4.2
2097
      # and later when we are not doing run time linking.
2098
      library_names_spec='${libname}${release}.a $libname.a'
2099
      soname_spec='${libname}${release}${shared_ext}$major'
2100
    fi
2101
    shlibpath_var=LIBPATH
2102
  fi
2103
  ;;
2104
2105
amigaos*)
2106
  library_names_spec='$libname.ixlibrary $libname.a'
2107
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2108
  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'
2109
  ;;
2110
2111
beos*)
2112
  library_names_spec='${libname}${shared_ext}'
2113
  dynamic_linker="$host_os ld.so"
2114
  shlibpath_var=LIBRARY_PATH
2115
  ;;
2116
30 by pklong
moved byteio to upper dir
2117
bsdi[[45]]*)
1 by pklong
Initial revision
2118
  version_type=linux
2119
  need_version=no
2120
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2121
  soname_spec='${libname}${release}${shared_ext}$major'
2122
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2123
  shlibpath_var=LD_LIBRARY_PATH
2124
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2125
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2126
  # the default ld.so.conf also contains /usr/contrib/lib and
2127
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2128
  # libtool to hard-code these into programs
2129
  ;;
2130
2131
cygwin* | mingw* | pw32*)
2132
  version_type=windows
21 by pklong
New ukengine
2133
  shrext_cmds=".dll"
1 by pklong
Initial revision
2134
  need_version=no
2135
  need_lib_prefix=no
2136
2137
  case $GCC,$host_os in
2138
  yes,cygwin* | yes,mingw* | yes,pw32*)
2139
    library_names_spec='$libname.dll.a'
2140
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2141
    postinstall_cmds='base_file=`basename \${file}`~
2142
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2143
      dldir=$destdir/`dirname \$dlpath`~
2144
      test -d \$dldir || mkdir -p \$dldir~
30 by pklong
moved byteio to upper dir
2145
      $install_prog $dir/$dlname \$dldir/$dlname~
2146
      chmod a+x \$dldir/$dlname'
1 by pklong
Initial revision
2147
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2148
      dlpath=$dir/\$dldll~
2149
       $rm \$dlpath'
2150
    shlibpath_overrides_runpath=yes
2151
2152
    case $host_os in
2153
    cygwin*)
2154
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2155
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2156
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2157
      ;;
2158
    mingw*)
2159
      # MinGW DLLs use traditional 'lib' prefix
2160
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2161
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2162
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2163
        # It is most probably a Windows format PATH printed by
2164
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2165
        # path with ; separators, and with drive letters. We can handle the
2166
        # drive letters (cygwin fileutils understands them), so leave them,
2167
        # especially as we might pass files found there to a mingw objdump,
2168
        # which wouldn't understand a cygwinified path. Ahh.
2169
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2170
      else
2171
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2172
      fi
2173
      ;;
2174
    pw32*)
2175
      # pw32 DLLs use 'pw' prefix rather than 'lib'
30 by pklong
moved byteio to upper dir
2176
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1 by pklong
Initial revision
2177
      ;;
2178
    esac
2179
    ;;
2180
2181
  *)
2182
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2183
    ;;
2184
  esac
2185
  dynamic_linker='Win32 ld.exe'
2186
  # FIXME: first we should search . and the directory the executable is in
2187
  shlibpath_var=PATH
2188
  ;;
2189
2190
darwin* | rhapsody*)
2191
  dynamic_linker="$host_os dyld"
2192
  version_type=darwin
2193
  need_lib_prefix=no
2194
  need_version=no
2195
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2196
  soname_spec='${libname}${release}${major}$shared_ext'
2197
  shlibpath_overrides_runpath=yes
2198
  shlibpath_var=DYLD_LIBRARY_PATH
30 by pklong
moved byteio to upper dir
2199
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1 by pklong
Initial revision
2200
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2201
  if test "$GCC" = yes; then
2202
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2203
  else
2204
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2205
  fi
2206
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2207
  ;;
2208
2209
dgux*)
2210
  version_type=linux
2211
  need_lib_prefix=no
2212
  need_version=no
2213
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2214
  soname_spec='${libname}${release}${shared_ext}$major'
2215
  shlibpath_var=LD_LIBRARY_PATH
2216
  ;;
2217
2218
freebsd1*)
2219
  dynamic_linker=no
2220
  ;;
2221
30 by pklong
moved byteio to upper dir
2222
freebsd* | dragonfly*)
2223
  # DragonFly does not have aout.  When/if they implement a new
2224
  # versioning mechanism, adjust this.
2225
  if test -x /usr/bin/objformat; then
2226
    objformat=`/usr/bin/objformat`
2227
  else
2228
    case $host_os in
2229
    freebsd[[123]]*) objformat=aout ;;
2230
    *) objformat=elf ;;
2231
    esac
2232
  fi
1 by pklong
Initial revision
2233
  version_type=freebsd-$objformat
2234
  case $version_type in
2235
    freebsd-elf*)
2236
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2237
      need_version=no
2238
      need_lib_prefix=no
2239
      ;;
2240
    freebsd-*)
2241
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2242
      need_version=yes
2243
      ;;
2244
  esac
2245
  shlibpath_var=LD_LIBRARY_PATH
2246
  case $host_os in
2247
  freebsd2*)
2248
    shlibpath_overrides_runpath=yes
2249
    ;;
30 by pklong
moved byteio to upper dir
2250
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1 by pklong
Initial revision
2251
    shlibpath_overrides_runpath=yes
2252
    hardcode_into_libs=yes
2253
    ;;
95 by pklong
Unified with UniKey 4.0
2254
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2255
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1 by pklong
Initial revision
2256
    shlibpath_overrides_runpath=no
2257
    hardcode_into_libs=yes
2258
    ;;
95 by pklong
Unified with UniKey 4.0
2259
  freebsd*) # from 4.6 on
2260
    shlibpath_overrides_runpath=yes
2261
    hardcode_into_libs=yes
2262
    ;;
1 by pklong
Initial revision
2263
  esac
2264
  ;;
2265
2266
gnu*)
2267
  version_type=linux
2268
  need_lib_prefix=no
2269
  need_version=no
2270
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2271
  soname_spec='${libname}${release}${shared_ext}$major'
2272
  shlibpath_var=LD_LIBRARY_PATH
2273
  hardcode_into_libs=yes
2274
  ;;
2275
2276
hpux9* | hpux10* | hpux11*)
2277
  # Give a soname corresponding to the major version so that dld.sl refuses to
2278
  # link against other versions.
2279
  version_type=sunos
2280
  need_lib_prefix=no
2281
  need_version=no
30 by pklong
moved byteio to upper dir
2282
  case $host_cpu in
1 by pklong
Initial revision
2283
  ia64*)
21 by pklong
New ukengine
2284
    shrext_cmds='.so'
1 by pklong
Initial revision
2285
    hardcode_into_libs=yes
2286
    dynamic_linker="$host_os dld.so"
2287
    shlibpath_var=LD_LIBRARY_PATH
2288
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2289
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2290
    soname_spec='${libname}${release}${shared_ext}$major'
2291
    if test "X$HPUX_IA64_MODE" = X32; then
2292
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2293
    else
2294
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2295
    fi
2296
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2297
    ;;
2298
   hppa*64*)
21 by pklong
New ukengine
2299
     shrext_cmds='.sl'
1 by pklong
Initial revision
2300
     hardcode_into_libs=yes
2301
     dynamic_linker="$host_os dld.sl"
2302
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2303
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2304
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2305
     soname_spec='${libname}${release}${shared_ext}$major'
2306
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2307
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2308
     ;;
2309
   *)
21 by pklong
New ukengine
2310
    shrext_cmds='.sl'
1 by pklong
Initial revision
2311
    dynamic_linker="$host_os dld.sl"
2312
    shlibpath_var=SHLIB_PATH
2313
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2314
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2315
    soname_spec='${libname}${release}${shared_ext}$major'
2316
    ;;
2317
  esac
2318
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2319
  postinstall_cmds='chmod 555 $lib'
2320
  ;;
2321
95 by pklong
Unified with UniKey 4.0
2322
interix3*)
2323
  version_type=linux
2324
  need_lib_prefix=no
2325
  need_version=no
2326
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2327
  soname_spec='${libname}${release}${shared_ext}$major'
2328
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2329
  shlibpath_var=LD_LIBRARY_PATH
2330
  shlibpath_overrides_runpath=no
2331
  hardcode_into_libs=yes
2332
  ;;
2333
1 by pklong
Initial revision
2334
irix5* | irix6* | nonstopux*)
2335
  case $host_os in
2336
    nonstopux*) version_type=nonstopux ;;
2337
    *)
2338
	if test "$lt_cv_prog_gnu_ld" = yes; then
2339
		version_type=linux
2340
	else
2341
		version_type=irix
2342
	fi ;;
2343
  esac
2344
  need_lib_prefix=no
2345
  need_version=no
2346
  soname_spec='${libname}${release}${shared_ext}$major'
2347
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2348
  case $host_os in
2349
  irix5* | nonstopux*)
2350
    libsuff= shlibsuff=
2351
    ;;
2352
  *)
2353
    case $LD in # libtool.m4 will add one of these switches to LD
2354
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2355
      libsuff= shlibsuff= libmagic=32-bit;;
2356
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2357
      libsuff=32 shlibsuff=N32 libmagic=N32;;
2358
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2359
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2360
    *) libsuff= shlibsuff= libmagic=never-match;;
2361
    esac
2362
    ;;
2363
  esac
2364
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2365
  shlibpath_overrides_runpath=no
2366
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2367
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2368
  hardcode_into_libs=yes
2369
  ;;
2370
2371
# No shared lib support for Linux oldld, aout, or coff.
2372
linux*oldld* | linux*aout* | linux*coff*)
2373
  dynamic_linker=no
2374
  ;;
2375
2376
# This must be Linux ELF.
95 by pklong
Unified with UniKey 4.0
2377
linux* | k*bsd*-gnu)
1 by pklong
Initial revision
2378
  version_type=linux
2379
  need_lib_prefix=no
2380
  need_version=no
2381
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2382
  soname_spec='${libname}${release}${shared_ext}$major'
2383
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2384
  shlibpath_var=LD_LIBRARY_PATH
2385
  shlibpath_overrides_runpath=no
2386
  # This implies no fast_install, which is unacceptable.
2387
  # Some rework will be needed to allow for fast_install
2388
  # before this can be enabled.
2389
  hardcode_into_libs=yes
2390
2391
  # Append ld.so.conf contents to the search path
2392
  if test -f /etc/ld.so.conf; then
30 by pklong
moved byteio to upper dir
2393
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
21 by pklong
New ukengine
2394
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1 by pklong
Initial revision
2395
  fi
2396
2397
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2398
  # powerpc, because MkLinux only supported shared libraries with the
2399
  # GNU dynamic linker.  Since this was broken with cross compilers,
2400
  # most powerpc-linux boxes support dynamic linking these days and
2401
  # people can always --disable-shared, the test was removed, and we
2402
  # assume the GNU/Linux dynamic linker is in use.
2403
  dynamic_linker='GNU/Linux ld.so'
2404
  ;;
2405
21 by pklong
New ukengine
2406
netbsdelf*-gnu)
2407
  version_type=linux
2408
  need_lib_prefix=no
2409
  need_version=no
2410
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2411
  soname_spec='${libname}${release}${shared_ext}$major'
2412
  shlibpath_var=LD_LIBRARY_PATH
2413
  shlibpath_overrides_runpath=no
2414
  hardcode_into_libs=yes
2415
  dynamic_linker='NetBSD ld.elf_so'
2416
  ;;
2417
1 by pklong
Initial revision
2418
netbsd*)
2419
  version_type=sunos
2420
  need_lib_prefix=no
2421
  need_version=no
2422
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2423
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2424
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2425
    dynamic_linker='NetBSD (a.out) ld.so'
2426
  else
13 by pklong
fixes to be able to build in FreeBSD
2427
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1 by pklong
Initial revision
2428
    soname_spec='${libname}${release}${shared_ext}$major'
2429
    dynamic_linker='NetBSD ld.elf_so'
2430
  fi
2431
  shlibpath_var=LD_LIBRARY_PATH
2432
  shlibpath_overrides_runpath=yes
2433
  hardcode_into_libs=yes
2434
  ;;
2435
2436
newsos6)
2437
  version_type=linux
2438
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2439
  shlibpath_var=LD_LIBRARY_PATH
2440
  shlibpath_overrides_runpath=yes
2441
  ;;
2442
2443
nto-qnx*)
2444
  version_type=linux
2445
  need_lib_prefix=no
2446
  need_version=no
2447
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2448
  soname_spec='${libname}${release}${shared_ext}$major'
2449
  shlibpath_var=LD_LIBRARY_PATH
2450
  shlibpath_overrides_runpath=yes
2451
  ;;
2452
2453
openbsd*)
2454
  version_type=sunos
95 by pklong
Unified with UniKey 4.0
2455
  sys_lib_dlsearch_path_spec="/usr/lib"
1 by pklong
Initial revision
2456
  need_lib_prefix=no
30 by pklong
moved byteio to upper dir
2457
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2458
  case $host_os in
2459
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2460
    *)                         need_version=no  ;;
2461
  esac
1 by pklong
Initial revision
2462
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2463
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2464
  shlibpath_var=LD_LIBRARY_PATH
2465
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2466
    case $host_os in
2467
      openbsd2.[[89]] | openbsd2.[[89]].*)
2468
	shlibpath_overrides_runpath=no
2469
	;;
2470
      *)
2471
	shlibpath_overrides_runpath=yes
2472
	;;
2473
      esac
2474
  else
2475
    shlibpath_overrides_runpath=yes
2476
  fi
2477
  ;;
2478
2479
os2*)
2480
  libname_spec='$name'
21 by pklong
New ukengine
2481
  shrext_cmds=".dll"
1 by pklong
Initial revision
2482
  need_lib_prefix=no
2483
  library_names_spec='$libname${shared_ext} $libname.a'
2484
  dynamic_linker='OS/2 ld.exe'
2485
  shlibpath_var=LIBPATH
2486
  ;;
2487
2488
osf3* | osf4* | osf5*)
2489
  version_type=osf
2490
  need_lib_prefix=no
2491
  need_version=no
2492
  soname_spec='${libname}${release}${shared_ext}$major'
2493
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2494
  shlibpath_var=LD_LIBRARY_PATH
2495
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2496
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2497
  ;;
2498
2499
solaris*)
2500
  version_type=linux
2501
  need_lib_prefix=no
2502
  need_version=no
2503
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2504
  soname_spec='${libname}${release}${shared_ext}$major'
2505
  shlibpath_var=LD_LIBRARY_PATH
2506
  shlibpath_overrides_runpath=yes
2507
  hardcode_into_libs=yes
2508
  # ldd complains unless libraries are executable
2509
  postinstall_cmds='chmod +x $lib'
2510
  ;;
2511
2512
sunos4*)
2513
  version_type=sunos
2514
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2515
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2516
  shlibpath_var=LD_LIBRARY_PATH
2517
  shlibpath_overrides_runpath=yes
2518
  if test "$with_gnu_ld" = yes; then
2519
    need_lib_prefix=no
2520
  fi
2521
  need_version=yes
2522
  ;;
2523
95 by pklong
Unified with UniKey 4.0
2524
sysv4 | sysv4.3*)
1 by pklong
Initial revision
2525
  version_type=linux
2526
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527
  soname_spec='${libname}${release}${shared_ext}$major'
2528
  shlibpath_var=LD_LIBRARY_PATH
2529
  case $host_vendor in
2530
    sni)
2531
      shlibpath_overrides_runpath=no
2532
      need_lib_prefix=no
2533
      export_dynamic_flag_spec='${wl}-Blargedynsym'
2534
      runpath_var=LD_RUN_PATH
2535
      ;;
2536
    siemens)
2537
      need_lib_prefix=no
2538
      ;;
2539
    motorola)
2540
      need_lib_prefix=no
2541
      need_version=no
2542
      shlibpath_overrides_runpath=no
2543
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2544
      ;;
2545
  esac
2546
  ;;
2547
2548
sysv4*MP*)
2549
  if test -d /usr/nec ;then
2550
    version_type=linux
2551
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2552
    soname_spec='$libname${shared_ext}.$major'
2553
    shlibpath_var=LD_LIBRARY_PATH
2554
  fi
2555
  ;;
2556
95 by pklong
Unified with UniKey 4.0
2557
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2558
  version_type=freebsd-elf
2559
  need_lib_prefix=no
2560
  need_version=no
2561
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2562
  soname_spec='${libname}${release}${shared_ext}$major'
2563
  shlibpath_var=LD_LIBRARY_PATH
2564
  hardcode_into_libs=yes
2565
  if test "$with_gnu_ld" = yes; then
2566
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2567
    shlibpath_overrides_runpath=no
2568
  else
2569
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2570
    shlibpath_overrides_runpath=yes
2571
    case $host_os in
2572
      sco3.2v5*)
2573
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2574
	;;
2575
    esac
2576
  fi
2577
  sys_lib_dlsearch_path_spec='/usr/lib'
2578
  ;;
2579
1 by pklong
Initial revision
2580
uts4*)
2581
  version_type=linux
2582
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2583
  soname_spec='${libname}${release}${shared_ext}$major'
2584
  shlibpath_var=LD_LIBRARY_PATH
2585
  ;;
2586
2587
*)
2588
  dynamic_linker=no
2589
  ;;
2590
esac
2591
AC_MSG_RESULT([$dynamic_linker])
2592
test "$dynamic_linker" = no && can_build_shared=no
95 by pklong
Unified with UniKey 4.0
2593
2594
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2595
if test "$GCC" = yes; then
2596
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2597
fi
1 by pklong
Initial revision
2598
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2599
2600
2601
# _LT_AC_TAGCONFIG
2602
# ----------------
2603
AC_DEFUN([_LT_AC_TAGCONFIG],
2604
[AC_ARG_WITH([tags],
2605
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2606
        [include additional configurations @<:@automatic@:>@])],
2607
    [tagnames="$withval"])
2608
2609
if test -f "$ltmain" && test -n "$tagnames"; then
2610
  if test ! -f "${ofile}"; then
2611
    AC_MSG_WARN([output file `$ofile' does not exist])
2612
  fi
2613
2614
  if test -z "$LTCC"; then
2615
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2616
    if test -z "$LTCC"; then
2617
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2618
    else
2619
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2620
    fi
2621
  fi
95 by pklong
Unified with UniKey 4.0
2622
  if test -z "$LTCFLAGS"; then
2623
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2624
  fi
1 by pklong
Initial revision
2625
2626
  # Extract list of available tagged configurations in $ofile.
2627
  # Note that this assumes the entire list is on one line.
2628
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2629
2630
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2631
  for tagname in $tagnames; do
2632
    IFS="$lt_save_ifs"
2633
    # Check whether tagname contains only valid characters
2634
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2635
    "") ;;
2636
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2637
	;;
2638
    esac
2639
2640
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2641
    then
2642
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2643
    fi
2644
2645
    # Update the list of available tags.
2646
    if test -n "$tagname"; then
2647
      echo appending configuration tag \"$tagname\" to $ofile
2648
2649
      case $tagname in
2650
      CXX)
30 by pklong
moved byteio to upper dir
2651
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2652
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2653
	    (test "X$CXX" != "Xg++"))) ; then
1 by pklong
Initial revision
2654
	  AC_LIBTOOL_LANG_CXX_CONFIG
2655
	else
2656
	  tagname=""
2657
	fi
2658
	;;
2659
2660
      F77)
2661
	if test -n "$F77" && test "X$F77" != "Xno"; then
2662
	  AC_LIBTOOL_LANG_F77_CONFIG
2663
	else
2664
	  tagname=""
2665
	fi
2666
	;;
2667
2668
      GCJ)
2669
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2670
	  AC_LIBTOOL_LANG_GCJ_CONFIG
2671
	else
2672
	  tagname=""
2673
	fi
2674
	;;
2675
2676
      RC)
2677
	AC_LIBTOOL_LANG_RC_CONFIG
2678
	;;
2679
2680
      *)
2681
	AC_MSG_ERROR([Unsupported tag name: $tagname])
2682
	;;
2683
      esac
2684
2685
      # Append the new tag name to the list of available tags.
2686
      if test -n "$tagname" ; then
2687
      available_tags="$available_tags $tagname"
2688
    fi
2689
    fi
2690
  done
2691
  IFS="$lt_save_ifs"
2692
2693
  # Now substitute the updated list of available tags.
2694
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2695
    mv "${ofile}T" "$ofile"
2696
    chmod +x "$ofile"
2697
  else
2698
    rm -f "${ofile}T"
2699
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2700
  fi
2701
fi
2702
])# _LT_AC_TAGCONFIG
2703
2704
2705
# AC_LIBTOOL_DLOPEN
2706
# -----------------
2707
# enable checks for dlopen support
2708
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2709
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2710
])# AC_LIBTOOL_DLOPEN
2711
2712
2713
# AC_LIBTOOL_WIN32_DLL
2714
# --------------------
30 by pklong
moved byteio to upper dir
2715
# declare package support for building win32 DLLs
1 by pklong
Initial revision
2716
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2717
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2718
])# AC_LIBTOOL_WIN32_DLL
2719
2720
2721
# AC_ENABLE_SHARED([DEFAULT])
2722
# ---------------------------
2723
# implement the --enable-shared flag
2724
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2725
AC_DEFUN([AC_ENABLE_SHARED],
2726
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2727
AC_ARG_ENABLE([shared],
2728
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2729
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2730
    [p=${PACKAGE-default}
2731
    case $enableval in
2732
    yes) enable_shared=yes ;;
2733
    no) enable_shared=no ;;
2734
    *)
2735
      enable_shared=no
2736
      # Look at the argument we got.  We use all the common list separators.
2737
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2738
      for pkg in $enableval; do
2739
	IFS="$lt_save_ifs"
2740
	if test "X$pkg" = "X$p"; then
2741
	  enable_shared=yes
2742
	fi
2743
      done
2744
      IFS="$lt_save_ifs"
2745
      ;;
2746
    esac],
2747
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2748
])# AC_ENABLE_SHARED
2749
2750
2751
# AC_DISABLE_SHARED
2752
# -----------------
95 by pklong
Unified with UniKey 4.0
2753
# set the default shared flag to --disable-shared
1 by pklong
Initial revision
2754
AC_DEFUN([AC_DISABLE_SHARED],
2755
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2756
AC_ENABLE_SHARED(no)
2757
])# AC_DISABLE_SHARED
2758
2759
2760
# AC_ENABLE_STATIC([DEFAULT])
2761
# ---------------------------
2762
# implement the --enable-static flag
2763
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2764
AC_DEFUN([AC_ENABLE_STATIC],
2765
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2766
AC_ARG_ENABLE([static],
2767
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2768
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2769
    [p=${PACKAGE-default}
2770
    case $enableval in
2771
    yes) enable_static=yes ;;
2772
    no) enable_static=no ;;
2773
    *)
2774
     enable_static=no
2775
      # Look at the argument we got.  We use all the common list separators.
2776
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2777
      for pkg in $enableval; do
2778
	IFS="$lt_save_ifs"
2779
	if test "X$pkg" = "X$p"; then
2780
	  enable_static=yes
2781
	fi
2782
      done
2783
      IFS="$lt_save_ifs"
2784
      ;;
2785
    esac],
2786
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2787
])# AC_ENABLE_STATIC
2788
2789
2790
# AC_DISABLE_STATIC
2791
# -----------------
2792
# set the default static flag to --disable-static
2793
AC_DEFUN([AC_DISABLE_STATIC],
2794
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2795
AC_ENABLE_STATIC(no)
2796
])# AC_DISABLE_STATIC
2797
2798
2799
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2800
# ---------------------------------
2801
# implement the --enable-fast-install flag
2802
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2803
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2804
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2805
AC_ARG_ENABLE([fast-install],
2806
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2807
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2808
    [p=${PACKAGE-default}
2809
    case $enableval in
2810
    yes) enable_fast_install=yes ;;
2811
    no) enable_fast_install=no ;;
2812
    *)
2813
      enable_fast_install=no
2814
      # Look at the argument we got.  We use all the common list separators.
2815
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2816
      for pkg in $enableval; do
2817
	IFS="$lt_save_ifs"
2818
	if test "X$pkg" = "X$p"; then
2819
	  enable_fast_install=yes
2820
	fi
2821
      done
2822
      IFS="$lt_save_ifs"
2823
      ;;
2824
    esac],
2825
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2826
])# AC_ENABLE_FAST_INSTALL
2827
2828
2829
# AC_DISABLE_FAST_INSTALL
2830
# -----------------------
2831
# set the default to --disable-fast-install
2832
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2833
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2834
AC_ENABLE_FAST_INSTALL(no)
2835
])# AC_DISABLE_FAST_INSTALL
2836
2837
2838
# AC_LIBTOOL_PICMODE([MODE])
2839
# --------------------------
2840
# implement the --with-pic flag
2841
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2842
AC_DEFUN([AC_LIBTOOL_PICMODE],
2843
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2844
pic_mode=ifelse($#,1,$1,default)
2845
])# AC_LIBTOOL_PICMODE
2846
2847
2848
# AC_PROG_EGREP
2849
# -------------
2850
# This is predefined starting with Autoconf 2.54, so this conditional
2851
# definition can be removed once we require Autoconf 2.54 or later.
2852
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2853
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2854
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2855
    then ac_cv_prog_egrep='grep -E'
2856
    else ac_cv_prog_egrep='egrep'
2857
    fi])
2858
 EGREP=$ac_cv_prog_egrep
2859
 AC_SUBST([EGREP])
2860
])])
2861
2862
2863
# AC_PATH_TOOL_PREFIX
2864
# -------------------
2865
# find a file program which can recognise shared library
2866
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2867
[AC_REQUIRE([AC_PROG_EGREP])dnl
2868
AC_MSG_CHECKING([for $1])
2869
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2870
[case $MAGIC_CMD in
2871
[[\\/*] |  ?:[\\/]*])
2872
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2873
  ;;
2874
*)
2875
  lt_save_MAGIC_CMD="$MAGIC_CMD"
2876
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2877
dnl $ac_dummy forces splitting on constant user-supplied paths.
2878
dnl POSIX.2 word splitting is done only on the output of word expansions,
2879
dnl not every word.  This closes a longstanding sh security hole.
2880
  ac_dummy="ifelse([$2], , $PATH, [$2])"
2881
  for ac_dir in $ac_dummy; do
2882
    IFS="$lt_save_ifs"
2883
    test -z "$ac_dir" && ac_dir=.
2884
    if test -f $ac_dir/$1; then
2885
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2886
      if test -n "$file_magic_test_file"; then
2887
	case $deplibs_check_method in
2888
	"file_magic "*)
30 by pklong
moved byteio to upper dir
2889
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1 by pklong
Initial revision
2890
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2891
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2892
	    $EGREP "$file_magic_regex" > /dev/null; then
2893
	    :
2894
	  else
2895
	    cat <<EOF 1>&2
2896
2897
*** Warning: the command libtool uses to detect shared libraries,
2898
*** $file_magic_cmd, produces output that libtool cannot recognize.
2899
*** The result is that libtool may fail to recognize shared libraries
2900
*** as such.  This will affect the creation of libtool libraries that
2901
*** depend on shared libraries, but programs linked with such libtool
2902
*** libraries will work regardless of this problem.  Nevertheless, you
2903
*** may want to report the problem to your system manager and/or to
2904
*** bug-libtool@gnu.org
2905
2906
EOF
2907
	  fi ;;
2908
	esac
2909
      fi
2910
      break
2911
    fi
2912
  done
2913
  IFS="$lt_save_ifs"
2914
  MAGIC_CMD="$lt_save_MAGIC_CMD"
2915
  ;;
2916
esac])
2917
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2918
if test -n "$MAGIC_CMD"; then
2919
  AC_MSG_RESULT($MAGIC_CMD)
2920
else
2921
  AC_MSG_RESULT(no)
2922
fi
2923
])# AC_PATH_TOOL_PREFIX
2924
2925
2926
# AC_PATH_MAGIC
2927
# -------------
2928
# find a file program which can recognise a shared library
2929
AC_DEFUN([AC_PATH_MAGIC],
2930
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2931
if test -z "$lt_cv_path_MAGIC_CMD"; then
2932
  if test -n "$ac_tool_prefix"; then
2933
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2934
  else
2935
    MAGIC_CMD=:
2936
  fi
2937
fi
2938
])# AC_PATH_MAGIC
2939
2940
2941
# AC_PROG_LD
2942
# ----------
2943
# find the pathname to the GNU or non-GNU linker
2944
AC_DEFUN([AC_PROG_LD],
2945
[AC_ARG_WITH([gnu-ld],
2946
    [AC_HELP_STRING([--with-gnu-ld],
2947
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2948
    [test "$withval" = no || with_gnu_ld=yes],
2949
    [with_gnu_ld=no])
2950
AC_REQUIRE([LT_AC_PROG_SED])dnl
2951
AC_REQUIRE([AC_PROG_CC])dnl
2952
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2953
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2954
ac_prog=ld
2955
if test "$GCC" = yes; then
2956
  # Check if gcc -print-prog-name=ld gives a path.
2957
  AC_MSG_CHECKING([for ld used by $CC])
2958
  case $host in
2959
  *-*-mingw*)
2960
    # gcc leaves a trailing carriage return which upsets mingw
2961
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2962
  *)
2963
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2964
  esac
2965
  case $ac_prog in
2966
    # Accept absolute paths.
2967
    [[\\/]]* | ?:[[\\/]]*)
2968
      re_direlt='/[[^/]][[^/]]*/\.\./'
2969
      # Canonicalize the pathname of ld
2970
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2971
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2972
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2973
      done
2974
      test -z "$LD" && LD="$ac_prog"
2975
      ;;
2976
  "")
2977
    # If it fails, then pretend we aren't using GCC.
2978
    ac_prog=ld
2979
    ;;
2980
  *)
2981
    # If it is relative, then search for the first ld in PATH.
2982
    with_gnu_ld=unknown
2983
    ;;
2984
  esac
2985
elif test "$with_gnu_ld" = yes; then
2986
  AC_MSG_CHECKING([for GNU ld])
2987
else
2988
  AC_MSG_CHECKING([for non-GNU ld])
2989
fi
2990
AC_CACHE_VAL(lt_cv_path_LD,
2991
[if test -z "$LD"; then
2992
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2993
  for ac_dir in $PATH; do
2994
    IFS="$lt_save_ifs"
2995
    test -z "$ac_dir" && ac_dir=.
2996
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2997
      lt_cv_path_LD="$ac_dir/$ac_prog"
2998
      # Check to see if the program is GNU ld.  I'd rather use --version,
30 by pklong
moved byteio to upper dir
2999
      # but apparently some variants of GNU ld only accept -v.
1 by pklong
Initial revision
3000
      # Break only if it was the GNU/non-GNU ld that we prefer.
3001
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3002
      *GNU* | *'with BFD'*)
3003
	test "$with_gnu_ld" != no && break
3004
	;;
3005
      *)
3006
	test "$with_gnu_ld" != yes && break
3007
	;;
3008
      esac
3009
    fi
3010
  done
3011
  IFS="$lt_save_ifs"
3012
else
3013
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3014
fi])
3015
LD="$lt_cv_path_LD"
3016
if test -n "$LD"; then
3017
  AC_MSG_RESULT($LD)
3018
else
3019
  AC_MSG_RESULT(no)
3020
fi
3021
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3022
AC_PROG_LD_GNU
3023
])# AC_PROG_LD
3024
3025
3026
# AC_PROG_LD_GNU
3027
# --------------
3028
AC_DEFUN([AC_PROG_LD_GNU],
3029
[AC_REQUIRE([AC_PROG_EGREP])dnl
3030
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
30 by pklong
moved byteio to upper dir
3031
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1 by pklong
Initial revision
3032
case `$LD -v 2>&1 </dev/null` in
3033
*GNU* | *'with BFD'*)
3034
  lt_cv_prog_gnu_ld=yes
3035
  ;;
3036
*)
3037
  lt_cv_prog_gnu_ld=no
3038
  ;;
3039
esac])
3040
with_gnu_ld=$lt_cv_prog_gnu_ld
3041
])# AC_PROG_LD_GNU
3042
3043
3044
# AC_PROG_LD_RELOAD_FLAG
3045
# ----------------------
3046
# find reload flag for linker
3047
#   -- PORTME Some linkers may need a different reload flag.
3048
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3049
[AC_CACHE_CHECK([for $LD option to reload object files],
3050
  lt_cv_ld_reload_flag,
3051
  [lt_cv_ld_reload_flag='-r'])
3052
reload_flag=$lt_cv_ld_reload_flag
3053
case $reload_flag in
3054
"" | " "*) ;;
3055
*) reload_flag=" $reload_flag" ;;
3056
esac
3057
reload_cmds='$LD$reload_flag -o $output$reload_objs'
30 by pklong
moved byteio to upper dir
3058
case $host_os in
3059
  darwin*)
3060
    if test "$GCC" = yes; then
95 by pklong
Unified with UniKey 4.0
3061
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
30 by pklong
moved byteio to upper dir
3062
    else
3063
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3064
    fi
3065
    ;;
3066
esac
1 by pklong
Initial revision
3067
])# AC_PROG_LD_RELOAD_FLAG
3068
3069
3070
# AC_DEPLIBS_CHECK_METHOD
3071
# -----------------------
3072
# how to check for library dependencies
3073
#  -- PORTME fill in with the dynamic library characteristics
3074
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3075
[AC_CACHE_CHECK([how to recognise dependent libraries],
3076
lt_cv_deplibs_check_method,
3077
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3078
lt_cv_file_magic_test_file=
3079
lt_cv_deplibs_check_method='unknown'
3080
# Need to set the preceding variable on all platforms that support
3081
# interlibrary dependencies.
3082
# 'none' -- dependencies not supported.
3083
# `unknown' -- same as none, but documents that we really don't know.
3084
# 'pass_all' -- all dependencies passed with no checks.
3085
# 'test_compile' -- check by making test program.
3086
# 'file_magic [[regex]]' -- check by looking for files in library path
3087
# which responds to the $file_magic_cmd with a given extended regex.
3088
# If you have `file' or equivalent on your system and you're not sure
3089
# whether `pass_all' will *always* work, you probably want this one.
3090
3091
case $host_os in
3092
aix4* | aix5*)
3093
  lt_cv_deplibs_check_method=pass_all
3094
  ;;
3095
3096
beos*)
3097
  lt_cv_deplibs_check_method=pass_all
3098
  ;;
3099
30 by pklong
moved byteio to upper dir
3100
bsdi[[45]]*)
1 by pklong
Initial revision
3101
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3102
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3103
  lt_cv_file_magic_test_file=/shlib/libc.so
3104
  ;;
3105
3106
cygwin*)
21 by pklong
New ukengine
3107
  # func_win32_libid is a shell function defined in ltmain.sh
1 by pklong
Initial revision
3108
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
21 by pklong
New ukengine
3109
  lt_cv_file_magic_cmd='func_win32_libid'
1 by pklong
Initial revision
3110
  ;;
3111
3112
mingw* | pw32*)
3113
  # Base MSYS/MinGW do not provide the 'file' command needed by
21 by pklong
New ukengine
3114
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
1 by pklong
Initial revision
3115
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3116
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3117
  ;;
3118
3119
darwin* | rhapsody*)
3120
  lt_cv_deplibs_check_method=pass_all
3121
  ;;
3122
95 by pklong
Unified with UniKey 4.0
3123
freebsd* | dragonfly*)
1 by pklong
Initial revision
3124
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3125
    case $host_cpu in
3126
    i*86 )
3127
      # Not sure whether the presence of OpenBSD here was a mistake.
3128
      # Let's accept both of them until this is cleared up.
30 by pklong
moved byteio to upper dir
3129
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
1 by pklong
Initial revision
3130
      lt_cv_file_magic_cmd=/usr/bin/file
3131
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3132
      ;;
3133
    esac
3134
  else
3135
    lt_cv_deplibs_check_method=pass_all
3136
  fi
3137
  ;;
3138
3139
gnu*)
3140
  lt_cv_deplibs_check_method=pass_all
3141
  ;;
3142
3143
hpux10.20* | hpux11*)
3144
  lt_cv_file_magic_cmd=/usr/bin/file
30 by pklong
moved byteio to upper dir
3145
  case $host_cpu in
1 by pklong
Initial revision
3146
  ia64*)
3147
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3148
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3149
    ;;
3150
  hppa*64*)
3151
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3152
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3153
    ;;
3154
  *)
3155
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3156
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3157
    ;;
3158
  esac
3159
  ;;
3160
95 by pklong
Unified with UniKey 4.0
3161
interix3*)
3162
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3163
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3164
  ;;
3165
1 by pklong
Initial revision
3166
irix5* | irix6* | nonstopux*)
3167
  case $LD in
3168
  *-32|*"-32 ") libmagic=32-bit;;
3169
  *-n32|*"-n32 ") libmagic=N32;;
3170
  *-64|*"-64 ") libmagic=64-bit;;
3171
  *) libmagic=never-match;;
3172
  esac
3173
  lt_cv_deplibs_check_method=pass_all
3174
  ;;
3175
3176
# This must be Linux ELF.
95 by pklong
Unified with UniKey 4.0
3177
linux* | k*bsd*-gnu)
1 by pklong
Initial revision
3178
  lt_cv_deplibs_check_method=pass_all
3179
  ;;
3180
95 by pklong
Unified with UniKey 4.0
3181
netbsd* | netbsdelf*-gnu)
1 by pklong
Initial revision
3182
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3183
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3184
  else
3185
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3186
  fi
3187
  ;;
3188
3189
newos6*)
3190
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3191
  lt_cv_file_magic_cmd=/usr/bin/file
3192
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3193
  ;;
3194
3195
nto-qnx*)
3196
  lt_cv_deplibs_check_method=unknown
3197
  ;;
3198
3199
openbsd*)
3200
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
30 by pklong
moved byteio to upper dir
3201
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
1 by pklong
Initial revision
3202
  else
30 by pklong
moved byteio to upper dir
3203
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
1 by pklong
Initial revision
3204
  fi
3205
  ;;
3206
3207
osf3* | osf4* | osf5*)
3208
  lt_cv_deplibs_check_method=pass_all
3209
  ;;
3210
3211
solaris*)
3212
  lt_cv_deplibs_check_method=pass_all
3213
  ;;
3214
95 by pklong
Unified with UniKey 4.0
3215
sysv4 | sysv4.3*)
1 by pklong
Initial revision
3216
  case $host_vendor in
3217
  motorola)
3218
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3219
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3220
    ;;
3221
  ncr)
3222
    lt_cv_deplibs_check_method=pass_all
3223
    ;;
3224
  sequent)
3225
    lt_cv_file_magic_cmd='/bin/file'
3226
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3227
    ;;
3228
  sni)
3229
    lt_cv_file_magic_cmd='/bin/file'
3230
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3231
    lt_cv_file_magic_test_file=/lib/libc.so
3232
    ;;
3233
  siemens)
3234
    lt_cv_deplibs_check_method=pass_all
3235
    ;;
95 by pklong
Unified with UniKey 4.0
3236
  pc)
3237
    lt_cv_deplibs_check_method=pass_all
3238
    ;;
1 by pklong
Initial revision
3239
  esac
3240
  ;;
3241
95 by pklong
Unified with UniKey 4.0
3242
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1 by pklong
Initial revision
3243
  lt_cv_deplibs_check_method=pass_all
3244
  ;;
3245
esac
3246
])
3247
file_magic_cmd=$lt_cv_file_magic_cmd
3248
deplibs_check_method=$lt_cv_deplibs_check_method
3249
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3250
])# AC_DEPLIBS_CHECK_METHOD
3251
3252
3253
# AC_PROG_NM
3254
# ----------
3255
# find the pathname to a BSD-compatible name lister
3256
AC_DEFUN([AC_PROG_NM],
3257
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3258
[if test -n "$NM"; then
3259
  # Let the user override the test.
3260
  lt_cv_path_NM="$NM"
3261
else
95 by pklong
Unified with UniKey 4.0
3262
  lt_nm_to_check="${ac_tool_prefix}nm"
3263
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3264
    lt_nm_to_check="$lt_nm_to_check nm"
3265
  fi
3266
  for lt_tmp_nm in $lt_nm_to_check; do
3267
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3268
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3269
      IFS="$lt_save_ifs"
3270
      test -z "$ac_dir" && ac_dir=.
3271
      tmp_nm="$ac_dir/$lt_tmp_nm"
3272
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3273
	# Check to see if the nm accepts a BSD-compat flag.
3274
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3275
	#   nm: unknown option "B" ignored
3276
	# Tru64's nm complains that /dev/null is an invalid object file
3277
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3278
	*/dev/null* | *'Invalid file or object type'*)
3279
	  lt_cv_path_NM="$tmp_nm -B"
1 by pklong
Initial revision
3280
	  break
3281
	  ;;
3282
	*)
95 by pklong
Unified with UniKey 4.0
3283
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3284
	  */dev/null*)
3285
	    lt_cv_path_NM="$tmp_nm -p"
3286
	    break
3287
	    ;;
3288
	  *)
3289
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3290
	    continue # so that we can try to find one that supports BSD flags
3291
	    ;;
3292
	  esac
1 by pklong
Initial revision
3293
	  ;;
3294
	esac
95 by pklong
Unified with UniKey 4.0
3295
      fi
3296
    done
3297
    IFS="$lt_save_ifs"
1 by pklong
Initial revision
3298
  done
3299
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3300
fi])
3301
NM="$lt_cv_path_NM"
3302
])# AC_PROG_NM
3303
3304
3305
# AC_CHECK_LIBM
3306
# -------------
3307
# check for math library
3308
AC_DEFUN([AC_CHECK_LIBM],
3309
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3310
LIBM=
3311
case $host in
3312
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3313
  # These system don't have libm, or don't need it
3314
  ;;
3315
*-ncr-sysv4.3*)
3316
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3317
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3318
  ;;
3319
*)
3320
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3321
  ;;
3322
esac
3323
])# AC_CHECK_LIBM
3324
3325
3326
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3327
# -----------------------------------
3328
# sets LIBLTDL to the link flags for the libltdl convenience library and
3329
# LTDLINCL to the include flags for the libltdl header and adds
30 by pklong
moved byteio to upper dir
3330
# --enable-ltdl-convenience to the configure arguments.  Note that
3331
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3332
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3333
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3334
# (note the single quotes!).  If your package is not flat and you're not
3335
# using automake, define top_builddir and top_srcdir appropriately in
3336
# the Makefiles.
1 by pklong
Initial revision
3337
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3338
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3339
  case $enable_ltdl_convenience in
3340
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3341
  "") enable_ltdl_convenience=yes
3342
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3343
  esac
3344
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3345
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3346
  # For backwards non-gettext consistent compatibility...
3347
  INCLTDL="$LTDLINCL"
3348
])# AC_LIBLTDL_CONVENIENCE
3349
3350
3351
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3352
# -----------------------------------
3353
# sets LIBLTDL to the link flags for the libltdl installable library and
3354
# LTDLINCL to the include flags for the libltdl header and adds
30 by pklong
moved byteio to upper dir
3355
# --enable-ltdl-install to the configure arguments.  Note that
3356
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3357
# and an installed libltdl is not found, it is assumed to be `libltdl'.
3358
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3359
# '${top_srcdir}/' (note the single quotes!).  If your package is not
3360
# flat and you're not using automake, define top_builddir and top_srcdir
3361
# appropriately in the Makefiles.
1 by pklong
Initial revision
3362
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3363
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3364
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3365
  AC_CHECK_LIB(ltdl, lt_dlinit,
3366
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3367
  [if test x"$enable_ltdl_install" = xno; then
3368
     AC_MSG_WARN([libltdl not installed, but installation disabled])
3369
   else
3370
     enable_ltdl_install=yes
3371
   fi
3372
  ])
3373
  if test x"$enable_ltdl_install" = x"yes"; then
3374
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3375
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3376
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3377
  else
3378
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3379
    LIBLTDL="-lltdl"
3380
    LTDLINCL=
3381
  fi
3382
  # For backwards non-gettext consistent compatibility...
3383
  INCLTDL="$LTDLINCL"
3384
])# AC_LIBLTDL_INSTALLABLE
3385
3386
3387
# AC_LIBTOOL_CXX
3388
# --------------
3389
# enable support for C++ libraries
3390
AC_DEFUN([AC_LIBTOOL_CXX],
3391
[AC_REQUIRE([_LT_AC_LANG_CXX])
3392
])# AC_LIBTOOL_CXX
3393
3394
3395
# _LT_AC_LANG_CXX
3396
# ---------------
3397
AC_DEFUN([_LT_AC_LANG_CXX],
3398
[AC_REQUIRE([AC_PROG_CXX])
30 by pklong
moved byteio to upper dir
3399
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
1 by pklong
Initial revision
3400
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3401
])# _LT_AC_LANG_CXX
3402
30 by pklong
moved byteio to upper dir
3403
# _LT_AC_PROG_CXXCPP
95 by pklong
Unified with UniKey 4.0
3404
# ------------------
30 by pklong
moved byteio to upper dir
3405
AC_DEFUN([_LT_AC_PROG_CXXCPP],
3406
[
3407
AC_REQUIRE([AC_PROG_CXX])
3408
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3409
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3410
    (test "X$CXX" != "Xg++"))) ; then
3411
  AC_PROG_CXXCPP
3412
fi
3413
])# _LT_AC_PROG_CXXCPP
1 by pklong
Initial revision
3414
3415
# AC_LIBTOOL_F77
3416
# --------------
3417
# enable support for Fortran 77 libraries
3418
AC_DEFUN([AC_LIBTOOL_F77],
3419
[AC_REQUIRE([_LT_AC_LANG_F77])
3420
])# AC_LIBTOOL_F77
3421
3422
3423
# _LT_AC_LANG_F77
3424
# ---------------
3425
AC_DEFUN([_LT_AC_LANG_F77],
3426
[AC_REQUIRE([AC_PROG_F77])
3427
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3428
])# _LT_AC_LANG_F77
3429
3430
3431
# AC_LIBTOOL_GCJ
3432
# --------------
3433
# enable support for GCJ libraries
3434
AC_DEFUN([AC_LIBTOOL_GCJ],
3435
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3436
])# AC_LIBTOOL_GCJ
3437
3438
3439
# _LT_AC_LANG_GCJ
3440
# ---------------
3441
AC_DEFUN([_LT_AC_LANG_GCJ],
3442
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3443
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3444
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3445
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3446
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3447
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3448
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3449
])# _LT_AC_LANG_GCJ
3450
3451
3452
# AC_LIBTOOL_RC
95 by pklong
Unified with UniKey 4.0
3453
# -------------
1 by pklong
Initial revision
3454
# enable support for Windows resource files
3455
AC_DEFUN([AC_LIBTOOL_RC],
3456
[AC_REQUIRE([LT_AC_PROG_RC])
3457
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3458
])# AC_LIBTOOL_RC
3459
3460
3461
# AC_LIBTOOL_LANG_C_CONFIG
3462
# ------------------------
3463
# Ensure that the configuration vars for the C compiler are
3464
# suitably defined.  Those variables are subsequently used by
3465
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3466
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3467
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3468
[lt_save_CC="$CC"
3469
AC_LANG_PUSH(C)
3470
3471
# Source file extension for C test sources.
3472
ac_ext=c
3473
3474
# Object file extension for compiled C test sources.
3475
objext=o
3476
_LT_AC_TAGVAR(objext, $1)=$objext
3477
3478
# Code to be used in simple compile tests
3479
lt_simple_compile_test_code="int some_variable = 0;\n"
3480
3481
# Code to be used in simple link tests
3482
lt_simple_link_test_code='int main(){return(0);}\n'
3483
3484
_LT_AC_SYS_COMPILER
3485
30 by pklong
moved byteio to upper dir
3486
# save warnings/boilerplate of simple test code
3487
_LT_COMPILER_BOILERPLATE
3488
_LT_LINKER_BOILERPLATE
3489
1 by pklong
Initial revision
3490
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3491
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3492
AC_LIBTOOL_PROG_CC_C_O($1)
3493
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3494
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3495
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3496
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3497
AC_LIBTOOL_SYS_LIB_STRIP
95 by pklong
Unified with UniKey 4.0
3498
AC_LIBTOOL_DLOPEN_SELF
1 by pklong
Initial revision
3499
95 by pklong
Unified with UniKey 4.0
3500
# Report which library types will actually be built
1 by pklong
Initial revision
3501
AC_MSG_CHECKING([if libtool supports shared libraries])
3502
AC_MSG_RESULT([$can_build_shared])
3503
3504
AC_MSG_CHECKING([whether to build shared libraries])
3505
test "$can_build_shared" = "no" && enable_shared=no
3506
3507
# On AIX, shared libraries and static libraries use the same namespace, and
3508
# are all built from PIC.
30 by pklong
moved byteio to upper dir
3509
case $host_os in
1 by pklong
Initial revision
3510
aix3*)
3511
  test "$enable_shared" = yes && enable_static=no
3512
  if test -n "$RANLIB"; then
3513
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3514
    postinstall_cmds='$RANLIB $lib'
3515
  fi
3516
  ;;
3517
21 by pklong
New ukengine
3518
aix4* | aix5*)
1 by pklong
Initial revision
3519
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3520
    test "$enable_shared" = yes && enable_static=no
3521
  fi
3522
    ;;
3523
esac
3524
AC_MSG_RESULT([$enable_shared])
3525
3526
AC_MSG_CHECKING([whether to build static libraries])
3527
# Make sure either enable_shared or enable_static is yes.
3528
test "$enable_shared" = yes || enable_static=yes
3529
AC_MSG_RESULT([$enable_static])
3530
3531
AC_LIBTOOL_CONFIG($1)
3532
3533
AC_LANG_POP
3534
CC="$lt_save_CC"
3535
])# AC_LIBTOOL_LANG_C_CONFIG
3536
3537
3538
# AC_LIBTOOL_LANG_CXX_CONFIG
3539
# --------------------------
3540
# Ensure that the configuration vars for the C compiler are
3541
# suitably defined.  Those variables are subsequently used by
3542
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3543
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3544
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3545
[AC_LANG_PUSH(C++)
3546
AC_REQUIRE([AC_PROG_CXX])
30 by pklong
moved byteio to upper dir
3547
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
1 by pklong
Initial revision
3548
3549
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3550
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3551
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3552
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3553
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3554
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3555
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3556
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3557
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3558
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
95 by pklong
Unified with UniKey 4.0
3559
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1 by pklong
Initial revision
3560
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3561
_LT_AC_TAGVAR(module_cmds, $1)=
3562
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3563
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3564
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3565
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3566
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3567
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3568
3569
# Dependencies to place before and after the object being linked:
3570
_LT_AC_TAGVAR(predep_objects, $1)=
3571
_LT_AC_TAGVAR(postdep_objects, $1)=
3572
_LT_AC_TAGVAR(predeps, $1)=
3573
_LT_AC_TAGVAR(postdeps, $1)=
3574
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3575
3576
# Source file extension for C++ test sources.
30 by pklong
moved byteio to upper dir
3577
ac_ext=cpp
1 by pklong
Initial revision
3578
3579
# Object file extension for compiled C++ test sources.
3580
objext=o
3581
_LT_AC_TAGVAR(objext, $1)=$objext
3582
3583
# Code to be used in simple compile tests
3584
lt_simple_compile_test_code="int some_variable = 0;\n"
3585
3586
# Code to be used in simple link tests
95 by pklong
Unified with UniKey 4.0
3587
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
1 by pklong
Initial revision
3588
3589
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3590
_LT_AC_SYS_COMPILER
3591
30 by pklong
moved byteio to upper dir
3592
# save warnings/boilerplate of simple test code
3593
_LT_COMPILER_BOILERPLATE
3594
_LT_LINKER_BOILERPLATE
3595
1 by pklong
Initial revision
3596
# Allow CC to be a program name with arguments.
3597
lt_save_CC=$CC
3598
lt_save_LD=$LD
3599
lt_save_GCC=$GCC
3600
GCC=$GXX
3601
lt_save_with_gnu_ld=$with_gnu_ld
3602
lt_save_path_LD=$lt_cv_path_LD
3603
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3604
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3605
else
95 by pklong
Unified with UniKey 4.0
3606
  $as_unset lt_cv_prog_gnu_ld
1 by pklong
Initial revision
3607
fi
3608
if test -n "${lt_cv_path_LDCXX+set}"; then
3609
  lt_cv_path_LD=$lt_cv_path_LDCXX
3610
else
95 by pklong
Unified with UniKey 4.0
3611
  $as_unset lt_cv_path_LD
1 by pklong
Initial revision
3612
fi
3613
test -z "${LDCXX+set}" || LD=$LDCXX
3614
CC=${CXX-"c++"}
3615
compiler=$CC
3616
_LT_AC_TAGVAR(compiler, $1)=$CC
30 by pklong
moved byteio to upper dir
3617
_LT_CC_BASENAME([$compiler])
1 by pklong
Initial revision
3618
3619
# We don't want -fno-exception wen compiling C++ code, so set the
3620
# no_builtin_flag separately
3621
if test "$GXX" = yes; then
3622
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3623
else
3624
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3625
fi
3626
3627
if test "$GXX" = yes; then
3628
  # Set up default GNU C++ configuration
3629
3630
  AC_PROG_LD
3631
3632
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3633
  # archiving commands below assume that GNU ld is being used.
3634
  if test "$with_gnu_ld" = yes; then
3635
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3636
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3637
3638
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3639
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3640
3641
    # If archive_cmds runs LD, not CC, wlarc should be empty
3642
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3643
    #     investigate it a little bit more. (MM)
3644
    wlarc='${wl}'
3645
3646
    # ancient GNU ld didn't support --whole-archive et. al.
3647
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3648
	grep 'no-whole-archive' > /dev/null; then
3649
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3650
    else
3651
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3652
    fi
3653
  else
3654
    with_gnu_ld=no
3655
    wlarc=
3656
3657
    # A generic and very simple default shared library creation
3658
    # command for GNU C++ for the case where it uses the native
3659
    # linker, instead of GNU ld.  If possible, this setting should
3660
    # overridden to take advantage of the native linker features on
3661
    # the platform it is being used on.
3662
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3663
  fi
3664
3665
  # Commands to make compiler produce verbose output that lists
3666
  # what "hidden" libraries, object files and flags are used when
3667
  # linking a shared library.
3668
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3669
3670
else
3671
  GXX=no
3672
  with_gnu_ld=no
3673
  wlarc=
3674
fi
3675
3676
# PORTME: fill in a description of your system's C++ link characteristics
3677
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3678
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3679
case $host_os in
3680
  aix3*)
3681
    # FIXME: insert proper C++ library support
3682
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3683
    ;;
3684
  aix4* | aix5*)
3685
    if test "$host_cpu" = ia64; then
3686
      # On IA64, the linker does run time linking by default, so we don't
3687
      # have to do anything special.
3688
      aix_use_runtimelinking=no
3689
      exp_sym_flag='-Bexport'
3690
      no_entry_flag=""
3691
    else
3692
      aix_use_runtimelinking=no
3693
3694
      # Test if we are trying to use run time linking or normal
3695
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3696
      # need to do runtime linking.
3697
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3698
	for ld_flag in $LDFLAGS; do
3699
	  case $ld_flag in
3700
	  *-brtl*)
3701
	    aix_use_runtimelinking=yes
3702
	    break
3703
	    ;;
3704
	  esac
3705
	done
95 by pklong
Unified with UniKey 4.0
3706
	;;
1 by pklong
Initial revision
3707
      esac
3708
3709
      exp_sym_flag='-bexport'
3710
      no_entry_flag='-bnoentry'
3711
    fi
3712
3713
    # When large executables or shared objects are built, AIX ld can
3714
    # have problems creating the table of contents.  If linking a library
3715
    # or program results in "error TOC overflow" add -mminimal-toc to
3716
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3717
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3718
3719
    _LT_AC_TAGVAR(archive_cmds, $1)=''
3720
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3721
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3722
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3723
3724
    if test "$GXX" = yes; then
30 by pklong
moved byteio to upper dir
3725
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
1 by pklong
Initial revision
3726
      # We only want to do this on AIX 4.2 and lower, the check
3727
      # below for broken collect2 doesn't work under 4.3+
3728
	collect2name=`${CC} -print-prog-name=collect2`
3729
	if test -f "$collect2name" && \
3730
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3731
	then
3732
	  # We have reworked collect2
3733
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3734
	else
3735
	  # We have old collect2
3736
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3737
	  # It fails to find uninstalled libraries when the uninstalled
3738
	  # path is not listed in the libpath.  Setting hardcode_minus_L
3739
	  # to unsupported forces relinking
3740
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3741
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3742
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3743
	fi
95 by pklong
Unified with UniKey 4.0
3744
	;;
1 by pklong
Initial revision
3745
      esac
3746
      shared_flag='-shared'
30 by pklong
moved byteio to upper dir
3747
      if test "$aix_use_runtimelinking" = yes; then
3748
	shared_flag="$shared_flag "'${wl}-G'
3749
      fi
1 by pklong
Initial revision
3750
    else
3751
      # not using gcc
3752
      if test "$host_cpu" = ia64; then
3753
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3754
	# chokes on -Wl,-G. The following line is correct:
3755
	shared_flag='-G'
3756
      else
3757
	if test "$aix_use_runtimelinking" = yes; then
3758
	  shared_flag='${wl}-G'
3759
	else
3760
	  shared_flag='${wl}-bM:SRE'
3761
	fi
3762
      fi
3763
    fi
3764
3765
    # It seems that -bexpall does not export symbols beginning with
3766
    # underscore (_), so it is better to generate a list of symbols to export.
3767
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3768
    if test "$aix_use_runtimelinking" = yes; then
3769
      # Warning - without using the other runtime loading flags (-brtl),
3770
      # -berok will link without error, but may produce a broken library.
3771
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3772
      # Determine the default libpath from the value encoded in an empty executable.
3773
      _LT_AC_SYS_LIBPATH_AIX
3774
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3775
95 by pklong
Unified with UniKey 4.0
3776
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1 by pklong
Initial revision
3777
     else
3778
      if test "$host_cpu" = ia64; then
3779
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3780
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
95 by pklong
Unified with UniKey 4.0
3781
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
1 by pklong
Initial revision
3782
      else
3783
	# Determine the default libpath from the value encoded in an empty executable.
3784
	_LT_AC_SYS_LIBPATH_AIX
3785
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3786
	# Warning - without using the other run time loading flags,
3787
	# -berok will link without error, but may produce a broken library.
3788
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3789
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3790
	# Exported symbols can be pulled into shared objects from archives
95 by pklong
Unified with UniKey 4.0
3791
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
1 by pklong
Initial revision
3792
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
30 by pklong
moved byteio to upper dir
3793
	# This is similar to how AIX traditionally builds its shared libraries.
95 by pklong
Unified with UniKey 4.0
3794
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
1 by pklong
Initial revision
3795
      fi
3796
    fi
3797
    ;;
95 by pklong
Unified with UniKey 4.0
3798
3799
  beos*)
3800
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3801
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3802
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3803
      # support --undefined.  This deserves some investigation.  FIXME
3804
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3805
    else
3806
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3807
    fi
3808
    ;;
3809
1 by pklong
Initial revision
3810
  chorus*)
3811
    case $cc_basename in
3812
      *)
3813
	# FIXME: insert proper C++ library support
3814
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3815
	;;
3816
    esac
3817
    ;;
3818
3819
  cygwin* | mingw* | pw32*)
3820
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3821
    # as there is no search path for DLLs.
3822
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3823
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3824
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3825
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3826
3827
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
95 by pklong
Unified with UniKey 4.0
3828
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1 by pklong
Initial revision
3829
      # If the export-symbols file already is a .def file (1st line
3830
      # is EXPORTS), use it as is; otherwise, prepend...
3831
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3832
	cp $export_symbols $output_objdir/$soname.def;
3833
      else
3834
	echo EXPORTS > $output_objdir/$soname.def;
3835
	cat $export_symbols >> $output_objdir/$soname.def;
3836
      fi~
95 by pklong
Unified with UniKey 4.0
3837
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1 by pklong
Initial revision
3838
    else
3839
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3840
    fi
3841
  ;;
30 by pklong
moved byteio to upper dir
3842
      darwin* | rhapsody*)
3843
        case $host_os in
3844
        rhapsody* | darwin1.[[012]])
3845
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3846
         ;;
3847
       *) # Darwin 1.3 on
3848
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3849
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3850
         else
3851
           case ${MACOSX_DEPLOYMENT_TARGET} in
3852
             10.[[012]])
3853
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3854
               ;;
3855
             10.*)
3856
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3857
               ;;
3858
           esac
3859
         fi
3860
         ;;
1 by pklong
Initial revision
3861
        esac
30 by pklong
moved byteio to upper dir
3862
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3863
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3864
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3865
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3866
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3867
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
1 by pklong
Initial revision
3868
30 by pklong
moved byteio to upper dir
3869
    if test "$GXX" = yes ; then
3870
      lt_int_apple_cc_single_mod=no
3871
      output_verbose_link_cmd='echo'
3872
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3873
       lt_int_apple_cc_single_mod=yes
3874
      fi
3875
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3876
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3877
      else
3878
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3879
        fi
3880
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3881
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3882
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3883
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3884
          else
3885
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3886
          fi
3887
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3888
      else
3889
      case $cc_basename in
3890
        xlc*)
3891
         output_verbose_link_cmd='echo'
3892
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3893
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3894
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3895
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3896
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3897
          ;;
3898
       *)
3899
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3900
          ;;
3901
      esac
3902
      fi
3903
        ;;
1 by pklong
Initial revision
3904
3905
  dgux*)
3906
    case $cc_basename in
30 by pklong
moved byteio to upper dir
3907
      ec++*)
1 by pklong
Initial revision
3908
	# FIXME: insert proper C++ library support
3909
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3910
	;;
30 by pklong
moved byteio to upper dir
3911
      ghcx*)
1 by pklong
Initial revision
3912
	# Green Hills C++ Compiler
3913
	# FIXME: insert proper C++ library support
3914
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3915
	;;
3916
      *)
3917
	# FIXME: insert proper C++ library support
3918
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3919
	;;
3920
    esac
3921
    ;;
30 by pklong
moved byteio to upper dir
3922
  freebsd[[12]]*)
1 by pklong
Initial revision
3923
    # C++ shared libraries reported to be fairly broken before switch to ELF
3924
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3925
    ;;
3926
  freebsd-elf*)
3927
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3928
    ;;
95 by pklong
Unified with UniKey 4.0
3929
  freebsd* | dragonfly*)
1 by pklong
Initial revision
3930
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3931
    # conventions
3932
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3933
    ;;
3934
  gnu*)
3935
    ;;
3936
  hpux9*)
3937
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3938
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3939
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3940
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3941
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3942
				# but as the default
3943
				# location of the library.
3944
3945
    case $cc_basename in
30 by pklong
moved byteio to upper dir
3946
    CC*)
1 by pklong
Initial revision
3947
      # FIXME: insert proper C++ library support
3948
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3949
      ;;
30 by pklong
moved byteio to upper dir
3950
    aCC*)
1 by pklong
Initial revision
3951
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3952
      # Commands to make compiler produce verbose output that lists
3953
      # what "hidden" libraries, object files and flags are used when
3954
      # linking a shared library.
3955
      #
3956
      # There doesn't appear to be a way to prevent this compiler from
3957
      # explicitly linking system object files so we need to strip them
3958
      # from the output so that they don't get included in the library
3959
      # dependencies.
30 by pklong
moved byteio to upper dir
3960
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
1 by pklong
Initial revision
3961
      ;;
3962
    *)
3963
      if test "$GXX" = yes; then
3964
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3965
      else
3966
        # FIXME: insert proper C++ library support
3967
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3968
      fi
3969
      ;;
3970
    esac
3971
    ;;
3972
  hpux10*|hpux11*)
3973
    if test $with_gnu_ld = no; then
95 by pklong
Unified with UniKey 4.0
3974
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3975
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3976
30 by pklong
moved byteio to upper dir
3977
      case $host_cpu in
95 by pklong
Unified with UniKey 4.0
3978
      hppa*64*|ia64*)
1 by pklong
Initial revision
3979
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3980
        ;;
3981
      *)
3982
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3983
        ;;
3984
      esac
3985
    fi
30 by pklong
moved byteio to upper dir
3986
    case $host_cpu in
95 by pklong
Unified with UniKey 4.0
3987
    hppa*64*|ia64*)
3988
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3989
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by pklong
Initial revision
3990
      ;;
3991
    *)
3992
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3993
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3994
					      # but as the default
3995
					      # location of the library.
3996
      ;;
3997
    esac
3998
3999
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4000
      CC*)
1 by pklong
Initial revision
4001
	# FIXME: insert proper C++ library support
4002
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4003
	;;
30 by pklong
moved byteio to upper dir
4004
      aCC*)
4005
	case $host_cpu in
95 by pklong
Unified with UniKey 4.0
4006
	hppa*64*)
4007
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4008
	  ;;
4009
	ia64*)
4010
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1 by pklong
Initial revision
4011
	  ;;
4012
	*)
4013
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4014
	  ;;
4015
	esac
4016
	# Commands to make compiler produce verbose output that lists
4017
	# what "hidden" libraries, object files and flags are used when
4018
	# linking a shared library.
4019
	#
4020
	# There doesn't appear to be a way to prevent this compiler from
4021
	# explicitly linking system object files so we need to strip them
4022
	# from the output so that they don't get included in the library
4023
	# dependencies.
4024
	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4025
	;;
4026
      *)
4027
	if test "$GXX" = yes; then
4028
	  if test $with_gnu_ld = no; then
30 by pklong
moved byteio to upper dir
4029
	    case $host_cpu in
95 by pklong
Unified with UniKey 4.0
4030
	    hppa*64*)
4031
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4032
	      ;;
4033
	    ia64*)
4034
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1 by pklong
Initial revision
4035
	      ;;
4036
	    *)
4037
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4038
	      ;;
4039
	    esac
4040
	  fi
4041
	else
4042
	  # FIXME: insert proper C++ library support
4043
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4044
	fi
4045
	;;
4046
    esac
4047
    ;;
95 by pklong
Unified with UniKey 4.0
4048
  interix3*)
4049
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4050
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4051
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4052
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4053
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4054
    # Instead, shared libraries are loaded at an image base (0x10000000 by
4055
    # default) and relocated if they conflict, which is a slow very memory
4056
    # consuming and fragmenting process.  To avoid this, we pick a random,
4057
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4058
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4059
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4060
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4061
    ;;
1 by pklong
Initial revision
4062
  irix5* | irix6*)
4063
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4064
      CC*)
1 by pklong
Initial revision
4065
	# SGI C++
30 by pklong
moved byteio to upper dir
4066
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4067
4068
	# Archives containing C++ object files must be created using
4069
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4070
	# necessary to make sure instantiated templates are included
4071
	# in the archive.
4072
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4073
	;;
4074
      *)
4075
	if test "$GXX" = yes; then
4076
	  if test "$with_gnu_ld" = no; then
30 by pklong
moved byteio to upper dir
4077
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4078
	  else
4079
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4080
	  fi
4081
	fi
4082
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4083
	;;
4084
    esac
4085
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4086
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4087
    ;;
95 by pklong
Unified with UniKey 4.0
4088
  linux* | k*bsd*-gnu)
1 by pklong
Initial revision
4089
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4090
      KCC*)
1 by pklong
Initial revision
4091
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4092
4093
	# KCC will only create a shared library if the output file
4094
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4095
	# to its proper name (with version) after linking.
4096
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4097
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4098
	# Commands to make compiler produce verbose output that lists
4099
	# what "hidden" libraries, object files and flags are used when
4100
	# linking a shared library.
4101
	#
4102
	# There doesn't appear to be a way to prevent this compiler from
4103
	# explicitly linking system object files so we need to strip them
4104
	# from the output so that they don't get included in the library
4105
	# dependencies.
4106
	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4107
4108
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4109
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4110
4111
	# Archives containing C++ object files must be created using
4112
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4113
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4114
	;;
30 by pklong
moved byteio to upper dir
4115
      icpc*)
1 by pklong
Initial revision
4116
	# Intel C++
4117
	with_gnu_ld=yes
30 by pklong
moved byteio to upper dir
4118
	# version 8.0 and above of icpc choke on multiply defined symbols
4119
	# if we add $predep_objects and $postdep_objects, however 7.1 and
4120
	# earlier do not add the objects themselves.
4121
	case `$CC -V 2>&1` in
4122
	*"Version 7."*)
4123
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4124
  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4125
	  ;;
4126
	*)  # Version 8.0 or newer
4127
	  tmp_idyn=
4128
	  case $host_cpu in
4129
	    ia64*) tmp_idyn=' -i_dynamic';;
4130
	  esac
4131
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4132
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4133
	  ;;
4134
	esac
1 by pklong
Initial revision
4135
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4136
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4137
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4138
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4139
	;;
30 by pklong
moved byteio to upper dir
4140
      pgCC*)
4141
        # Portland Group C++ compiler
4142
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4143
  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4144
4145
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4146
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4147
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4148
        ;;
4149
      cxx*)
1 by pklong
Initial revision
4150
	# Compaq C++
4151
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4152
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4153
4154
	runpath_var=LD_RUN_PATH
4155
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4156
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4157
4158
	# Commands to make compiler produce verbose output that lists
4159
	# what "hidden" libraries, object files and flags are used when
4160
	# linking a shared library.
4161
	#
4162
	# There doesn't appear to be a way to prevent this compiler from
4163
	# explicitly linking system object files so we need to strip them
4164
	# from the output so that they don't get included in the library
4165
	# dependencies.
4166
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4167
	;;
4168
    esac
4169
    ;;
4170
  lynxos*)
4171
    # FIXME: insert proper C++ library support
4172
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4173
    ;;
4174
  m88k*)
4175
    # FIXME: insert proper C++ library support
4176
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4177
    ;;
4178
  mvs*)
4179
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4180
      cxx*)
1 by pklong
Initial revision
4181
	# FIXME: insert proper C++ library support
4182
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4183
	;;
4184
      *)
4185
	# FIXME: insert proper C++ library support
4186
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4187
	;;
4188
    esac
4189
    ;;
95 by pklong
Unified with UniKey 4.0
4190
  netbsd* | netbsdelf*-gnu)
1 by pklong
Initial revision
4191
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4192
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4193
      wlarc=
4194
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4195
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4196
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4197
    fi
4198
    # Workaround some broken pre-1.5 toolchains
4199
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4200
    ;;
30 by pklong
moved byteio to upper dir
4201
  openbsd2*)
4202
    # C++ shared libraries are fairly broken
4203
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4204
    ;;
4205
  openbsd*)
4206
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4207
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4208
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4209
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4210
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4211
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4212
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4213
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4214
    fi
4215
    output_verbose_link_cmd='echo'
4216
    ;;
1 by pklong
Initial revision
4217
  osf3*)
4218
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4219
      KCC*)
1 by pklong
Initial revision
4220
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4221
4222
	# KCC will only create a shared library if the output file
4223
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4224
	# to its proper name (with version) after linking.
4225
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4226
4227
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4228
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4229
4230
	# Archives containing C++ object files must be created using
4231
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4232
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4233
4234
	;;
30 by pklong
moved byteio to upper dir
4235
      RCC*)
1 by pklong
Initial revision
4236
	# Rational C++ 2.4.1
4237
	# FIXME: insert proper C++ library support
4238
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4239
	;;
30 by pklong
moved byteio to upper dir
4240
      cxx*)
1 by pklong
Initial revision
4241
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
30 by pklong
moved byteio to upper dir
4242
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4243
4244
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4245
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4246
4247
	# Commands to make compiler produce verbose output that lists
4248
	# what "hidden" libraries, object files and flags are used when
4249
	# linking a shared library.
4250
	#
4251
	# There doesn't appear to be a way to prevent this compiler from
4252
	# explicitly linking system object files so we need to strip them
4253
	# from the output so that they don't get included in the library
4254
	# dependencies.
4255
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4256
	;;
4257
      *)
4258
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4259
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
30 by pklong
moved byteio to upper dir
4260
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4261
4262
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4263
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4264
4265
	  # Commands to make compiler produce verbose output that lists
4266
	  # what "hidden" libraries, object files and flags are used when
4267
	  # linking a shared library.
4268
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4269
4270
	else
4271
	  # FIXME: insert proper C++ library support
4272
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4273
	fi
4274
	;;
4275
    esac
4276
    ;;
4277
  osf4* | osf5*)
4278
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4279
      KCC*)
1 by pklong
Initial revision
4280
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4281
4282
	# KCC will only create a shared library if the output file
4283
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4284
	# to its proper name (with version) after linking.
4285
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4286
4287
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4288
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4289
4290
	# Archives containing C++ object files must be created using
4291
	# the KAI C++ compiler.
4292
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4293
	;;
30 by pklong
moved byteio to upper dir
4294
      RCC*)
1 by pklong
Initial revision
4295
	# Rational C++ 2.4.1
4296
	# FIXME: insert proper C++ library support
4297
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4298
	;;
30 by pklong
moved byteio to upper dir
4299
      cxx*)
1 by pklong
Initial revision
4300
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
30 by pklong
moved byteio to upper dir
4301
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4302
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4303
	  echo "-hidden">> $lib.exp~
30 by pklong
moved byteio to upper dir
4304
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
1 by pklong
Initial revision
4305
	  $rm $lib.exp'
4306
4307
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4308
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4309
4310
	# Commands to make compiler produce verbose output that lists
4311
	# what "hidden" libraries, object files and flags are used when
4312
	# linking a shared library.
4313
	#
4314
	# There doesn't appear to be a way to prevent this compiler from
4315
	# explicitly linking system object files so we need to strip them
4316
	# from the output so that they don't get included in the library
4317
	# dependencies.
4318
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4319
	;;
4320
      *)
4321
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4322
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
30 by pklong
moved byteio to upper dir
4323
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1 by pklong
Initial revision
4324
4325
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4326
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4327
4328
	  # Commands to make compiler produce verbose output that lists
4329
	  # what "hidden" libraries, object files and flags are used when
4330
	  # linking a shared library.
4331
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4332
4333
	else
4334
	  # FIXME: insert proper C++ library support
4335
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4336
	fi
4337
	;;
4338
    esac
4339
    ;;
4340
  psos*)
4341
    # FIXME: insert proper C++ library support
4342
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4343
    ;;
4344
  sunos4*)
4345
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4346
      CC*)
1 by pklong
Initial revision
4347
	# Sun C++ 4.x
4348
	# FIXME: insert proper C++ library support
4349
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4350
	;;
30 by pklong
moved byteio to upper dir
4351
      lcc*)
1 by pklong
Initial revision
4352
	# Lucid
4353
	# FIXME: insert proper C++ library support
4354
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4355
	;;
4356
      *)
4357
	# FIXME: insert proper C++ library support
4358
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4359
	;;
4360
    esac
4361
    ;;
4362
  solaris*)
4363
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4364
      CC*)
1 by pklong
Initial revision
4365
	# Sun C++ 4.2, 5.x and Centerline C++
30 by pklong
moved byteio to upper dir
4366
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
1 by pklong
Initial revision
4367
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
30 by pklong
moved byteio to upper dir
4368
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
1 by pklong
Initial revision
4369
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
30 by pklong
moved byteio to upper dir
4370
	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
1 by pklong
Initial revision
4371
4372
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4373
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4374
	case $host_os in
30 by pklong
moved byteio to upper dir
4375
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1 by pklong
Initial revision
4376
	  *)
4377
	    # The C++ compiler is used as linker so we must use $wl
4378
	    # flag to pass the commands to the underlying system
30 by pklong
moved byteio to upper dir
4379
	    # linker. We must also pass each convience library through
4380
	    # to the system linker between allextract/defaultextract.
4381
	    # The C++ compiler will combine linker options so we
4382
	    # cannot just pass the convience library names through
4383
	    # without $wl.
1 by pklong
Initial revision
4384
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
30 by pklong
moved byteio to upper dir
4385
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
1 by pklong
Initial revision
4386
	    ;;
4387
	esac
4388
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4389
30 by pklong
moved byteio to upper dir
4390
	output_verbose_link_cmd='echo'
1 by pklong
Initial revision
4391
4392
	# Archives containing C++ object files must be created using
4393
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4394
	# necessary to make sure instantiated templates are included
4395
	# in the archive.
4396
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4397
	;;
30 by pklong
moved byteio to upper dir
4398
      gcx*)
1 by pklong
Initial revision
4399
	# Green Hills C++ Compiler
4400
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4401
4402
	# The C++ compiler must be used to create the archive.
4403
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4404
	;;
4405
      *)
4406
	# GNU C++ compiler with Solaris linker
4407
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4408
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4409
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4410
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4411
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4412
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4413
4414
	    # Commands to make compiler produce verbose output that lists
4415
	    # what "hidden" libraries, object files and flags are used when
4416
	    # linking a shared library.
4417
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4418
	  else
4419
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4420
	    # platform.
4421
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4422
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4423
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4424
4425
	    # Commands to make compiler produce verbose output that lists
4426
	    # what "hidden" libraries, object files and flags are used when
4427
	    # linking a shared library.
4428
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4429
	  fi
4430
4431
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4432
	fi
4433
	;;
4434
    esac
4435
    ;;
95 by pklong
Unified with UniKey 4.0
4436
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4437
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4438
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4439
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4440
    runpath_var='LD_RUN_PATH'
4441
4442
    case $cc_basename in
4443
      CC*)
4444
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4445
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4446
	;;
4447
      *)
4448
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4449
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4450
	;;
4451
    esac
4452
    ;;
4453
  sysv5* | sco3.2v5* | sco5v6*)
4454
    # Note: We can NOT use -z defs as we might desire, because we do not
4455
    # link with -lc, and that would cause any symbols used from libc to
4456
    # always be unresolved, which means just about no library would
4457
    # ever link correctly.  If we're not using GNU ld we use -z text
4458
    # though, which does catch some bad symbols but isn't as heavy-handed
4459
    # as -z defs.
4460
    # For security reasons, it is highly recommended that you always
4461
    # use absolute paths for naming shared libraries, and exclude the
4462
    # DT_RUNPATH tag from executables and libraries.  But doing so
4463
    # requires that you compile everything twice, which is a pain.
4464
    # So that behaviour is only enabled if SCOABSPATH is set to a
4465
    # non-empty value in the environment.  Most likely only useful for
4466
    # creating official distributions of packages.
4467
    # This is a hack until libtool officially supports absolute path
4468
    # names for shared libraries.
4469
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4470
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4471
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4472
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4473
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4474
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4475
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4476
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4477
    runpath_var='LD_RUN_PATH'
4478
4479
    case $cc_basename in
4480
      CC*)
4481
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4482
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4483
	;;
4484
      *)
4485
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4486
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4487
	;;
4488
    esac
1 by pklong
Initial revision
4489
    ;;
4490
  tandem*)
4491
    case $cc_basename in
30 by pklong
moved byteio to upper dir
4492
      NCC*)
1 by pklong
Initial revision
4493
	# NonStop-UX NCC 3.20
4494
	# FIXME: insert proper C++ library support
4495
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4496
	;;
4497
      *)
4498
	# FIXME: insert proper C++ library support
4499
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4500
	;;
4501
    esac
4502
    ;;
4503
  vxworks*)
4504
    # FIXME: insert proper C++ library support
4505
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4506
    ;;
4507
  *)
4508
    # FIXME: insert proper C++ library support
4509
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4510
    ;;
4511
esac
4512
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4513
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4514
4515
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4516
_LT_AC_TAGVAR(LD, $1)="$LD"
4517
4518
AC_LIBTOOL_POSTDEP_PREDEP($1)
4519
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4520
AC_LIBTOOL_PROG_CC_C_O($1)
4521
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4522
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4523
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4524
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4525
4526
AC_LIBTOOL_CONFIG($1)
4527
4528
AC_LANG_POP
4529
CC=$lt_save_CC
4530
LDCXX=$LD
4531
LD=$lt_save_LD
4532
GCC=$lt_save_GCC
4533
with_gnu_ldcxx=$with_gnu_ld
4534
with_gnu_ld=$lt_save_with_gnu_ld
4535
lt_cv_path_LDCXX=$lt_cv_path_LD
4536
lt_cv_path_LD=$lt_save_path_LD
4537
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4538
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4539
])# AC_LIBTOOL_LANG_CXX_CONFIG
4540
4541
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
95 by pklong
Unified with UniKey 4.0
4542
# ------------------------------------
1 by pklong
Initial revision
4543
# Figure out "hidden" library dependencies from verbose
4544
# compiler output when linking a shared library.
4545
# Parse the compiler output and extract the necessary
4546
# objects, libraries and library flags.
4547
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4548
dnl we can't use the lt_simple_compile_test_code here,
4549
dnl because it contains code intended for an executable,
4550
dnl not a library.  It's possible we should let each
4551
dnl tag define a new lt_????_link_test_code variable,
4552
dnl but it's only used here...
4553
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4554
int a;
4555
void foo (void) { a = 0; }
4556
EOF
4557
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4558
class Foo
4559
{
4560
public:
4561
  Foo (void) { a = 0; }
4562
private:
4563
  int a;
4564
};
4565
EOF
4566
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4567
      subroutine foo
4568
      implicit none
4569
      integer*4 a
4570
      a=0
4571
      return
4572
      end
4573
EOF
4574
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4575
public class foo {
4576
  private int a;
4577
  public void bar (void) {
4578
    a = 0;
4579
  }
4580
};
4581
EOF
4582
])
4583
dnl Parse the compiler output and extract the necessary
4584
dnl objects, libraries and library flags.
4585
if AC_TRY_EVAL(ac_compile); then
4586
  # Parse the compiler output and extract the necessary
4587
  # objects, libraries and library flags.
4588
4589
  # Sentinel used to keep track of whether or not we are before
4590
  # the conftest object file.
4591
  pre_test_object_deps_done=no
4592
4593
  # The `*' in the case matches for architectures that use `case' in
4594
  # $output_verbose_cmd can trigger glob expansion during the loop
4595
  # eval without this substitution.
30 by pklong
moved byteio to upper dir
4596
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
1 by pklong
Initial revision
4597
4598
  for p in `eval $output_verbose_link_cmd`; do
4599
    case $p in
4600
4601
    -L* | -R* | -l*)
4602
       # Some compilers place space between "-{L,R}" and the path.
4603
       # Remove the space.
4604
       if test $p = "-L" \
4605
	  || test $p = "-R"; then
4606
	 prev=$p
4607
	 continue
4608
       else
4609
	 prev=
4610
       fi
4611
4612
       if test "$pre_test_object_deps_done" = no; then
4613
	 case $p in
4614
	 -L* | -R*)
4615
	   # Internal compiler library paths should come after those
4616
	   # provided the user.  The postdeps already come after the
4617
	   # user supplied libs so there is no need to process them.
4618
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4619
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4620
	   else
4621
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4622
	   fi
4623
	   ;;
4624
	 # The "-l" case would never come before the object being
4625
	 # linked, so don't bother handling this case.
4626
	 esac
4627
       else
4628
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4629
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4630
	 else
4631
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4632
	 fi
4633
       fi
4634
       ;;
4635
4636
    *.$objext)
4637
       # This assumes that the test object file only shows up
4638
       # once in the compiler output.
4639
       if test "$p" = "conftest.$objext"; then
4640
	 pre_test_object_deps_done=yes
4641
	 continue
4642
       fi
4643
4644
       if test "$pre_test_object_deps_done" = no; then
4645
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4646
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4647
	 else
4648
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4649
	 fi
4650
       else
4651
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4652
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4653
	 else
4654
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4655
	 fi
4656
       fi
4657
       ;;
4658
4659
    *) ;; # Ignore the rest.
4660
4661
    esac
4662
  done
4663
4664
  # Clean up.
4665
  rm -f a.out a.exe
4666
else
4667
  echo "libtool.m4: error: problem compiling $1 test program"
4668
fi
4669
4670
$rm -f confest.$objext
4671
30 by pklong
moved byteio to upper dir
4672
# PORTME: override above test on systems where it is broken
4673
ifelse([$1],[CXX],
4674
[case $host_os in
95 by pklong
Unified with UniKey 4.0
4675
interix3*)
4676
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4677
  # hack all around it, let's just trust "g++" to DTRT.
4678
  _LT_AC_TAGVAR(predep_objects,$1)=
4679
  _LT_AC_TAGVAR(postdep_objects,$1)=
4680
  _LT_AC_TAGVAR(postdeps,$1)=
4681
  ;;
4682
30 by pklong
moved byteio to upper dir
4683
solaris*)
4684
  case $cc_basename in
4685
  CC*)
4686
    # Adding this requires a known-good setup of shared libraries for
4687
    # Sun compiler versions before 5.6, else PIC objects from an old
4688
    # archive will be linked into the output, leading to subtle bugs.
4689
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4690
    ;;
4691
  esac
95 by pklong
Unified with UniKey 4.0
4692
  ;;
30 by pklong
moved byteio to upper dir
4693
esac
4694
])
4695
1 by pklong
Initial revision
4696
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4697
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4698
esac
4699
])# AC_LIBTOOL_POSTDEP_PREDEP
4700
4701
# AC_LIBTOOL_LANG_F77_CONFIG
95 by pklong
Unified with UniKey 4.0
4702
# --------------------------
1 by pklong
Initial revision
4703
# Ensure that the configuration vars for the C compiler are
4704
# suitably defined.  Those variables are subsequently used by
4705
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4706
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4707
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4708
[AC_REQUIRE([AC_PROG_F77])
4709
AC_LANG_PUSH(Fortran 77)
4710
4711
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4712
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4713
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4714
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4715
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4716
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4717
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4718
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4719
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4720
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4721
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4722
_LT_AC_TAGVAR(module_cmds, $1)=
4723
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4724
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4725
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4726
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4727
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4728
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4729
4730
# Source file extension for f77 test sources.
4731
ac_ext=f
4732
4733
# Object file extension for compiled f77 test sources.
4734
objext=o
4735
_LT_AC_TAGVAR(objext, $1)=$objext
4736
4737
# Code to be used in simple compile tests
4738
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4739
4740
# Code to be used in simple link tests
4741
lt_simple_link_test_code="      program t\n      end\n"
4742
4743
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4744
_LT_AC_SYS_COMPILER
4745
30 by pklong
moved byteio to upper dir
4746
# save warnings/boilerplate of simple test code
4747
_LT_COMPILER_BOILERPLATE
4748
_LT_LINKER_BOILERPLATE
4749
1 by pklong
Initial revision
4750
# Allow CC to be a program name with arguments.
4751
lt_save_CC="$CC"
4752
CC=${F77-"f77"}
4753
compiler=$CC
4754
_LT_AC_TAGVAR(compiler, $1)=$CC
30 by pklong
moved byteio to upper dir
4755
_LT_CC_BASENAME([$compiler])
1 by pklong
Initial revision
4756
4757
AC_MSG_CHECKING([if libtool supports shared libraries])
4758
AC_MSG_RESULT([$can_build_shared])
4759
4760
AC_MSG_CHECKING([whether to build shared libraries])
4761
test "$can_build_shared" = "no" && enable_shared=no
4762
4763
# On AIX, shared libraries and static libraries use the same namespace, and
4764
# are all built from PIC.
30 by pklong
moved byteio to upper dir
4765
case $host_os in
1 by pklong
Initial revision
4766
aix3*)
4767
  test "$enable_shared" = yes && enable_static=no
4768
  if test -n "$RANLIB"; then
4769
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4770
    postinstall_cmds='$RANLIB $lib'
4771
  fi
4772
  ;;
21 by pklong
New ukengine
4773
aix4* | aix5*)
30 by pklong
moved byteio to upper dir
4774
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4775
    test "$enable_shared" = yes && enable_static=no
4776
  fi
1 by pklong
Initial revision
4777
  ;;
4778
esac
4779
AC_MSG_RESULT([$enable_shared])
4780
4781
AC_MSG_CHECKING([whether to build static libraries])
4782
# Make sure either enable_shared or enable_static is yes.
4783
test "$enable_shared" = yes || enable_static=yes
4784
AC_MSG_RESULT([$enable_static])
4785
4786
_LT_AC_TAGVAR(GCC, $1)="$G77"
4787
_LT_AC_TAGVAR(LD, $1)="$LD"
4788
4789
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4790
AC_LIBTOOL_PROG_CC_C_O($1)
4791
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4792
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4793
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4794
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4795
4796
AC_LIBTOOL_CONFIG($1)
4797
4798
AC_LANG_POP
4799
CC="$lt_save_CC"
4800
])# AC_LIBTOOL_LANG_F77_CONFIG
4801
4802
4803
# AC_LIBTOOL_LANG_GCJ_CONFIG
4804
# --------------------------
4805
# Ensure that the configuration vars for the C compiler are
4806
# suitably defined.  Those variables are subsequently used by
4807
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4808
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4809
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4810
[AC_LANG_SAVE
4811
4812
# Source file extension for Java test sources.
4813
ac_ext=java
4814
4815
# Object file extension for compiled Java test sources.
4816
objext=o
4817
_LT_AC_TAGVAR(objext, $1)=$objext
4818
4819
# Code to be used in simple compile tests
4820
lt_simple_compile_test_code="class foo {}\n"
4821
4822
# Code to be used in simple link tests
30 by pklong
moved byteio to upper dir
4823
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
1 by pklong
Initial revision
4824
4825
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4826
_LT_AC_SYS_COMPILER
4827
30 by pklong
moved byteio to upper dir
4828
# save warnings/boilerplate of simple test code
4829
_LT_COMPILER_BOILERPLATE
4830
_LT_LINKER_BOILERPLATE
4831
1 by pklong
Initial revision
4832
# Allow CC to be a program name with arguments.
4833
lt_save_CC="$CC"
4834
CC=${GCJ-"gcj"}
4835
compiler=$CC
4836
_LT_AC_TAGVAR(compiler, $1)=$CC
30 by pklong
moved byteio to upper dir
4837
_LT_CC_BASENAME([$compiler])
1 by pklong
Initial revision
4838
4839
# GCJ did not exist at the time GCC didn't implicitly link libc in.
4840
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4841
30 by pklong
moved byteio to upper dir
4842
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4843
1 by pklong
Initial revision
4844
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4845
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4846
AC_LIBTOOL_PROG_CC_C_O($1)
4847
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4848
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4849
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4850
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4851
4852
AC_LIBTOOL_CONFIG($1)
4853
4854
AC_LANG_RESTORE
4855
CC="$lt_save_CC"
4856
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4857
4858
4859
# AC_LIBTOOL_LANG_RC_CONFIG
95 by pklong
Unified with UniKey 4.0
4860
# -------------------------
1 by pklong
Initial revision
4861
# Ensure that the configuration vars for the Windows resource compiler are
4862
# suitably defined.  Those variables are subsequently used by
4863
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4864
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4865
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4866
[AC_LANG_SAVE
4867
4868
# Source file extension for RC test sources.
4869
ac_ext=rc
4870
4871
# Object file extension for compiled RC test sources.
4872
objext=o
4873
_LT_AC_TAGVAR(objext, $1)=$objext
4874
4875
# Code to be used in simple compile tests
4876
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4877
4878
# Code to be used in simple link tests
4879
lt_simple_link_test_code="$lt_simple_compile_test_code"
4880
4881
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4882
_LT_AC_SYS_COMPILER
4883
30 by pklong
moved byteio to upper dir
4884
# save warnings/boilerplate of simple test code
4885
_LT_COMPILER_BOILERPLATE
4886
_LT_LINKER_BOILERPLATE
4887
1 by pklong
Initial revision
4888
# Allow CC to be a program name with arguments.
4889
lt_save_CC="$CC"
4890
CC=${RC-"windres"}
4891
compiler=$CC
4892
_LT_AC_TAGVAR(compiler, $1)=$CC
30 by pklong
moved byteio to upper dir
4893
_LT_CC_BASENAME([$compiler])
1 by pklong
Initial revision
4894
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4895
4896
AC_LIBTOOL_CONFIG($1)
4897
4898
AC_LANG_RESTORE
4899
CC="$lt_save_CC"
4900
])# AC_LIBTOOL_LANG_RC_CONFIG
4901
4902
4903
# AC_LIBTOOL_CONFIG([TAGNAME])
4904
# ----------------------------
4905
# If TAGNAME is not passed, then create an initial libtool script
4906
# with a default configuration from the untagged config vars.  Otherwise
4907
# add code to config.status for appending the configuration named by
4908
# TAGNAME from the matching tagged config vars.
4909
AC_DEFUN([AC_LIBTOOL_CONFIG],
4910
[# The else clause should only fire when bootstrapping the
4911
# libtool distribution, otherwise you forgot to ship ltmain.sh
4912
# with your package, and you will get complaints that there are
4913
# no rules to generate ltmain.sh.
4914
if test -f "$ltmain"; then
4915
  # See if we are running on zsh, and set the options which allow our commands through
4916
  # without removal of \ escapes.
4917
  if test -n "${ZSH_VERSION+set}" ; then
4918
    setopt NO_GLOB_SUBST
4919
  fi
4920
  # Now quote all the things that may contain metacharacters while being
4921
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4922
  # variables and quote the copies for generation of the libtool script.
95 by pklong
Unified with UniKey 4.0
4923
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
1 by pklong
Initial revision
4924
    SED SHELL STRIP \
4925
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4926
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4927
    deplibs_check_method reload_flag reload_cmds need_locks \
4928
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4929
    lt_cv_sys_global_symbol_to_c_name_address \
4930
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4931
    old_postinstall_cmds old_postuninstall_cmds \
4932
    _LT_AC_TAGVAR(compiler, $1) \
4933
    _LT_AC_TAGVAR(CC, $1) \
4934
    _LT_AC_TAGVAR(LD, $1) \
4935
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4936
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4937
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4938
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4939
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4940
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4941
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4942
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4943
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4944
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4945
    _LT_AC_TAGVAR(predep_objects, $1) \
4946
    _LT_AC_TAGVAR(postdep_objects, $1) \
4947
    _LT_AC_TAGVAR(predeps, $1) \
4948
    _LT_AC_TAGVAR(postdeps, $1) \
4949
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4950
    _LT_AC_TAGVAR(archive_cmds, $1) \
4951
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4952
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4953
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4954
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4955
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4956
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4957
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4958
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4959
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4960
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4961
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4962
    _LT_AC_TAGVAR(module_cmds, $1) \
4963
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4964
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4965
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4966
    _LT_AC_TAGVAR(include_expsyms, $1); do
4967
4968
    case $var in
4969
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4970
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4971
    _LT_AC_TAGVAR(archive_cmds, $1) | \
4972
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4973
    _LT_AC_TAGVAR(module_cmds, $1) | \
4974
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4975
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4976
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4977
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4978
    postinstall_cmds | postuninstall_cmds | \
4979
    old_postinstall_cmds | old_postuninstall_cmds | \
4980
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4981
      # Double-quote double-evaled strings.
4982
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4983
      ;;
4984
    *)
4985
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4986
      ;;
4987
    esac
4988
  done
4989
4990
  case $lt_echo in
4991
  *'\[$]0 --fallback-echo"')
4992
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4993
    ;;
4994
  esac
4995
4996
ifelse([$1], [],
4997
  [cfgfile="${ofile}T"
4998
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4999
  $rm -f "$cfgfile"
5000
  AC_MSG_NOTICE([creating $ofile])],
5001
  [cfgfile="$ofile"])
5002
5003
  cat <<__EOF__ >> "$cfgfile"
5004
ifelse([$1], [],
5005
[#! $SHELL
5006
5007
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5008
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5009
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5010
#
5011
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5012
# Free Software Foundation, Inc.
5013
#
5014
# This file is part of GNU Libtool:
5015
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5016
#
5017
# This program is free software; you can redistribute it and/or modify
5018
# it under the terms of the GNU General Public License as published by
5019
# the Free Software Foundation; either version 2 of the License, or
5020
# (at your option) any later version.
5021
#
5022
# This program is distributed in the hope that it will be useful, but
5023
# WITHOUT ANY WARRANTY; without even the implied warranty of
5024
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5025
# General Public License for more details.
5026
#
5027
# You should have received a copy of the GNU General Public License
5028
# along with this program; if not, write to the Free Software
30 by pklong
moved byteio to upper dir
5029
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1 by pklong
Initial revision
5030
#
5031
# As a special exception to the GNU General Public License, if you
5032
# distribute this file as part of a program that contains a
5033
# configuration script generated by Autoconf, you may include it under
5034
# the same distribution terms that you use for the rest of that program.
5035
5036
# A sed program that does not truncate output.
5037
SED=$lt_SED
5038
5039
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
30 by pklong
moved byteio to upper dir
5040
Xsed="$SED -e 1s/^X//"
1 by pklong
Initial revision
5041
5042
# The HP-UX ksh and POSIX shell print the target directory to stdout
5043
# if CDPATH is set.
30 by pklong
moved byteio to upper dir
5044
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1 by pklong
Initial revision
5045
5046
# The names of the tagged configurations supported by this script.
5047
available_tags=
5048
5049
# ### BEGIN LIBTOOL CONFIG],
5050
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5051
5052
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5053
5054
# Shell to use when invoking shell scripts.
5055
SHELL=$lt_SHELL
5056
5057
# Whether or not to build shared libraries.
5058
build_libtool_libs=$enable_shared
5059
5060
# Whether or not to build static libraries.
5061
build_old_libs=$enable_static
5062
5063
# Whether or not to add -lc for building shared libraries.
5064
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5065
5066
# Whether or not to disallow shared libs when runtime libs are static
5067
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5068
5069
# Whether or not to optimize for fast installation.
5070
fast_install=$enable_fast_install
5071
5072
# The host system.
5073
host_alias=$host_alias
5074
host=$host
30 by pklong
moved byteio to upper dir
5075
host_os=$host_os
5076
5077
# The build system.
5078
build_alias=$build_alias
5079
build=$build
5080
build_os=$build_os
1 by pklong
Initial revision
5081
5082
# An echo program that does not interpret backslashes.
5083
echo=$lt_echo
5084
5085
# The archiver.
5086
AR=$lt_AR
5087
AR_FLAGS=$lt_AR_FLAGS
5088
5089
# A C compiler.
5090
LTCC=$lt_LTCC
5091
95 by pklong
Unified with UniKey 4.0
5092
# LTCC compiler flags.
5093
LTCFLAGS=$lt_LTCFLAGS
5094
1 by pklong
Initial revision
5095
# A language-specific compiler.
5096
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5097
5098
# Is the compiler the GNU C compiler?
5099
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5100
5101
# An ERE matcher.
5102
EGREP=$lt_EGREP
5103
5104
# The linker used to build libraries.
5105
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5106
5107
# Whether we need hard or soft links.
5108
LN_S=$lt_LN_S
5109
5110
# A BSD-compatible nm program.
5111
NM=$lt_NM
5112
5113
# A symbol stripping program
5114
STRIP=$lt_STRIP
5115
5116
# Used to examine libraries when file_magic_cmd begins "file"
5117
MAGIC_CMD=$MAGIC_CMD
5118
5119
# Used on cygwin: DLL creation program.
5120
DLLTOOL="$DLLTOOL"
5121
5122
# Used on cygwin: object dumper.
5123
OBJDUMP="$OBJDUMP"
5124
5125
# Used on cygwin: assembler.
5126
AS="$AS"
5127
5128
# The name of the directory that contains temporary libtool files.
5129
objdir=$objdir
5130
5131
# How to create reloadable object files.
5132
reload_flag=$lt_reload_flag
5133
reload_cmds=$lt_reload_cmds
5134
5135
# How to pass a linker flag through the compiler.
5136
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5137
5138
# Object file suffix (normally "o").
5139
objext="$ac_objext"
5140
5141
# Old archive suffix (normally "a").
5142
libext="$libext"
5143
5144
# Shared library suffix (normally ".so").
21 by pklong
New ukengine
5145
shrext_cmds='$shrext_cmds'
1 by pklong
Initial revision
5146
5147
# Executable file suffix (normally "").
5148
exeext="$exeext"
5149
5150
# Additional compiler flags for building library objects.
5151
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5152
pic_mode=$pic_mode
5153
5154
# What is the maximum length of a command?
5155
max_cmd_len=$lt_cv_sys_max_cmd_len
5156
5157
# Does compiler simultaneously support -c and -o options?
5158
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5159
30 by pklong
moved byteio to upper dir
5160
# Must we lock files when doing compilation?
1 by pklong
Initial revision
5161
need_locks=$lt_need_locks
5162
5163
# Do we need the lib prefix for modules?
5164
need_lib_prefix=$need_lib_prefix
5165
5166
# Do we need a version for libraries?
5167
need_version=$need_version
5168
5169
# Whether dlopen is supported.
5170
dlopen_support=$enable_dlopen
5171
5172
# Whether dlopen of programs is supported.
5173
dlopen_self=$enable_dlopen_self
5174
5175
# Whether dlopen of statically linked programs is supported.
5176
dlopen_self_static=$enable_dlopen_self_static
5177
5178
# Compiler flag to prevent dynamic linking.
5179
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5180
5181
# Compiler flag to turn off builtin functions.
5182
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5183
5184
# Compiler flag to allow reflexive dlopens.
5185
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5186
5187
# Compiler flag to generate shared objects directly from archives.
5188
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5189
5190
# Compiler flag to generate thread-safe objects.
5191
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5192
5193
# Library versioning type.
5194
version_type=$version_type
5195
5196
# Format of library name prefix.
5197
libname_spec=$lt_libname_spec
5198
5199
# List of archive names.  First name is the real one, the rest are links.
5200
# The last name is the one that the linker finds with -lNAME.
5201
library_names_spec=$lt_library_names_spec
5202
5203
# The coded name of the library, if different from the real name.
5204
soname_spec=$lt_soname_spec
5205
5206
# Commands used to build and install an old-style archive.
5207
RANLIB=$lt_RANLIB
5208
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5209
old_postinstall_cmds=$lt_old_postinstall_cmds
5210
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5211
5212
# Create an old-style archive from a shared archive.
5213
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5214
5215
# Create a temporary old-style archive to link instead of a shared archive.
5216
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5217
5218
# Commands used to build and install a shared archive.
5219
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5220
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5221
postinstall_cmds=$lt_postinstall_cmds
5222
postuninstall_cmds=$lt_postuninstall_cmds
5223
5224
# Commands used to build a loadable module (assumed same as above if empty)
5225
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5226
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5227
5228
# Commands to strip libraries.
5229
old_striplib=$lt_old_striplib
5230
striplib=$lt_striplib
5231
5232
# Dependencies to place before the objects being linked to create a
5233
# shared library.
5234
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5235
5236
# Dependencies to place after the objects being linked to create a
5237
# shared library.
5238
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5239
5240
# Dependencies to place before the objects being linked to create a
5241
# shared library.
5242
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5243
5244
# Dependencies to place after the objects being linked to create a
5245
# shared library.
5246
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5247
5248
# The library search path used internally by the compiler when linking
5249
# a shared library.
5250
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5251
5252
# Method to check whether dependent libraries are shared objects.
5253
deplibs_check_method=$lt_deplibs_check_method
5254
5255
# Command to use when deplibs_check_method == file_magic.
5256
file_magic_cmd=$lt_file_magic_cmd
5257
5258
# Flag that allows shared libraries with undefined symbols to be built.
5259
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5260
5261
# Flag that forces no undefined symbols.
5262
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5263
5264
# Commands used to finish a libtool library installation in a directory.
5265
finish_cmds=$lt_finish_cmds
5266
5267
# Same as above, but a single script fragment to be evaled but not shown.
5268
finish_eval=$lt_finish_eval
5269
5270
# Take the output of nm and produce a listing of raw symbols and C names.
5271
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5272
5273
# Transform the output of nm in a proper C declaration
5274
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5275
5276
# Transform the output of nm in a C name address pair
5277
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5278
5279
# This is the shared library runtime path variable.
5280
runpath_var=$runpath_var
5281
5282
# This is the shared library path variable.
5283
shlibpath_var=$shlibpath_var
5284
5285
# Is shlibpath searched before the hard-coded library search path?
5286
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5287
5288
# How to hardcode a shared library path into an executable.
5289
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5290
5291
# Whether we should hardcode library paths into libraries.
5292
hardcode_into_libs=$hardcode_into_libs
5293
5294
# Flag to hardcode \$libdir into a binary during linking.
5295
# This must work even if \$libdir does not exist.
5296
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5297
5298
# If ld is used when linking, flag to hardcode \$libdir into
5299
# a binary during linking. This must work even if \$libdir does
5300
# not exist.
5301
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5302
5303
# Whether we need a single -rpath flag with a separated argument.
5304
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5305
5306
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5307
# resulting binary.
5308
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5309
5310
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5311
# resulting binary.
5312
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5313
5314
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5315
# the resulting binary.
5316
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5317
5318
# Set to yes if building a shared library automatically hardcodes DIR into the library
5319
# and all subsequent libraries and executables linked against it.
5320
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5321
5322
# Variables whose values should be saved in libtool wrapper scripts and
5323
# restored at relink time.
5324
variables_saved_for_relink="$variables_saved_for_relink"
5325
5326
# Whether libtool must link a program against all its dependency libraries.
5327
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5328
5329
# Compile-time system search path for libraries
5330
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5331
5332
# Run-time system search path for libraries
5333
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5334
5335
# Fix the shell variable \$srcfile for the compiler.
5336
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5337
5338
# Set to yes if exported symbols are required.
5339
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5340
5341
# The commands to list exported symbols.
5342
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5343
5344
# The commands to extract the exported symbol list from a shared archive.
5345
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5346
5347
# Symbols that should not be listed in the preloaded symbols.
5348
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5349
5350
# Symbols that must always be exported.
5351
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5352
5353
ifelse([$1],[],
5354
[# ### END LIBTOOL CONFIG],
5355
[# ### END LIBTOOL TAG CONFIG: $tagname])
5356
5357
__EOF__
5358
5359
ifelse([$1],[], [
5360
  case $host_os in
5361
  aix3*)
5362
    cat <<\EOF >> "$cfgfile"
5363
5364
# AIX sometimes has problems with the GCC collect2 program.  For some
5365
# reason, if we set the COLLECT_NAMES environment variable, the problems
5366
# vanish in a puff of smoke.
5367
if test "X${COLLECT_NAMES+set}" != Xset; then
5368
  COLLECT_NAMES=
5369
  export COLLECT_NAMES
5370
fi
5371
EOF
5372
    ;;
5373
  esac
5374
5375
  # We use sed instead of cat because bash on DJGPP gets confused if
5376
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5377
  # text mode, it properly converts lines to CR/LF.  This bash problem
5378
  # is reportedly fixed, but why not run on old versions too?
5379
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5380
5381
  mv -f "$cfgfile" "$ofile" || \
5382
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5383
  chmod +x "$ofile"
5384
])
5385
else
5386
  # If there is no Makefile yet, we rely on a make rule to execute
5387
  # `config.status --recheck' to rerun these tests and create the
5388
  # libtool script then.
5389
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5390
  if test -f "$ltmain_in"; then
5391
    test -f Makefile && make "$ltmain"
5392
  fi
5393
fi
5394
])# AC_LIBTOOL_CONFIG
5395
5396
5397
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5398
# -------------------------------------------
5399
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5400
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5401
5402
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5403
5404
if test "$GCC" = yes; then
5405
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5406
5407
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5408
    lt_cv_prog_compiler_rtti_exceptions,
5409
    [-fno-rtti -fno-exceptions], [],
5410
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5411
fi
5412
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5413
5414
5415
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5416
# ---------------------------------
5417
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5418
[AC_REQUIRE([AC_CANONICAL_HOST])
5419
AC_REQUIRE([AC_PROG_NM])
5420
AC_REQUIRE([AC_OBJEXT])
5421
# Check for command to grab the raw symbol name followed by C symbol from nm.
5422
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5423
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5424
[
5425
# These are sane defaults that work on at least a few old systems.
5426
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5427
5428
# Character class describing NM global symbol codes.
5429
symcode='[[BCDEGRST]]'
5430
5431
# Regexp to match symbols that can be accessed directly from C.
5432
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5433
5434
# Transform an extracted symbol line into a proper C declaration
5435
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5436
5437
# Transform an extracted symbol line into symbol name and symbol address
5438
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5439
5440
# Define system-specific variables.
5441
case $host_os in
5442
aix*)
5443
  symcode='[[BCDT]]'
5444
  ;;
5445
cygwin* | mingw* | pw32*)
5446
  symcode='[[ABCDGISTW]]'
5447
  ;;
5448
hpux*) # Its linker distinguishes data from code symbols
5449
  if test "$host_cpu" = ia64; then
5450
    symcode='[[ABCDEGRST]]'
5451
  fi
5452
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5453
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5454
  ;;
95 by pklong
Unified with UniKey 4.0
5455
linux* | k*bsd*-gnu)
30 by pklong
moved byteio to upper dir
5456
  if test "$host_cpu" = ia64; then
5457
    symcode='[[ABCDGIRSTW]]'
5458
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5459
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5460
  fi
5461
  ;;
1 by pklong
Initial revision
5462
irix* | nonstopux*)
5463
  symcode='[[BCDEGRST]]'
5464
  ;;
5465
osf*)
5466
  symcode='[[BCDEGQRST]]'
5467
  ;;
95 by pklong
Unified with UniKey 4.0
5468
solaris*)
1 by pklong
Initial revision
5469
  symcode='[[BDRT]]'
5470
  ;;
95 by pklong
Unified with UniKey 4.0
5471
sco3.2v5*)
5472
  symcode='[[DT]]'
5473
  ;;
5474
sysv4.2uw2*)
5475
  symcode='[[DT]]'
5476
  ;;
5477
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5478
  symcode='[[ABDT]]'
5479
  ;;
1 by pklong
Initial revision
5480
sysv4)
5481
  symcode='[[DFNSTU]]'
5482
  ;;
5483
esac
5484
5485
# Handle CRLF in mingw tool chain
5486
opt_cr=
5487
case $build_os in
5488
mingw*)
5489
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5490
  ;;
5491
esac
5492
5493
# If we're using GNU nm, then use its standard symbol codes.
5494
case `$NM -V 2>&1` in
5495
*GNU* | *'with BFD'*)
5496
  symcode='[[ABCDGIRSTW]]' ;;
5497
esac
5498
5499
# Try without a prefix undercore, then with it.
5500
for ac_symprfx in "" "_"; do
5501
30 by pklong
moved byteio to upper dir
5502
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5503
  symxfrm="\\1 $ac_symprfx\\2 \\2"
5504
1 by pklong
Initial revision
5505
  # Write the raw and C identifiers.
30 by pklong
moved byteio to upper dir
5506
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
1 by pklong
Initial revision
5507
5508
  # Check to see that the pipe works correctly.
5509
  pipe_works=no
5510
5511
  rm -f conftest*
5512
  cat > conftest.$ac_ext <<EOF
5513
#ifdef __cplusplus
5514
extern "C" {
5515
#endif
5516
char nm_test_var;
5517
void nm_test_func(){}
5518
#ifdef __cplusplus
5519
}
5520
#endif
5521
int main(){nm_test_var='a';nm_test_func();return(0);}
5522
EOF
5523
5524
  if AC_TRY_EVAL(ac_compile); then
5525
    # Now try to grab the symbols.
5526
    nlist=conftest.nm
5527
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5528
      # Try sorting and uniquifying the output.
5529
      if sort "$nlist" | uniq > "$nlist"T; then
5530
	mv -f "$nlist"T "$nlist"
5531
      else
5532
	rm -f "$nlist"T
5533
      fi
5534
5535
      # Make sure that we snagged all the symbols we need.
5536
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5537
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5538
	  cat <<EOF > conftest.$ac_ext
5539
#ifdef __cplusplus
5540
extern "C" {
5541
#endif
5542
5543
EOF
5544
	  # Now generate the symbol file.
5545
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5546
5547
	  cat <<EOF >> conftest.$ac_ext
5548
#if defined (__STDC__) && __STDC__
5549
# define lt_ptr_t void *
5550
#else
5551
# define lt_ptr_t char *
5552
# define const
5553
#endif
5554
5555
/* The mapping between symbol names and symbols. */
5556
const struct {
5557
  const char *name;
5558
  lt_ptr_t address;
5559
}
5560
lt_preloaded_symbols[[]] =
5561
{
5562
EOF
5563
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5564
	  cat <<\EOF >> conftest.$ac_ext
5565
  {0, (lt_ptr_t) 0}
5566
};
5567
5568
#ifdef __cplusplus
5569
}
5570
#endif
5571
EOF
5572
	  # Now try linking the two files.
5573
	  mv conftest.$ac_objext conftstm.$ac_objext
5574
	  lt_save_LIBS="$LIBS"
5575
	  lt_save_CFLAGS="$CFLAGS"
5576
	  LIBS="conftstm.$ac_objext"
5577
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5578
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5579
	    pipe_works=yes
5580
	  fi
5581
	  LIBS="$lt_save_LIBS"
5582
	  CFLAGS="$lt_save_CFLAGS"
5583
	else
5584
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5585
	fi
5586
      else
5587
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5588
      fi
5589
    else
5590
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5591
    fi
5592
  else
5593
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5594
    cat conftest.$ac_ext >&5
5595
  fi
5596
  rm -f conftest* conftst*
5597
5598
  # Do not use the global_symbol_pipe unless it works.
5599
  if test "$pipe_works" = yes; then
5600
    break
5601
  else
5602
    lt_cv_sys_global_symbol_pipe=
5603
  fi
5604
done
5605
])
5606
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5607
  lt_cv_sys_global_symbol_to_cdecl=
5608
fi
5609
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5610
  AC_MSG_RESULT(failed)
5611
else
5612
  AC_MSG_RESULT(ok)
5613
fi
5614
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5615
5616
5617
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5618
# ---------------------------------------
5619
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5620
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5621
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5622
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5623
5624
AC_MSG_CHECKING([for $compiler option to produce PIC])
5625
 ifelse([$1],[CXX],[
5626
  # C++ specific cases for pic, static, wl, etc.
5627
  if test "$GXX" = yes; then
5628
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5629
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5630
5631
    case $host_os in
5632
    aix*)
5633
      # All AIX code is PIC.
5634
      if test "$host_cpu" = ia64; then
5635
	# AIX 5 now supports IA64 processor
5636
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5637
      fi
5638
      ;;
5639
    amigaos*)
5640
      # FIXME: we need at least 68020 code to build shared libraries, but
5641
      # adding the `-m68020' flag to GCC prevents building anything better,
5642
      # like `-m68040'.
5643
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5644
      ;;
5645
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5646
      # PIC is the default for these OSes.
5647
      ;;
5648
    mingw* | os2* | pw32*)
5649
      # This hack is so that the source file can tell whether it is being
5650
      # built for inclusion in a dll (and should export symbols for example).
5651
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5652
      ;;
5653
    darwin* | rhapsody*)
5654
      # PIC is the default on this platform
5655
      # Common symbols not allowed in MH_DYLIB files
5656
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5657
      ;;
5658
    *djgpp*)
5659
      # DJGPP does not support shared libraries at all
5660
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5661
      ;;
95 by pklong
Unified with UniKey 4.0
5662
    interix3*)
5663
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5664
      # Instead, we relocate shared libraries at runtime.
5665
      ;;
1 by pklong
Initial revision
5666
    sysv4*MP*)
5667
      if test -d /usr/nec; then
5668
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5669
      fi
5670
      ;;
5671
    hpux*)
5672
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5673
      # not for PA HP-UX.
30 by pklong
moved byteio to upper dir
5674
      case $host_cpu in
1 by pklong
Initial revision
5675
      hppa*64*|ia64*)
5676
	;;
5677
      *)
5678
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5679
	;;
5680
      esac
5681
      ;;
5682
    *)
5683
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5684
      ;;
5685
    esac
5686
  else
5687
    case $host_os in
5688
      aix4* | aix5*)
5689
	# All AIX code is PIC.
5690
	if test "$host_cpu" = ia64; then
5691
	  # AIX 5 now supports IA64 processor
5692
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5693
	else
5694
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5695
	fi
5696
	;;
5697
      chorus*)
5698
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5699
	cxch68*)
1 by pklong
Initial revision
5700
	  # Green Hills C++ Compiler
5701
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5702
	  ;;
5703
	esac
5704
	;;
30 by pklong
moved byteio to upper dir
5705
       darwin*)
5706
         # PIC is the default on this platform
5707
         # Common symbols not allowed in MH_DYLIB files
5708
         case $cc_basename in
5709
           xlc*)
5710
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5711
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5712
           ;;
5713
         esac
5714
       ;;
1 by pklong
Initial revision
5715
      dgux*)
5716
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5717
	  ec++*)
1 by pklong
Initial revision
5718
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5719
	    ;;
30 by pklong
moved byteio to upper dir
5720
	  ghcx*)
1 by pklong
Initial revision
5721
	    # Green Hills C++ Compiler
5722
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5723
	    ;;
5724
	  *)
5725
	    ;;
5726
	esac
5727
	;;
95 by pklong
Unified with UniKey 4.0
5728
      freebsd* | dragonfly*)
1 by pklong
Initial revision
5729
	# FreeBSD uses GNU C++
5730
	;;
5731
      hpux9* | hpux10* | hpux11*)
5732
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5733
	  CC*)
1 by pklong
Initial revision
5734
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
95 by pklong
Unified with UniKey 4.0
5735
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
1 by pklong
Initial revision
5736
	    if test "$host_cpu" != ia64; then
5737
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5738
	    fi
5739
	    ;;
30 by pklong
moved byteio to upper dir
5740
	  aCC*)
1 by pklong
Initial revision
5741
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
95 by pklong
Unified with UniKey 4.0
5742
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
30 by pklong
moved byteio to upper dir
5743
	    case $host_cpu in
1 by pklong
Initial revision
5744
	    hppa*64*|ia64*)
5745
	      # +Z the default
5746
	      ;;
5747
	    *)
5748
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5749
	      ;;
5750
	    esac
5751
	    ;;
5752
	  *)
5753
	    ;;
5754
	esac
5755
	;;
95 by pklong
Unified with UniKey 4.0
5756
      interix*)
5757
	# This is c89, which is MS Visual C++ (no shared libs)
5758
	# Anyone wants to do a port?
5759
	;;
1 by pklong
Initial revision
5760
      irix5* | irix6* | nonstopux*)
5761
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5762
	  CC*)
1 by pklong
Initial revision
5763
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5764
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5765
	    # CC pic flag -KPIC is the default.
5766
	    ;;
5767
	  *)
5768
	    ;;
5769
	esac
5770
	;;
95 by pklong
Unified with UniKey 4.0
5771
      linux* | k*bsd*-gnu)
1 by pklong
Initial revision
5772
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5773
	  KCC*)
1 by pklong
Initial revision
5774
	    # KAI C++ Compiler
5775
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5776
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5777
	    ;;
30 by pklong
moved byteio to upper dir
5778
	  icpc* | ecpc*)
1 by pklong
Initial revision
5779
	    # Intel C++
5780
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5781
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5782
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5783
	    ;;
30 by pklong
moved byteio to upper dir
5784
	  pgCC*)
5785
	    # Portland Group C++ compiler.
5786
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5787
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5788
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5789
	    ;;
5790
	  cxx*)
1 by pklong
Initial revision
5791
	    # Compaq C++
5792
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5793
	    # Linux and Compaq Tru64 Unix objects are PIC.
5794
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5795
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5796
	    ;;
5797
	  *)
5798
	    ;;
5799
	esac
5800
	;;
5801
      lynxos*)
5802
	;;
5803
      m88k*)
5804
	;;
5805
      mvs*)
5806
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5807
	  cxx*)
1 by pklong
Initial revision
5808
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5809
	    ;;
5810
	  *)
5811
	    ;;
5812
	esac
5813
	;;
95 by pklong
Unified with UniKey 4.0
5814
      netbsd* | netbsdelf*-gnu)
1 by pklong
Initial revision
5815
	;;
5816
      osf3* | osf4* | osf5*)
5817
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5818
	  KCC*)
1 by pklong
Initial revision
5819
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5820
	    ;;
30 by pklong
moved byteio to upper dir
5821
	  RCC*)
1 by pklong
Initial revision
5822
	    # Rational C++ 2.4.1
5823
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5824
	    ;;
30 by pklong
moved byteio to upper dir
5825
	  cxx*)
1 by pklong
Initial revision
5826
	    # Digital/Compaq C++
5827
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5828
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5829
	    # Linux and Compaq Tru64 Unix objects are PIC.
5830
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5831
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5832
	    ;;
5833
	  *)
5834
	    ;;
5835
	esac
5836
	;;
5837
      psos*)
5838
	;;
5839
      solaris*)
5840
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5841
	  CC*)
1 by pklong
Initial revision
5842
	    # Sun C++ 4.2, 5.x and Centerline C++
5843
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5844
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5845
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5846
	    ;;
30 by pklong
moved byteio to upper dir
5847
	  gcx*)
1 by pklong
Initial revision
5848
	    # Green Hills C++ Compiler
5849
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5850
	    ;;
5851
	  *)
5852
	    ;;
5853
	esac
5854
	;;
5855
      sunos4*)
5856
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5857
	  CC*)
1 by pklong
Initial revision
5858
	    # Sun C++ 4.x
5859
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5860
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5861
	    ;;
30 by pklong
moved byteio to upper dir
5862
	  lcc*)
1 by pklong
Initial revision
5863
	    # Lucid
5864
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5865
	    ;;
5866
	  *)
5867
	    ;;
5868
	esac
5869
	;;
5870
      tandem*)
5871
	case $cc_basename in
30 by pklong
moved byteio to upper dir
5872
	  NCC*)
1 by pklong
Initial revision
5873
	    # NonStop-UX NCC 3.20
5874
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5875
	    ;;
5876
	  *)
5877
	    ;;
5878
	esac
5879
	;;
95 by pklong
Unified with UniKey 4.0
5880
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5881
	case $cc_basename in
5882
	  CC*)
5883
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5884
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5885
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5886
	    ;;
5887
	esac
1 by pklong
Initial revision
5888
	;;
5889
      vxworks*)
5890
	;;
5891
      *)
5892
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5893
	;;
5894
    esac
5895
  fi
5896
],
5897
[
5898
  if test "$GCC" = yes; then
5899
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5900
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5901
5902
    case $host_os in
5903
      aix*)
5904
      # All AIX code is PIC.
5905
      if test "$host_cpu" = ia64; then
5906
	# AIX 5 now supports IA64 processor
5907
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5908
      fi
5909
      ;;
5910
5911
    amigaos*)
5912
      # FIXME: we need at least 68020 code to build shared libraries, but
5913
      # adding the `-m68020' flag to GCC prevents building anything better,
5914
      # like `-m68040'.
5915
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5916
      ;;
5917
5918
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5919
      # PIC is the default for these OSes.
5920
      ;;
5921
5922
    mingw* | pw32* | os2*)
5923
      # This hack is so that the source file can tell whether it is being
5924
      # built for inclusion in a dll (and should export symbols for example).
5925
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5926
      ;;
5927
5928
    darwin* | rhapsody*)
5929
      # PIC is the default on this platform
5930
      # Common symbols not allowed in MH_DYLIB files
5931
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5932
      ;;
5933
95 by pklong
Unified with UniKey 4.0
5934
    interix3*)
5935
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5936
      # Instead, we relocate shared libraries at runtime.
5937
      ;;
5938
1 by pklong
Initial revision
5939
    msdosdjgpp*)
5940
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5941
      # on systems that don't support them.
5942
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5943
      enable_shared=no
5944
      ;;
5945
5946
    sysv4*MP*)
5947
      if test -d /usr/nec; then
5948
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5949
      fi
5950
      ;;
5951
5952
    hpux*)
5953
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5954
      # not for PA HP-UX.
30 by pklong
moved byteio to upper dir
5955
      case $host_cpu in
1 by pklong
Initial revision
5956
      hppa*64*|ia64*)
5957
	# +Z the default
5958
	;;
5959
      *)
5960
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5961
	;;
5962
      esac
5963
      ;;
5964
5965
    *)
5966
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5967
      ;;
5968
    esac
5969
  else
5970
    # PORTME Check for flag to pass linker flags through the system compiler.
5971
    case $host_os in
5972
    aix*)
5973
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5974
      if test "$host_cpu" = ia64; then
5975
	# AIX 5 now supports IA64 processor
5976
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5977
      else
5978
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5979
      fi
5980
      ;;
30 by pklong
moved byteio to upper dir
5981
      darwin*)
5982
        # PIC is the default on this platform
5983
        # Common symbols not allowed in MH_DYLIB files
5984
       case $cc_basename in
5985
         xlc*)
5986
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5987
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5988
         ;;
5989
       esac
5990
       ;;
1 by pklong
Initial revision
5991
5992
    mingw* | pw32* | os2*)
5993
      # This hack is so that the source file can tell whether it is being
5994
      # built for inclusion in a dll (and should export symbols for example).
5995
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5996
      ;;
5997
5998
    hpux9* | hpux10* | hpux11*)
5999
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6000
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6001
      # not for PA HP-UX.
30 by pklong
moved byteio to upper dir
6002
      case $host_cpu in
1 by pklong
Initial revision
6003
      hppa*64*|ia64*)
6004
	# +Z the default
6005
	;;
6006
      *)
6007
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6008
	;;
6009
      esac
6010
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6011
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6012
      ;;
6013
6014
    irix5* | irix6* | nonstopux*)
6015
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6016
      # PIC (with -KPIC) is the default.
6017
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6018
      ;;
6019
6020
    newsos6)
6021
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6022
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6023
      ;;
6024
95 by pklong
Unified with UniKey 4.0
6025
    linux* | k*bsd*-gnu)
30 by pklong
moved byteio to upper dir
6026
      case $cc_basename in
1 by pklong
Initial revision
6027
      icc* | ecc*)
6028
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6029
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6030
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6031
        ;;
30 by pklong
moved byteio to upper dir
6032
      pgcc* | pgf77* | pgf90* | pgf95*)
6033
        # Portland Group compilers (*not* the Pentium gcc compiler,
6034
	# which looks to be a dead project)
6035
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6036
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6037
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6038
        ;;
1 by pklong
Initial revision
6039
      ccc*)
6040
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6041
        # All Alpha code is PIC.
6042
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6043
        ;;
6044
      esac
6045
      ;;
6046
6047
    osf3* | osf4* | osf5*)
6048
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6049
      # All OSF/1 code is PIC.
6050
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6051
      ;;
6052
6053
    solaris*)
6054
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6055
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
30 by pklong
moved byteio to upper dir
6056
      case $cc_basename in
6057
      f77* | f90* | f95*)
6058
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6059
      *)
6060
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6061
      esac
1 by pklong
Initial revision
6062
      ;;
6063
6064
    sunos4*)
6065
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6066
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6067
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6068
      ;;
6069
95 by pklong
Unified with UniKey 4.0
6070
    sysv4 | sysv4.2uw2* | sysv4.3*)
1 by pklong
Initial revision
6071
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6072
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6073
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6074
      ;;
6075
6076
    sysv4*MP*)
6077
      if test -d /usr/nec ;then
6078
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6079
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6080
      fi
6081
      ;;
6082
95 by pklong
Unified with UniKey 4.0
6083
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6084
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6085
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6086
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6087
      ;;
6088
30 by pklong
moved byteio to upper dir
6089
    unicos*)
6090
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6091
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6092
      ;;
6093
1 by pklong
Initial revision
6094
    uts4*)
6095
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6096
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6097
      ;;
6098
6099
    *)
6100
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6101
      ;;
6102
    esac
6103
  fi
6104
])
6105
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6106
6107
#
6108
# Check to make sure the PIC flag actually works.
6109
#
6110
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6111
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6112
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6113
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6114
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6115
     "" | " "*) ;;
6116
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6117
     esac],
6118
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6119
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6120
fi
30 by pklong
moved byteio to upper dir
6121
case $host_os in
1 by pklong
Initial revision
6122
  # For platforms which do not support PIC, -DPIC is meaningless:
6123
  *djgpp*)
6124
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6125
    ;;
6126
  *)
6127
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6128
    ;;
6129
esac
95 by pklong
Unified with UniKey 4.0
6130
6131
#
6132
# Check to make sure the static flag actually works.
6133
#
6134
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6135
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6136
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6137
  $lt_tmp_static_flag,
6138
  [],
6139
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
1 by pklong
Initial revision
6140
])
6141
6142
6143
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6144
# ------------------------------------
6145
# See if the linker supports building shared libraries.
6146
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6147
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6148
ifelse([$1],[CXX],[
6149
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6150
  case $host_os in
6151
  aix4* | aix5*)
6152
    # If we're using GNU nm, then we don't want the "-C" option.
6153
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6154
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6155
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6156
    else
6157
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6158
    fi
6159
    ;;
6160
  pw32*)
6161
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6162
  ;;
6163
  cygwin* | mingw*)
30 by pklong
moved byteio to upper dir
6164
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
1 by pklong
Initial revision
6165
  ;;
95 by pklong
Unified with UniKey 4.0
6166
  linux* | k*bsd*-gnu)
21 by pklong
New ukengine
6167
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6168
  ;;
1 by pklong
Initial revision
6169
  *)
6170
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6171
  ;;
6172
  esac
6173
],[
6174
  runpath_var=
6175
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6176
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6177
  _LT_AC_TAGVAR(archive_cmds, $1)=
6178
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6179
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6180
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6181
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6182
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6183
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6184
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6185
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6186
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6187
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6188
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6189
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6190
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6191
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6192
  _LT_AC_TAGVAR(module_cmds, $1)=
6193
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6194
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6195
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6196
  # include_expsyms should be a list of space-separated symbols to be *always*
6197
  # included in the symbol list
6198
  _LT_AC_TAGVAR(include_expsyms, $1)=
6199
  # exclude_expsyms can be an extended regexp of symbols to exclude
6200
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6201
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6202
  # as well as any symbol that contains `d'.
6203
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6204
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6205
  # platforms (ab)use it in PIC code, but their linkers get confused if
6206
  # the symbol is explicitly referenced.  Since portable code cannot
6207
  # rely on this symbol name, it's probably fine to never include it in
6208
  # preloaded symbol tables.
6209
  extract_expsyms_cmds=
30 by pklong
moved byteio to upper dir
6210
  # Just being paranoid about ensuring that cc_basename is set.
6211
  _LT_CC_BASENAME([$compiler])
1 by pklong
Initial revision
6212
  case $host_os in
6213
  cygwin* | mingw* | pw32*)
6214
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6215
    # When not using gcc, we currently assume that we are using
6216
    # Microsoft Visual C++.
6217
    if test "$GCC" != yes; then
6218
      with_gnu_ld=no
6219
    fi
6220
    ;;
95 by pklong
Unified with UniKey 4.0
6221
  interix*)
6222
    # we just hope/assume this is gcc and not c89 (= MSVC++)
6223
    with_gnu_ld=yes
6224
    ;;
1 by pklong
Initial revision
6225
  openbsd*)
6226
    with_gnu_ld=no
6227
    ;;
6228
  esac
6229
6230
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6231
  if test "$with_gnu_ld" = yes; then
6232
    # If archive_cmds runs LD, not CC, wlarc should be empty
6233
    wlarc='${wl}'
6234
30 by pklong
moved byteio to upper dir
6235
    # Set some defaults for GNU ld with shared library support. These
6236
    # are reset later if shared libraries are not supported. Putting them
6237
    # here allows them to be overridden if necessary.
6238
    runpath_var=LD_RUN_PATH
6239
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6240
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6241
    # ancient GNU ld didn't support --whole-archive et. al.
6242
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6243
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6244
      else
6245
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6246
    fi
6247
    supports_anon_versioning=no
6248
    case `$LD -v 2>/dev/null` in
6249
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6250
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6251
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6252
      *\ 2.11.*) ;; # other 2.11 versions
6253
      *) supports_anon_versioning=yes ;;
6254
    esac
6255
1 by pklong
Initial revision
6256
    # See if GNU ld supports shared libraries.
6257
    case $host_os in
6258
    aix3* | aix4* | aix5*)
6259
      # On AIX/PPC, the GNU linker is very broken
6260
      if test "$host_cpu" != ia64; then
6261
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6262
	cat <<EOF 1>&2
6263
6264
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6265
*** to be unable to reliably create shared libraries on AIX.
6266
*** Therefore, libtool is disabling shared libraries support.  If you
6267
*** really care for shared libraries, you may want to modify your PATH
6268
*** so that a non-GNU linker is found, and then restart.
6269
6270
EOF
6271
      fi
6272
      ;;
6273
6274
    amigaos*)
6275
      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
6276
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6277
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6278
6279
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6280
      # that the semantics of dynamic libraries on AmigaOS, at least up
6281
      # to version 4, is to share data among multiple programs linked
6282
      # with the same dynamic library.  Since this doesn't match the
6283
      # behavior of shared libraries on other platforms, we can't use
6284
      # them.
6285
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6286
      ;;
6287
6288
    beos*)
6289
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6290
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6291
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6292
	# support --undefined.  This deserves some investigation.  FIXME
6293
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6294
      else
6295
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6296
      fi
6297
      ;;
6298
6299
    cygwin* | mingw* | pw32*)
6300
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6301
      # as there is no search path for DLLs.
6302
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6303
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6304
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6305
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
30 by pklong
moved byteio to upper dir
6306
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
1 by pklong
Initial revision
6307
6308
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
95 by pklong
Unified with UniKey 4.0
6309
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1 by pklong
Initial revision
6310
	# If the export-symbols file already is a .def file (1st line
6311
	# is EXPORTS), use it as is; otherwise, prepend...
6312
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6313
	  cp $export_symbols $output_objdir/$soname.def;
6314
	else
6315
	  echo EXPORTS > $output_objdir/$soname.def;
6316
	  cat $export_symbols >> $output_objdir/$soname.def;
6317
	fi~
95 by pklong
Unified with UniKey 4.0
6318
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1 by pklong
Initial revision
6319
      else
30 by pklong
moved byteio to upper dir
6320
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6321
      fi
6322
      ;;
6323
95 by pklong
Unified with UniKey 4.0
6324
    interix3*)
6325
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6326
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6327
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6328
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6329
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6330
      # Instead, shared libraries are loaded at an image base (0x10000000 by
6331
      # default) and relocated if they conflict, which is a slow very memory
6332
      # consuming and fragmenting process.  To avoid this, we pick a random,
6333
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6334
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6335
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6336
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6337
      ;;
6338
6339
    linux* | k*bsd*-gnu)
30 by pklong
moved byteio to upper dir
6340
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6341
	tmp_addflag=
6342
	case $cc_basename,$host_cpu in
6343
	pgcc*)				# Portland Group C compiler
6344
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6345
	  tmp_addflag=' $pic_flag'
6346
	  ;;
6347
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6348
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6349
	  tmp_addflag=' $pic_flag -Mnomain' ;;
6350
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6351
	  tmp_addflag=' -i_dynamic' ;;
6352
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6353
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6354
	ifc* | ifort*)			# Intel Fortran compiler
6355
	  tmp_addflag=' -nofor_main' ;;
6356
	esac
6357
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6358
6359
	if test $supports_anon_versioning = yes; then
6360
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6361
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6362
  $echo "local: *; };" >> $output_objdir/$libname.ver~
6363
	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6364
	fi
6365
	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6366
      else
6367
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
1 by pklong
Initial revision
6368
      fi
6369
      ;;
6370
95 by pklong
Unified with UniKey 4.0
6371
    netbsd* | netbsdelf*-gnu)
1 by pklong
Initial revision
6372
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6373
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6374
	wlarc=
6375
      else
6376
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6377
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6378
      fi
6379
      ;;
6380
95 by pklong
Unified with UniKey 4.0
6381
    solaris*)
1 by pklong
Initial revision
6382
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6383
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6384
	cat <<EOF 1>&2
6385
6386
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6387
*** create shared libraries on Solaris systems.  Therefore, libtool
6388
*** is disabling shared libraries support.  We urge you to upgrade GNU
6389
*** binutils to release 2.9.1 or newer.  Another option is to modify
6390
*** your PATH or compiler configuration so that the native linker is
6391
*** used, and then restart.
6392
6393
EOF
6394
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6395
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6396
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6397
      else
6398
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6399
      fi
6400
      ;;
6401
95 by pklong
Unified with UniKey 4.0
6402
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6403
      case `$LD -v 2>&1` in
6404
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
6405
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6406
	cat <<_LT_EOF 1>&2
6407
6408
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6409
*** reliably create shared libraries on SCO systems.  Therefore, libtool
6410
*** is disabling shared libraries support.  We urge you to upgrade GNU
6411
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6412
*** your PATH or compiler configuration so that the native linker is
6413
*** used, and then restart.
6414
6415
_LT_EOF
6416
	;;
6417
	*)
6418
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6419
	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6420
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6421
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6422
	  else
6423
	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6424
	  fi
6425
	;;
6426
      esac
6427
      ;;
6428
1 by pklong
Initial revision
6429
    sunos4*)
6430
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6431
      wlarc=
6432
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6433
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6434
      ;;
6435
6436
    *)
6437
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6438
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6439
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6440
      else
6441
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6442
      fi
6443
      ;;
6444
    esac
6445
30 by pklong
moved byteio to upper dir
6446
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6447
      runpath_var=
6448
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6449
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6450
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
1 by pklong
Initial revision
6451
    fi
6452
  else
6453
    # PORTME fill in a description of your system's linker (not GNU ld)
6454
    case $host_os in
6455
    aix3*)
6456
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6457
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6458
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6459
      # Note: this linker hardcodes the directories in LIBPATH if there
6460
      # are no directories specified by -L.
6461
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
95 by pklong
Unified with UniKey 4.0
6462
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
1 by pklong
Initial revision
6463
	# Neither direct hardcoding nor static linking is supported with a
6464
	# broken collect2.
6465
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6466
      fi
6467
      ;;
6468
6469
    aix4* | aix5*)
6470
      if test "$host_cpu" = ia64; then
6471
	# On IA64, the linker does run time linking by default, so we don't
6472
	# have to do anything special.
6473
	aix_use_runtimelinking=no
6474
	exp_sym_flag='-Bexport'
6475
	no_entry_flag=""
6476
      else
6477
	# If we're using GNU nm, then we don't want the "-C" option.
6478
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6479
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6480
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6481
	else
6482
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6483
	fi
6484
	aix_use_runtimelinking=no
6485
6486
	# Test if we are trying to use run time linking or normal
6487
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6488
	# need to do runtime linking.
6489
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6490
	  for ld_flag in $LDFLAGS; do
6491
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6492
  	    aix_use_runtimelinking=yes
6493
  	    break
6494
  	  fi
6495
	  done
95 by pklong
Unified with UniKey 4.0
6496
	  ;;
1 by pklong
Initial revision
6497
	esac
6498
6499
	exp_sym_flag='-bexport'
6500
	no_entry_flag='-bnoentry'
6501
      fi
6502
6503
      # When large executables or shared objects are built, AIX ld can
6504
      # have problems creating the table of contents.  If linking a library
6505
      # or program results in "error TOC overflow" add -mminimal-toc to
6506
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6507
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6508
6509
      _LT_AC_TAGVAR(archive_cmds, $1)=''
6510
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6511
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6512
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6513
6514
      if test "$GCC" = yes; then
30 by pklong
moved byteio to upper dir
6515
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
1 by pklong
Initial revision
6516
	# We only want to do this on AIX 4.2 and lower, the check
6517
	# below for broken collect2 doesn't work under 4.3+
6518
	  collect2name=`${CC} -print-prog-name=collect2`
6519
	  if test -f "$collect2name" && \
6520
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6521
	  then
6522
  	  # We have reworked collect2
6523
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6524
	  else
6525
  	  # We have old collect2
6526
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6527
  	  # It fails to find uninstalled libraries when the uninstalled
6528
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6529
  	  # to unsupported forces relinking
6530
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6531
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6532
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6533
	  fi
95 by pklong
Unified with UniKey 4.0
6534
	  ;;
1 by pklong
Initial revision
6535
	esac
6536
	shared_flag='-shared'
30 by pklong
moved byteio to upper dir
6537
	if test "$aix_use_runtimelinking" = yes; then
6538
	  shared_flag="$shared_flag "'${wl}-G'
6539
	fi
1 by pklong
Initial revision
6540
      else
6541
	# not using gcc
6542
	if test "$host_cpu" = ia64; then
6543
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6544
  	# chokes on -Wl,-G. The following line is correct:
6545
	  shared_flag='-G'
6546
	else
95 by pklong
Unified with UniKey 4.0
6547
	  if test "$aix_use_runtimelinking" = yes; then
1 by pklong
Initial revision
6548
	    shared_flag='${wl}-G'
6549
	  else
6550
	    shared_flag='${wl}-bM:SRE'
95 by pklong
Unified with UniKey 4.0
6551
	  fi
1 by pklong
Initial revision
6552
	fi
6553
      fi
6554
6555
      # It seems that -bexpall does not export symbols beginning with
6556
      # underscore (_), so it is better to generate a list of symbols to export.
6557
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6558
      if test "$aix_use_runtimelinking" = yes; then
6559
	# Warning - without using the other runtime loading flags (-brtl),
6560
	# -berok will link without error, but may produce a broken library.
6561
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6562
       # Determine the default libpath from the value encoded in an empty executable.
6563
       _LT_AC_SYS_LIBPATH_AIX
6564
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
95 by pklong
Unified with UniKey 4.0
6565
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1 by pklong
Initial revision
6566
       else
6567
	if test "$host_cpu" = ia64; then
6568
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6569
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
95 by pklong
Unified with UniKey 4.0
6570
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
1 by pklong
Initial revision
6571
	else
6572
	 # Determine the default libpath from the value encoded in an empty executable.
6573
	 _LT_AC_SYS_LIBPATH_AIX
6574
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6575
	  # Warning - without using the other run time loading flags,
6576
	  # -berok will link without error, but may produce a broken library.
6577
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6578
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6579
	  # Exported symbols can be pulled into shared objects from archives
95 by pklong
Unified with UniKey 4.0
6580
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
1 by pklong
Initial revision
6581
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
30 by pklong
moved byteio to upper dir
6582
	  # This is similar to how AIX traditionally builds its shared libraries.
95 by pklong
Unified with UniKey 4.0
6583
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
1 by pklong
Initial revision
6584
	fi
6585
      fi
6586
      ;;
6587
6588
    amigaos*)
6589
      _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
6590
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6591
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6592
      # see comment about different semantics on the GNU ld section
6593
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6594
      ;;
6595
30 by pklong
moved byteio to upper dir
6596
    bsdi[[45]]*)
1 by pklong
Initial revision
6597
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6598
      ;;
6599
6600
    cygwin* | mingw* | pw32*)
6601
      # When not using gcc, we currently assume that we are using
6602
      # Microsoft Visual C++.
6603
      # hardcode_libdir_flag_spec is actually meaningless, as there is
6604
      # no search path for DLLs.
6605
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6606
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6607
      # Tell ltmain to make .lib files, not .a files.
6608
      libext=lib
6609
      # Tell ltmain to make .dll files, not .so files.
21 by pklong
New ukengine
6610
      shrext_cmds=".dll"
1 by pklong
Initial revision
6611
      # FIXME: Setting linknames here is a bad hack.
6612
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6613
      # The linker will automatically build a .lib file if we build a DLL.
6614
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6615
      # FIXME: Should let the user specify the lib program.
6616
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
30 by pklong
moved byteio to upper dir
6617
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
1 by pklong
Initial revision
6618
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6619
      ;;
6620
6621
    darwin* | rhapsody*)
30 by pklong
moved byteio to upper dir
6622
      case $host_os in
6623
        rhapsody* | darwin1.[[012]])
6624
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6625
         ;;
6626
       *) # Darwin 1.3 on
6627
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6628
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6629
         else
6630
           case ${MACOSX_DEPLOYMENT_TARGET} in
6631
             10.[[012]])
6632
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6633
               ;;
6634
             10.*)
6635
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6636
               ;;
6637
           esac
6638
         fi
6639
         ;;
6640
      esac
1 by pklong
Initial revision
6641
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
30 by pklong
moved byteio to upper dir
6642
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6643
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6644
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6645
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6646
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6647
    if test "$GCC" = yes ; then
1 by pklong
Initial revision
6648
    	output_verbose_link_cmd='echo'
30 by pklong
moved byteio to upper dir
6649
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6650
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6651
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6652
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6653
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6654
    else
6655
      case $cc_basename in
6656
        xlc*)
6657
         output_verbose_link_cmd='echo'
6658
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6659
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6660
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6661
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1 by pklong
Initial revision
6662
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
30 by pklong
moved byteio to upper dir
6663
          ;;
6664
       *)
6665
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6666
          ;;
6667
      esac
1 by pklong
Initial revision
6668
    fi
6669
      ;;
6670
6671
    dgux*)
6672
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6673
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6674
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6675
      ;;
6676
6677
    freebsd1*)
6678
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6679
      ;;
6680
6681
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6682
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6683
    # does not break anything, and helps significantly (at the cost of a little
6684
    # extra space).
6685
    freebsd2.2*)
6686
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6687
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6688
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6689
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6690
      ;;
6691
6692
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6693
    freebsd2*)
6694
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6695
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6696
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6697
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6698
      ;;
6699
6700
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
95 by pklong
Unified with UniKey 4.0
6701
    freebsd* | dragonfly*)
1 by pklong
Initial revision
6702
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6703
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6704
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6705
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6706
      ;;
6707
6708
    hpux9*)
6709
      if test "$GCC" = yes; then
6710
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6711
      else
6712
	_LT_AC_TAGVAR(archive_cmds, $1)='$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'
6713
      fi
6714
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6715
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6716
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6717
6718
      # hardcode_minus_L: Not really in the search PATH,
6719
      # but as the default location of the library.
6720
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6721
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6722
      ;;
6723
95 by pklong
Unified with UniKey 4.0
6724
    hpux10*)
6725
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6726
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6727
      else
6728
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6729
      fi
6730
      if test "$with_gnu_ld" = no; then
6731
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6732
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6733
6734
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6735
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6736
6737
	# hardcode_minus_L: Not really in the search PATH,
6738
	# but as the default location of the library.
6739
	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6740
      fi
6741
      ;;
6742
6743
    hpux11*)
1 by pklong
Initial revision
6744
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
30 by pklong
moved byteio to upper dir
6745
	case $host_cpu in
95 by pklong
Unified with UniKey 4.0
6746
	hppa*64*)
1 by pklong
Initial revision
6747
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6748
	  ;;
95 by pklong
Unified with UniKey 4.0
6749
	ia64*)
6750
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6751
	  ;;
1 by pklong
Initial revision
6752
	*)
6753
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6754
	  ;;
6755
	esac
6756
      else
30 by pklong
moved byteio to upper dir
6757
	case $host_cpu in
95 by pklong
Unified with UniKey 4.0
6758
	hppa*64*)
6759
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6760
	  ;;
6761
	ia64*)
6762
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1 by pklong
Initial revision
6763
	  ;;
6764
	*)
95 by pklong
Unified with UniKey 4.0
6765
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1 by pklong
Initial revision
6766
	  ;;
6767
	esac
6768
      fi
6769
      if test "$with_gnu_ld" = no; then
95 by pklong
Unified with UniKey 4.0
6770
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6771
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6772
30 by pklong
moved byteio to upper dir
6773
	case $host_cpu in
95 by pklong
Unified with UniKey 4.0
6774
	hppa*64*|ia64*)
1 by pklong
Initial revision
6775
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
95 by pklong
Unified with UniKey 4.0
6776
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6777
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
1 by pklong
Initial revision
6778
	  ;;
6779
	*)
6780
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6781
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6782
6783
	  # hardcode_minus_L: Not really in the search PATH,
6784
	  # but as the default location of the library.
6785
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6786
	  ;;
6787
	esac
6788
      fi
6789
      ;;
6790
6791
    irix5* | irix6* | nonstopux*)
6792
      if test "$GCC" = yes; then
6793
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6794
      else
6795
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6796
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6797
      fi
6798
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6799
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6800
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6801
      ;;
6802
95 by pklong
Unified with UniKey 4.0
6803
    netbsd* | netbsdelf*-gnu)
1 by pklong
Initial revision
6804
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6805
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6806
      else
6807
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6808
      fi
6809
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6810
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6811
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6812
      ;;
6813
6814
    newsos6)
6815
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6816
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6817
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6818
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6819
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6820
      ;;
6821
6822
    openbsd*)
6823
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6824
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6825
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6826
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
30 by pklong
moved byteio to upper dir
6827
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
1 by pklong
Initial revision
6828
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6829
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6830
      else
6831
       case $host_os in
6832
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6833
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6834
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6835
	   ;;
6836
	 *)
6837
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6838
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6839
	   ;;
6840
       esac
6841
      fi
6842
      ;;
6843
6844
    os2*)
6845
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6846
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6847
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6848
      _LT_AC_TAGVAR(archive_cmds, $1)='$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'
6849
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6850
      ;;
6851
6852
    osf3*)
6853
      if test "$GCC" = yes; then
6854
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6855
	_LT_AC_TAGVAR(archive_cmds, $1)='$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}${output_objdir}/so_locations -o $lib'
6856
      else
6857
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6858
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6859
      fi
6860
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6861
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6862
      ;;
6863
6864
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6865
      if test "$GCC" = yes; then
6866
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6867
	_LT_AC_TAGVAR(archive_cmds, $1)='$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}${output_objdir}/so_locations -o $lib'
6868
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6869
      else
6870
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6871
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6872
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
30 by pklong
moved byteio to upper dir
6873
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
1 by pklong
Initial revision
6874
6875
	# Both c and cxx compiler support -rpath directly
6876
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6877
      fi
6878
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6879
      ;;
6880
6881
    solaris*)
6882
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6883
      if test "$GCC" = yes; then
30 by pklong
moved byteio to upper dir
6884
	wlarc='${wl}'
1 by pklong
Initial revision
6885
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6886
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6887
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6888
      else
30 by pklong
moved byteio to upper dir
6889
	wlarc=''
1 by pklong
Initial revision
6890
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6891
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6892
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6893
      fi
6894
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6895
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6896
      case $host_os in
6897
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
30 by pklong
moved byteio to upper dir
6898
      *)
6899
 	# The compiler driver will combine linker options so we
6900
 	# cannot just pass the convience library names through
6901
 	# without $wl, iff we do not link with $LD.
6902
 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6903
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6904
 	case $wlarc in
6905
 	'')
6906
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6907
 	*)
6908
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6909
 	esac ;;
1 by pklong
Initial revision
6910
      esac
6911
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6912
      ;;
6913
6914
    sunos4*)
6915
      if test "x$host_vendor" = xsequent; then
6916
	# Use $CC to link under sequent, because it throws in some extra .o
6917
	# files that make .init and .fini sections work.
6918
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6919
      else
6920
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6921
      fi
6922
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6923
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6924
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6925
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6926
      ;;
6927
6928
    sysv4)
6929
      case $host_vendor in
6930
	sni)
6931
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6932
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6933
	;;
6934
	siemens)
6935
	  ## LD is ld it makes a PLAMLIB
6936
	  ## CC just makes a GrossModule.
6937
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6938
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6939
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6940
        ;;
6941
	motorola)
6942
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6943
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6944
	;;
6945
      esac
6946
      runpath_var='LD_RUN_PATH'
6947
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6948
      ;;
6949
6950
    sysv4.3*)
6951
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6952
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6953
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6954
      ;;
6955
6956
    sysv4*MP*)
6957
      if test -d /usr/nec; then
6958
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6959
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6960
	runpath_var=LD_RUN_PATH
6961
	hardcode_runpath_var=yes
6962
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6963
      fi
6964
      ;;
6965
95 by pklong
Unified with UniKey 4.0
6966
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6967
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6968
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6969
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6970
      runpath_var='LD_RUN_PATH'
6971
6972
      if test "$GCC" = yes; then
6973
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6974
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6975
      else
6976
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6977
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6978
      fi
6979
      ;;
6980
6981
    sysv5* | sco3.2v5* | sco5v6*)
6982
      # Note: We can NOT use -z defs as we might desire, because we do not
6983
      # link with -lc, and that would cause any symbols used from libc to
6984
      # always be unresolved, which means just about no library would
6985
      # ever link correctly.  If we're not using GNU ld we use -z text
6986
      # though, which does catch some bad symbols but isn't as heavy-handed
6987
      # as -z defs.
6988
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6989
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6990
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6991
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6992
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6993
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6994
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6995
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6996
      runpath_var='LD_RUN_PATH'
6997
6998
      if test "$GCC" = yes; then
6999
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7000
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7001
      else
7002
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7003
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7004
      fi
1 by pklong
Initial revision
7005
      ;;
7006
7007
    uts4*)
7008
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7009
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7010
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7011
      ;;
7012
7013
    *)
7014
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7015
      ;;
7016
    esac
7017
  fi
7018
])
7019
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7020
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7021
7022
#
7023
# Do we need to explicitly link libc?
7024
#
7025
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7026
x|xyes)
7027
  # Assume -lc should be added
7028
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7029
7030
  if test "$enable_shared" = yes && test "$GCC" = yes; then
7031
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7032
    *'~'*)
7033
      # FIXME: we may have to deal with multi-command sequences.
7034
      ;;
7035
    '$CC '*)
7036
      # Test whether the compiler implicitly links with -lc since on some
7037
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7038
      # to ld, don't add -lc before -lgcc.
7039
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7040
      $rm conftest*
7041
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7042
7043
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7044
        soname=conftest
7045
        lib=conftest
7046
        libobjs=conftest.$ac_objext
7047
        deplibs=
7048
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
95 by pklong
Unified with UniKey 4.0
7049
	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
1 by pklong
Initial revision
7050
        compiler_flags=-v
7051
        linker_flags=-v
7052
        verstring=
7053
        output_objdir=.
7054
        libname=conftest
7055
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7056
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7057
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7058
        then
7059
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7060
        else
7061
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7062
        fi
7063
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7064
      else
7065
        cat conftest.err 1>&5
7066
      fi
7067
      $rm conftest*
7068
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7069
      ;;
7070
    esac
7071
  fi
7072
  ;;
7073
esac
7074
])# AC_LIBTOOL_PROG_LD_SHLIBS
7075
7076
7077
# _LT_AC_FILE_LTDLL_C
7078
# -------------------
7079
# Be careful that the start marker always follows a newline.
7080
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7081
# /* ltdll.c starts here */
7082
# #define WIN32_LEAN_AND_MEAN
7083
# #include <windows.h>
7084
# #undef WIN32_LEAN_AND_MEAN
7085
# #include <stdio.h>
7086
#
7087
# #ifndef __CYGWIN__
7088
# #  ifdef __CYGWIN32__
7089
# #    define __CYGWIN__ __CYGWIN32__
7090
# #  endif
7091
# #endif
7092
#
7093
# #ifdef __cplusplus
7094
# extern "C" {
7095
# #endif
7096
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7097
# #ifdef __cplusplus
7098
# }
7099
# #endif
7100
#
7101
# #ifdef __CYGWIN__
7102
# #include <cygwin/cygwin_dll.h>
7103
# DECLARE_CYGWIN_DLL( DllMain );
7104
# #endif
7105
# HINSTANCE __hDllInstance_base;
7106
#
7107
# BOOL APIENTRY
7108
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7109
# {
7110
#   __hDllInstance_base = hInst;
7111
#   return TRUE;
7112
# }
7113
# /* ltdll.c ends here */
7114
])# _LT_AC_FILE_LTDLL_C
7115
7116
7117
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7118
# ---------------------------------
7119
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7120
7121
7122
# old names
7123
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7124
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7125
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7126
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7127
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7128
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7129
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7130
7131
# This is just to silence aclocal about the macro not being used
7132
ifelse([AC_DISABLE_FAST_INSTALL])
7133
7134
AC_DEFUN([LT_AC_PROG_GCJ],
7135
[AC_CHECK_TOOL(GCJ, gcj, no)
7136
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7137
  AC_SUBST(GCJFLAGS)
7138
])
7139
7140
AC_DEFUN([LT_AC_PROG_RC],
7141
[AC_CHECK_TOOL(RC, windres, no)
7142
])
7143
7144
# NOTE: This macro has been submitted for inclusion into   #
7145
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7146
#  a released version of Autoconf we should remove this    #
7147
#  macro and use it instead.                               #
7148
# LT_AC_PROG_SED
7149
# --------------
7150
# Check for a fully-functional sed program, that truncates
7151
# as few characters as possible.  Prefer GNU sed if found.
7152
AC_DEFUN([LT_AC_PROG_SED],
7153
[AC_MSG_CHECKING([for a sed that does not truncate output])
7154
AC_CACHE_VAL(lt_cv_path_SED,
7155
[# Loop through the user's path and test for sed and gsed.
7156
# Then use that list of sed's as ones to test for truncation.
7157
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158
for as_dir in $PATH
7159
do
7160
  IFS=$as_save_IFS
7161
  test -z "$as_dir" && as_dir=.
7162
  for lt_ac_prog in sed gsed; do
7163
    for ac_exec_ext in '' $ac_executable_extensions; do
7164
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7165
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7166
      fi
7167
    done
7168
  done
7169
done
7170
lt_ac_max=0
7171
lt_ac_count=0
7172
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7173
# along with /bin/sed that truncates output.
7174
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
30 by pklong
moved byteio to upper dir
7175
  test ! -f $lt_ac_sed && continue
1 by pklong
Initial revision
7176
  cat /dev/null > conftest.in
7177
  lt_ac_count=0
7178
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7179
  # Check for GNU sed and select it if it is found.
7180
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7181
    lt_cv_path_SED=$lt_ac_sed
7182
    break
7183
  fi
7184
  while true; do
7185
    cat conftest.in conftest.in >conftest.tmp
7186
    mv conftest.tmp conftest.in
7187
    cp conftest.in conftest.nl
7188
    echo >>conftest.nl
7189
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7190
    cmp -s conftest.out conftest.nl || break
7191
    # 10000 chars as input seems more than enough
7192
    test $lt_ac_count -gt 10 && break
7193
    lt_ac_count=`expr $lt_ac_count + 1`
7194
    if test $lt_ac_count -gt $lt_ac_max; then
7195
      lt_ac_max=$lt_ac_count
7196
      lt_cv_path_SED=$lt_ac_sed
7197
    fi
7198
  done
7199
done
30 by pklong
moved byteio to upper dir
7200
])
1 by pklong
Initial revision
7201
SED=$lt_cv_path_SED
7202
AC_MSG_RESULT([$SED])
7203
])
7204
21 by pklong
New ukengine
7205
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7206
# 
7207
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7208
#
7209
# This program is free software; you can redistribute it and/or modify
7210
# it under the terms of the GNU General Public License as published by
7211
# the Free Software Foundation; either version 2 of the License, or
7212
# (at your option) any later version.
7213
#
7214
# This program is distributed in the hope that it will be useful, but
7215
# WITHOUT ANY WARRANTY; without even the implied warranty of
7216
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7217
# General Public License for more details.
7218
#
7219
# You should have received a copy of the GNU General Public License
7220
# along with this program; if not, write to the Free Software
7221
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7222
#
7223
# As a special exception to the GNU General Public License, if you
7224
# distribute this file as part of a program that contains a
7225
# configuration script generated by Autoconf, you may include it under
7226
# the same distribution terms that you use for the rest of that program.
7227
7228
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7229
# ----------------------------------
7230
AC_DEFUN([PKG_PROG_PKG_CONFIG],
7231
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7232
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7233
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7234
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7235
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7236
fi
7237
if test -n "$PKG_CONFIG"; then
95 by pklong
Unified with UniKey 4.0
7238
	_pkg_min_version=m4_default([$1], [0.9.0])
21 by pklong
New ukengine
7239
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7240
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7241
		AC_MSG_RESULT([yes])
7242
	else
7243
		AC_MSG_RESULT([no])
7244
		PKG_CONFIG=""
7245
	fi
7246
		
7247
fi[]dnl
7248
])# PKG_PROG_PKG_CONFIG
7249
7250
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7251
#
7252
# Check to see whether a particular set of modules exists.  Similar
7253
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
7254
#
7255
#
7256
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
7257
# this or PKG_CHECK_MODULES is called, or make sure to call
7258
# PKG_CHECK_EXISTS manually
7259
# --------------------------------------------------------------
7260
AC_DEFUN([PKG_CHECK_EXISTS],
7261
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7262
if test -n "$PKG_CONFIG" && \
7263
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7264
  m4_ifval([$2], [$2], [:])
7265
m4_ifvaln([$3], [else
7266
  $3])dnl
7267
fi])
7268
7269
7270
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7271
# ---------------------------------------------
7272
m4_define([_PKG_CONFIG],
7273
[if test -n "$PKG_CONFIG"; then
95 by pklong
Unified with UniKey 4.0
7274
    if test -n "$$1"; then
7275
        pkg_cv_[]$1="$$1"
7276
    else
21 by pklong
New ukengine
7277
        PKG_CHECK_EXISTS([$3],
7278
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7279
			 [pkg_failed=yes])
95 by pklong
Unified with UniKey 4.0
7280
    fi
21 by pklong
New ukengine
7281
else
7282
	pkg_failed=untried
7283
fi[]dnl
7284
])# _PKG_CONFIG
7285
95 by pklong
Unified with UniKey 4.0
7286
# _PKG_SHORT_ERRORS_SUPPORTED
7287
# -----------------------------
7288
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7289
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7290
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7291
        _pkg_short_errors_supported=yes
7292
else
7293
        _pkg_short_errors_supported=no
7294
fi[]dnl
7295
])# _PKG_SHORT_ERRORS_SUPPORTED
7296
7297
21 by pklong
New ukengine
7298
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7299
# [ACTION-IF-NOT-FOUND])
7300
#
7301
#
7302
# Note that if there is a possibility the first call to
7303
# PKG_CHECK_MODULES might not happen, you should be sure to include an
7304
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7305
#
7306
#
7307
# --------------------------------------------------------------
7308
AC_DEFUN([PKG_CHECK_MODULES],
7309
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7310
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7311
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7312
7313
pkg_failed=no
7314
AC_MSG_CHECKING([for $1])
7315
7316
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7317
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
7318
95 by pklong
Unified with UniKey 4.0
7319
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7320
and $1[]_LIBS to avoid the need to call pkg-config.
7321
See the pkg-config man page for more details.])
7322
21 by pklong
New ukengine
7323
if test $pkg_failed = yes; then
95 by pklong
Unified with UniKey 4.0
7324
        _PKG_SHORT_ERRORS_SUPPORTED
7325
        if test $_pkg_short_errors_supported = yes; then
7326
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7327
        else 
7328
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7329
        fi
21 by pklong
New ukengine
7330
	# Put the nasty error message in config.log where it belongs
95 by pklong
Unified with UniKey 4.0
7331
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
21 by pklong
New ukengine
7332
7333
	ifelse([$4], , [AC_MSG_ERROR(dnl
95 by pklong
Unified with UniKey 4.0
7334
[Package requirements ($2) were not met:
7335
7336
$$1_PKG_ERRORS
7337
21 by pklong
New ukengine
7338
Consider adjusting the PKG_CONFIG_PATH environment variable if you
7339
installed software in a non-standard prefix.
7340
95 by pklong
Unified with UniKey 4.0
7341
_PKG_TEXT
7342
])],
21 by pklong
New ukengine
7343
		[$4])
7344
elif test $pkg_failed = untried; then
7345
	ifelse([$4], , [AC_MSG_FAILURE(dnl
7346
[The pkg-config script could not be found or is too old.  Make sure it
7347
is in your PATH or set the PKG_CONFIG environment variable to the full
7348
path to pkg-config.
7349
95 by pklong
Unified with UniKey 4.0
7350
_PKG_TEXT
21 by pklong
New ukengine
7351
7352
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
7353
		[$4])
7354
else
7355
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7356
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7357
        AC_MSG_RESULT([yes])
7358
	ifelse([$3], , :, [$3])
7359
fi[]dnl
7360
])# PKG_CHECK_MODULES
1 by pklong
Initial revision
7361
7362
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
21 by pklong
New ukengine
7363
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1 by pklong
Initial revision
7364
#
7365
# This file is free software, distributed under the terms of the GNU
7366
# General Public License.  As a special exception to the GNU General
7367
# Public License, this file may be distributed as part of a program
7368
# that contains a configuration script generated by Autoconf, under
7369
# the same distribution terms as the rest of that program.
7370
#
7371
# This file can be copied and used freely without restrictions.  It can
7372
# be used in projects which are not available under the GNU Public License
7373
# but which still want to provide support for the GNU gettext functionality.
7374
#
7375
# Macro to add for using GNU gettext.
7376
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
7377
#
7378
# Modified to never use included libintl. 
7379
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
7380
#
7381
# Major rework to remove unused code
7382
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
7383
#
7384
# Added better handling of ALL_LINGUAS from GNU gettext version 
7385
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
21 by pklong
New ukengine
7386
#
7387
# Modified to require ngettext
7388
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1 by pklong
Initial revision
7389
#
7390
# We need this here as well, since someone might use autoconf-2.5x
7391
# to configure GLib then an older version to configure a package
7392
# using AM_GLIB_GNU_GETTEXT
7393
AC_PREREQ(2.53)
7394
7395
dnl
7396
dnl We go to great lengths to make sure that aclocal won't 
7397
dnl try to pull in the installed version of these macros
7398
dnl when running aclocal in the glib directory.
7399
dnl
7400
m4_copy([AC_DEFUN],[glib_DEFUN])
7401
m4_copy([AC_REQUIRE],[glib_REQUIRE])
7402
dnl
7403
dnl At the end, if we're not within glib, we'll define the public
7404
dnl definitions in terms of our private definitions.
7405
dnl
7406
7407
# GLIB_LC_MESSAGES
7408
#--------------------
7409
glib_DEFUN([GLIB_LC_MESSAGES],
7410
  [AC_CHECK_HEADERS([locale.h])
7411
    if test $ac_cv_header_locale_h = yes; then
7412
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
7413
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
7414
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
7415
    if test $am_cv_val_LC_MESSAGES = yes; then
7416
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
7417
        [Define if your <locale.h> file defines LC_MESSAGES.])
7418
    fi
7419
  fi])
7420
7421
# GLIB_PATH_PROG_WITH_TEST
7422
#----------------------------
7423
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
7424
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
7425
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
7426
[# Extract the first word of "$2", so it can be a program name with args.
7427
set dummy $2; ac_word=[$]2
7428
AC_MSG_CHECKING([for $ac_word])
7429
AC_CACHE_VAL(ac_cv_path_$1,
7430
[case "[$]$1" in
7431
  /*)
7432
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
7433
  ;;
7434
  *)
7435
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
7436
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
7437
    test -z "$ac_dir" && ac_dir=.
7438
    if test -f $ac_dir/$ac_word; then
7439
      if [$3]; then
7440
	ac_cv_path_$1="$ac_dir/$ac_word"
7441
	break
7442
      fi
7443
    fi
7444
  done
7445
  IFS="$ac_save_ifs"
7446
dnl If no 4th arg is given, leave the cache variable unset,
7447
dnl so AC_PATH_PROGS will keep looking.
7448
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
7449
])dnl
7450
  ;;
7451
esac])dnl
7452
$1="$ac_cv_path_$1"
7453
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
7454
  AC_MSG_RESULT([$]$1)
7455
else
7456
  AC_MSG_RESULT(no)
7457
fi
7458
AC_SUBST($1)dnl
7459
])
7460
7461
# GLIB_WITH_NLS
7462
#-----------------
7463
glib_DEFUN([GLIB_WITH_NLS],
7464
  dnl NLS is obligatory
7465
  [USE_NLS=yes
7466
    AC_SUBST(USE_NLS)
7467
7468
    gt_cv_have_gettext=no
7469
7470
    CATOBJEXT=NONE
7471
    XGETTEXT=:
7472
    INTLLIBS=
7473
7474
    AC_CHECK_HEADER(libintl.h,
7475
     [gt_cv_func_dgettext_libintl="no"
7476
      libintl_extra_libs=""
7477
7478
      #
7479
      # First check in libc
7480
      #
21 by pklong
New ukengine
7481
      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1 by pklong
Initial revision
7482
        [AC_TRY_LINK([
7483
#include <libintl.h>
7484
],
21 by pklong
New ukengine
7485
         [return !ngettext ("","", 1)],
7486
	  gt_cv_func_ngettext_libc=yes,
7487
          gt_cv_func_ngettext_libc=no)
1 by pklong
Initial revision
7488
        ])
7489
  
21 by pklong
New ukengine
7490
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
7491
	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
7492
        	[AC_TRY_LINK([
7493
#include <libintl.h>
7494
],
7495
	          [return !dgettext ("","")],
7496
		  gt_cv_func_dgettext_libc=yes,
7497
	          gt_cv_func_dgettext_libc=no)
7498
        	])
7499
      fi
7500
  
7501
      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1 by pklong
Initial revision
7502
        AC_CHECK_FUNCS(bind_textdomain_codeset)
7503
      fi
7504
7505
      #
7506
      # If we don't have everything we want, check in libintl
7507
      #
7508
      if test "$gt_cv_func_dgettext_libc" != "yes" \
21 by pklong
New ukengine
7509
	 || test "$gt_cv_func_ngettext_libc" != "yes" \
1 by pklong
Initial revision
7510
         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
7511
        
7512
        AC_CHECK_LIB(intl, bindtextdomain,
21 by pklong
New ukengine
7513
	    [AC_CHECK_LIB(intl, ngettext,
7514
		    [AC_CHECK_LIB(intl, dgettext,
7515
			          gt_cv_func_dgettext_libintl=yes)])])
1 by pklong
Initial revision
7516
7517
	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
7518
	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
7519
	  AC_MSG_RESULT([])
21 by pklong
New ukengine
7520
  	  AC_CHECK_LIB(intl, ngettext,
7521
          	[AC_CHECK_LIB(intl, dcgettext,
1 by pklong
Initial revision
7522
		       [gt_cv_func_dgettext_libintl=yes
7523
			libintl_extra_libs=-liconv],
21 by pklong
New ukengine
7524
			:,-liconv)],
7525
		:,-liconv)
1 by pklong
Initial revision
7526
        fi
7527
7528
        #
7529
        # If we found libintl, then check in it for bind_textdomain_codeset();
7530
        # we'll prefer libc if neither have bind_textdomain_codeset(),
21 by pklong
New ukengine
7531
        # and both have dgettext and ngettext
1 by pklong
Initial revision
7532
        #
7533
        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
7534
          glib_save_LIBS="$LIBS"
7535
          LIBS="$LIBS -lintl $libintl_extra_libs"
7536
          unset ac_cv_func_bind_textdomain_codeset
7537
          AC_CHECK_FUNCS(bind_textdomain_codeset)
7538
          LIBS="$glib_save_LIBS"
7539
7540
          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
7541
            gt_cv_func_dgettext_libc=no
7542
          else
21 by pklong
New ukengine
7543
            if test "$gt_cv_func_dgettext_libc" = "yes" \
7544
		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1 by pklong
Initial revision
7545
              gt_cv_func_dgettext_libintl=no
7546
            fi
7547
          fi
7548
        fi
7549
      fi
7550
7551
      if test "$gt_cv_func_dgettext_libc" = "yes" \
7552
	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
7553
        gt_cv_have_gettext=yes
7554
      fi
7555
  
7556
      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
7557
        INTLLIBS="-lintl $libintl_extra_libs"
7558
      fi
7559
  
7560
      if test "$gt_cv_have_gettext" = "yes"; then
7561
	AC_DEFINE(HAVE_GETTEXT,1,
7562
	  [Define if the GNU gettext() function is already present or preinstalled.])
7563
	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
7564
	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
7565
	if test "$MSGFMT" != "no"; then
7566
          glib_save_LIBS="$LIBS"
7567
          LIBS="$LIBS $INTLLIBS"
7568
	  AC_CHECK_FUNCS(dcgettext)
7569
	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
7570
	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
7571
	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
7572
	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
7573
			 return _nl_msg_cat_cntr],
7574
	    [CATOBJEXT=.gmo 
7575
             DATADIRNAME=share],
7576
	    [case $host in
7577
	    *-*-solaris*)
7578
	    dnl On Solaris, if bind_textdomain_codeset is in libc,
7579
	    dnl GNU format message catalog is always supported,
7580
            dnl since both are added to the libc all together.
7581
	    dnl Hence, we'd like to go with DATADIRNAME=share and
7582
	    dnl and CATOBJEXT=.gmo in this case.
7583
            AC_CHECK_FUNC(bind_textdomain_codeset,
7584
	      [CATOBJEXT=.gmo 
7585
               DATADIRNAME=share],
7586
	      [CATOBJEXT=.mo
7587
               DATADIRNAME=lib])
7588
	    ;;
7589
	    *)
7590
	    CATOBJEXT=.mo
7591
            DATADIRNAME=lib
7592
	    ;;
7593
	    esac])
7594
          LIBS="$glib_save_LIBS"
7595
	  INSTOBJEXT=.mo
7596
	else
7597
	  gt_cv_have_gettext=no
7598
	fi
7599
      fi
7600
    ])
7601
7602
    if test "$gt_cv_have_gettext" = "yes" ; then
7603
      AC_DEFINE(ENABLE_NLS, 1,
7604
        [always defined to indicate that i18n is enabled])
7605
    fi
7606
7607
    dnl Test whether we really found GNU xgettext.
7608
    if test "$XGETTEXT" != ":"; then
7609
      dnl If it is not GNU xgettext we define it as : so that the
7610
      dnl Makefiles still can work.
7611
      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
7612
        : ;
7613
      else
7614
        AC_MSG_RESULT(
7615
	  [found xgettext program is not GNU xgettext; ignore it])
7616
        XGETTEXT=":"
7617
      fi
7618
    fi
7619
7620
    # We need to process the po/ directory.
7621
    POSUB=po
7622
7623
    AC_OUTPUT_COMMANDS(
7624
      [case "$CONFIG_FILES" in *po/Makefile.in*)
7625
        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
7626
      esac])
7627
7628
    dnl These rules are solely for the distribution goal.  While doing this
7629
    dnl we only have to keep exactly one list of the available catalogs
7630
    dnl in configure.in.
7631
    for lang in $ALL_LINGUAS; do
7632
      GMOFILES="$GMOFILES $lang.gmo"
7633
      POFILES="$POFILES $lang.po"
7634
    done
7635
7636
    dnl Make all variables we use known to autoconf.
7637
    AC_SUBST(CATALOGS)
7638
    AC_SUBST(CATOBJEXT)
7639
    AC_SUBST(DATADIRNAME)
7640
    AC_SUBST(GMOFILES)
7641
    AC_SUBST(INSTOBJEXT)
7642
    AC_SUBST(INTLLIBS)
7643
    AC_SUBST(PO_IN_DATADIR_TRUE)
7644
    AC_SUBST(PO_IN_DATADIR_FALSE)
7645
    AC_SUBST(POFILES)
7646
    AC_SUBST(POSUB)
7647
  ])
7648
7649
# AM_GLIB_GNU_GETTEXT
7650
# -------------------
7651
# Do checks necessary for use of gettext. If a suitable implementation 
7652
# of gettext is found in either in libintl or in the C library,
7653
# it will set INTLLIBS to the libraries needed for use of gettext
7654
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
7655
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
7656
# on various variables needed by the Makefile.in.in installed by 
7657
# glib-gettextize.
7658
dnl
21 by pklong
New ukengine
7659
glib_DEFUN([GLIB_GNU_GETTEXT],
1 by pklong
Initial revision
7660
  [AC_REQUIRE([AC_PROG_CC])dnl
7661
   AC_REQUIRE([AC_HEADER_STDC])dnl
7662
   
7663
   GLIB_LC_MESSAGES
7664
   GLIB_WITH_NLS
7665
7666
   if test "$gt_cv_have_gettext" = "yes"; then
7667
     if test "x$ALL_LINGUAS" = "x"; then
7668
       LINGUAS=
7669
     else
7670
       AC_MSG_CHECKING(for catalogs to be installed)
7671
       NEW_LINGUAS=
7672
       for presentlang in $ALL_LINGUAS; do
7673
         useit=no
7674
         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
7675
           desiredlanguages="$LINGUAS"
7676
         else
7677
           desiredlanguages="$ALL_LINGUAS"
7678
         fi
7679
         for desiredlang in $desiredlanguages; do
7680
 	   # Use the presentlang catalog if desiredlang is
7681
           #   a. equal to presentlang, or
7682
           #   b. a variant of presentlang (because in this case,
7683
           #      presentlang can be used as a fallback for messages
7684
           #      which are not translated in the desiredlang catalog).
7685
           case "$desiredlang" in
7686
             "$presentlang"*) useit=yes;;
7687
           esac
7688
         done
7689
         if test $useit = yes; then
7690
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7691
         fi
7692
       done
7693
       LINGUAS=$NEW_LINGUAS
7694
       AC_MSG_RESULT($LINGUAS)
7695
     fi
7696
7697
     dnl Construct list of names of catalog files to be constructed.
7698
     if test -n "$LINGUAS"; then
7699
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7700
     fi
7701
   fi
7702
7703
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
7704
   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
7705
   dnl Try to locate is.
7706
   MKINSTALLDIRS=
7707
   if test -n "$ac_aux_dir"; then
7708
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
7709
   fi
7710
   if test -z "$MKINSTALLDIRS"; then
7711
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
7712
   fi
7713
   AC_SUBST(MKINSTALLDIRS)
7714
7715
   dnl Generate list of files to be processed by xgettext which will
7716
   dnl be included in po/Makefile.
7717
   test -d po || mkdir po
7718
   if test "x$srcdir" != "x."; then
7719
     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
7720
       posrcprefix="$srcdir/"
7721
     else
7722
       posrcprefix="../$srcdir/"
7723
     fi
7724
   else
7725
     posrcprefix="../"
7726
   fi
7727
   rm -f po/POTFILES
7728
   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
7729
	< $srcdir/po/POTFILES.in > po/POTFILES
7730
  ])
7731
7732
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
7733
# -------------------------------
7734
# Define VARIABLE to the location where catalog files will
7735
# be installed by po/Makefile.
21 by pklong
New ukengine
7736
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1 by pklong
Initial revision
7737
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
7738
glib_save_prefix="$prefix"
7739
glib_save_exec_prefix="$exec_prefix"
7740
test "x$prefix" = xNONE && prefix=$ac_default_prefix
7741
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
7742
if test "x$CATOBJEXT" = "x.mo" ; then
7743
  localedir=`eval echo "${libdir}/locale"`
7744
else
7745
  localedir=`eval echo "${datadir}/locale"`
7746
fi
7747
prefix="$glib_save_prefix"
7748
exec_prefix="$glib_save_exec_prefix"
7749
AC_DEFINE_UNQUOTED($1, "$localedir",
7750
  [Define the location where the catalogs will be installed])
7751
])
7752
7753
dnl
7754
dnl Now the definitions that aclocal will find
7755
dnl
7756
ifdef(glib_configure_in,[],[
21 by pklong
New ukengine
7757
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
7758
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1 by pklong
Initial revision
7759
])dnl
7760