~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-12-08 14:59:50 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071208145950-u1tykhpw56nyzqik
Tags: 5.4.1~dfsg-4ubuntu1
* Merge from debian unstable.
* Remaining Ubuntu changes:
  - Remove stop links from rc0 and rc6
  - Munge Maintainer field as per spec.
* Ubuntu changes dropped:
  - Symlink common files between the packages, CDBS ought to handle that
    for us automatically.
* The latest Debian changes has dropped history from the changelog. Slot in
  the Ubuntu changes as best I can. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl @synopsis AC_PROMPT_USER_NO_DEFINE(VARIABLENAME,QUESTION,[DEFAULT])
2
 
dnl
3
 
dnl Asks a QUESTION and puts the results in VARIABLENAME with an optional
4
 
dnl DEFAULT value if the user merely hits return.
5
 
dnl
6
 
dnl @version 1.15
7
 
dnl @author Wes Hardaker <hardaker@users.sourceforge.net>
8
 
dnl
9
 
AC_DEFUN([AC_PROMPT_USER_NO_DEFINE],
10
 
dnl changequote(<<, >>) dnl
11
 
dnl <<
12
 
[
13
 
if test "x$defaults" = "xno"; then
14
 
echo $ECHO_N "$2 ($3): $ECHO_C"
15
 
read tmpinput
16
 
if test "$tmpinput" = "" -a "$3" != ""; then
17
 
  tmpinput="$3"
18
 
fi
19
 
eval $1=\"$tmpinput\"
20
 
else
21
 
tmpinput="$3"
22
 
eval $1=\"$tmpinput\"
23
 
fi
24
 
]
25
 
dnl >>
26
 
dnl changequote([, ])
27
 
) dnl done AC_PROMPT_USER
28
 
 
29
 
dnl @synopsis AC_PROMPT_USER(VARIABLENAME,QUESTION,[DEFAULT],QUOTED)
30
 
dnl
31
 
dnl Asks a QUESTION and puts the results in VARIABLENAME with an optional
32
 
dnl DEFAULT value if the user merely hits return.  Also calls 
33
 
dnl AC_DEFINE_UNQUOTED() on the VARIABLENAME for VARIABLENAMEs that should
34
 
dnl be entered into the config.h file as well.  If QUOTED is "quoted" then
35
 
dnl the result will be defined within quotes.
36
 
dnl
37
 
dnl @version 1.15
38
 
dnl @author Wes Hardaker <hardaker@users.sourceforge.net>
39
 
dnl
40
 
AC_DEFUN([AC_PROMPT_USER],
41
 
[
42
 
MSG_CHECK=`echo "$2" | tail -1`
43
 
AC_CACHE_CHECK($MSG_CHECK, ac_cv_user_prompt_$1,
44
 
[echo "" >&AC_FD_MSG
45
 
AC_PROMPT_USER_NO_DEFINE($1,[$2],$3)
46
 
eval ac_cv_user_prompt_$1=\$$1
47
 
echo $ECHO_N "setting $MSG_CHECK to...  $ECHO_C" >&AC_FD_MSG
48
 
])
49
 
if test "$ac_cv_user_prompt_$1" != "none"; then
50
 
  if test "x$4" = "xquoted" -o "x$4" = "xQUOTED"; then
51
 
    AC_DEFINE_UNQUOTED($1,"$ac_cv_user_prompt_$1")
52
 
  else
53
 
    AC_DEFINE_UNQUOTED($1,$ac_cv_user_prompt_$1)
54
 
  fi
55
 
fi
56
 
]) dnl
57
 
 
58
 
dnl @synopsis AC_CHECK_STRUCT_FOR(INCLUDES,STRUCT,MEMBER,DEFINE,[no])
59
 
dnl
60
 
dnl Checks STRUCT for MEMBER and defines DEFINE if found.
61
 
dnl
62
 
dnl @version 1.15
63
 
dnl @author Wes Hardaker <hardaker@users.sourceforge.net>
64
 
dnl
65
 
AC_DEFUN(AC_CHECK_STRUCT_FOR,[
66
 
 
67
 
ac_safe_struct=`echo "$2" | sed 'y%./+-%__p_%'`
68
 
ac_safe_member=`echo "$3" | sed 'y%./+-%__p_%'`
69
 
ac_safe_all="ac_cv_struct_${ac_safe_struct}_has_${ac_safe_member}"
70
 
changequote(, )dnl
71
 
  ac_uc_define=STRUCT_`echo "${ac_safe_struct}_HAS_${ac_safe_member}" | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
72
 
changequote([, ])dnl
73
 
 
74
 
AC_MSG_CHECKING([for $2.$3])
75
 
AC_CACHE_VAL($ac_safe_all,
76
 
[
77
 
if test "x$4" = "x"; then
78
 
  defineit="= 0"
79
 
elif test "x$4" = "xno"; then
80
 
  defineit=""
81
 
else
82
 
  defineit="$4"
83
 
fi
84
 
AC_TRY_COMPILE([
85
 
$1
86
 
],[
87
 
struct $2 testit; 
88
 
testit.$3 $defineit;
89
 
], eval "${ac_safe_all}=yes", eval "${ac_safe_all}=no" )
90
 
])
91
 
 
92
 
if eval "test \"x$`echo ${ac_safe_all}`\" = \"xyes\""; then
93
 
  AC_MSG_RESULT(yes)
94
 
  AC_DEFINE_UNQUOTED($ac_uc_define)
95
 
else
96
 
  AC_MSG_RESULT(no)
97
 
fi
98
 
 
99
 
])
100
 
 
101
 
dnl AC_CHECK_IFNET_FOR(SUBSTRUCT,[no])
102
 
AC_DEFUN(AC_CHECK_IFNET_FOR,[
103
 
dnl check for $1 in struct ifnet
104
 
AC_CHECK_STRUCT_FOR([
105
 
#ifdef IFNET_NEEDS_KERNEL
106
 
#define _KERNEL 1
107
 
#endif
108
 
#include <sys/types.h>
109
 
#include <sys/socket.h>
110
 
#ifdef HAVE_SYS_TIME_H
111
 
#include <sys/time.h>
112
 
#endif
113
 
#include <net/if.h>
114
 
#ifdef HAVE_NET_IF_VAR_H
115
 
#include <net/if_var.h>
116
 
#endif
117
 
#ifdef HAVE_SYS_QUEUE_H
118
 
#include <sys/queue.h>
119
 
#endif
120
 
#ifdef linux
121
 
struct ifnet {
122
 
        char    *if_name;               /* name, e.g. "en" or "lo" */
123
 
        short   if_unit;                /* sub-unit for lower level driver */
124
 
        short   if_mtu;                 /* maximum transmission unit */
125
 
        short   if_flags;               /* up/down, broadcast, etc. */
126
 
        int     if_metric;              /* routing metric (external only) */
127
 
        char    if_hwaddr [6];          /* ethernet address */
128
 
        int     if_type;                /* interface type: 1=generic,
129
 
                                           28=slip, ether=6, loopback=24 */
130
 
        int     if_speed;               /* interface speed: in bits/sec */
131
 
 
132
 
        struct sockaddr if_addr;        /* interface's address */
133
 
        struct sockaddr ifu_broadaddr;  /* broadcast address */
134
 
        struct sockaddr ia_subnetmask;  /* interface's mask */
135
 
 
136
 
        struct  ifqueue {
137
 
                int     ifq_len;
138
 
                int     ifq_drops;
139
 
        } if_snd;                       /* output queue */
140
 
        int     if_ibytes;              /* octets received on interface */
141
 
        int     if_ipackets;            /* packets received on interface */
142
 
        int     if_ierrors;             /* input errors on interface */
143
 
        int     if_iqdrops;             /* input queue overruns */
144
 
        int     if_obytes;              /* octets sent on interface */
145
 
        int     if_opackets;            /* packets sent on interface */
146
 
        int     if_oerrors;             /* output errors on interface */
147
 
        int     if_collisions;          /* collisions on csma interfaces */
148
 
/* end statistics */
149
 
        struct  ifnet *if_next;
150
 
};
151
 
#endif
152
 
], ifnet, $1, $2)
153
 
])
154
 
 
155
 
dnl
156
 
dnl Add a search path to the LIBS and CFLAGS variables
157
 
dnl
158
 
AC_DEFUN(AC_ADD_SEARCH_PATH,[
159
 
  if test "x$1" != x -a -d $1; then
160
 
     if test -d $1/lib; then
161
 
       LDFLAGS="-L$1/lib $LDFLAGS"
162
 
     fi
163
 
     if test -d $1/include; then
164
 
        CPPFLAGS="-I$1/include $CPPFLAGS"
165
 
     fi
166
 
  fi
167
 
])
168
 
 
169
 
dnl
170
 
dnl Store information for displaying later.
171
 
dnl
172
 
AC_DEFUN(AC_MSG_CACHE_INIT,[
173
 
  rm -f configure-summary
174
 
])
175
 
 
176
 
AC_DEFUN(AC_MSG_CACHE_ADD,[
177
 
  cat >> configure-summary << EOF
178
 
  $1
179
 
EOF
180
 
])
181
 
 
182
 
AC_DEFUN(AC_MSG_CACHE_DISPLAY,[
183
 
  echo ""
184
 
  echo "---------------------------------------------------------"
185
 
  echo "            Net-SNMP configuration summary:"
186
 
  echo "---------------------------------------------------------"
187
 
  echo ""
188
 
  cat configure-summary
189
 
  echo ""
190
 
  echo "---------------------------------------------------------"
191
 
  echo ""
192
 
])
193
 
 
194
 
 
195
 
dnl
196
 
dnl Stuff taken from libtool.m4 from the libtool package
197
 
dnl
198
 
 
199
 
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
200
 
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
201
 
## Free Software Foundation, Inc.
202
 
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
203
 
##
204
 
## This program is free software; you can redistribute it and/or modify
205
 
## it under the terms of the GNU General Public License as published by
206
 
## the Free Software Foundation; either version 2 of the License, or
207
 
## (at your option) any later version.
208
 
##
209
 
## This program is distributed in the hope that it will be useful, but
210
 
## WITHOUT ANY WARRANTY; without even the implied warranty of
211
 
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
212
 
## General Public License for more details.
213
 
##
214
 
## You should have received a copy of the GNU General Public License
215
 
## along with this program; if not, write to the Free Software
216
 
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
217
 
##
218
 
## As a special exception to the GNU General Public License, if you
219
 
## distribute this file as part of a program that contains a
220
 
## configuration script generated by Autoconf, you may include it under
221
 
## the same distribution terms that you use for the rest of that program.
222
 
 
223
 
# serial 46 AC_PROG_LIBTOOL
224
 
 
 
1
# generated automatically by aclocal 1.10 -*- Autoconf -*-
 
2
 
 
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 
4
# 2005, 2006  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
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
15
 
 
16
# serial 51 AC_PROG_LIBTOOL
 
17
 
 
18
 
 
19
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
 
20
# -----------------------------------------------------------
 
21
# If this macro is not defined by Autoconf, define it here.
 
22
m4_ifdef([AC_PROVIDE_IFELSE],
 
23
         [],
 
24
         [m4_define([AC_PROVIDE_IFELSE],
 
25
                 [m4_ifdef([AC_PROVIDE_$1],
 
26
                           [$2], [$3])])])
 
27
 
 
28
 
 
29
# AC_PROG_LIBTOOL
 
30
# ---------------
225
31
AC_DEFUN([AC_PROG_LIBTOOL],
 
32
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
 
33
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
 
34
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
 
35
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
36
    [AC_LIBTOOL_CXX],
 
37
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
 
38
  ])])
 
39
dnl And a similar setup for Fortran 77 support
 
40
  AC_PROVIDE_IFELSE([AC_PROG_F77],
 
41
    [AC_LIBTOOL_F77],
 
42
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
 
43
])])
 
44
 
 
45
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
 
46
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
 
47
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
 
48
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
49
    [AC_LIBTOOL_GCJ],
 
50
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
51
      [AC_LIBTOOL_GCJ],
 
52
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
 
53
        [AC_LIBTOOL_GCJ],
 
54
      [ifdef([AC_PROG_GCJ],
 
55
             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
56
       ifdef([A][M_PROG_GCJ],
 
57
             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
 
58
       ifdef([LT_AC_PROG_GCJ],
 
59
             [define([LT_AC_PROG_GCJ],
 
60
                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
 
61
])])# AC_PROG_LIBTOOL
 
62
 
 
63
 
 
64
# _AC_PROG_LIBTOOL
 
65
# ----------------
 
66
AC_DEFUN([_AC_PROG_LIBTOOL],
226
67
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
68
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
 
69
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
 
70
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
227
71
 
228
72
# This can be used to rebuild libtool when needed
229
73
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
234
78
 
235
79
# Prevent multiple expansion
236
80
define([AC_PROG_LIBTOOL], [])
237
 
])
238
 
 
 
81
])# _AC_PROG_LIBTOOL
 
82
 
 
83
 
 
84
# AC_LIBTOOL_SETUP
 
85
# ----------------
239
86
AC_DEFUN([AC_LIBTOOL_SETUP],
240
 
[AC_PREREQ(2.13)dnl
 
87
[AC_PREREQ(2.50)dnl
241
88
AC_REQUIRE([AC_ENABLE_SHARED])dnl
242
89
AC_REQUIRE([AC_ENABLE_STATIC])dnl
243
90
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
247
94
AC_REQUIRE([AC_PROG_LD])dnl
248
95
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
249
96
AC_REQUIRE([AC_PROG_NM])dnl
250
 
AC_REQUIRE([LT_AC_PROG_SED])dnl
251
97
 
252
98
AC_REQUIRE([AC_PROG_LN_S])dnl
253
99
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
100
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
254
101
AC_REQUIRE([AC_OBJEXT])dnl
255
102
AC_REQUIRE([AC_EXEEXT])dnl
256
103
dnl
257
104
 
 
105
AC_LIBTOOL_SYS_MAX_CMD_LEN
 
106
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
107
AC_LIBTOOL_OBJDIR
 
108
 
 
109
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
258
110
_LT_AC_PROG_ECHO_BACKSLASH
 
111
 
 
112
case $host_os in
 
113
aix3*)
 
114
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
115
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
116
  # vanish in a puff of smoke.
 
117
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
118
    COLLECT_NAMES=
 
119
    export COLLECT_NAMES
 
120
  fi
 
121
  ;;
 
122
esac
 
123
 
 
124
# Sed substitution that helps us do robust quoting.  It backslashifies
 
125
# metacharacters that are still active within double-quoted strings.
 
126
Xsed='sed -e 1s/^X//'
 
127
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
128
 
 
129
# Same as above, but do not quote variable references.
 
130
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
131
 
 
132
# Sed substitution to delay expansion of an escaped shell variable in a
 
133
# double_quote_subst'ed string.
 
134
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
135
 
 
136
# Sed substitution to avoid accidental globbing in evaled expressions
 
137
no_glob_subst='s/\*/\\\*/g'
 
138
 
 
139
# Constants:
 
140
rm="rm -f"
 
141
 
 
142
# Global variables:
 
143
default_ofile=libtool
 
144
can_build_shared=yes
 
145
 
 
146
# All known linkers require a `.a' archive for static linking (except MSVC,
 
147
# which needs '.lib').
 
148
libext=a
 
149
ltmain="$ac_aux_dir/ltmain.sh"
 
150
ofile="$default_ofile"
 
151
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
152
 
 
153
AC_CHECK_TOOL(AR, ar, false)
 
154
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
155
AC_CHECK_TOOL(STRIP, strip, :)
 
156
 
 
157
old_CC="$CC"
 
158
old_CFLAGS="$CFLAGS"
 
159
 
 
160
# Set sane defaults for various variables
 
161
test -z "$AR" && AR=ar
 
162
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
163
test -z "$AS" && AS=as
 
164
test -z "$CC" && CC=cc
 
165
test -z "$LTCC" && LTCC=$CC
 
166
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 
167
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
168
test -z "$LD" && LD=ld
 
169
test -z "$LN_S" && LN_S="ln -s"
 
170
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
171
test -z "$NM" && NM=nm
 
172
test -z "$SED" && SED=sed
 
173
test -z "$OBJDUMP" && OBJDUMP=objdump
 
174
test -z "$RANLIB" && RANLIB=:
 
175
test -z "$STRIP" && STRIP=:
 
176
test -z "$ac_objext" && ac_objext=o
 
177
 
 
178
# Determine commands to create old-style static archives.
 
179
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
 
180
old_postinstall_cmds='chmod 644 $oldlib'
 
181
old_postuninstall_cmds=
 
182
 
 
183
if test -n "$RANLIB"; then
 
184
  case $host_os in
 
185
  openbsd*)
 
186
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
 
187
    ;;
 
188
  *)
 
189
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
 
190
    ;;
 
191
  esac
 
192
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
193
fi
 
194
 
 
195
_LT_CC_BASENAME([$compiler])
 
196
 
259
197
# Only perform the check for file, if the check method requires it
260
198
case $deplibs_check_method in
261
199
file_magic*)
265
203
  ;;
266
204
esac
267
205
 
268
 
AC_CHECK_TOOL(RANLIB, ranlib, :)
269
 
AC_CHECK_TOOL(STRIP, strip, :)
270
 
 
271
 
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
272
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
206
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
207
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
273
208
enable_win32_dll=yes, enable_win32_dll=no)
274
209
 
275
 
AC_ARG_ENABLE(libtool-lock,
276
 
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
 
210
AC_ARG_ENABLE([libtool-lock],
 
211
    [AC_HELP_STRING([--disable-libtool-lock],
 
212
        [avoid locking (might break parallel builds)])])
277
213
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
278
214
 
279
 
# Some flags need to be propagated to the compiler or linker for good
280
 
# libtool support.
281
 
case $host in
282
 
*-*-irix6*)
283
 
  # Find out which ABI we are using.
284
 
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
285
 
  if AC_TRY_EVAL(ac_compile); then
286
 
    case `/usr/bin/file conftest.$ac_objext` in
287
 
    *32-bit*)
288
 
      LD="${LD-ld} -32"
289
 
      ;;
290
 
    *N32*)
291
 
      LD="${LD-ld} -n32"
292
 
      ;;
293
 
    *64-bit*)
294
 
      LD="${LD-ld} -64"
295
 
      ;;
296
 
    esac
297
 
  fi
298
 
  rm -rf conftest*
299
 
  ;;
300
 
 
301
 
*-*-sco3.2v5*)
302
 
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
303
 
  SAVE_CFLAGS="$CFLAGS"
304
 
  CFLAGS="$CFLAGS -belf"
305
 
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
306
 
    [AC_LANG_SAVE
307
 
     AC_LANG_C
308
 
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
309
 
     AC_LANG_RESTORE])
310
 
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
311
 
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
312
 
    CFLAGS="$SAVE_CFLAGS"
313
 
  fi
314
 
  ;;
315
 
 
316
 
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
317
 
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
318
 
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
319
 
  AC_CHECK_TOOL(AS, as, false)
320
 
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
321
 
 
322
 
  # recent cygwin and mingw systems supply a stub DllMain which the user
323
 
  # can override, but on older systems we have to supply one
324
 
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
325
 
    [AC_TRY_LINK([],
326
 
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
327
 
      DllMain (0, 0, 0);],
328
 
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
329
 
 
330
 
  case $host/$CC in
331
 
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
332
 
    # old mingw systems require "-dll" to link a DLL, while more recent ones
333
 
    # require "-mdll"
334
 
    SAVE_CFLAGS="$CFLAGS"
335
 
    CFLAGS="$CFLAGS -mdll"
336
 
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
337
 
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
338
 
    CFLAGS="$SAVE_CFLAGS" ;;
339
 
  *-*-cygwin* | *-*-pw32*)
340
 
    # cygwin systems need to pass --dll to the linker, and not link
341
 
    # crt.o which will require a WinMain@16 definition.
342
 
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
 
215
AC_ARG_WITH([pic],
 
216
    [AC_HELP_STRING([--with-pic],
 
217
        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
 
218
    [pic_mode="$withval"],
 
219
    [pic_mode=default])
 
220
test -z "$pic_mode" && pic_mode=default
 
221
 
 
222
# Use C for the default configuration in the libtool script
 
223
tagname=
 
224
AC_LIBTOOL_LANG_C_CONFIG
 
225
_LT_AC_TAGCONFIG
 
226
])# AC_LIBTOOL_SETUP
 
227
 
 
228
 
 
229
# _LT_AC_SYS_COMPILER
 
230
# -------------------
 
231
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
232
[AC_REQUIRE([AC_PROG_CC])dnl
 
233
 
 
234
# If no C compiler was specified, use CC.
 
235
LTCC=${LTCC-"$CC"}
 
236
 
 
237
# If no C compiler flags were specified, use CFLAGS.
 
238
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
239
 
 
240
# Allow CC to be a program name with arguments.
 
241
compiler=$CC
 
242
])# _LT_AC_SYS_COMPILER
 
243
 
 
244
 
 
245
# _LT_CC_BASENAME(CC)
 
246
# -------------------
 
247
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
248
AC_DEFUN([_LT_CC_BASENAME],
 
249
[for cc_temp in $1""; do
 
250
  case $cc_temp in
 
251
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
252
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
253
    \-*) ;;
 
254
    *) break;;
343
255
  esac
344
 
  ;;
345
 
  ])
346
 
esac
347
 
 
348
 
_LT_AC_LTCONFIG_HACK
349
 
 
 
256
done
 
257
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
350
258
])
351
259
 
352
 
# AC_LIBTOOL_HEADER_ASSERT
 
260
 
 
261
# _LT_COMPILER_BOILERPLATE
353
262
# ------------------------
354
 
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
355
 
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
356
 
    [lt_cv_func_assert_works],
357
 
    [case $host in
358
 
    *-*-solaris*)
359
 
      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
360
 
        case `$CC --version 2>/dev/null` in
361
 
        [[12]].*) lt_cv_func_assert_works=no ;;
362
 
        *)        lt_cv_func_assert_works=yes ;;
363
 
        esac
364
 
      fi
365
 
      ;;
366
 
    esac])
367
 
 
368
 
if test "x$lt_cv_func_assert_works" = xyes; then
369
 
  AC_CHECK_HEADERS(assert.h)
370
 
fi
371
 
])# AC_LIBTOOL_HEADER_ASSERT
372
 
 
373
 
# _LT_AC_CHECK_DLFCN
374
 
# --------------------
375
 
AC_DEFUN([_LT_AC_CHECK_DLFCN],
376
 
[AC_CHECK_HEADERS(dlfcn.h)
377
 
])# _LT_AC_CHECK_DLFCN
378
 
 
379
 
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
380
 
# ---------------------------------
381
 
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
382
 
[AC_REQUIRE([AC_CANONICAL_HOST])
383
 
AC_REQUIRE([AC_PROG_NM])
384
 
AC_REQUIRE([AC_OBJEXT])
385
 
# Check for command to grab the raw symbol name followed by C symbol from nm.
386
 
AC_MSG_CHECKING([command to parse $NM output])
387
 
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
388
 
 
389
 
# These are sane defaults that work on at least a few old systems.
390
 
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
391
 
 
392
 
# Character class describing NM global symbol codes.
393
 
symcode='[[BCDEGRST]]'
394
 
 
395
 
# Regexp to match symbols that can be accessed directly from C.
396
 
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
397
 
 
398
 
# Transform the above into a raw symbol and a C symbol.
399
 
symxfrm='\1 \2\3 \3'
400
 
 
401
 
# Transform an extracted symbol line into a proper C declaration
402
 
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
403
 
 
404
 
# Transform an extracted symbol line into symbol name and symbol address
405
 
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
406
 
 
407
 
# Define system-specific variables.
408
 
case $host_os in
409
 
aix*)
410
 
  symcode='[[BCDT]]'
411
 
  ;;
412
 
cygwin* | mingw* | pw32*)
413
 
  symcode='[[ABCDGISTW]]'
414
 
  ;;
415
 
hpux*) # Its linker distinguishes data from code symbols
416
 
  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
417
 
  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
418
 
  ;;
419
 
irix* | nonstopux*)
420
 
  symcode='[[BCDEGRST]]'
421
 
  ;;
422
 
osf*)
423
 
  symcode='[[BCDEGQRST]]'
424
 
  ;;
425
 
solaris* | sysv5*)
426
 
  symcode='[[BDT]]'
427
 
  ;;
428
 
sysv4)
429
 
  symcode='[[DFNSTU]]'
430
 
  ;;
431
 
esac
432
 
 
433
 
# Handle CRLF in mingw tool chain
434
 
opt_cr=
435
 
case $host_os in
436
 
mingw*)
437
 
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
438
 
  ;;
439
 
esac
440
 
 
441
 
# If we're using GNU nm, then use its standard symbol codes.
442
 
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
443
 
  symcode='[[ABCDGISTW]]'
444
 
fi
445
 
 
446
 
# Try without a prefix undercore, then with it.
447
 
for ac_symprfx in "" "_"; do
448
 
 
449
 
  # Write the raw and C identifiers.
450
 
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
451
 
 
452
 
  # Check to see that the pipe works correctly.
453
 
  pipe_works=no
454
 
  rm -f conftest*
455
 
  cat > conftest.$ac_ext <<EOF
456
 
#ifdef __cplusplus
457
 
extern "C" {
458
 
#endif
459
 
char nm_test_var;
460
 
void nm_test_func(){}
461
 
#ifdef __cplusplus
462
 
}
463
 
#endif
464
 
int main(){nm_test_var='a';nm_test_func();return(0);}
465
 
EOF
466
 
 
467
 
  if AC_TRY_EVAL(ac_compile); then
468
 
    # Now try to grab the symbols.
469
 
    nlist=conftest.nm
470
 
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
471
 
      # Try sorting and uniquifying the output.
472
 
      if sort "$nlist" | uniq > "$nlist"T; then
473
 
        mv -f "$nlist"T "$nlist"
474
 
      else
475
 
        rm -f "$nlist"T
476
 
      fi
477
 
 
478
 
      # Make sure that we snagged all the symbols we need.
479
 
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
480
 
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
481
 
          cat <<EOF > conftest.$ac_ext
482
 
#ifdef __cplusplus
483
 
extern "C" {
484
 
#endif
485
 
 
486
 
EOF
487
 
          # Now generate the symbol file.
488
 
          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
489
 
 
490
 
          cat <<EOF >> conftest.$ac_ext
491
 
#if defined (__STDC__) && __STDC__
492
 
# define lt_ptr void *
493
 
#else
494
 
# define lt_ptr char *
495
 
# define const
496
 
#endif
497
 
 
498
 
/* The mapping between symbol names and symbols. */
499
 
const struct {
500
 
  const char *name;
501
 
  lt_ptr address;
502
 
}
503
 
lt_preloaded_symbols[[]] =
504
 
{
505
 
EOF
506
 
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
507
 
          cat <<\EOF >> conftest.$ac_ext
508
 
  {0, (lt_ptr) 0}
509
 
};
510
 
 
511
 
#ifdef __cplusplus
512
 
}
513
 
#endif
514
 
EOF
515
 
          # Now try linking the two files.
516
 
          mv conftest.$ac_objext conftstm.$ac_objext
517
 
          save_LIBS="$LIBS"
518
 
          save_CFLAGS="$CFLAGS"
519
 
          LIBS="conftstm.$ac_objext"
520
 
          CFLAGS="$CFLAGS$no_builtin_flag"
521
 
          if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
522
 
            pipe_works=yes
523
 
          fi
524
 
          LIBS="$save_LIBS"
525
 
          CFLAGS="$save_CFLAGS"
526
 
        else
527
 
          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
528
 
        fi
529
 
      else
530
 
        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
531
 
      fi
532
 
    else
533
 
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
534
 
    fi
535
 
  else
536
 
    echo "$progname: failed program was:" >&AC_FD_CC
537
 
    cat conftest.$ac_ext >&5
538
 
  fi
539
 
  rm -f conftest* conftst*
540
 
 
541
 
  # Do not use the global_symbol_pipe unless it works.
542
 
  if test "$pipe_works" = yes; then
543
 
    break
544
 
  else
545
 
    lt_cv_sys_global_symbol_pipe=
546
 
  fi
547
 
done
548
 
])
549
 
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
550
 
if test -z "$lt_cv_sys_global_symbol_pipe"; then
551
 
  global_symbol_to_cdecl=
552
 
  global_symbol_to_c_name_address=
553
 
else
554
 
  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
555
 
  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
556
 
fi
557
 
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
558
 
then
559
 
  AC_MSG_RESULT(failed)
560
 
else
561
 
  AC_MSG_RESULT(ok)
562
 
fi
563
 
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
564
 
 
565
 
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
566
 
# ---------------------------------
567
 
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
568
 
[# Find the correct PATH separator.  Usually this is `:', but
569
 
# DJGPP uses `;' like DOS.
570
 
if test "X${PATH_SEPARATOR+set}" != Xset; then
571
 
  UNAME=${UNAME-`uname 2>/dev/null`}
572
 
  case X$UNAME in
573
 
    *-DOS) lt_cv_sys_path_separator=';' ;;
574
 
    *)     lt_cv_sys_path_separator=':' ;;
575
 
  esac
576
 
  PATH_SEPARATOR=$lt_cv_sys_path_separator
577
 
fi
578
 
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
263
# Check for compiler boilerplate output or warnings with
 
264
# the simple compiler test code.
 
265
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
266
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
267
ac_outfile=conftest.$ac_objext
 
268
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
 
269
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
270
_lt_compiler_boilerplate=`cat conftest.err`
 
271
$rm conftest*
 
272
])# _LT_COMPILER_BOILERPLATE
 
273
 
 
274
 
 
275
# _LT_LINKER_BOILERPLATE
 
276
# ----------------------
 
277
# Check for linker boilerplate output or warnings with
 
278
# the simple link test code.
 
279
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
280
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
281
ac_outfile=conftest.$ac_objext
 
282
echo "$lt_simple_link_test_code" >conftest.$ac_ext
 
283
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
284
_lt_linker_boilerplate=`cat conftest.err`
 
285
$rm conftest*
 
286
])# _LT_LINKER_BOILERPLATE
 
287
 
 
288
 
 
289
# _LT_AC_SYS_LIBPATH_AIX
 
290
# ----------------------
 
291
# Links a minimal program and checks the executable
 
292
# for the system default hardcoded library path. In most cases,
 
293
# this is /usr/lib:/lib, but when the MPI compilers are used
 
294
# the location of the communication and MPI libs are included too.
 
295
# If we don't find anything, use the default library path according
 
296
# to the aix ld manual.
 
297
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
 
298
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
299
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
300
lt_aix_libpath_sed='
 
301
    /Import File Strings/,/^$/ {
 
302
        /^0/ {
 
303
            s/^0  *\(.*\)$/\1/
 
304
            p
 
305
        }
 
306
    }'
 
307
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
308
# Check for a 64-bit object if we didn't find anything.
 
309
if test -z "$aix_libpath"; then
 
310
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
 
311
fi],[])
 
312
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
313
])# _LT_AC_SYS_LIBPATH_AIX
 
314
 
 
315
 
 
316
# _LT_AC_SHELL_INIT(ARG)
 
317
# ----------------------
 
318
AC_DEFUN([_LT_AC_SHELL_INIT],
 
319
[ifdef([AC_DIVERSION_NOTICE],
 
320
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
321
         [AC_DIVERT_PUSH(NOTICE)])
 
322
$1
 
323
AC_DIVERT_POP
 
324
])# _LT_AC_SHELL_INIT
 
325
 
579
326
 
580
327
# _LT_AC_PROG_ECHO_BACKSLASH
581
328
# --------------------------
582
329
# Add some code to the start of the generated configure script which
583
330
# will find an echo command which doesn't interpret backslashes.
584
331
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
585
 
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
586
 
                              [AC_DIVERT_PUSH(NOTICE)])
587
 
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
588
 
 
 
332
[_LT_AC_SHELL_INIT([
589
333
# Check that we are running under the correct shell.
590
334
SHELL=${CONFIG_SHELL-/bin/sh}
591
335
 
603
347
elif test "X[$]1" = X--fallback-echo; then
604
348
  # Avoid inline document here, it may be left over
605
349
  :
606
 
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
350
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
607
351
  # Yippee, $echo works!
608
352
  :
609
353
else
615
359
  # used as fallback echo
616
360
  shift
617
361
  cat <<EOF
618
 
$*
 
362
[$]*
619
363
EOF
620
364
  exit 0
621
365
fi
622
366
 
623
367
# The HP-UX ksh and POSIX shell print the target directory to stdout
624
368
# if CDPATH is set.
625
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
369
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
626
370
 
627
371
if test -z "$ECHO"; then
628
372
if test "X${echo_test_string+set}" != Xset; then
629
373
# find a string as large as possible, as long as the shell can cope with it
630
374
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
631
375
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
632
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
633
 
       echo_test_string="`eval $cmd`" &&
 
376
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
377
       echo_test_string=`eval $cmd` &&
634
378
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
635
379
    then
636
380
      break
649
393
  #
650
394
  # So, first we look for a working echo in the user's PATH.
651
395
 
652
 
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
396
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
653
397
  for dir in $PATH /usr/ucb; do
 
398
    IFS="$lt_save_ifs"
654
399
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
655
400
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
656
401
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
659
404
      break
660
405
    fi
661
406
  done
662
 
  IFS="$save_ifs"
 
407
  IFS="$lt_save_ifs"
663
408
 
664
409
  if test "X$echo" = Xecho; then
665
410
    # We didn't find a better echo, so look for alternatives.
732
477
fi
733
478
 
734
479
AC_SUBST(ECHO)
735
 
AC_DIVERT_POP
736
 
])# _LT_AC_PROG_ECHO_BACKSLASH
 
480
])])# _LT_AC_PROG_ECHO_BACKSLASH
 
481
 
 
482
 
 
483
# _LT_AC_LOCK
 
484
# -----------
 
485
AC_DEFUN([_LT_AC_LOCK],
 
486
[AC_ARG_ENABLE([libtool-lock],
 
487
    [AC_HELP_STRING([--disable-libtool-lock],
 
488
        [avoid locking (might break parallel builds)])])
 
489
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
490
 
 
491
# Some flags need to be propagated to the compiler or linker for good
 
492
# libtool support.
 
493
case $host in
 
494
ia64-*-hpux*)
 
495
  # Find out which ABI we are using.
 
496
  echo 'int i;' > conftest.$ac_ext
 
497
  if AC_TRY_EVAL(ac_compile); then
 
498
    case `/usr/bin/file conftest.$ac_objext` in
 
499
    *ELF-32*)
 
500
      HPUX_IA64_MODE="32"
 
501
      ;;
 
502
    *ELF-64*)
 
503
      HPUX_IA64_MODE="64"
 
504
      ;;
 
505
    esac
 
506
  fi
 
507
  rm -rf conftest*
 
508
  ;;
 
509
*-*-irix6*)
 
510
  # Find out which ABI we are using.
 
511
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
512
  if AC_TRY_EVAL(ac_compile); then
 
513
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
514
    case `/usr/bin/file conftest.$ac_objext` in
 
515
    *32-bit*)
 
516
      LD="${LD-ld} -melf32bsmip"
 
517
      ;;
 
518
    *N32*)
 
519
      LD="${LD-ld} -melf32bmipn32"
 
520
      ;;
 
521
    *64-bit*)
 
522
      LD="${LD-ld} -melf64bmip"
 
523
      ;;
 
524
    esac
 
525
   else
 
526
    case `/usr/bin/file conftest.$ac_objext` in
 
527
    *32-bit*)
 
528
      LD="${LD-ld} -32"
 
529
      ;;
 
530
    *N32*)
 
531
      LD="${LD-ld} -n32"
 
532
      ;;
 
533
    *64-bit*)
 
534
      LD="${LD-ld} -64"
 
535
      ;;
 
536
    esac
 
537
   fi
 
538
  fi
 
539
  rm -rf conftest*
 
540
  ;;
 
541
 
 
542
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
 
543
s390*-*linux*|sparc*-*linux*)
 
544
  # Find out which ABI we are using.
 
545
  echo 'int i;' > conftest.$ac_ext
 
546
  if AC_TRY_EVAL(ac_compile); then
 
547
    case `/usr/bin/file conftest.o` in
 
548
    *32-bit*)
 
549
      case $host in
 
550
        x86_64-*kfreebsd*-gnu)
 
551
          LD="${LD-ld} -m elf_i386_fbsd"
 
552
          ;;
 
553
        x86_64-*linux*)
 
554
          LD="${LD-ld} -m elf_i386"
 
555
          ;;
 
556
        ppc64-*linux*|powerpc64-*linux*)
 
557
          LD="${LD-ld} -m elf32ppclinux"
 
558
          ;;
 
559
        s390x-*linux*)
 
560
          LD="${LD-ld} -m elf_s390"
 
561
          ;;
 
562
        sparc64-*linux*)
 
563
          LD="${LD-ld} -m elf32_sparc"
 
564
          ;;
 
565
      esac
 
566
      ;;
 
567
    *64-bit*)
 
568
      case $host in
 
569
        x86_64-*kfreebsd*-gnu)
 
570
          LD="${LD-ld} -m elf_x86_64_fbsd"
 
571
          ;;
 
572
        x86_64-*linux*)
 
573
          LD="${LD-ld} -m elf_x86_64"
 
574
          ;;
 
575
        ppc*-*linux*|powerpc*-*linux*)
 
576
          LD="${LD-ld} -m elf64ppc"
 
577
          ;;
 
578
        s390*-*linux*)
 
579
          LD="${LD-ld} -m elf64_s390"
 
580
          ;;
 
581
        sparc*-*linux*)
 
582
          LD="${LD-ld} -m elf64_sparc"
 
583
          ;;
 
584
      esac
 
585
      ;;
 
586
    esac
 
587
  fi
 
588
  rm -rf conftest*
 
589
  ;;
 
590
 
 
591
*-*-sco3.2v5*)
 
592
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
593
  SAVE_CFLAGS="$CFLAGS"
 
594
  CFLAGS="$CFLAGS -belf"
 
595
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
596
    [AC_LANG_PUSH(C)
 
597
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
598
     AC_LANG_POP])
 
599
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
600
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
601
    CFLAGS="$SAVE_CFLAGS"
 
602
  fi
 
603
  ;;
 
604
sparc*-*solaris*)
 
605
  # Find out which ABI we are using.
 
606
  echo 'int i;' > conftest.$ac_ext
 
607
  if AC_TRY_EVAL(ac_compile); then
 
608
    case `/usr/bin/file conftest.o` in
 
609
    *64-bit*)
 
610
      case $lt_cv_prog_gnu_ld in
 
611
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
612
      *)    LD="${LD-ld} -64" ;;
 
613
      esac
 
614
      ;;
 
615
    esac
 
616
  fi
 
617
  rm -rf conftest*
 
618
  ;;
 
619
 
 
620
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
 
621
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
622
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
623
  AC_CHECK_TOOL(AS, as, false)
 
624
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
625
  ;;
 
626
  ])
 
627
esac
 
628
 
 
629
need_locks="$enable_libtool_lock"
 
630
 
 
631
])# _LT_AC_LOCK
 
632
 
 
633
 
 
634
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
635
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
636
# ----------------------------------------------------------------
 
637
# Check whether the given compiler option works
 
638
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
639
[AC_REQUIRE([LT_AC_PROG_SED])
 
640
AC_CACHE_CHECK([$1], [$2],
 
641
  [$2=no
 
642
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
643
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
644
   lt_compiler_flag="$3"
 
645
   # Insert the option either (1) after the last *FLAGS variable, or
 
646
   # (2) before a word containing "conftest.", or (3) at the end.
 
647
   # Note that $ac_compile itself does not contain backslashes and begins
 
648
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
649
   # The option is referenced via a variable to avoid confusing sed.
 
650
   lt_compile=`echo "$ac_compile" | $SED \
 
651
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
652
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
653
   -e 's:$: $lt_compiler_flag:'`
 
654
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
655
   (eval "$lt_compile" 2>conftest.err)
 
656
   ac_status=$?
 
657
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
658
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
659
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
660
     # The compiler can only warn and ignore the option if not recognized
 
661
     # So say no if there are warnings other than the usual output.
 
662
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
663
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
664
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
 
665
       $2=yes
 
666
     fi
 
667
   fi
 
668
   $rm conftest*
 
669
])
 
670
 
 
671
if test x"[$]$2" = xyes; then
 
672
    ifelse([$5], , :, [$5])
 
673
else
 
674
    ifelse([$6], , :, [$6])
 
675
fi
 
676
])# AC_LIBTOOL_COMPILER_OPTION
 
677
 
 
678
 
 
679
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
680
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
681
# ------------------------------------------------------------
 
682
# Check whether the given compiler option works
 
683
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
 
684
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
685
AC_CACHE_CHECK([$1], [$2],
 
686
  [$2=no
 
687
   save_LDFLAGS="$LDFLAGS"
 
688
   LDFLAGS="$LDFLAGS $3"
 
689
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
 
690
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
691
     # The linker can only warn and ignore the option if not recognized
 
692
     # So say no if there are warnings
 
693
     if test -s conftest.err; then
 
694
       # Append any errors to the config.log.
 
695
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
696
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
697
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
698
       if diff conftest.exp conftest.er2 >/dev/null; then
 
699
         $2=yes
 
700
       fi
 
701
     else
 
702
       $2=yes
 
703
     fi
 
704
   fi
 
705
   $rm conftest*
 
706
   LDFLAGS="$save_LDFLAGS"
 
707
])
 
708
 
 
709
if test x"[$]$2" = xyes; then
 
710
    ifelse([$4], , :, [$4])
 
711
else
 
712
    ifelse([$5], , :, [$5])
 
713
fi
 
714
])# AC_LIBTOOL_LINKER_OPTION
 
715
 
 
716
 
 
717
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
718
# --------------------------
 
719
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
720
[# find the maximum length of command line arguments
 
721
AC_MSG_CHECKING([the maximum length of command line arguments])
 
722
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
723
  i=0
 
724
  teststring="ABCD"
 
725
 
 
726
  case $build_os in
 
727
  msdosdjgpp*)
 
728
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
729
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
730
    # during glob expansion).  Even if it were fixed, the result of this
 
731
    # check would be larger than it should be.
 
732
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
733
    ;;
 
734
 
 
735
  gnu*)
 
736
    # Under GNU Hurd, this test is not required because there is
 
737
    # no limit to the length of command line arguments.
 
738
    # Libtool will interpret -1 as no limit whatsoever
 
739
    lt_cv_sys_max_cmd_len=-1;
 
740
    ;;
 
741
 
 
742
  cygwin* | mingw*)
 
743
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
744
    # about 5 minutes as the teststring grows exponentially.
 
745
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
746
    # you end up with a "frozen" computer, even though with patience
 
747
    # the test eventually succeeds (with a max line length of 256k).
 
748
    # Instead, let's just punt: use the minimum linelength reported by
 
749
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
750
    lt_cv_sys_max_cmd_len=8192;
 
751
    ;;
 
752
 
 
753
  amigaos*)
 
754
    # On AmigaOS with pdksh, this test takes hours, literally.
 
755
    # So we just punt and use a minimum line length of 8192.
 
756
    lt_cv_sys_max_cmd_len=8192;
 
757
    ;;
 
758
 
 
759
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
760
    # This has been around since 386BSD, at least.  Likely further.
 
761
    if test -x /sbin/sysctl; then
 
762
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
763
    elif test -x /usr/sbin/sysctl; then
 
764
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
765
    else
 
766
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
767
    fi
 
768
    # And add a safety zone
 
769
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
770
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
771
    ;;
 
772
 
 
773
  interix*)
 
774
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
775
    lt_cv_sys_max_cmd_len=196608
 
776
    ;;
 
777
 
 
778
  osf*)
 
779
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
780
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
781
    # nice to cause kernel panics so lets avoid the loop below.
 
782
    # First set a reasonable default.
 
783
    lt_cv_sys_max_cmd_len=16384
 
784
    #
 
785
    if test -x /sbin/sysconfig; then
 
786
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
787
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
788
      esac
 
789
    fi
 
790
    ;;
 
791
  sco3.2v5*)
 
792
    lt_cv_sys_max_cmd_len=102400
 
793
    ;;
 
794
  sysv5* | sco5v6* | sysv4.2uw2*)
 
795
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
796
    if test -n "$kargmax"; then
 
797
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
 
798
    else
 
799
      lt_cv_sys_max_cmd_len=32768
 
800
    fi
 
801
    ;;
 
802
  *)
 
803
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
 
804
    if test -n "$lt_cv_sys_max_cmd_len"; then
 
805
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
806
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
807
    else
 
808
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
809
      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
810
               = "XX$teststring") >/dev/null 2>&1 &&
 
811
              new_result=`expr "X$teststring" : ".*" 2>&1` &&
 
812
              lt_cv_sys_max_cmd_len=$new_result &&
 
813
              test $i != 17 # 1/2 MB should be enough
 
814
      do
 
815
        i=`expr $i + 1`
 
816
        teststring=$teststring$teststring
 
817
      done
 
818
      teststring=
 
819
      # Add a significant safety factor because C++ compilers can tack on massive
 
820
      # amounts of additional arguments before passing them to the linker.
 
821
      # It appears as though 1/2 is a usable value.
 
822
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
823
    fi
 
824
    ;;
 
825
  esac
 
826
])
 
827
if test -n $lt_cv_sys_max_cmd_len ; then
 
828
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
829
else
 
830
  AC_MSG_RESULT(none)
 
831
fi
 
832
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
833
 
 
834
 
 
835
# _LT_AC_CHECK_DLFCN
 
836
# ------------------
 
837
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
838
[AC_CHECK_HEADERS(dlfcn.h)dnl
 
839
])# _LT_AC_CHECK_DLFCN
 
840
 
737
841
 
738
842
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
739
843
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
740
 
# ------------------------------------------------------------------
 
844
# ---------------------------------------------------------------------
741
845
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
742
 
[if test "$cross_compiling" = yes; then :
 
846
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
847
if test "$cross_compiling" = yes; then :
743
848
  [$4]
744
849
else
745
 
  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
746
850
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
747
851
  lt_status=$lt_dlunknown
748
852
  cat > conftest.$ac_ext <<EOF
803
907
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
804
908
      /* dlclose (self); */
805
909
    }
 
910
  else
 
911
    puts (dlerror ());
806
912
 
807
913
    exit (status);
808
914
}]
809
915
EOF
810
916
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
811
 
    (./conftest; exit; ) 2>/dev/null
 
917
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
812
918
    lt_status=$?
813
919
    case x$lt_status in
814
920
      x$lt_dlno_uscore) $1 ;;
815
921
      x$lt_dlneed_uscore) $2 ;;
816
 
      x$lt_unknown|x*) $3 ;;
 
922
      x$lt_dlunknown|x*) $3 ;;
817
923
    esac
818
924
  else :
819
925
    # compilation failed
823
929
rm -fr conftest*
824
930
])# _LT_AC_TRY_DLOPEN_SELF
825
931
 
 
932
 
826
933
# AC_LIBTOOL_DLOPEN_SELF
827
 
# -------------------
 
934
# ----------------------
828
935
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
829
 
[if test "x$enable_dlopen" != xyes; then
 
936
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
937
if test "x$enable_dlopen" != xyes; then
830
938
  enable_dlopen=unknown
831
939
  enable_dlopen_self=unknown
832
940
  enable_dlopen_self_static=unknown
841
949
    lt_cv_dlopen_self=yes
842
950
    ;;
843
951
 
844
 
  cygwin* | mingw* | pw32*)
 
952
  mingw* | pw32*)
845
953
    lt_cv_dlopen="LoadLibrary"
846
954
    lt_cv_dlopen_libs=
847
955
   ;;
848
956
 
 
957
  cygwin*)
 
958
    lt_cv_dlopen="dlopen"
 
959
    lt_cv_dlopen_libs=
 
960
   ;;
 
961
 
 
962
  darwin*)
 
963
  # if libdl is installed we need to link against it
 
964
    AC_CHECK_LIB([dl], [dlopen],
 
965
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
966
    lt_cv_dlopen="dyld"
 
967
    lt_cv_dlopen_libs=
 
968
    lt_cv_dlopen_self=yes
 
969
    ])
 
970
   ;;
 
971
 
849
972
  *)
850
973
    AC_CHECK_FUNC([shl_load],
851
 
          [lt_cv_dlopen="shl_load"],
 
974
          [lt_cv_dlopen="shl_load"],
852
975
      [AC_CHECK_LIB([dld], [shl_load],
853
 
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
976
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
854
977
        [AC_CHECK_FUNC([dlopen],
855
978
              [lt_cv_dlopen="dlopen"],
856
979
          [AC_CHECK_LIB([dl], [dlopen],
857
 
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
980
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
858
981
            [AC_CHECK_LIB([svld], [dlopen],
859
 
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
982
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
860
983
              [AC_CHECK_LIB([dld], [dld_link],
861
 
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
984
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
862
985
              ])
863
986
            ])
864
987
          ])
876
999
  case $lt_cv_dlopen in
877
1000
  dlopen)
878
1001
    save_CPPFLAGS="$CPPFLAGS"
879
 
    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
880
1002
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
881
1003
 
882
1004
    save_LDFLAGS="$LDFLAGS"
883
 
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
1005
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
884
1006
 
885
1007
    save_LIBS="$LIBS"
886
1008
    LIBS="$lt_cv_dlopen_libs $LIBS"
893
1015
    ])
894
1016
 
895
1017
    if test "x$lt_cv_dlopen_self" = xyes; then
896
 
      LDFLAGS="$LDFLAGS $link_static_flag"
 
1018
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
897
1019
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
898
1020
          lt_cv_dlopen_self_static, [dnl
899
1021
          _LT_AC_TRY_DLOPEN_SELF(
920
1042
fi
921
1043
])# AC_LIBTOOL_DLOPEN_SELF
922
1044
 
923
 
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
924
 
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
925
 
# Sed substitution that helps us do robust quoting.  It backslashifies
926
 
# metacharacters that are still active within double-quoted strings.
927
 
Xsed='sed -e s/^X//'
928
 
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
929
 
 
930
 
# Same as above, but do not quote variable references.
931
 
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
932
 
 
933
 
# Sed substitution to delay expansion of an escaped shell variable in a
934
 
# double_quote_subst'ed string.
935
 
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
936
 
 
937
 
# Constants:
938
 
rm="rm -f"
939
 
 
940
 
# Global variables:
941
 
default_ofile=libtool
942
 
can_build_shared=yes
943
 
 
944
 
# All known linkers require a `.a' archive for static linking (except M$VC,
945
 
# which needs '.lib').
946
 
libext=a
947
 
ltmain="$ac_aux_dir/ltmain.sh"
948
 
ofile="$default_ofile"
949
 
with_gnu_ld="$lt_cv_prog_gnu_ld"
950
 
need_locks="$enable_libtool_lock"
951
 
 
952
 
old_CC="$CC"
953
 
old_CFLAGS="$CFLAGS"
954
 
 
955
 
# Set sane defaults for various variables
956
 
test -z "$AR" && AR=ar
957
 
test -z "$AR_FLAGS" && AR_FLAGS=cru
958
 
test -z "$AS" && AS=as
959
 
test -z "$CC" && CC=cc
960
 
test -z "$DLLTOOL" && DLLTOOL=dlltool
961
 
test -z "$LD" && LD=ld
962
 
test -z "$LN_S" && LN_S="ln -s"
963
 
test -z "$MAGIC_CMD" && MAGIC_CMD=file
964
 
test -z "$NM" && NM=nm
965
 
test -z "$OBJDUMP" && OBJDUMP=objdump
966
 
test -z "$RANLIB" && RANLIB=:
967
 
test -z "$STRIP" && STRIP=:
968
 
test -z "$ac_objext" && ac_objext=o
969
 
 
970
 
if test x"$host" != x"$build"; then
971
 
  ac_tool_prefix=${host_alias}-
972
 
else
973
 
  ac_tool_prefix=
974
 
fi
975
 
 
976
 
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
977
 
case $host_os in
978
 
linux-gnu*) ;;
979
 
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
980
 
esac
981
 
 
982
 
case $host_os in
983
 
aix3*)
984
 
  # AIX sometimes has problems with the GCC collect2 program.  For some
985
 
  # reason, if we set the COLLECT_NAMES environment variable, the problems
986
 
  # vanish in a puff of smoke.
987
 
  if test "X${COLLECT_NAMES+set}" != Xset; then
988
 
    COLLECT_NAMES=
989
 
    export COLLECT_NAMES
990
 
  fi
991
 
  ;;
992
 
esac
993
 
 
994
 
# Determine commands to create old-style static archives.
995
 
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
996
 
old_postinstall_cmds='chmod 644 $oldlib'
997
 
old_postuninstall_cmds=
998
 
 
999
 
if test -n "$RANLIB"; then
1000
 
  case $host_os in
1001
 
  openbsd*)
1002
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1003
 
    ;;
1004
 
  *)
1005
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1006
 
    ;;
1007
 
  esac
1008
 
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1009
 
fi
1010
 
 
1011
 
# Allow CC to be a program name with arguments.
1012
 
set dummy $CC
1013
 
compiler="[$]2"
1014
 
 
1015
 
## FIXME: this should be a separate macro
1016
 
##
1017
 
AC_MSG_CHECKING([for objdir])
1018
 
rm -f .libs 2>/dev/null
1019
 
mkdir .libs 2>/dev/null
1020
 
if test -d .libs; then
1021
 
  objdir=.libs
1022
 
else
1023
 
  # MS-DOS does not allow filenames that begin with a dot.
1024
 
  objdir=_libs
1025
 
fi
1026
 
rmdir .libs 2>/dev/null
1027
 
AC_MSG_RESULT($objdir)
1028
 
##
1029
 
## END FIXME
1030
 
 
1031
 
 
1032
 
## FIXME: this should be a separate macro
1033
 
##
1034
 
AC_ARG_WITH(pic,
1035
 
[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1036
 
pic_mode="$withval", pic_mode=default)
1037
 
test -z "$pic_mode" && pic_mode=default
1038
 
 
1039
 
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
1040
 
# in isolation, and that seeing it set (from the cache) indicates that
1041
 
# the associated values are set (in the cache) correctly too.
1042
 
AC_MSG_CHECKING([for $compiler option to produce PIC])
1043
 
AC_CACHE_VAL(lt_cv_prog_cc_pic,
1044
 
[ lt_cv_prog_cc_pic=
1045
 
  lt_cv_prog_cc_shlib=
1046
 
  lt_cv_prog_cc_wl=
1047
 
  lt_cv_prog_cc_static=
1048
 
  lt_cv_prog_cc_no_builtin=
1049
 
  lt_cv_prog_cc_can_build_shared=$can_build_shared
1050
 
 
1051
 
  if test "$GCC" = yes; then
1052
 
    lt_cv_prog_cc_wl='-Wl,'
1053
 
    lt_cv_prog_cc_static='-static'
1054
 
 
1055
 
    case $host_os in
1056
 
    aix*)
1057
 
      # Below there is a dirty hack to force normal static linking with -ldl
1058
 
      # The problem is because libdl dynamically linked with both libc and
1059
 
      # libC (AIX C++ library), which obviously doesn't included in libraries
1060
 
      # list by gcc. This cause undefined symbols with -static flags.
1061
 
      # This hack allows C programs to be linked with "-static -ldl", but
1062
 
      # not sure about C++ programs.
1063
 
      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1064
 
      ;;
1065
 
    amigaos*)
1066
 
      # FIXME: we need at least 68020 code to build shared libraries, but
1067
 
      # adding the `-m68020' flag to GCC prevents building anything better,
1068
 
      # like `-m68040'.
1069
 
      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1070
 
      ;;
1071
 
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1072
 
      # PIC is the default for these OSes.
1073
 
      ;;
1074
 
    darwin* | rhapsody*)
1075
 
      # PIC is the default on this platform
1076
 
      # Common symbols not allowed in MH_DYLIB files
1077
 
      lt_cv_prog_cc_pic='-fno-common'
1078
 
      ;;
1079
 
    cygwin* | mingw* | pw32* | os2*)
1080
 
      # This hack is so that the source file can tell whether it is being
1081
 
      # built for inclusion in a dll (and should export symbols for example).
1082
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1083
 
      ;;
1084
 
    sysv4*MP*)
1085
 
      if test -d /usr/nec; then
1086
 
         lt_cv_prog_cc_pic=-Kconform_pic
1087
 
      fi
1088
 
      ;;
1089
 
    *)
1090
 
      lt_cv_prog_cc_pic='-fPIC'
1091
 
      ;;
1092
 
    esac
1093
 
  else
1094
 
    # PORTME Check for PIC flags for the system compiler.
1095
 
    case $host_os in
1096
 
    aix3* | aix4* | aix5*)
1097
 
      lt_cv_prog_cc_wl='-Wl,'
1098
 
      # All AIX code is PIC.
1099
 
      if test "$host_cpu" = ia64; then
1100
 
        # AIX 5 now supports IA64 processor
1101
 
        lt_cv_prog_cc_static='-Bstatic'
1102
 
      else
1103
 
        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1104
 
      fi
1105
 
      ;;
1106
 
 
1107
 
    hpux9* | hpux10* | hpux11*)
1108
 
      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1109
 
      lt_cv_prog_cc_wl='-Wl,'
1110
 
      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1111
 
      lt_cv_prog_cc_pic='+Z'
1112
 
      ;;
1113
 
 
1114
 
    irix5* | irix6* | nonstopux*)
1115
 
      lt_cv_prog_cc_wl='-Wl,'
1116
 
      lt_cv_prog_cc_static='-non_shared'
1117
 
      # PIC (with -KPIC) is the default.
1118
 
      ;;
1119
 
 
1120
 
    cygwin* | mingw* | pw32* | os2*)
1121
 
      # This hack is so that the source file can tell whether it is being
1122
 
      # built for inclusion in a dll (and should export symbols for example).
1123
 
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
1124
 
      ;;
1125
 
 
1126
 
    newsos6)
1127
 
      lt_cv_prog_cc_pic='-KPIC'
1128
 
      lt_cv_prog_cc_static='-Bstatic'
1129
 
      ;;
1130
 
 
1131
 
    osf3* | osf4* | osf5*)
1132
 
      # All OSF/1 code is PIC.
1133
 
      lt_cv_prog_cc_wl='-Wl,'
1134
 
      lt_cv_prog_cc_static='-non_shared'
1135
 
      ;;
1136
 
 
1137
 
    sco3.2v5*)
1138
 
      lt_cv_prog_cc_pic='-Kpic'
1139
 
      lt_cv_prog_cc_static='-dn'
1140
 
      lt_cv_prog_cc_shlib='-belf'
1141
 
      ;;
1142
 
 
1143
 
    solaris*)
1144
 
      lt_cv_prog_cc_pic='-KPIC'
1145
 
      lt_cv_prog_cc_static='-Bstatic'
1146
 
      lt_cv_prog_cc_wl='-Wl,'
1147
 
      ;;
1148
 
 
1149
 
    sunos4*)
1150
 
      lt_cv_prog_cc_pic='-PIC'
1151
 
      lt_cv_prog_cc_static='-Bstatic'
1152
 
      lt_cv_prog_cc_wl='-Qoption ld '
1153
 
      ;;
1154
 
 
1155
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1156
 
      lt_cv_prog_cc_pic='-KPIC'
1157
 
      lt_cv_prog_cc_static='-Bstatic'
1158
 
      lt_cv_prog_cc_wl='-Wl,'
1159
 
      ;;
1160
 
 
1161
 
    uts4*)
1162
 
      lt_cv_prog_cc_pic='-pic'
1163
 
      lt_cv_prog_cc_static='-Bstatic'
1164
 
      ;;
1165
 
 
1166
 
    sysv4*MP*)
1167
 
      if test -d /usr/nec ;then
1168
 
        lt_cv_prog_cc_pic='-Kconform_pic'
1169
 
        lt_cv_prog_cc_static='-Bstatic'
1170
 
      fi
1171
 
      ;;
1172
 
 
1173
 
    *)
1174
 
      lt_cv_prog_cc_can_build_shared=no
1175
 
      ;;
1176
 
    esac
1177
 
  fi
1178
 
])
1179
 
if test -z "$lt_cv_prog_cc_pic"; then
1180
 
  AC_MSG_RESULT([none])
1181
 
else
1182
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1183
 
 
1184
 
  # Check to make sure the pic_flag actually works.
1185
 
  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1186
 
  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1187
 
    save_CFLAGS="$CFLAGS"
1188
 
    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1189
 
    AC_TRY_COMPILE([], [], [dnl
1190
 
      case $host_os in
1191
 
      hpux9* | hpux10* | hpux11*)
1192
 
        # On HP-UX, both CC and GCC only warn that PIC is supported... then
1193
 
        # they create non-PIC objects.  So, if there were any warnings, we
1194
 
        # assume that PIC is not supported.
1195
 
        if test -s conftest.err; then
1196
 
          lt_cv_prog_cc_pic_works=no
1197
 
        else
1198
 
          lt_cv_prog_cc_pic_works=yes
1199
 
        fi
1200
 
        ;;
1201
 
      *)
1202
 
        lt_cv_prog_cc_pic_works=yes
1203
 
        ;;
1204
 
      esac
1205
 
    ], [dnl
1206
 
      lt_cv_prog_cc_pic_works=no
1207
 
    ])
1208
 
    CFLAGS="$save_CFLAGS"
1209
 
  ])
1210
 
 
1211
 
  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1212
 
    lt_cv_prog_cc_pic=
1213
 
    lt_cv_prog_cc_can_build_shared=no
1214
 
  else
1215
 
    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1216
 
  fi
1217
 
 
1218
 
  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1219
 
fi
1220
 
##
1221
 
## END FIXME
1222
 
 
1223
 
# Check for any special shared library compilation flags.
1224
 
if test -n "$lt_cv_prog_cc_shlib"; then
1225
 
  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1226
 
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1227
 
  else
1228
 
   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1229
 
    lt_cv_prog_cc_can_build_shared=no
1230
 
  fi
1231
 
fi
1232
 
 
1233
 
## FIXME: this should be a separate macro
1234
 
##
1235
 
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1236
 
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1237
 
  lt_cv_prog_cc_static_works=no
1238
 
  save_LDFLAGS="$LDFLAGS"
1239
 
  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1240
 
  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1241
 
  LDFLAGS="$save_LDFLAGS"
1242
 
])
1243
 
 
1244
 
# Belt *and* braces to stop my trousers falling down:
1245
 
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1246
 
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1247
 
 
1248
 
pic_flag="$lt_cv_prog_cc_pic"
1249
 
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1250
 
wl="$lt_cv_prog_cc_wl"
1251
 
link_static_flag="$lt_cv_prog_cc_static"
1252
 
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1253
 
can_build_shared="$lt_cv_prog_cc_can_build_shared"
1254
 
##
1255
 
## END FIXME
1256
 
 
1257
 
 
1258
 
## FIXME: this should be a separate macro
1259
 
##
1260
 
# Check to see if options -o and -c are simultaneously supported by compiler
1261
 
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1262
 
AC_CACHE_VAL([lt_cv_compiler_c_o], [
1263
 
$rm -r conftest 2>/dev/null
1264
 
mkdir conftest
1265
 
cd conftest
1266
 
echo "int some_variable = 0;" > conftest.$ac_ext
1267
 
mkdir out
1268
 
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1269
 
# that will create temporary files in the current directory regardless of
1270
 
# the output directory.  Thus, making CWD read-only will cause this test
1271
 
# to fail, enabling locking or at least warning the user not to do parallel
1272
 
# builds.
1273
 
chmod -w .
1274
 
save_CFLAGS="$CFLAGS"
1275
 
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1276
 
compiler_c_o=no
1277
 
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1278
 
  # The compiler can only warn and ignore the option if not recognized
1279
 
  # So say no if there are warnings
1280
 
  if test -s out/conftest.err; then
1281
 
    lt_cv_compiler_c_o=no
1282
 
  else
1283
 
    lt_cv_compiler_c_o=yes
1284
 
  fi
1285
 
else
1286
 
  # Append any errors to the config.log.
1287
 
  cat out/conftest.err 1>&AC_FD_CC
1288
 
  lt_cv_compiler_c_o=no
1289
 
fi
1290
 
CFLAGS="$save_CFLAGS"
1291
 
chmod u+w .
1292
 
$rm conftest* out/*
1293
 
rmdir out
1294
 
cd ..
1295
 
rmdir conftest
1296
 
$rm -r conftest 2>/dev/null
1297
 
])
1298
 
compiler_c_o=$lt_cv_compiler_c_o
1299
 
AC_MSG_RESULT([$compiler_c_o])
1300
 
 
1301
 
if test x"$compiler_c_o" = x"yes"; then
1302
 
  # Check to see if we can write to a .lo
1303
 
  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1304
 
  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1305
 
  lt_cv_compiler_o_lo=no
1306
 
  save_CFLAGS="$CFLAGS"
1307
 
  CFLAGS="$CFLAGS -c -o conftest.lo"
1308
 
  save_objext="$ac_objext"
1309
 
  ac_objext=lo
1310
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1311
 
    # The compiler can only warn and ignore the option if not recognized
1312
 
    # So say no if there are warnings
1313
 
    if test -s conftest.err; then
1314
 
      lt_cv_compiler_o_lo=no
1315
 
    else
1316
 
      lt_cv_compiler_o_lo=yes
1317
 
    fi
1318
 
  ])
1319
 
  ac_objext="$save_objext"
1320
 
  CFLAGS="$save_CFLAGS"
1321
 
  ])
1322
 
  compiler_o_lo=$lt_cv_compiler_o_lo
1323
 
  AC_MSG_RESULT([$compiler_o_lo])
1324
 
else
1325
 
  compiler_o_lo=no
1326
 
fi
1327
 
##
1328
 
## END FIXME
1329
 
 
1330
 
## FIXME: this should be a separate macro
1331
 
##
 
1045
 
 
1046
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
1047
# ---------------------------------
 
1048
# Check to see if options -c and -o are simultaneously supported by compiler
 
1049
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
1050
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1051
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
1052
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
1053
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
1054
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
1055
   $rm -r conftest 2>/dev/null
 
1056
   mkdir conftest
 
1057
   cd conftest
 
1058
   mkdir out
 
1059
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1060
 
 
1061
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
1062
   # Insert the option either (1) after the last *FLAGS variable, or
 
1063
   # (2) before a word containing "conftest.", or (3) at the end.
 
1064
   # Note that $ac_compile itself does not contain backslashes and begins
 
1065
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1066
   lt_compile=`echo "$ac_compile" | $SED \
 
1067
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
 
1068
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1069
   -e 's:$: $lt_compiler_flag:'`
 
1070
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1071
   (eval "$lt_compile" 2>out/conftest.err)
 
1072
   ac_status=$?
 
1073
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
1074
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1075
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
1076
   then
 
1077
     # The compiler can only warn and ignore the option if not recognized
 
1078
     # So say no if there are warnings
 
1079
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
1080
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
1081
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
 
1082
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
1083
     fi
 
1084
   fi
 
1085
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
 
1086
   $rm conftest*
 
1087
   # SGI C++ compiler will create directory out/ii_files/ for
 
1088
   # template instantiation
 
1089
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
1090
   $rm out/* && rmdir out
 
1091
   cd ..
 
1092
   rmdir conftest
 
1093
   $rm conftest*
 
1094
])
 
1095
])# AC_LIBTOOL_PROG_CC_C_O
 
1096
 
 
1097
 
 
1098
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
1099
# -----------------------------------------
1332
1100
# Check to see if we can do hard links to lock some files if needed
 
1101
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
1102
[AC_REQUIRE([_LT_AC_LOCK])dnl
 
1103
 
1333
1104
hard_links="nottested"
1334
 
if test "$compiler_c_o" = no && test "$need_locks" != no; then
 
1105
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1335
1106
  # do not overwrite the value of need_locks provided by the user
1336
1107
  AC_MSG_CHECKING([if we can lock with hard links])
1337
1108
  hard_links=yes
1342
1113
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1343
1114
  AC_MSG_RESULT([$hard_links])
1344
1115
  if test "$hard_links" = no; then
1345
 
    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
 
1116
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1346
1117
    need_locks=warn
1347
1118
  fi
1348
1119
else
1349
1120
  need_locks=no
1350
1121
fi
1351
 
##
1352
 
## END FIXME
1353
 
 
1354
 
## FIXME: this should be a separate macro
1355
 
##
1356
 
if test "$GCC" = yes; then
1357
 
  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1358
 
  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1359
 
  echo "int some_variable = 0;" > conftest.$ac_ext
1360
 
  save_CFLAGS="$CFLAGS"
1361
 
  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1362
 
  compiler_rtti_exceptions=no
1363
 
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1364
 
    # The compiler can only warn and ignore the option if not recognized
1365
 
    # So say no if there are warnings
1366
 
    if test -s conftest.err; then
1367
 
      compiler_rtti_exceptions=no
1368
 
    else
1369
 
      compiler_rtti_exceptions=yes
1370
 
    fi
1371
 
  ])
1372
 
  CFLAGS="$save_CFLAGS"
1373
 
  AC_MSG_RESULT([$compiler_rtti_exceptions])
1374
 
 
1375
 
  if test "$compiler_rtti_exceptions" = "yes"; then
1376
 
    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1377
 
  else
1378
 
    no_builtin_flag=' -fno-builtin'
1379
 
  fi
1380
 
fi
1381
 
##
1382
 
## END FIXME
1383
 
 
1384
 
## FIXME: this should be a separate macro
1385
 
##
1386
 
# See if the linker supports building shared libraries.
1387
 
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1388
 
 
1389
 
allow_undefined_flag=
1390
 
no_undefined_flag=
1391
 
need_lib_prefix=unknown
1392
 
need_version=unknown
1393
 
# when you set need_version to no, make sure it does not cause -set_version
1394
 
# flags to be left without arguments
1395
 
archive_cmds=
1396
 
archive_expsym_cmds=
1397
 
old_archive_from_new_cmds=
1398
 
old_archive_from_expsyms_cmds=
1399
 
export_dynamic_flag_spec=
1400
 
whole_archive_flag_spec=
1401
 
thread_safe_flag_spec=
1402
 
hardcode_into_libs=no
1403
 
hardcode_libdir_flag_spec=
1404
 
hardcode_libdir_separator=
1405
 
hardcode_direct=no
1406
 
hardcode_minus_L=no
1407
 
hardcode_shlibpath_var=unsupported
1408
 
runpath_var=
1409
 
link_all_deplibs=unknown
1410
 
always_export_symbols=no
1411
 
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1412
 
# include_expsyms should be a list of space-separated symbols to be *always*
1413
 
# included in the symbol list
1414
 
include_expsyms=
1415
 
# exclude_expsyms can be an egrep regular expression of symbols to exclude
1416
 
# it will be wrapped by ` (' and `)$', so one must not match beginning or
1417
 
# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1418
 
# as well as any symbol that contains `d'.
1419
 
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1420
 
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1421
 
# platforms (ab)use it in PIC code, but their linkers get confused if
1422
 
# the symbol is explicitly referenced.  Since portable code cannot
1423
 
# rely on this symbol name, it's probably fine to never include it in
1424
 
# preloaded symbol tables.
1425
 
extract_expsyms_cmds=
1426
 
 
1427
 
case $host_os in
1428
 
cygwin* | mingw* | pw32*)
1429
 
  # FIXME: the MSVC++ port hasn't been tested in a loooong time
1430
 
  # When not using gcc, we currently assume that we are using
1431
 
  # Microsoft Visual C++.
1432
 
  if test "$GCC" != yes; then
1433
 
    with_gnu_ld=no
1434
 
  fi
1435
 
  ;;
1436
 
openbsd*)
1437
 
  with_gnu_ld=no
1438
 
  ;;
1439
 
esac
1440
 
 
1441
 
ld_shlibs=yes
1442
 
if test "$with_gnu_ld" = yes; then
1443
 
  # If archive_cmds runs LD, not CC, wlarc should be empty
1444
 
  wlarc='${wl}'
1445
 
 
1446
 
  # See if GNU ld supports shared libraries.
1447
 
  case $host_os in
1448
 
  aix3* | aix4* | aix5*)
1449
 
    # On AIX, the GNU linker is very broken
1450
 
    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1451
 
    ld_shlibs=no
1452
 
    cat <<EOF 1>&2
1453
 
 
1454
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1455
 
*** to be unable to reliably create shared libraries on AIX.
1456
 
*** Therefore, libtool is disabling shared libraries support.  If you
1457
 
*** really care for shared libraries, you may want to modify your PATH
1458
 
*** so that a non-GNU linker is found, and then restart.
1459
 
 
1460
 
EOF
1461
 
    ;;
1462
 
 
1463
 
  amigaos*)
1464
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1465
 
    hardcode_libdir_flag_spec='-L$libdir'
1466
 
    hardcode_minus_L=yes
1467
 
 
1468
 
    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1469
 
    # that the semantics of dynamic libraries on AmigaOS, at least up
1470
 
    # to version 4, is to share data among multiple programs linked
1471
 
    # with the same dynamic library.  Since this doesn't match the
1472
 
    # behavior of shared libraries on other platforms, we can use
1473
 
    # them.
1474
 
    ld_shlibs=no
1475
 
    ;;
1476
 
 
1477
 
  beos*)
1478
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1479
 
      allow_undefined_flag=unsupported
1480
 
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1481
 
      # support --undefined.  This deserves some investigation.  FIXME
1482
 
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1483
 
    else
1484
 
      ld_shlibs=no
1485
 
    fi
1486
 
    ;;
1487
 
 
1488
 
  cygwin* | mingw* | pw32*)
1489
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
1490
 
    # no search path for DLLs.
1491
 
    hardcode_libdir_flag_spec='-L$libdir'
1492
 
    allow_undefined_flag=unsupported
1493
 
    always_export_symbols=yes
1494
 
 
1495
 
    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1496
 
      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1497
 
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1498
 
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1499
 
      else $CC -o impgen impgen.c ; fi)~
1500
 
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1501
 
 
1502
 
    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1503
 
 
1504
 
    # cygwin and mingw dlls have different entry points and sets of symbols
1505
 
    # to exclude.
1506
 
    # FIXME: what about values for MSVC?
1507
 
    dll_entry=__cygwin_dll_entry@12
1508
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1509
 
    case $host_os in
1510
 
    mingw*)
1511
 
      # mingw values
1512
 
      dll_entry=_DllMainCRTStartup@12
1513
 
      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1514
 
      ;;
1515
 
    esac
1516
 
 
1517
 
    # mingw and cygwin differ, and it's simplest to just exclude the union
1518
 
    # of the two symbol sets.
1519
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1520
 
 
1521
 
    # recent cygwin and mingw systems supply a stub DllMain which the user
1522
 
    # can override, but on older systems we have to supply one (in ltdll.c)
1523
 
    if test "x$lt_cv_need_dllmain" = "xyes"; then
1524
 
      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1525
 
      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1526
 
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1527
 
    else
1528
 
      ltdll_obj=
1529
 
      ltdll_cmds=
1530
 
    fi
1531
 
 
1532
 
    # Extract the symbol export list from an `--export-all' def file,
1533
 
    # then regenerate the def file from the symbol export list, so that
1534
 
    # the compiled dll only exports the symbol export list.
1535
 
    # Be careful not to strip the DATA tag left be newer dlltools.
1536
 
    export_symbols_cmds="$ltdll_cmds"'
1537
 
      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1538
 
      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1539
 
 
1540
 
    # If the export-symbols file already is a .def file (1st line
1541
 
    # is EXPORTS), use it as is.
1542
 
    # If DATA tags from a recent dlltool are present, honour them!
1543
 
    archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1544
 
        cp $export_symbols $output_objdir/$soname-def;
1545
 
      else
1546
 
        echo EXPORTS > $output_objdir/$soname-def;
1547
 
        _lt_hint=1;
1548
 
        cat $export_symbols | while read symbol; do
1549
 
         set dummy \$symbol;
1550
 
         case \[$]# in
1551
 
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1552
 
           4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1553
 
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1554
 
         esac;
1555
 
         _lt_hint=`expr 1 + \$_lt_hint`;
1556
 
        done;
1557
 
      fi~
1558
 
      '"$ltdll_cmds"'
1559
 
      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1560
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1561
 
      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1562
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1563
 
      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1564
 
    ;;
1565
 
 
1566
 
  netbsd*)
1567
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1568
 
      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1569
 
      wlarc=
1570
 
    else
1571
 
      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1572
 
      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1573
 
    fi
1574
 
    ;;
1575
 
 
1576
 
  solaris* | sysv5*)
1577
 
    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1578
 
      ld_shlibs=no
1579
 
      cat <<EOF 1>&2
1580
 
 
1581
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1582
 
*** create shared libraries on Solaris systems.  Therefore, libtool
1583
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
1584
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
1585
 
*** your PATH or compiler configuration so that the native linker is
1586
 
*** used, and then restart.
1587
 
 
1588
 
EOF
1589
 
    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1590
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1591
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1592
 
    else
1593
 
      ld_shlibs=no
1594
 
    fi
1595
 
    ;;
1596
 
 
1597
 
  sunos4*)
1598
 
    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1599
 
    wlarc=
1600
 
    hardcode_direct=yes
1601
 
    hardcode_shlibpath_var=no
1602
 
    ;;
1603
 
 
1604
 
  *)
1605
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1606
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1607
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1608
 
    else
1609
 
      ld_shlibs=no
1610
 
    fi
1611
 
    ;;
1612
 
  esac
1613
 
 
1614
 
  if test "$ld_shlibs" = yes; then
1615
 
    runpath_var=LD_RUN_PATH
1616
 
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1617
 
    export_dynamic_flag_spec='${wl}--export-dynamic'
1618
 
    case $host_os in
1619
 
    cygwin* | mingw* | pw32*)
1620
 
      # dlltool doesn't understand --whole-archive et. al.
1621
 
      whole_archive_flag_spec=
1622
 
      ;;
1623
 
    *)
1624
 
      # ancient GNU ld didn't support --whole-archive et. al.
1625
 
      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1626
 
        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1627
 
      else
1628
 
        whole_archive_flag_spec=
1629
 
      fi
1630
 
      ;;
1631
 
    esac
1632
 
  fi
 
1122
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
1123
 
 
1124
 
 
1125
# AC_LIBTOOL_OBJDIR
 
1126
# -----------------
 
1127
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
1128
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
1129
[rm -f .libs 2>/dev/null
 
1130
mkdir .libs 2>/dev/null
 
1131
if test -d .libs; then
 
1132
  lt_cv_objdir=.libs
1633
1133
else
1634
 
  # PORTME fill in a description of your system's linker (not GNU ld)
1635
 
  case $host_os in
1636
 
  aix3*)
1637
 
    allow_undefined_flag=unsupported
1638
 
    always_export_symbols=yes
1639
 
    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1640
 
    # Note: this linker hardcodes the directories in LIBPATH if there
1641
 
    # are no directories specified by -L.
1642
 
    hardcode_minus_L=yes
1643
 
    if test "$GCC" = yes && test -z "$link_static_flag"; then
1644
 
      # Neither direct hardcoding nor static linking is supported with a
1645
 
      # broken collect2.
1646
 
      hardcode_direct=unsupported
1647
 
    fi
1648
 
    ;;
1649
 
 
1650
 
  aix4* | aix5*)
1651
 
    if test "$host_cpu" = ia64; then
1652
 
      # On IA64, the linker does run time linking by default, so we don't
1653
 
      # have to do anything special.
1654
 
      aix_use_runtimelinking=no
1655
 
      exp_sym_flag='-Bexport'
1656
 
      no_entry_flag=""
1657
 
    else
1658
 
      aix_use_runtimelinking=no
1659
 
 
1660
 
      # Test if we are trying to use run time linking or normal
1661
 
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1662
 
      # need to do runtime linking.
1663
 
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1664
 
        for ld_flag in $LDFLAGS; do
1665
 
          case $ld_flag in
1666
 
          *-brtl*)
1667
 
            aix_use_runtimelinking=yes
1668
 
            break
1669
 
          ;;
1670
 
          esac
1671
 
        done
1672
 
      esac
1673
 
 
1674
 
      exp_sym_flag='-bexport'
1675
 
      no_entry_flag='-bnoentry'
1676
 
    fi
1677
 
 
1678
 
    # When large executables or shared objects are built, AIX ld can
1679
 
    # have problems creating the table of contents.  If linking a library
1680
 
    # or program results in "error TOC overflow" add -mminimal-toc to
1681
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
1682
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1683
 
 
1684
 
    hardcode_direct=yes
1685
 
    archive_cmds=''
1686
 
    hardcode_libdir_separator=':'
1687
 
    if test "$GCC" = yes; then
1688
 
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
1689
 
        collect2name=`${CC} -print-prog-name=collect2`
1690
 
        if test -f "$collect2name" && \
1691
 
          strings "$collect2name" | grep resolve_lib_name >/dev/null
1692
 
        then
1693
 
          # We have reworked collect2
1694
 
          hardcode_direct=yes
1695
 
        else
1696
 
          # We have old collect2
1697
 
          hardcode_direct=unsupported
1698
 
          # It fails to find uninstalled libraries when the uninstalled
1699
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
1700
 
          # to unsupported forces relinking
1701
 
          hardcode_minus_L=yes
1702
 
          hardcode_libdir_flag_spec='-L$libdir'
1703
 
          hardcode_libdir_separator=
1704
 
        fi
1705
 
      esac
1706
 
 
1707
 
      shared_flag='-shared'
1708
 
    else
1709
 
      # not using gcc
1710
 
      if test "$host_cpu" = ia64; then
1711
 
        shared_flag='${wl}-G'
1712
 
      else
1713
 
        if test "$aix_use_runtimelinking" = yes; then
1714
 
          shared_flag='${wl}-G'
1715
 
        else
1716
 
          shared_flag='${wl}-bM:SRE'
1717
 
        fi
1718
 
      fi
1719
 
    fi
1720
 
 
1721
 
    # It seems that -bexpall can do strange things, so it is better to
1722
 
    # generate a list of symbols to export.
1723
 
    always_export_symbols=yes
1724
 
    if test "$aix_use_runtimelinking" = yes; then
1725
 
      # Warning - without using the other runtime loading flags (-brtl),
1726
 
      # -berok will link without error, but may produce a broken library.
1727
 
      allow_undefined_flag='-berok'
1728
 
      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1729
 
      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1730
 
    else
1731
 
      if test "$host_cpu" = ia64; then
1732
 
        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1733
 
        allow_undefined_flag="-z nodefs"
1734
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1735
 
      else
1736
 
        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1737
 
        # Warning - without using the other run time loading flags,
1738
 
        # -berok will link without error, but may produce a broken library.
1739
 
        allow_undefined_flag='${wl}-berok'
1740
 
        # This is a bit strange, but is similar to how AIX traditionally builds
1741
 
        # it's shared libraries.
1742
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
1743
 
      fi
1744
 
    fi
1745
 
    ;;
1746
 
 
1747
 
  amigaos*)
1748
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1749
 
    hardcode_libdir_flag_spec='-L$libdir'
1750
 
    hardcode_minus_L=yes
1751
 
    # see comment about different semantics on the GNU ld section
1752
 
    ld_shlibs=no
1753
 
    ;;
1754
 
 
1755
 
  cygwin* | mingw* | pw32*)
1756
 
    # When not using gcc, we currently assume that we are using
1757
 
    # Microsoft Visual C++.
1758
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
1759
 
    # no search path for DLLs.
1760
 
    hardcode_libdir_flag_spec=' '
1761
 
    allow_undefined_flag=unsupported
1762
 
    # Tell ltmain to make .lib files, not .a files.
1763
 
    libext=lib
1764
 
    # FIXME: Setting linknames here is a bad hack.
1765
 
    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1766
 
    # The linker will automatically build a .lib file if we build a DLL.
1767
 
    old_archive_from_new_cmds='true'
1768
 
    # FIXME: Should let the user specify the lib program.
1769
 
    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1770
 
    fix_srcfile_path='`cygpath -w "$srcfile"`'
1771
 
    ;;
1772
 
 
1773
 
  darwin* | rhapsody*)
1774
 
    case "$host_os" in
1775
 
    rhapsody* | darwin1.[[012]])
1776
 
      allow_undefined_flag='-undefined suppress'
1777
 
      ;;
1778
 
    *) # Darwin 1.3 on
1779
 
      allow_undefined_flag='-flat_namespace -undefined suppress'
1780
 
      ;;
1781
 
    esac
1782
 
    # FIXME: Relying on posixy $() will cause problems for
1783
 
    #        cross-compilation, but unfortunately the echo tests do not
1784
 
    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
1785
 
    #        `"' quotes if we put them in here... so don't!
1786
 
    archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
1787
 
    # We need to add '_' to the symbols in $export_symbols first
1788
 
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1789
 
    hardcode_direct=yes
1790
 
    hardcode_shlibpath_var=no
1791
 
    whole_archive_flag_spec='-all_load $convenience'
1792
 
    ;;
1793
 
 
1794
 
  freebsd1*)
1795
 
    ld_shlibs=no
1796
 
    ;;
1797
 
 
1798
 
  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1799
 
  # support.  Future versions do this automatically, but an explicit c++rt0.o
1800
 
  # does not break anything, and helps significantly (at the cost of a little
1801
 
  # extra space).
1802
 
  freebsd2.2*)
1803
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1804
 
    hardcode_libdir_flag_spec='-R$libdir'
1805
 
    hardcode_direct=yes
1806
 
    hardcode_shlibpath_var=no
1807
 
    ;;
1808
 
 
1809
 
  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1810
 
  freebsd2*)
1811
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1812
 
    hardcode_direct=yes
1813
 
    hardcode_minus_L=yes
1814
 
    hardcode_shlibpath_var=no
1815
 
    ;;
1816
 
 
1817
 
  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1818
 
  freebsd*)
1819
 
    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1820
 
    hardcode_libdir_flag_spec='-R$libdir'
1821
 
    hardcode_direct=yes
1822
 
    hardcode_shlibpath_var=no
1823
 
    ;;
1824
 
 
1825
 
  hpux9* | hpux10* | hpux11*)
1826
 
    case $host_os in
1827
 
    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
1828
 
    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1829
 
    esac
1830
 
    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1831
 
    hardcode_libdir_separator=:
1832
 
    hardcode_direct=yes
1833
 
    hardcode_minus_L=yes # Not in the search PATH, but as the default
1834
 
                         # location of the library.
1835
 
    export_dynamic_flag_spec='${wl}-E'
1836
 
    ;;
1837
 
 
1838
 
  irix5* | irix6* | nonstopux*)
1839
 
    if test "$GCC" = yes; then
1840
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1841
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1842
 
    else
1843
 
      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1844
 
      hardcode_libdir_flag_spec='-rpath $libdir'
1845
 
    fi
1846
 
    hardcode_libdir_separator=:
1847
 
    link_all_deplibs=yes
1848
 
    ;;
1849
 
 
1850
 
  netbsd*)
1851
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1852
 
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
1853
 
    else
1854
 
      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
1855
 
    fi
1856
 
    hardcode_libdir_flag_spec='-R$libdir'
1857
 
    hardcode_direct=yes
1858
 
    hardcode_shlibpath_var=no
1859
 
    ;;
1860
 
 
1861
 
  newsos6)
1862
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1863
 
    hardcode_direct=yes
1864
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1865
 
    hardcode_libdir_separator=:
1866
 
    hardcode_shlibpath_var=no
1867
 
    ;;
1868
 
 
1869
 
  openbsd*)
1870
 
    hardcode_direct=yes
1871
 
    hardcode_shlibpath_var=no
1872
 
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1873
 
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1874
 
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1875
 
      export_dynamic_flag_spec='${wl}-E'
1876
 
    else
1877
 
      case "$host_os" in
1878
 
      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1879
 
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1880
 
        hardcode_libdir_flag_spec='-R$libdir'
1881
 
        ;;
1882
 
      *)
1883
 
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1884
 
        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1885
 
        ;;
1886
 
      esac
1887
 
    fi
1888
 
    ;;
1889
 
 
1890
 
  os2*)
1891
 
    hardcode_libdir_flag_spec='-L$libdir'
1892
 
    hardcode_minus_L=yes
1893
 
    allow_undefined_flag=unsupported
1894
 
    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
1895
 
    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1896
 
    ;;
1897
 
 
1898
 
  osf3*)
1899
 
    if test "$GCC" = yes; then
1900
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1901
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1902
 
    else
1903
 
      allow_undefined_flag=' -expect_unresolved \*'
1904
 
      archive_cmds='$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'
1905
 
    fi
1906
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1907
 
    hardcode_libdir_separator=:
1908
 
    ;;
1909
 
 
1910
 
  osf4* | osf5*)        # as osf3* with the addition of -msym flag
1911
 
    if test "$GCC" = yes; then
1912
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1913
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
1914
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1915
 
    else
1916
 
      allow_undefined_flag=' -expect_unresolved \*'
1917
 
      archive_cmds='$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'
1918
 
      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1919
 
      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
1920
 
 
1921
 
      #Both c and cxx compiler support -rpath directly
1922
 
      hardcode_libdir_flag_spec='-rpath $libdir'
1923
 
    fi
1924
 
    hardcode_libdir_separator=:
1925
 
    ;;
1926
 
 
1927
 
  sco3.2v5*)
1928
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1929
 
    hardcode_shlibpath_var=no
1930
 
    runpath_var=LD_RUN_PATH
1931
 
    hardcode_runpath_var=yes
1932
 
    export_dynamic_flag_spec='${wl}-Bexport'
1933
 
    ;;
1934
 
 
1935
 
  solaris*)
1936
 
    # gcc --version < 3.0 without binutils cannot create self contained
1937
 
    # shared libraries reliably, requiring libgcc.a to resolve some of
1938
 
    # the object symbols generated in some cases.  Libraries that use
1939
 
    # assert need libgcc.a to resolve __eprintf, for example.  Linking
1940
 
    # a copy of libgcc.a into every shared library to guarantee resolving
1941
 
    # such symbols causes other problems:  According to Tim Van Holder
1942
 
    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
1943
 
    # (to the application) exception stack for one thing.
1944
 
    no_undefined_flag=' -z defs'
1945
 
    if test "$GCC" = yes; then
1946
 
      case `$CC --version 2>/dev/null` in
1947
 
      [[12]].*)
1948
 
        cat <<EOF 1>&2
1949
 
 
1950
 
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
1951
 
*** create self contained shared libraries on Solaris systems, without
1952
 
*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
1953
 
*** -no-undefined support, which will at least allow you to build shared
1954
 
*** libraries.  However, you may find that when you link such libraries
1955
 
*** into an application without using GCC, you have to manually add
1956
 
*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
1957
 
*** upgrade to a newer version of GCC.  Another option is to rebuild your
1958
 
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
1959
 
 
1960
 
EOF
1961
 
        no_undefined_flag=
1962
 
        ;;
1963
 
      esac
1964
 
    fi
1965
 
    # $CC -shared without GNU ld will not create a library from C++
1966
 
    # object files and a static libstdc++, better avoid it by now
1967
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1968
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1969
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1970
 
    hardcode_libdir_flag_spec='-R$libdir'
1971
 
    hardcode_shlibpath_var=no
1972
 
    case $host_os in
1973
 
    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
1974
 
    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1975
 
      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1976
 
    esac
1977
 
    link_all_deplibs=yes
1978
 
    ;;
1979
 
 
1980
 
  sunos4*)
1981
 
    if test "x$host_vendor" = xsequent; then
1982
 
      # Use $CC to link under sequent, because it throws in some extra .o
1983
 
      # files that make .init and .fini sections work.
1984
 
      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1985
 
    else
1986
 
      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1987
 
    fi
1988
 
    hardcode_libdir_flag_spec='-L$libdir'
1989
 
    hardcode_direct=yes
1990
 
    hardcode_minus_L=yes
1991
 
    hardcode_shlibpath_var=no
1992
 
    ;;
1993
 
 
1994
 
  sysv4)
1995
 
    case $host_vendor in
1996
 
      sni)
1997
 
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1998
 
        hardcode_direct=yes # is this really true???
1999
 
        ;;
2000
 
      siemens)
2001
 
        ## LD is ld it makes a PLAMLIB
2002
 
        ## CC just makes a GrossModule.
2003
 
        archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2004
 
        reload_cmds='$CC -r -o $output$reload_objs'
2005
 
        hardcode_direct=no
2006
 
        ;;
2007
 
      motorola)
2008
 
        archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2009
 
        hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2010
 
        ;;
2011
 
    esac
2012
 
    runpath_var='LD_RUN_PATH'
2013
 
    hardcode_shlibpath_var=no
2014
 
    ;;
2015
 
 
2016
 
  sysv4.3*)
2017
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2018
 
    hardcode_shlibpath_var=no
2019
 
    export_dynamic_flag_spec='-Bexport'
2020
 
    ;;
2021
 
 
2022
 
  sysv5*)
2023
 
    no_undefined_flag=' -z text'
2024
 
    # $CC -shared without GNU ld will not create a library from C++
2025
 
    # object files and a static libstdc++, better avoid it by now
2026
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2027
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2028
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2029
 
    hardcode_libdir_flag_spec=
2030
 
    hardcode_shlibpath_var=no
2031
 
    runpath_var='LD_RUN_PATH'
2032
 
    ;;
2033
 
 
2034
 
  uts4*)
2035
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2036
 
    hardcode_libdir_flag_spec='-L$libdir'
2037
 
    hardcode_shlibpath_var=no
2038
 
    ;;
2039
 
 
2040
 
  dgux*)
2041
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2042
 
    hardcode_libdir_flag_spec='-L$libdir'
2043
 
    hardcode_shlibpath_var=no
2044
 
    ;;
2045
 
 
2046
 
  sysv4*MP*)
2047
 
    if test -d /usr/nec; then
2048
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2049
 
      hardcode_shlibpath_var=no
2050
 
      runpath_var=LD_RUN_PATH
2051
 
      hardcode_runpath_var=yes
2052
 
      ld_shlibs=yes
2053
 
    fi
2054
 
    ;;
2055
 
 
2056
 
  sysv4.2uw2*)
2057
 
    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2058
 
    hardcode_direct=yes
2059
 
    hardcode_minus_L=no
2060
 
    hardcode_shlibpath_var=no
2061
 
    hardcode_runpath_var=yes
2062
 
    runpath_var=LD_RUN_PATH
2063
 
    ;;
2064
 
 
2065
 
  sysv5uw7* | unixware7*)
2066
 
    no_undefined_flag='${wl}-z ${wl}text'
2067
 
    if test "$GCC" = yes; then
2068
 
      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2069
 
    else
2070
 
      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2071
 
    fi
2072
 
    runpath_var='LD_RUN_PATH'
2073
 
    hardcode_shlibpath_var=no
2074
 
    ;;
2075
 
 
2076
 
  *)
2077
 
    ld_shlibs=no
2078
 
    ;;
2079
 
  esac
 
1134
  # MS-DOS does not allow filenames that begin with a dot.
 
1135
  lt_cv_objdir=_libs
2080
1136
fi
2081
 
AC_MSG_RESULT([$ld_shlibs])
2082
 
test "$ld_shlibs" = no && can_build_shared=no
2083
 
##
2084
 
## END FIXME
2085
 
 
2086
 
## FIXME: this should be a separate macro
2087
 
##
 
1137
rmdir .libs 2>/dev/null])
 
1138
objdir=$lt_cv_objdir
 
1139
])# AC_LIBTOOL_OBJDIR
 
1140
 
 
1141
 
 
1142
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
1143
# ----------------------------------------------
2088
1144
# Check hardcoding attributes.
2089
 
AC_MSG_CHECKING([how to hardcode library paths into programs])
2090
 
hardcode_action=
2091
 
if test -n "$hardcode_libdir_flag_spec" || \
2092
 
   test -n "$runpath_var"; then
 
1145
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
1146
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
1147
_LT_AC_TAGVAR(hardcode_action, $1)=
 
1148
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
 
1149
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
1150
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2093
1151
 
2094
1152
  # We can hardcode non-existant directories.
2095
 
  if test "$hardcode_direct" != no &&
 
1153
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2096
1154
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2097
1155
     # have to relink, otherwise we might link with an installed library
2098
1156
     # when we should be linking with a yet-to-be-installed one
2099
 
     ## test "$hardcode_shlibpath_var" != no &&
2100
 
     test "$hardcode_minus_L" != no; then
 
1157
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
1158
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2101
1159
    # Linking always hardcodes the temporary library directory.
2102
 
    hardcode_action=relink
 
1160
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2103
1161
  else
2104
1162
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2105
 
    hardcode_action=immediate
 
1163
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2106
1164
  fi
2107
1165
else
2108
1166
  # We cannot hardcode anything, or else we can only hardcode existing
2109
1167
  # directories.
2110
 
  hardcode_action=unsupported
2111
 
fi
2112
 
AC_MSG_RESULT([$hardcode_action])
2113
 
##
2114
 
## END FIXME
2115
 
 
2116
 
## FIXME: this should be a separate macro
2117
 
##
2118
 
striplib=
 
1168
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
1169
fi
 
1170
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
1171
 
 
1172
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
 
1173
  # Fast installation is not supported
 
1174
  enable_fast_install=no
 
1175
elif test "$shlibpath_overrides_runpath" = yes ||
 
1176
     test "$enable_shared" = no; then
 
1177
  # Fast installation is not necessary
 
1178
  enable_fast_install=needless
 
1179
fi
 
1180
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
1181
 
 
1182
 
 
1183
# AC_LIBTOOL_SYS_LIB_STRIP
 
1184
# ------------------------
 
1185
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
1186
[striplib=
2119
1187
old_striplib=
2120
1188
AC_MSG_CHECKING([whether stripping libraries is possible])
2121
1189
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2123
1191
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2124
1192
  AC_MSG_RESULT([yes])
2125
1193
else
2126
 
  AC_MSG_RESULT([no])
2127
 
fi
2128
 
##
2129
 
## END FIXME
2130
 
 
2131
 
reload_cmds='$LD$reload_flag -o $output$reload_objs'
2132
 
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2133
 
 
2134
 
## FIXME: this should be a separate macro
2135
 
##
 
1194
# FIXME - insert some real tests, host_os isn't really good enough
 
1195
  case $host_os in
 
1196
   darwin*)
 
1197
       if test -n "$STRIP" ; then
 
1198
         striplib="$STRIP -x"
 
1199
         old_striplib="$STRIP -S"
 
1200
         AC_MSG_RESULT([yes])
 
1201
       else
 
1202
  AC_MSG_RESULT([no])
 
1203
fi
 
1204
       ;;
 
1205
   *)
 
1206
  AC_MSG_RESULT([no])
 
1207
    ;;
 
1208
  esac
 
1209
fi
 
1210
])# AC_LIBTOOL_SYS_LIB_STRIP
 
1211
 
 
1212
 
 
1213
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1214
# -----------------------------
2136
1215
# PORTME Fill in your ld.so characteristics
 
1216
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
1217
[AC_REQUIRE([LT_AC_PROG_SED])dnl
2137
1218
AC_MSG_CHECKING([dynamic linker characteristics])
2138
1219
library_names_spec=
2139
1220
libname_spec='lib$name'
2140
1221
soname_spec=
 
1222
shrext_cmds=".so"
2141
1223
postinstall_cmds=
2142
1224
postuninstall_cmds=
2143
1225
finish_cmds=
2147
1229
version_type=none
2148
1230
dynamic_linker="$host_os ld.so"
2149
1231
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2150
 
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1232
m4_if($1,[],[
 
1233
if test "$GCC" = yes; then
 
1234
  case $host_os in
 
1235
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
 
1236
    *) lt_awk_arg="/^libraries:/" ;;
 
1237
  esac
 
1238
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1239
  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
 
1240
    # if the path contains ";" then we assume it to be the separator
 
1241
    # otherwise default to the standard path separator (i.e. ":") - it is
 
1242
    # assumed that no part of a normal pathname contains ";" but that should
 
1243
    # okay in the real world where ";" in dirpaths is itself problematic.
 
1244
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
 
1245
  else
 
1246
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1247
  fi
 
1248
  # Ok, now we have the path, separated by spaces, we can step through it
 
1249
  # and add multilib dir if necessary.
 
1250
  lt_tmp_lt_search_path_spec=
 
1251
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
 
1252
  for lt_sys_path in $lt_search_path_spec; do
 
1253
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
 
1254
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
 
1255
    else
 
1256
      test -d "$lt_sys_path" && \
 
1257
        lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
 
1258
    fi
 
1259
  done
 
1260
  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
 
1261
BEGIN {RS=" "; FS="/|\n";} {
 
1262
  lt_foo="";
 
1263
  lt_count=0;
 
1264
  for (lt_i = NF; lt_i > 0; lt_i--) {
 
1265
    if ($lt_i != "" && $lt_i != ".") {
 
1266
      if ($lt_i == "..") {
 
1267
        lt_count++;
 
1268
      } else {
 
1269
        if (lt_count == 0) {
 
1270
          lt_foo="/" $lt_i lt_foo;
 
1271
        } else {
 
1272
          lt_count--;
 
1273
        }
 
1274
      }
 
1275
    }
 
1276
  }
 
1277
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
 
1278
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 
1279
}'`
 
1280
  sys_lib_search_path_spec=`echo $lt_search_path_spec`
 
1281
else
 
1282
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1283
fi])
 
1284
need_lib_prefix=unknown
 
1285
hardcode_into_libs=no
 
1286
 
 
1287
# when you set need_version to no, make sure it does not cause -set_version
 
1288
# flags to be left without arguments
 
1289
need_version=unknown
2151
1290
 
2152
1291
case $host_os in
2153
1292
aix3*)
2154
1293
  version_type=linux
2155
 
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
1294
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2156
1295
  shlibpath_var=LIBPATH
2157
1296
 
2158
 
  # AIX has no versioning support, so we append a major version to the name.
2159
 
  soname_spec='${libname}${release}.so$major'
 
1297
  # AIX 3 has no versioning support, so we append a major version to the name.
 
1298
  soname_spec='${libname}${release}${shared_ext}$major'
2160
1299
  ;;
2161
1300
 
2162
1301
aix4* | aix5*)
2166
1305
  hardcode_into_libs=yes
2167
1306
  if test "$host_cpu" = ia64; then
2168
1307
    # AIX 5 supports IA64
2169
 
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
1308
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2170
1309
    shlibpath_var=LD_LIBRARY_PATH
2171
1310
  else
2172
1311
    # With GCC up to 2.95.x, collect2 would create an import file
2176
1315
    # development snapshots of GCC prior to 3.0.
2177
1316
    case $host_os in
2178
1317
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2179
 
        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2180
 
             echo ' yes '
2181
 
             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2182
 
          :
2183
 
        else
2184
 
          can_build_shared=no
2185
 
        fi
2186
 
        ;;
 
1318
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
1319
           echo ' yes '
 
1320
           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
1321
        :
 
1322
      else
 
1323
        can_build_shared=no
 
1324
      fi
 
1325
      ;;
2187
1326
    esac
2188
 
    # AIX (on Power*) has no versioning support, so currently we can
2189
 
    # not hardcode correct soname into executable. Probably we can
2190
 
    # add versioning support to collect2, so additional links can
2191
 
    # be useful in future.
 
1327
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
1328
    # soname into executable. Probably we can add versioning support to
 
1329
    # collect2, so additional links can be useful in future.
2192
1330
    if test "$aix_use_runtimelinking" = yes; then
2193
1331
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2194
1332
      # instead of lib<name>.a to let people know that these are not
2195
1333
      # typical AIX shared libraries.
2196
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1334
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2197
1335
    else
2198
1336
      # We preserve .a as extension for shared libraries through AIX4.2
2199
1337
      # and later when we are not doing run time linking.
2200
1338
      library_names_spec='${libname}${release}.a $libname.a'
2201
 
      soname_spec='${libname}${release}.so$major'
 
1339
      soname_spec='${libname}${release}${shared_ext}$major'
2202
1340
    fi
2203
1341
    shlibpath_var=LIBPATH
2204
1342
  fi
2205
 
  hardcode_into_libs=yes
2206
1343
  ;;
2207
1344
 
2208
1345
amigaos*)
2209
1346
  library_names_spec='$libname.ixlibrary $libname.a'
2210
1347
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2211
 
  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'
 
1348
  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'
2212
1349
  ;;
2213
1350
 
2214
1351
beos*)
2215
 
  library_names_spec='${libname}.so'
 
1352
  library_names_spec='${libname}${shared_ext}'
2216
1353
  dynamic_linker="$host_os ld.so"
2217
1354
  shlibpath_var=LIBRARY_PATH
2218
1355
  ;;
2219
1356
 
2220
 
bsdi4*)
 
1357
bsdi[[45]]*)
2221
1358
  version_type=linux
2222
1359
  need_version=no
2223
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2224
 
  soname_spec='${libname}${release}.so$major'
 
1360
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1361
  soname_spec='${libname}${release}${shared_ext}$major'
2225
1362
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2226
1363
  shlibpath_var=LD_LIBRARY_PATH
2227
1364
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2228
1365
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2229
 
  export_dynamic_flag_spec=-rdynamic
2230
1366
  # the default ld.so.conf also contains /usr/contrib/lib and
2231
1367
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2232
1368
  # libtool to hard-code these into programs
2234
1370
 
2235
1371
cygwin* | mingw* | pw32*)
2236
1372
  version_type=windows
 
1373
  shrext_cmds=".dll"
2237
1374
  need_version=no
2238
1375
  need_lib_prefix=no
 
1376
 
2239
1377
  case $GCC,$host_os in
2240
 
  yes,cygwin*)
 
1378
  yes,cygwin* | yes,mingw* | yes,pw32*)
2241
1379
    library_names_spec='$libname.dll.a'
2242
 
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2243
 
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
1380
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
1381
    postinstall_cmds='base_file=`basename \${file}`~
 
1382
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2244
1383
      dldir=$destdir/`dirname \$dlpath`~
2245
1384
      test -d \$dldir || mkdir -p \$dldir~
2246
 
      $install_prog .libs/$dlname \$dldir/$dlname'
2247
 
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
1385
      $install_prog $dir/$dlname \$dldir/$dlname~
 
1386
      chmod a+x \$dldir/$dlname'
 
1387
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2248
1388
      dlpath=$dir/\$dldll~
2249
1389
       $rm \$dlpath'
2250
 
    ;;
2251
 
  yes,mingw*)
2252
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2253
 
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2254
 
    ;;
2255
 
  yes,pw32*)
2256
 
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2257
 
    ;;
 
1390
    shlibpath_overrides_runpath=yes
 
1391
 
 
1392
    case $host_os in
 
1393
    cygwin*)
 
1394
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
1395
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1396
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
1397
      ;;
 
1398
    mingw*)
 
1399
      # MinGW DLLs use traditional 'lib' prefix
 
1400
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1401
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1402
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
 
1403
        # It is most probably a Windows format PATH printed by
 
1404
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
1405
        # path with ; separators, and with drive letters. We can handle the
 
1406
        # drive letters (cygwin fileutils understands them), so leave them,
 
1407
        # especially as we might pass files found there to a mingw objdump,
 
1408
        # which wouldn't understand a cygwinified path. Ahh.
 
1409
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1410
      else
 
1411
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1412
      fi
 
1413
      ;;
 
1414
    pw32*)
 
1415
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
1416
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1417
      ;;
 
1418
    esac
 
1419
    ;;
 
1420
 
2258
1421
  *)
2259
 
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
1422
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2260
1423
    ;;
2261
1424
  esac
2262
1425
  dynamic_linker='Win32 ld.exe'
2269
1432
  version_type=darwin
2270
1433
  need_lib_prefix=no
2271
1434
  need_version=no
2272
 
  # FIXME: Relying on posixy $() will cause problems for
2273
 
  #        cross-compilation, but unfortunately the echo tests do not
2274
 
  #        yet detect zsh echo's removal of \ escapes.
2275
 
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2276
 
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
1435
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
1436
  soname_spec='${libname}${release}${major}$shared_ext'
2277
1437
  shlibpath_overrides_runpath=yes
2278
1438
  shlibpath_var=DYLD_LIBRARY_PATH
 
1439
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
 
1440
  m4_if([$1], [],[
 
1441
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
 
1442
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
1443
  ;;
 
1444
 
 
1445
dgux*)
 
1446
  version_type=linux
 
1447
  need_lib_prefix=no
 
1448
  need_version=no
 
1449
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
1450
  soname_spec='${libname}${release}${shared_ext}$major'
 
1451
  shlibpath_var=LD_LIBRARY_PATH
2279
1452
  ;;
2280
1453
 
2281
1454
freebsd1*)
2282
1455
  dynamic_linker=no
2283
1456
  ;;
2284
1457
 
2285
 
freebsd*)
2286
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
1458
freebsd* | dragonfly*)
 
1459
  # DragonFly does not have aout.  When/if they implement a new
 
1460
  # versioning mechanism, adjust this.
 
1461
  if test -x /usr/bin/objformat; then
 
1462
    objformat=`/usr/bin/objformat`
 
1463
  else
 
1464
    case $host_os in
 
1465
    freebsd[[123]]*) objformat=aout ;;
 
1466
    *) objformat=elf ;;
 
1467
    esac
 
1468
  fi
2287
1469
  version_type=freebsd-$objformat
2288
1470
  case $version_type in
2289
1471
    freebsd-elf*)
2290
 
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
1472
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2291
1473
      need_version=no
2292
1474
      need_lib_prefix=no
2293
1475
      ;;
2294
1476
    freebsd-*)
2295
 
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
1477
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2296
1478
      need_version=yes
2297
1479
      ;;
2298
1480
  esac
2301
1483
  freebsd2*)
2302
1484
    shlibpath_overrides_runpath=yes
2303
1485
    ;;
2304
 
  *)
 
1486
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
 
1487
    shlibpath_overrides_runpath=yes
 
1488
    hardcode_into_libs=yes
 
1489
    ;;
 
1490
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
1491
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2305
1492
    shlibpath_overrides_runpath=no
2306
1493
    hardcode_into_libs=yes
2307
1494
    ;;
 
1495
  *) # from 4.6 on, and DragonFly
 
1496
    shlibpath_overrides_runpath=yes
 
1497
    hardcode_into_libs=yes
 
1498
    ;;
2308
1499
  esac
2309
1500
  ;;
2310
1501
 
2312
1503
  version_type=linux
2313
1504
  need_lib_prefix=no
2314
1505
  need_version=no
2315
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2316
 
  soname_spec='${libname}${release}.so$major'
 
1506
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
1507
  soname_spec='${libname}${release}${shared_ext}$major'
2317
1508
  shlibpath_var=LD_LIBRARY_PATH
2318
1509
  hardcode_into_libs=yes
2319
1510
  ;;
2321
1512
hpux9* | hpux10* | hpux11*)
2322
1513
  # Give a soname corresponding to the major version so that dld.sl refuses to
2323
1514
  # link against other versions.
2324
 
  dynamic_linker="$host_os dld.sl"
2325
1515
  version_type=sunos
2326
1516
  need_lib_prefix=no
2327
1517
  need_version=no
2328
 
  shlibpath_var=SHLIB_PATH
2329
 
  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2330
 
  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2331
 
  soname_spec='${libname}${release}.sl$major'
 
1518
  case $host_cpu in
 
1519
  ia64*)
 
1520
    shrext_cmds='.so'
 
1521
    hardcode_into_libs=yes
 
1522
    dynamic_linker="$host_os dld.so"
 
1523
    shlibpath_var=LD_LIBRARY_PATH
 
1524
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1525
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1526
    soname_spec='${libname}${release}${shared_ext}$major'
 
1527
    if test "X$HPUX_IA64_MODE" = X32; then
 
1528
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
1529
    else
 
1530
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
1531
    fi
 
1532
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1533
    ;;
 
1534
   hppa*64*)
 
1535
     shrext_cmds='.sl'
 
1536
     hardcode_into_libs=yes
 
1537
     dynamic_linker="$host_os dld.sl"
 
1538
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
1539
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1540
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1541
     soname_spec='${libname}${release}${shared_ext}$major'
 
1542
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
1543
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1544
     ;;
 
1545
   *)
 
1546
    shrext_cmds='.sl'
 
1547
    dynamic_linker="$host_os dld.sl"
 
1548
    shlibpath_var=SHLIB_PATH
 
1549
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
1550
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1551
    soname_spec='${libname}${release}${shared_ext}$major'
 
1552
    ;;
 
1553
  esac
2332
1554
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2333
1555
  postinstall_cmds='chmod 555 $lib'
2334
1556
  ;;
2335
1557
 
 
1558
interix[[3-9]]*)
 
1559
  version_type=linux
 
1560
  need_lib_prefix=no
 
1561
  need_version=no
 
1562
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1563
  soname_spec='${libname}${release}${shared_ext}$major'
 
1564
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
1565
  shlibpath_var=LD_LIBRARY_PATH
 
1566
  shlibpath_overrides_runpath=no
 
1567
  hardcode_into_libs=yes
 
1568
  ;;
 
1569
 
2336
1570
irix5* | irix6* | nonstopux*)
2337
1571
  case $host_os in
2338
1572
    nonstopux*) version_type=nonstopux ;;
2339
 
    *)          version_type=irix ;;
 
1573
    *)
 
1574
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
1575
                version_type=linux
 
1576
        else
 
1577
                version_type=irix
 
1578
        fi ;;
2340
1579
  esac
2341
1580
  need_lib_prefix=no
2342
1581
  need_version=no
2343
 
  soname_spec='${libname}${release}.so$major'
2344
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
1582
  soname_spec='${libname}${release}${shared_ext}$major'
 
1583
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2345
1584
  case $host_os in
2346
1585
  irix5* | nonstopux*)
2347
1586
    libsuff= shlibsuff=
2348
1587
    ;;
2349
1588
  *)
2350
1589
    case $LD in # libtool.m4 will add one of these switches to LD
2351
 
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2352
 
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2353
 
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
1590
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
1591
      libsuff= shlibsuff= libmagic=32-bit;;
 
1592
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
1593
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
1594
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
1595
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2354
1596
    *) libsuff= shlibsuff= libmagic=never-match;;
2355
1597
    esac
2356
1598
    ;;
2359
1601
  shlibpath_overrides_runpath=no
2360
1602
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2361
1603
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
1604
  hardcode_into_libs=yes
2362
1605
  ;;
2363
1606
 
2364
1607
# No shared lib support for Linux oldld, aout, or coff.
2365
 
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
 
1608
linux*oldld* | linux*aout* | linux*coff*)
2366
1609
  dynamic_linker=no
2367
1610
  ;;
2368
1611
 
2369
1612
# This must be Linux ELF.
2370
 
linux-gnu*)
 
1613
linux* | k*bsd*-gnu)
2371
1614
  version_type=linux
2372
1615
  need_lib_prefix=no
2373
1616
  need_version=no
2374
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2375
 
  soname_spec='${libname}${release}.so$major'
 
1617
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1618
  soname_spec='${libname}${release}${shared_ext}$major'
2376
1619
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2377
1620
  shlibpath_var=LD_LIBRARY_PATH
2378
1621
  shlibpath_overrides_runpath=no
2381
1624
  # before this can be enabled.
2382
1625
  hardcode_into_libs=yes
2383
1626
 
 
1627
  # Append ld.so.conf contents to the search path
 
1628
  if test -f /etc/ld.so.conf; then
 
1629
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
1630
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
1631
  fi
 
1632
 
2384
1633
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2385
1634
  # powerpc, because MkLinux only supported shared libraries with the
2386
1635
  # GNU dynamic linker.  Since this was broken with cross compilers,
2395
1644
  need_lib_prefix=no
2396
1645
  need_version=no
2397
1646
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2398
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1647
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2399
1648
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2400
1649
    dynamic_linker='NetBSD (a.out) ld.so'
2401
1650
  else
2402
 
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2403
 
    soname_spec='${libname}${release}.so$major'
 
1651
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1652
    soname_spec='${libname}${release}${shared_ext}$major'
2404
1653
    dynamic_linker='NetBSD ld.elf_so'
2405
1654
  fi
2406
1655
  shlibpath_var=LD_LIBRARY_PATH
2410
1659
 
2411
1660
newsos6)
2412
1661
  version_type=linux
2413
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1662
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1663
  shlibpath_var=LD_LIBRARY_PATH
 
1664
  shlibpath_overrides_runpath=yes
 
1665
  ;;
 
1666
 
 
1667
nto-qnx*)
 
1668
  version_type=linux
 
1669
  need_lib_prefix=no
 
1670
  need_version=no
 
1671
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1672
  soname_spec='${libname}${release}${shared_ext}$major'
2414
1673
  shlibpath_var=LD_LIBRARY_PATH
2415
1674
  shlibpath_overrides_runpath=yes
2416
1675
  ;;
2417
1676
 
2418
1677
openbsd*)
2419
1678
  version_type=sunos
 
1679
  sys_lib_dlsearch_path_spec="/usr/lib"
2420
1680
  need_lib_prefix=no
2421
 
  need_version=no
2422
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2423
 
    case "$host_os" in
2424
 
    openbsd2.[[89]] | openbsd2.[[89]].*)
2425
 
      shlibpath_overrides_runpath=no
2426
 
      ;;
2427
 
    *)
2428
 
      shlibpath_overrides_runpath=yes
2429
 
      ;;
2430
 
    esac
2431
 
  else
2432
 
    shlibpath_overrides_runpath=yes
2433
 
  fi
2434
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1681
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
1682
  case $host_os in
 
1683
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
1684
    *)                         need_version=no  ;;
 
1685
  esac
 
1686
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2435
1687
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2436
1688
  shlibpath_var=LD_LIBRARY_PATH
 
1689
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
1690
    case $host_os in
 
1691
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
1692
        shlibpath_overrides_runpath=no
 
1693
        ;;
 
1694
      *)
 
1695
        shlibpath_overrides_runpath=yes
 
1696
        ;;
 
1697
      esac
 
1698
  else
 
1699
    shlibpath_overrides_runpath=yes
 
1700
  fi
2437
1701
  ;;
2438
1702
 
2439
1703
os2*)
2440
1704
  libname_spec='$name'
 
1705
  shrext_cmds=".dll"
2441
1706
  need_lib_prefix=no
2442
 
  library_names_spec='$libname.dll $libname.a'
 
1707
  library_names_spec='$libname${shared_ext} $libname.a'
2443
1708
  dynamic_linker='OS/2 ld.exe'
2444
1709
  shlibpath_var=LIBPATH
2445
1710
  ;;
2446
1711
 
2447
1712
osf3* | osf4* | osf5*)
2448
1713
  version_type=osf
 
1714
  need_lib_prefix=no
2449
1715
  need_version=no
2450
 
  soname_spec='${libname}${release}.so$major'
2451
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
1716
  soname_spec='${libname}${release}${shared_ext}$major'
 
1717
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2452
1718
  shlibpath_var=LD_LIBRARY_PATH
2453
1719
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2454
1720
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2455
 
  hardcode_into_libs=yes
2456
1721
  ;;
2457
1722
 
2458
 
sco3.2v5*)
2459
 
  version_type=osf
2460
 
  soname_spec='${libname}${release}.so$major'
2461
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2462
 
  shlibpath_var=LD_LIBRARY_PATH
 
1723
rdos*)
 
1724
  dynamic_linker=no
2463
1725
  ;;
2464
1726
 
2465
1727
solaris*)
2466
1728
  version_type=linux
2467
1729
  need_lib_prefix=no
2468
1730
  need_version=no
2469
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2470
 
  soname_spec='${libname}${release}.so$major'
 
1731
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1732
  soname_spec='${libname}${release}${shared_ext}$major'
2471
1733
  shlibpath_var=LD_LIBRARY_PATH
2472
1734
  shlibpath_overrides_runpath=yes
2473
1735
  hardcode_into_libs=yes
2477
1739
 
2478
1740
sunos4*)
2479
1741
  version_type=sunos
2480
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
1742
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2481
1743
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2482
1744
  shlibpath_var=LD_LIBRARY_PATH
2483
1745
  shlibpath_overrides_runpath=yes
2487
1749
  need_version=yes
2488
1750
  ;;
2489
1751
 
2490
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
1752
sysv4 | sysv4.3*)
2491
1753
  version_type=linux
2492
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2493
 
  soname_spec='${libname}${release}.so$major'
 
1754
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1755
  soname_spec='${libname}${release}${shared_ext}$major'
2494
1756
  shlibpath_var=LD_LIBRARY_PATH
2495
1757
  case $host_vendor in
2496
1758
    sni)
2511
1773
  esac
2512
1774
  ;;
2513
1775
 
2514
 
uts4*)
2515
 
  version_type=linux
2516
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2517
 
  soname_spec='${libname}${release}.so$major'
2518
 
  shlibpath_var=LD_LIBRARY_PATH
2519
 
  ;;
2520
 
 
2521
 
dgux*)
2522
 
  version_type=linux
2523
 
  need_lib_prefix=no
2524
 
  need_version=no
2525
 
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2526
 
  soname_spec='${libname}${release}.so$major'
2527
 
  shlibpath_var=LD_LIBRARY_PATH
2528
 
  ;;
2529
 
 
2530
1776
sysv4*MP*)
2531
1777
  if test -d /usr/nec ;then
2532
1778
    version_type=linux
2533
 
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2534
 
    soname_spec='$libname.so.$major'
 
1779
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
1780
    soname_spec='$libname${shared_ext}.$major'
2535
1781
    shlibpath_var=LD_LIBRARY_PATH
2536
1782
  fi
2537
1783
  ;;
2538
1784
 
 
1785
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
1786
  version_type=freebsd-elf
 
1787
  need_lib_prefix=no
 
1788
  need_version=no
 
1789
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1790
  soname_spec='${libname}${release}${shared_ext}$major'
 
1791
  shlibpath_var=LD_LIBRARY_PATH
 
1792
  hardcode_into_libs=yes
 
1793
  if test "$with_gnu_ld" = yes; then
 
1794
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
1795
    shlibpath_overrides_runpath=no
 
1796
  else
 
1797
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
1798
    shlibpath_overrides_runpath=yes
 
1799
    case $host_os in
 
1800
      sco3.2v5*)
 
1801
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
1802
        ;;
 
1803
    esac
 
1804
  fi
 
1805
  sys_lib_dlsearch_path_spec='/usr/lib'
 
1806
  ;;
 
1807
 
 
1808
uts4*)
 
1809
  version_type=linux
 
1810
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1811
  soname_spec='${libname}${release}${shared_ext}$major'
 
1812
  shlibpath_var=LD_LIBRARY_PATH
 
1813
  ;;
 
1814
 
2539
1815
*)
2540
1816
  dynamic_linker=no
2541
1817
  ;;
2542
1818
esac
2543
1819
AC_MSG_RESULT([$dynamic_linker])
2544
1820
test "$dynamic_linker" = no && can_build_shared=no
2545
 
##
2546
 
## END FIXME
2547
 
 
2548
 
## FIXME: this should be a separate macro
2549
 
##
2550
 
# Report the final consequences.
2551
 
AC_MSG_CHECKING([if libtool supports shared libraries])
2552
 
AC_MSG_RESULT([$can_build_shared])
2553
 
##
2554
 
## END FIXME
2555
 
 
2556
 
## FIXME: this should be a separate macro
2557
 
##
2558
 
AC_MSG_CHECKING([whether to build shared libraries])
2559
 
test "$can_build_shared" = "no" && enable_shared=no
2560
 
 
2561
 
# On AIX, shared libraries and static libraries use the same namespace, and
2562
 
# are all built from PIC.
2563
 
case "$host_os" in
2564
 
aix3*)
2565
 
  test "$enable_shared" = yes && enable_static=no
2566
 
  if test -n "$RANLIB"; then
2567
 
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2568
 
    postinstall_cmds='$RANLIB $lib'
2569
 
  fi
2570
 
  ;;
2571
 
 
2572
 
aix4*)
2573
 
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2574
 
    test "$enable_shared" = yes && enable_static=no
2575
 
  fi
2576
 
  ;;
2577
 
esac
2578
 
AC_MSG_RESULT([$enable_shared])
2579
 
##
2580
 
## END FIXME
2581
 
 
2582
 
## FIXME: this should be a separate macro
2583
 
##
2584
 
AC_MSG_CHECKING([whether to build static libraries])
2585
 
# Make sure either enable_shared or enable_static is yes.
2586
 
test "$enable_shared" = yes || enable_static=yes
2587
 
AC_MSG_RESULT([$enable_static])
2588
 
##
2589
 
## END FIXME
2590
 
 
2591
 
if test "$hardcode_action" = relink; then
2592
 
  # Fast installation is not supported
2593
 
  enable_fast_install=no
2594
 
elif test "$shlibpath_overrides_runpath" = yes ||
2595
 
     test "$enable_shared" = no; then
2596
 
  # Fast installation is not necessary
2597
 
  enable_fast_install=needless
2598
 
fi
2599
1821
 
2600
1822
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2601
1823
if test "$GCC" = yes; then
2602
1824
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2603
1825
fi
2604
 
 
 
1826
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1827
 
 
1828
 
 
1829
# _LT_AC_TAGCONFIG
 
1830
# ----------------
 
1831
AC_DEFUN([_LT_AC_TAGCONFIG],
 
1832
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1833
AC_ARG_WITH([tags],
 
1834
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
 
1835
        [include additional configurations @<:@automatic@:>@])],
 
1836
    [tagnames="$withval"])
 
1837
 
 
1838
if test -f "$ltmain" && test -n "$tagnames"; then
 
1839
  if test ! -f "${ofile}"; then
 
1840
    AC_MSG_WARN([output file `$ofile' does not exist])
 
1841
  fi
 
1842
 
 
1843
  if test -z "$LTCC"; then
 
1844
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
 
1845
    if test -z "$LTCC"; then
 
1846
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
 
1847
    else
 
1848
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
1849
    fi
 
1850
  fi
 
1851
  if test -z "$LTCFLAGS"; then
 
1852
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
 
1853
  fi
 
1854
 
 
1855
  # Extract list of available tagged configurations in $ofile.
 
1856
  # Note that this assumes the entire list is on one line.
 
1857
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
 
1858
 
 
1859
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1860
  for tagname in $tagnames; do
 
1861
    IFS="$lt_save_ifs"
 
1862
    # Check whether tagname contains only valid characters
 
1863
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
 
1864
    "") ;;
 
1865
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
 
1866
        ;;
 
1867
    esac
 
1868
 
 
1869
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
 
1870
    then
 
1871
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
 
1872
    fi
 
1873
 
 
1874
    # Update the list of available tags.
 
1875
    if test -n "$tagname"; then
 
1876
      echo appending configuration tag \"$tagname\" to $ofile
 
1877
 
 
1878
      case $tagname in
 
1879
      CXX)
 
1880
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
1881
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
1882
            (test "X$CXX" != "Xg++"))) ; then
 
1883
          AC_LIBTOOL_LANG_CXX_CONFIG
 
1884
        else
 
1885
          tagname=""
 
1886
        fi
 
1887
        ;;
 
1888
 
 
1889
      F77)
 
1890
        if test -n "$F77" && test "X$F77" != "Xno"; then
 
1891
          AC_LIBTOOL_LANG_F77_CONFIG
 
1892
        else
 
1893
          tagname=""
 
1894
        fi
 
1895
        ;;
 
1896
 
 
1897
      GCJ)
 
1898
        if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
1899
          AC_LIBTOOL_LANG_GCJ_CONFIG
 
1900
        else
 
1901
          tagname=""
 
1902
        fi
 
1903
        ;;
 
1904
 
 
1905
      RC)
 
1906
        AC_LIBTOOL_LANG_RC_CONFIG
 
1907
        ;;
 
1908
 
 
1909
      *)
 
1910
        AC_MSG_ERROR([Unsupported tag name: $tagname])
 
1911
        ;;
 
1912
      esac
 
1913
 
 
1914
      # Append the new tag name to the list of available tags.
 
1915
      if test -n "$tagname" ; then
 
1916
      available_tags="$available_tags $tagname"
 
1917
    fi
 
1918
    fi
 
1919
  done
 
1920
  IFS="$lt_save_ifs"
 
1921
 
 
1922
  # Now substitute the updated list of available tags.
 
1923
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
 
1924
    mv "${ofile}T" "$ofile"
 
1925
    chmod +x "$ofile"
 
1926
  else
 
1927
    rm -f "${ofile}T"
 
1928
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
 
1929
  fi
 
1930
fi
 
1931
])# _LT_AC_TAGCONFIG
 
1932
 
 
1933
 
 
1934
# AC_LIBTOOL_DLOPEN
 
1935
# -----------------
 
1936
# enable checks for dlopen support
 
1937
AC_DEFUN([AC_LIBTOOL_DLOPEN],
 
1938
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
 
1939
])# AC_LIBTOOL_DLOPEN
 
1940
 
 
1941
 
 
1942
# AC_LIBTOOL_WIN32_DLL
 
1943
# --------------------
 
1944
# declare package support for building win32 DLLs
 
1945
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
 
1946
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
 
1947
])# AC_LIBTOOL_WIN32_DLL
 
1948
 
 
1949
 
 
1950
# AC_ENABLE_SHARED([DEFAULT])
 
1951
# ---------------------------
 
1952
# implement the --enable-shared flag
 
1953
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1954
AC_DEFUN([AC_ENABLE_SHARED],
 
1955
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
1956
AC_ARG_ENABLE([shared],
 
1957
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
 
1958
        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
 
1959
    [p=${PACKAGE-default}
 
1960
    case $enableval in
 
1961
    yes) enable_shared=yes ;;
 
1962
    no) enable_shared=no ;;
 
1963
    *)
 
1964
      enable_shared=no
 
1965
      # Look at the argument we got.  We use all the common list separators.
 
1966
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
1967
      for pkg in $enableval; do
 
1968
        IFS="$lt_save_ifs"
 
1969
        if test "X$pkg" = "X$p"; then
 
1970
          enable_shared=yes
 
1971
        fi
 
1972
      done
 
1973
      IFS="$lt_save_ifs"
 
1974
      ;;
 
1975
    esac],
 
1976
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
 
1977
])# AC_ENABLE_SHARED
 
1978
 
 
1979
 
 
1980
# AC_DISABLE_SHARED
 
1981
# -----------------
 
1982
# set the default shared flag to --disable-shared
 
1983
AC_DEFUN([AC_DISABLE_SHARED],
 
1984
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
1985
AC_ENABLE_SHARED(no)
 
1986
])# AC_DISABLE_SHARED
 
1987
 
 
1988
 
 
1989
# AC_ENABLE_STATIC([DEFAULT])
 
1990
# ---------------------------
 
1991
# implement the --enable-static flag
 
1992
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
1993
AC_DEFUN([AC_ENABLE_STATIC],
 
1994
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
1995
AC_ARG_ENABLE([static],
 
1996
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
 
1997
        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
 
1998
    [p=${PACKAGE-default}
 
1999
    case $enableval in
 
2000
    yes) enable_static=yes ;;
 
2001
    no) enable_static=no ;;
 
2002
    *)
 
2003
     enable_static=no
 
2004
      # Look at the argument we got.  We use all the common list separators.
 
2005
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2006
      for pkg in $enableval; do
 
2007
        IFS="$lt_save_ifs"
 
2008
        if test "X$pkg" = "X$p"; then
 
2009
          enable_static=yes
 
2010
        fi
 
2011
      done
 
2012
      IFS="$lt_save_ifs"
 
2013
      ;;
 
2014
    esac],
 
2015
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
 
2016
])# AC_ENABLE_STATIC
 
2017
 
 
2018
 
 
2019
# AC_DISABLE_STATIC
 
2020
# -----------------
 
2021
# set the default static flag to --disable-static
 
2022
AC_DEFUN([AC_DISABLE_STATIC],
 
2023
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2024
AC_ENABLE_STATIC(no)
 
2025
])# AC_DISABLE_STATIC
 
2026
 
 
2027
 
 
2028
# AC_ENABLE_FAST_INSTALL([DEFAULT])
 
2029
# ---------------------------------
 
2030
# implement the --enable-fast-install flag
 
2031
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
 
2032
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
2033
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
2034
AC_ARG_ENABLE([fast-install],
 
2035
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
 
2036
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
 
2037
    [p=${PACKAGE-default}
 
2038
    case $enableval in
 
2039
    yes) enable_fast_install=yes ;;
 
2040
    no) enable_fast_install=no ;;
 
2041
    *)
 
2042
      enable_fast_install=no
 
2043
      # Look at the argument we got.  We use all the common list separators.
 
2044
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
 
2045
      for pkg in $enableval; do
 
2046
        IFS="$lt_save_ifs"
 
2047
        if test "X$pkg" = "X$p"; then
 
2048
          enable_fast_install=yes
 
2049
        fi
 
2050
      done
 
2051
      IFS="$lt_save_ifs"
 
2052
      ;;
 
2053
    esac],
 
2054
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
 
2055
])# AC_ENABLE_FAST_INSTALL
 
2056
 
 
2057
 
 
2058
# AC_DISABLE_FAST_INSTALL
 
2059
# -----------------------
 
2060
# set the default to --disable-fast-install
 
2061
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
2062
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2063
AC_ENABLE_FAST_INSTALL(no)
 
2064
])# AC_DISABLE_FAST_INSTALL
 
2065
 
 
2066
 
 
2067
# AC_LIBTOOL_PICMODE([MODE])
 
2068
# --------------------------
 
2069
# implement the --with-pic flag
 
2070
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 
2071
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
2072
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2073
pic_mode=ifelse($#,1,$1,default)
 
2074
])# AC_LIBTOOL_PICMODE
 
2075
 
 
2076
 
 
2077
# AC_PROG_EGREP
 
2078
# -------------
 
2079
# This is predefined starting with Autoconf 2.54, so this conditional
 
2080
# definition can be removed once we require Autoconf 2.54 or later.
 
2081
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 
2082
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 
2083
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
 
2084
    then ac_cv_prog_egrep='grep -E'
 
2085
    else ac_cv_prog_egrep='egrep'
 
2086
    fi])
 
2087
 EGREP=$ac_cv_prog_egrep
 
2088
 AC_SUBST([EGREP])
 
2089
])])
 
2090
 
 
2091
 
 
2092
# AC_PATH_TOOL_PREFIX
 
2093
# -------------------
 
2094
# find a file program which can recognize shared library
 
2095
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
2096
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2097
AC_MSG_CHECKING([for $1])
 
2098
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
2099
[case $MAGIC_CMD in
 
2100
[[\\/*] |  ?:[\\/]*])
 
2101
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
2102
  ;;
 
2103
*)
 
2104
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
2105
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2106
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
2107
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
2108
dnl not every word.  This closes a longstanding sh security hole.
 
2109
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
2110
  for ac_dir in $ac_dummy; do
 
2111
    IFS="$lt_save_ifs"
 
2112
    test -z "$ac_dir" && ac_dir=.
 
2113
    if test -f $ac_dir/$1; then
 
2114
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
2115
      if test -n "$file_magic_test_file"; then
 
2116
        case $deplibs_check_method in
 
2117
        "file_magic "*)
 
2118
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
2119
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2120
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
2121
            $EGREP "$file_magic_regex" > /dev/null; then
 
2122
            :
 
2123
          else
 
2124
            cat <<EOF 1>&2
 
2125
 
 
2126
*** Warning: the command libtool uses to detect shared libraries,
 
2127
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
2128
*** The result is that libtool may fail to recognize shared libraries
 
2129
*** as such.  This will affect the creation of libtool libraries that
 
2130
*** depend on shared libraries, but programs linked with such libtool
 
2131
*** libraries will work regardless of this problem.  Nevertheless, you
 
2132
*** may want to report the problem to your system manager and/or to
 
2133
*** bug-libtool@gnu.org
 
2134
 
 
2135
EOF
 
2136
          fi ;;
 
2137
        esac
 
2138
      fi
 
2139
      break
 
2140
    fi
 
2141
  done
 
2142
  IFS="$lt_save_ifs"
 
2143
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
2144
  ;;
 
2145
esac])
 
2146
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2147
if test -n "$MAGIC_CMD"; then
 
2148
  AC_MSG_RESULT($MAGIC_CMD)
 
2149
else
 
2150
  AC_MSG_RESULT(no)
 
2151
fi
 
2152
])# AC_PATH_TOOL_PREFIX
 
2153
 
 
2154
 
 
2155
# AC_PATH_MAGIC
 
2156
# -------------
 
2157
# find a file program which can recognize a shared library
 
2158
AC_DEFUN([AC_PATH_MAGIC],
 
2159
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
2160
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
2161
  if test -n "$ac_tool_prefix"; then
 
2162
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
2163
  else
 
2164
    MAGIC_CMD=:
 
2165
  fi
 
2166
fi
 
2167
])# AC_PATH_MAGIC
 
2168
 
 
2169
 
 
2170
# AC_PROG_LD
 
2171
# ----------
 
2172
# find the pathname to the GNU or non-GNU linker
 
2173
AC_DEFUN([AC_PROG_LD],
 
2174
[AC_ARG_WITH([gnu-ld],
 
2175
    [AC_HELP_STRING([--with-gnu-ld],
 
2176
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
2177
    [test "$withval" = no || with_gnu_ld=yes],
 
2178
    [with_gnu_ld=no])
 
2179
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
2180
AC_REQUIRE([AC_PROG_CC])dnl
 
2181
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2182
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2183
ac_prog=ld
 
2184
if test "$GCC" = yes; then
 
2185
  # Check if gcc -print-prog-name=ld gives a path.
 
2186
  AC_MSG_CHECKING([for ld used by $CC])
 
2187
  case $host in
 
2188
  *-*-mingw*)
 
2189
    # gcc leaves a trailing carriage return which upsets mingw
 
2190
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2191
  *)
 
2192
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2193
  esac
 
2194
  case $ac_prog in
 
2195
    # Accept absolute paths.
 
2196
    [[\\/]]* | ?:[[\\/]]*)
 
2197
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
2198
      # Canonicalize the pathname of ld
 
2199
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
2200
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
2201
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
2202
      done
 
2203
      test -z "$LD" && LD="$ac_prog"
 
2204
      ;;
 
2205
  "")
 
2206
    # If it fails, then pretend we aren't using GCC.
 
2207
    ac_prog=ld
 
2208
    ;;
 
2209
  *)
 
2210
    # If it is relative, then search for the first ld in PATH.
 
2211
    with_gnu_ld=unknown
 
2212
    ;;
 
2213
  esac
 
2214
elif test "$with_gnu_ld" = yes; then
 
2215
  AC_MSG_CHECKING([for GNU ld])
 
2216
else
 
2217
  AC_MSG_CHECKING([for non-GNU ld])
 
2218
fi
 
2219
AC_CACHE_VAL(lt_cv_path_LD,
 
2220
[if test -z "$LD"; then
 
2221
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2222
  for ac_dir in $PATH; do
 
2223
    IFS="$lt_save_ifs"
 
2224
    test -z "$ac_dir" && ac_dir=.
 
2225
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2226
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
2227
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2228
      # but apparently some variants of GNU ld only accept -v.
 
2229
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2230
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2231
      *GNU* | *'with BFD'*)
 
2232
        test "$with_gnu_ld" != no && break
 
2233
        ;;
 
2234
      *)
 
2235
        test "$with_gnu_ld" != yes && break
 
2236
        ;;
 
2237
      esac
 
2238
    fi
 
2239
  done
 
2240
  IFS="$lt_save_ifs"
 
2241
else
 
2242
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
2243
fi])
 
2244
LD="$lt_cv_path_LD"
 
2245
if test -n "$LD"; then
 
2246
  AC_MSG_RESULT($LD)
 
2247
else
 
2248
  AC_MSG_RESULT(no)
 
2249
fi
 
2250
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2251
AC_PROG_LD_GNU
 
2252
])# AC_PROG_LD
 
2253
 
 
2254
 
 
2255
# AC_PROG_LD_GNU
 
2256
# --------------
 
2257
AC_DEFUN([AC_PROG_LD_GNU],
 
2258
[AC_REQUIRE([AC_PROG_EGREP])dnl
 
2259
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2260
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 
2261
case `$LD -v 2>&1 </dev/null` in
 
2262
*GNU* | *'with BFD'*)
 
2263
  lt_cv_prog_gnu_ld=yes
 
2264
  ;;
 
2265
*)
 
2266
  lt_cv_prog_gnu_ld=no
 
2267
  ;;
 
2268
esac])
 
2269
with_gnu_ld=$lt_cv_prog_gnu_ld
 
2270
])# AC_PROG_LD_GNU
 
2271
 
 
2272
 
 
2273
# AC_PROG_LD_RELOAD_FLAG
 
2274
# ----------------------
 
2275
# find reload flag for linker
 
2276
#   -- PORTME Some linkers may need a different reload flag.
 
2277
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
2278
[AC_CACHE_CHECK([for $LD option to reload object files],
 
2279
  lt_cv_ld_reload_flag,
 
2280
  [lt_cv_ld_reload_flag='-r'])
 
2281
reload_flag=$lt_cv_ld_reload_flag
 
2282
case $reload_flag in
 
2283
"" | " "*) ;;
 
2284
*) reload_flag=" $reload_flag" ;;
 
2285
esac
 
2286
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2287
case $host_os in
 
2288
  darwin*)
 
2289
    if test "$GCC" = yes; then
 
2290
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
2291
    else
 
2292
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2293
    fi
 
2294
    ;;
 
2295
esac
 
2296
])# AC_PROG_LD_RELOAD_FLAG
 
2297
 
 
2298
 
 
2299
# AC_DEPLIBS_CHECK_METHOD
 
2300
# -----------------------
 
2301
# how to check for library dependencies
 
2302
#  -- PORTME fill in with the dynamic library characteristics
 
2303
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
2304
[AC_CACHE_CHECK([how to recognize dependent libraries],
 
2305
lt_cv_deplibs_check_method,
 
2306
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
2307
lt_cv_file_magic_test_file=
 
2308
lt_cv_deplibs_check_method='unknown'
 
2309
# Need to set the preceding variable on all platforms that support
 
2310
# interlibrary dependencies.
 
2311
# 'none' -- dependencies not supported.
 
2312
# `unknown' -- same as none, but documents that we really don't know.
 
2313
# 'pass_all' -- all dependencies passed with no checks.
 
2314
# 'test_compile' -- check by making test program.
 
2315
# 'file_magic [[regex]]' -- check by looking for files in library path
 
2316
# which responds to the $file_magic_cmd with a given extended regex.
 
2317
# If you have `file' or equivalent on your system and you're not sure
 
2318
# whether `pass_all' will *always* work, you probably want this one.
 
2319
 
 
2320
case $host_os in
 
2321
aix4* | aix5*)
 
2322
  lt_cv_deplibs_check_method=pass_all
 
2323
  ;;
 
2324
 
 
2325
beos*)
 
2326
  lt_cv_deplibs_check_method=pass_all
 
2327
  ;;
 
2328
 
 
2329
bsdi[[45]]*)
 
2330
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
2331
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
2332
  lt_cv_file_magic_test_file=/shlib/libc.so
 
2333
  ;;
 
2334
 
 
2335
cygwin*)
 
2336
  # func_win32_libid is a shell function defined in ltmain.sh
 
2337
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2338
  lt_cv_file_magic_cmd='func_win32_libid'
 
2339
  ;;
 
2340
 
 
2341
mingw* | pw32*)
 
2342
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
2343
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
 
2344
  # unless we find 'file', for example because we are cross-compiling.
 
2345
  if ( file / ) >/dev/null 2>&1; then
 
2346
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2347
    lt_cv_file_magic_cmd='func_win32_libid'
 
2348
  else
 
2349
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
2350
    lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2351
  fi
 
2352
  ;;
 
2353
 
 
2354
darwin* | rhapsody*)
 
2355
  lt_cv_deplibs_check_method=pass_all
 
2356
  ;;
 
2357
 
 
2358
freebsd* | dragonfly*)
 
2359
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2360
    case $host_cpu in
 
2361
    i*86 )
 
2362
      # Not sure whether the presence of OpenBSD here was a mistake.
 
2363
      # Let's accept both of them until this is cleared up.
 
2364
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
 
2365
      lt_cv_file_magic_cmd=/usr/bin/file
 
2366
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
2367
      ;;
 
2368
    esac
 
2369
  else
 
2370
    lt_cv_deplibs_check_method=pass_all
 
2371
  fi
 
2372
  ;;
 
2373
 
 
2374
gnu*)
 
2375
  lt_cv_deplibs_check_method=pass_all
 
2376
  ;;
 
2377
 
 
2378
hpux10.20* | hpux11*)
 
2379
  lt_cv_file_magic_cmd=/usr/bin/file
 
2380
  case $host_cpu in
 
2381
  ia64*)
 
2382
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
2383
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
2384
    ;;
 
2385
  hppa*64*)
 
2386
    [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]']
 
2387
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
2388
    ;;
 
2389
  *)
 
2390
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
2391
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
2392
    ;;
 
2393
  esac
 
2394
  ;;
 
2395
 
 
2396
interix[[3-9]]*)
 
2397
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
2398
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
2399
  ;;
 
2400
 
 
2401
irix5* | irix6* | nonstopux*)
 
2402
  case $LD in
 
2403
  *-32|*"-32 ") libmagic=32-bit;;
 
2404
  *-n32|*"-n32 ") libmagic=N32;;
 
2405
  *-64|*"-64 ") libmagic=64-bit;;
 
2406
  *) libmagic=never-match;;
 
2407
  esac
 
2408
  lt_cv_deplibs_check_method=pass_all
 
2409
  ;;
 
2410
 
 
2411
# This must be Linux ELF.
 
2412
linux* | k*bsd*-gnu)
 
2413
  lt_cv_deplibs_check_method=pass_all
 
2414
  ;;
 
2415
 
 
2416
netbsd*)
 
2417
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
2418
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2419
  else
 
2420
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
2421
  fi
 
2422
  ;;
 
2423
 
 
2424
newos6*)
 
2425
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
2426
  lt_cv_file_magic_cmd=/usr/bin/file
 
2427
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
2428
  ;;
 
2429
 
 
2430
nto-qnx*)
 
2431
  lt_cv_deplibs_check_method=unknown
 
2432
  ;;
 
2433
 
 
2434
openbsd*)
 
2435
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2436
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
2437
  else
 
2438
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2439
  fi
 
2440
  ;;
 
2441
 
 
2442
osf3* | osf4* | osf5*)
 
2443
  lt_cv_deplibs_check_method=pass_all
 
2444
  ;;
 
2445
 
 
2446
rdos*)
 
2447
  lt_cv_deplibs_check_method=pass_all
 
2448
  ;;
 
2449
 
 
2450
solaris*)
 
2451
  lt_cv_deplibs_check_method=pass_all
 
2452
  ;;
 
2453
 
 
2454
sysv4 | sysv4.3*)
 
2455
  case $host_vendor in
 
2456
  motorola)
 
2457
    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]]'
 
2458
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
2459
    ;;
 
2460
  ncr)
 
2461
    lt_cv_deplibs_check_method=pass_all
 
2462
    ;;
 
2463
  sequent)
 
2464
    lt_cv_file_magic_cmd='/bin/file'
 
2465
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
2466
    ;;
 
2467
  sni)
 
2468
    lt_cv_file_magic_cmd='/bin/file'
 
2469
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
2470
    lt_cv_file_magic_test_file=/lib/libc.so
 
2471
    ;;
 
2472
  siemens)
 
2473
    lt_cv_deplibs_check_method=pass_all
 
2474
    ;;
 
2475
  pc)
 
2476
    lt_cv_deplibs_check_method=pass_all
 
2477
    ;;
 
2478
  esac
 
2479
  ;;
 
2480
 
 
2481
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
2482
  lt_cv_deplibs_check_method=pass_all
 
2483
  ;;
 
2484
esac
 
2485
])
 
2486
file_magic_cmd=$lt_cv_file_magic_cmd
 
2487
deplibs_check_method=$lt_cv_deplibs_check_method
 
2488
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
2489
])# AC_DEPLIBS_CHECK_METHOD
 
2490
 
 
2491
 
 
2492
# AC_PROG_NM
 
2493
# ----------
 
2494
# find the pathname to a BSD-compatible name lister
 
2495
AC_DEFUN([AC_PROG_NM],
 
2496
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
2497
[if test -n "$NM"; then
 
2498
  # Let the user override the test.
 
2499
  lt_cv_path_NM="$NM"
 
2500
else
 
2501
  lt_nm_to_check="${ac_tool_prefix}nm"
 
2502
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
 
2503
    lt_nm_to_check="$lt_nm_to_check nm"
 
2504
  fi
 
2505
  for lt_tmp_nm in $lt_nm_to_check; do
 
2506
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2507
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
2508
      IFS="$lt_save_ifs"
 
2509
      test -z "$ac_dir" && ac_dir=.
 
2510
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
2511
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
2512
        # Check to see if the nm accepts a BSD-compat flag.
 
2513
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
2514
        #   nm: unknown option "B" ignored
 
2515
        # Tru64's nm complains that /dev/null is an invalid object file
 
2516
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2517
        */dev/null* | *'Invalid file or object type'*)
 
2518
          lt_cv_path_NM="$tmp_nm -B"
 
2519
          break
 
2520
          ;;
 
2521
        *)
 
2522
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2523
          */dev/null*)
 
2524
            lt_cv_path_NM="$tmp_nm -p"
 
2525
            break
 
2526
            ;;
 
2527
          *)
 
2528
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2529
            continue # so that we can try to find one that supports BSD flags
 
2530
            ;;
 
2531
          esac
 
2532
          ;;
 
2533
        esac
 
2534
      fi
 
2535
    done
 
2536
    IFS="$lt_save_ifs"
 
2537
  done
 
2538
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
2539
fi])
 
2540
NM="$lt_cv_path_NM"
 
2541
])# AC_PROG_NM
 
2542
 
 
2543
 
 
2544
# AC_CHECK_LIBM
 
2545
# -------------
 
2546
# check for math library
 
2547
AC_DEFUN([AC_CHECK_LIBM],
 
2548
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2549
LIBM=
 
2550
case $host in
 
2551
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
2552
  # These system don't have libm, or don't need it
 
2553
  ;;
 
2554
*-ncr-sysv4.3*)
 
2555
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
2556
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
2557
  ;;
 
2558
*)
 
2559
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
2560
  ;;
 
2561
esac
 
2562
])# AC_CHECK_LIBM
 
2563
 
 
2564
 
 
2565
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
 
2566
# -----------------------------------
 
2567
# sets LIBLTDL to the link flags for the libltdl convenience library and
 
2568
# LTDLINCL to the include flags for the libltdl header and adds
 
2569
# --enable-ltdl-convenience to the configure arguments.  Note that
 
2570
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2571
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
2572
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
2573
# (note the single quotes!).  If your package is not flat and you're not
 
2574
# using automake, define top_builddir and top_srcdir appropriately in
 
2575
# the Makefiles.
 
2576
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
2577
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2578
  case $enable_ltdl_convenience in
 
2579
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
2580
  "") enable_ltdl_convenience=yes
 
2581
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
2582
  esac
 
2583
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
2584
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2585
  # For backwards non-gettext consistent compatibility...
 
2586
  INCLTDL="$LTDLINCL"
 
2587
])# AC_LIBLTDL_CONVENIENCE
 
2588
 
 
2589
 
 
2590
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
 
2591
# -----------------------------------
 
2592
# sets LIBLTDL to the link flags for the libltdl installable library and
 
2593
# LTDLINCL to the include flags for the libltdl header and adds
 
2594
# --enable-ltdl-install to the configure arguments.  Note that
 
2595
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
2596
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
2597
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
2598
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
2599
# flat and you're not using automake, define top_builddir and top_srcdir
 
2600
# appropriately in the Makefiles.
 
2601
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
2602
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
2603
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
2604
  AC_CHECK_LIB(ltdl, lt_dlinit,
 
2605
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
2606
  [if test x"$enable_ltdl_install" = xno; then
 
2607
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
2608
   else
 
2609
     enable_ltdl_install=yes
 
2610
   fi
 
2611
  ])
 
2612
  if test x"$enable_ltdl_install" = x"yes"; then
 
2613
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
2614
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
2615
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
2616
  else
 
2617
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
2618
    LIBLTDL="-lltdl"
 
2619
    LTDLINCL=
 
2620
  fi
 
2621
  # For backwards non-gettext consistent compatibility...
 
2622
  INCLTDL="$LTDLINCL"
 
2623
])# AC_LIBLTDL_INSTALLABLE
 
2624
 
 
2625
 
 
2626
# AC_LIBTOOL_CXX
 
2627
# --------------
 
2628
# enable support for C++ libraries
 
2629
AC_DEFUN([AC_LIBTOOL_CXX],
 
2630
[AC_REQUIRE([_LT_AC_LANG_CXX])
 
2631
])# AC_LIBTOOL_CXX
 
2632
 
 
2633
 
 
2634
# _LT_AC_LANG_CXX
 
2635
# ---------------
 
2636
AC_DEFUN([_LT_AC_LANG_CXX],
 
2637
[AC_REQUIRE([AC_PROG_CXX])
 
2638
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2639
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
 
2640
])# _LT_AC_LANG_CXX
 
2641
 
 
2642
# _LT_AC_PROG_CXXCPP
 
2643
# ------------------
 
2644
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
2645
[
 
2646
AC_REQUIRE([AC_PROG_CXX])
 
2647
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
2648
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
2649
    (test "X$CXX" != "Xg++"))) ; then
 
2650
  AC_PROG_CXXCPP
 
2651
fi
 
2652
])# _LT_AC_PROG_CXXCPP
 
2653
 
 
2654
# AC_LIBTOOL_F77
 
2655
# --------------
 
2656
# enable support for Fortran 77 libraries
 
2657
AC_DEFUN([AC_LIBTOOL_F77],
 
2658
[AC_REQUIRE([_LT_AC_LANG_F77])
 
2659
])# AC_LIBTOOL_F77
 
2660
 
 
2661
 
 
2662
# _LT_AC_LANG_F77
 
2663
# ---------------
 
2664
AC_DEFUN([_LT_AC_LANG_F77],
 
2665
[AC_REQUIRE([AC_PROG_F77])
 
2666
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
 
2667
])# _LT_AC_LANG_F77
 
2668
 
 
2669
 
 
2670
# AC_LIBTOOL_GCJ
 
2671
# --------------
 
2672
# enable support for GCJ libraries
 
2673
AC_DEFUN([AC_LIBTOOL_GCJ],
 
2674
[AC_REQUIRE([_LT_AC_LANG_GCJ])
 
2675
])# AC_LIBTOOL_GCJ
 
2676
 
 
2677
 
 
2678
# _LT_AC_LANG_GCJ
 
2679
# ---------------
 
2680
AC_DEFUN([_LT_AC_LANG_GCJ],
 
2681
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
 
2682
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
 
2683
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
 
2684
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
 
2685
         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
 
2686
           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
 
2687
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
 
2688
])# _LT_AC_LANG_GCJ
 
2689
 
 
2690
 
 
2691
# AC_LIBTOOL_RC
 
2692
# -------------
 
2693
# enable support for Windows resource files
 
2694
AC_DEFUN([AC_LIBTOOL_RC],
 
2695
[AC_REQUIRE([LT_AC_PROG_RC])
 
2696
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
 
2697
])# AC_LIBTOOL_RC
 
2698
 
 
2699
 
 
2700
# AC_LIBTOOL_LANG_C_CONFIG
 
2701
# ------------------------
 
2702
# Ensure that the configuration vars for the C compiler are
 
2703
# suitably defined.  Those variables are subsequently used by
 
2704
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2705
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
 
2706
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
 
2707
[lt_save_CC="$CC"
 
2708
AC_LANG_PUSH(C)
 
2709
 
 
2710
# Source file extension for C test sources.
 
2711
ac_ext=c
 
2712
 
 
2713
# Object file extension for compiled C test sources.
 
2714
objext=o
 
2715
_LT_AC_TAGVAR(objext, $1)=$objext
 
2716
 
 
2717
# Code to be used in simple compile tests
 
2718
lt_simple_compile_test_code="int some_variable = 0;"
 
2719
 
 
2720
# Code to be used in simple link tests
 
2721
lt_simple_link_test_code='int main(){return(0);}'
 
2722
 
 
2723
_LT_AC_SYS_COMPILER
 
2724
 
 
2725
# save warnings/boilerplate of simple test code
 
2726
_LT_COMPILER_BOILERPLATE
 
2727
_LT_LINKER_BOILERPLATE
 
2728
 
 
2729
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
2730
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
2731
AC_LIBTOOL_PROG_CC_C_O($1)
 
2732
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
2733
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
2734
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
2735
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
2736
AC_LIBTOOL_SYS_LIB_STRIP
2605
2737
AC_LIBTOOL_DLOPEN_SELF
2606
2738
 
2607
 
## FIXME: this should be a separate macro
2608
 
##
2609
 
if test "$enable_shared" = yes && test "$GCC" = yes; then
2610
 
  case $archive_cmds in
2611
 
  *'~'*)
2612
 
    # FIXME: we may have to deal with multi-command sequences.
2613
 
    ;;
2614
 
  '$CC '*)
2615
 
    # Test whether the compiler implicitly links with -lc since on some
2616
 
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
2617
 
    # to ld, don't add -lc before -lgcc.
2618
 
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2619
 
    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2620
 
    [$rm conftest*
2621
 
    echo 'static int dummy;' > conftest.$ac_ext
2622
 
 
2623
 
    if AC_TRY_EVAL(ac_compile); then
2624
 
      soname=conftest
2625
 
      lib=conftest
2626
 
      libobjs=conftest.$ac_objext
2627
 
      deplibs=
2628
 
      wl=$lt_cv_prog_cc_wl
2629
 
      compiler_flags=-v
2630
 
      linker_flags=-v
2631
 
      verstring=
2632
 
      output_objdir=.
2633
 
      libname=conftest
2634
 
      save_allow_undefined_flag=$allow_undefined_flag
2635
 
      allow_undefined_flag=
2636
 
      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2637
 
      then
2638
 
        lt_cv_archive_cmds_need_lc=no
2639
 
      else
2640
 
        lt_cv_archive_cmds_need_lc=yes
2641
 
      fi
2642
 
      allow_undefined_flag=$save_allow_undefined_flag
2643
 
    else
2644
 
      cat conftest.err 1>&5
2645
 
    fi])
2646
 
    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2647
 
    ;;
2648
 
  esac
2649
 
fi
2650
 
need_lc=${lt_cv_archive_cmds_need_lc-yes}
2651
 
##
2652
 
## END FIXME
2653
 
 
2654
 
## FIXME: this should be a separate macro
2655
 
##
2656
 
# The second clause should only fire when bootstrapping the
 
2739
# Report which library types will actually be built
 
2740
AC_MSG_CHECKING([if libtool supports shared libraries])
 
2741
AC_MSG_RESULT([$can_build_shared])
 
2742
 
 
2743
AC_MSG_CHECKING([whether to build shared libraries])
 
2744
test "$can_build_shared" = "no" && enable_shared=no
 
2745
 
 
2746
# On AIX, shared libraries and static libraries use the same namespace, and
 
2747
# are all built from PIC.
 
2748
case $host_os in
 
2749
aix3*)
 
2750
  test "$enable_shared" = yes && enable_static=no
 
2751
  if test -n "$RANLIB"; then
 
2752
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
2753
    postinstall_cmds='$RANLIB $lib'
 
2754
  fi
 
2755
  ;;
 
2756
 
 
2757
aix4* | aix5*)
 
2758
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
2759
    test "$enable_shared" = yes && enable_static=no
 
2760
  fi
 
2761
    ;;
 
2762
esac
 
2763
AC_MSG_RESULT([$enable_shared])
 
2764
 
 
2765
AC_MSG_CHECKING([whether to build static libraries])
 
2766
# Make sure either enable_shared or enable_static is yes.
 
2767
test "$enable_shared" = yes || enable_static=yes
 
2768
AC_MSG_RESULT([$enable_static])
 
2769
 
 
2770
AC_LIBTOOL_CONFIG($1)
 
2771
 
 
2772
AC_LANG_POP
 
2773
CC="$lt_save_CC"
 
2774
])# AC_LIBTOOL_LANG_C_CONFIG
 
2775
 
 
2776
 
 
2777
# AC_LIBTOOL_LANG_CXX_CONFIG
 
2778
# --------------------------
 
2779
# Ensure that the configuration vars for the C compiler are
 
2780
# suitably defined.  Those variables are subsequently used by
 
2781
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
2782
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
 
2783
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
 
2784
[AC_LANG_PUSH(C++)
 
2785
AC_REQUIRE([AC_PROG_CXX])
 
2786
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
 
2787
 
 
2788
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
2789
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
2790
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
2791
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
2792
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
2793
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
2794
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
2795
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
2796
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2797
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
2798
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
2799
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
2800
_LT_AC_TAGVAR(module_cmds, $1)=
 
2801
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
2802
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
2803
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
2804
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
2805
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2806
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
2807
 
 
2808
# Dependencies to place before and after the object being linked:
 
2809
_LT_AC_TAGVAR(predep_objects, $1)=
 
2810
_LT_AC_TAGVAR(postdep_objects, $1)=
 
2811
_LT_AC_TAGVAR(predeps, $1)=
 
2812
_LT_AC_TAGVAR(postdeps, $1)=
 
2813
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
2814
 
 
2815
# Source file extension for C++ test sources.
 
2816
ac_ext=cpp
 
2817
 
 
2818
# Object file extension for compiled C++ test sources.
 
2819
objext=o
 
2820
_LT_AC_TAGVAR(objext, $1)=$objext
 
2821
 
 
2822
# Code to be used in simple compile tests
 
2823
lt_simple_compile_test_code="int some_variable = 0;"
 
2824
 
 
2825
# Code to be used in simple link tests
 
2826
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
 
2827
 
 
2828
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
2829
_LT_AC_SYS_COMPILER
 
2830
 
 
2831
# save warnings/boilerplate of simple test code
 
2832
_LT_COMPILER_BOILERPLATE
 
2833
_LT_LINKER_BOILERPLATE
 
2834
 
 
2835
# Allow CC to be a program name with arguments.
 
2836
lt_save_CC=$CC
 
2837
lt_save_LD=$LD
 
2838
lt_save_GCC=$GCC
 
2839
GCC=$GXX
 
2840
lt_save_with_gnu_ld=$with_gnu_ld
 
2841
lt_save_path_LD=$lt_cv_path_LD
 
2842
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
2843
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
2844
else
 
2845
  $as_unset lt_cv_prog_gnu_ld
 
2846
fi
 
2847
if test -n "${lt_cv_path_LDCXX+set}"; then
 
2848
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
2849
else
 
2850
  $as_unset lt_cv_path_LD
 
2851
fi
 
2852
test -z "${LDCXX+set}" || LD=$LDCXX
 
2853
CC=${CXX-"c++"}
 
2854
compiler=$CC
 
2855
_LT_AC_TAGVAR(compiler, $1)=$CC
 
2856
_LT_CC_BASENAME([$compiler])
 
2857
 
 
2858
# We don't want -fno-exception wen compiling C++ code, so set the
 
2859
# no_builtin_flag separately
 
2860
if test "$GXX" = yes; then
 
2861
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
2862
else
 
2863
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
2864
fi
 
2865
 
 
2866
if test "$GXX" = yes; then
 
2867
  # Set up default GNU C++ configuration
 
2868
 
 
2869
  AC_PROG_LD
 
2870
 
 
2871
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
2872
  # archiving commands below assume that GNU ld is being used.
 
2873
  if test "$with_gnu_ld" = yes; then
 
2874
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
2875
    _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'
 
2876
 
 
2877
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
2878
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
2879
 
 
2880
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
2881
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
2882
    #     investigate it a little bit more. (MM)
 
2883
    wlarc='${wl}'
 
2884
 
 
2885
    # ancient GNU ld didn't support --whole-archive et. al.
 
2886
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
 
2887
        grep 'no-whole-archive' > /dev/null; then
 
2888
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
2889
    else
 
2890
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
2891
    fi
 
2892
  else
 
2893
    with_gnu_ld=no
 
2894
    wlarc=
 
2895
 
 
2896
    # A generic and very simple default shared library creation
 
2897
    # command for GNU C++ for the case where it uses the native
 
2898
    # linker, instead of GNU ld.  If possible, this setting should
 
2899
    # overridden to take advantage of the native linker features on
 
2900
    # the platform it is being used on.
 
2901
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
2902
  fi
 
2903
 
 
2904
  # Commands to make compiler produce verbose output that lists
 
2905
  # what "hidden" libraries, object files and flags are used when
 
2906
  # linking a shared library.
 
2907
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
2908
 
 
2909
else
 
2910
  GXX=no
 
2911
  with_gnu_ld=no
 
2912
  wlarc=
 
2913
fi
 
2914
 
 
2915
# PORTME: fill in a description of your system's C++ link characteristics
 
2916
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
2917
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
2918
case $host_os in
 
2919
  aix3*)
 
2920
    # FIXME: insert proper C++ library support
 
2921
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
2922
    ;;
 
2923
  aix4* | aix5*)
 
2924
    if test "$host_cpu" = ia64; then
 
2925
      # On IA64, the linker does run time linking by default, so we don't
 
2926
      # have to do anything special.
 
2927
      aix_use_runtimelinking=no
 
2928
      exp_sym_flag='-Bexport'
 
2929
      no_entry_flag=""
 
2930
    else
 
2931
      aix_use_runtimelinking=no
 
2932
 
 
2933
      # Test if we are trying to use run time linking or normal
 
2934
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
2935
      # need to do runtime linking.
 
2936
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
2937
        for ld_flag in $LDFLAGS; do
 
2938
          case $ld_flag in
 
2939
          *-brtl*)
 
2940
            aix_use_runtimelinking=yes
 
2941
            break
 
2942
            ;;
 
2943
          esac
 
2944
        done
 
2945
        ;;
 
2946
      esac
 
2947
 
 
2948
      exp_sym_flag='-bexport'
 
2949
      no_entry_flag='-bnoentry'
 
2950
    fi
 
2951
 
 
2952
    # When large executables or shared objects are built, AIX ld can
 
2953
    # have problems creating the table of contents.  If linking a library
 
2954
    # or program results in "error TOC overflow" add -mminimal-toc to
 
2955
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
2956
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
2957
 
 
2958
    _LT_AC_TAGVAR(archive_cmds, $1)=''
 
2959
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
2960
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
2961
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
2962
 
 
2963
    if test "$GXX" = yes; then
 
2964
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
2965
      # We only want to do this on AIX 4.2 and lower, the check
 
2966
      # below for broken collect2 doesn't work under 4.3+
 
2967
        collect2name=`${CC} -print-prog-name=collect2`
 
2968
        if test -f "$collect2name" && \
 
2969
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
2970
        then
 
2971
          # We have reworked collect2
 
2972
          :
 
2973
        else
 
2974
          # We have old collect2
 
2975
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
2976
          # It fails to find uninstalled libraries when the uninstalled
 
2977
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
2978
          # to unsupported forces relinking
 
2979
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
2980
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
2981
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
2982
        fi
 
2983
        ;;
 
2984
      esac
 
2985
      shared_flag='-shared'
 
2986
      if test "$aix_use_runtimelinking" = yes; then
 
2987
        shared_flag="$shared_flag "'${wl}-G'
 
2988
      fi
 
2989
    else
 
2990
      # not using gcc
 
2991
      if test "$host_cpu" = ia64; then
 
2992
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
2993
        # chokes on -Wl,-G. The following line is correct:
 
2994
        shared_flag='-G'
 
2995
      else
 
2996
        if test "$aix_use_runtimelinking" = yes; then
 
2997
          shared_flag='${wl}-G'
 
2998
        else
 
2999
          shared_flag='${wl}-bM:SRE'
 
3000
        fi
 
3001
      fi
 
3002
    fi
 
3003
 
 
3004
    # It seems that -bexpall does not export symbols beginning with
 
3005
    # underscore (_), so it is better to generate a list of symbols to export.
 
3006
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3007
    if test "$aix_use_runtimelinking" = yes; then
 
3008
      # Warning - without using the other runtime loading flags (-brtl),
 
3009
      # -berok will link without error, but may produce a broken library.
 
3010
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
3011
      # Determine the default libpath from the value encoded in an empty executable.
 
3012
      _LT_AC_SYS_LIBPATH_AIX
 
3013
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3014
 
 
3015
      _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"
 
3016
     else
 
3017
      if test "$host_cpu" = ia64; then
 
3018
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
3019
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
3020
        _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"
 
3021
      else
 
3022
        # Determine the default libpath from the value encoded in an empty executable.
 
3023
        _LT_AC_SYS_LIBPATH_AIX
 
3024
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3025
        # Warning - without using the other run time loading flags,
 
3026
        # -berok will link without error, but may produce a broken library.
 
3027
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
3028
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
3029
        # Exported symbols can be pulled into shared objects from archives
 
3030
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
3031
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
3032
        # This is similar to how AIX traditionally builds its shared libraries.
 
3033
        _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'
 
3034
      fi
 
3035
    fi
 
3036
    ;;
 
3037
 
 
3038
  beos*)
 
3039
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
3040
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3041
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
3042
      # support --undefined.  This deserves some investigation.  FIXME
 
3043
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3044
    else
 
3045
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3046
    fi
 
3047
    ;;
 
3048
 
 
3049
  chorus*)
 
3050
    case $cc_basename in
 
3051
      *)
 
3052
        # FIXME: insert proper C++ library support
 
3053
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3054
        ;;
 
3055
    esac
 
3056
    ;;
 
3057
 
 
3058
  cygwin* | mingw* | pw32*)
 
3059
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
3060
    # as there is no search path for DLLs.
 
3061
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3062
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3063
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3064
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
3065
 
 
3066
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
3067
      _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'
 
3068
      # If the export-symbols file already is a .def file (1st line
 
3069
      # is EXPORTS), use it as is; otherwise, prepend...
 
3070
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
3071
        cp $export_symbols $output_objdir/$soname.def;
 
3072
      else
 
3073
        echo EXPORTS > $output_objdir/$soname.def;
 
3074
        cat $export_symbols >> $output_objdir/$soname.def;
 
3075
      fi~
 
3076
      $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'
 
3077
    else
 
3078
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3079
    fi
 
3080
  ;;
 
3081
      darwin* | rhapsody*)
 
3082
        case $host_os in
 
3083
        rhapsody* | darwin1.[[012]])
 
3084
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
3085
         ;;
 
3086
       *) # Darwin 1.3 on
 
3087
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3088
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3089
         else
 
3090
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
3091
             10.[[012]])
 
3092
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3093
               ;;
 
3094
             10.*)
 
3095
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
3096
               ;;
 
3097
           esac
 
3098
         fi
 
3099
         ;;
 
3100
        esac
 
3101
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3102
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3103
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3104
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3105
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
3106
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3107
 
 
3108
    if test "$GXX" = yes ; then
 
3109
      lt_int_apple_cc_single_mod=no
 
3110
      output_verbose_link_cmd='echo'
 
3111
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
3112
       lt_int_apple_cc_single_mod=yes
 
3113
      fi
 
3114
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3115
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3116
      else
 
3117
          _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'
 
3118
        fi
 
3119
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3120
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
3121
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3122
            _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}'
 
3123
          else
 
3124
            _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}'
 
3125
          fi
 
3126
            _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}'
 
3127
      else
 
3128
      case $cc_basename in
 
3129
        xlc*)
 
3130
         output_verbose_link_cmd='echo'
 
3131
          _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` $xlcverstring'
 
3132
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3133
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
3134
          _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3135
          _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}'
 
3136
          ;;
 
3137
       *)
 
3138
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3139
          ;;
 
3140
      esac
 
3141
      fi
 
3142
        ;;
 
3143
 
 
3144
  dgux*)
 
3145
    case $cc_basename in
 
3146
      ec++*)
 
3147
        # FIXME: insert proper C++ library support
 
3148
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3149
        ;;
 
3150
      ghcx*)
 
3151
        # Green Hills C++ Compiler
 
3152
        # FIXME: insert proper C++ library support
 
3153
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3154
        ;;
 
3155
      *)
 
3156
        # FIXME: insert proper C++ library support
 
3157
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3158
        ;;
 
3159
    esac
 
3160
    ;;
 
3161
  freebsd[[12]]*)
 
3162
    # C++ shared libraries reported to be fairly broken before switch to ELF
 
3163
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3164
    ;;
 
3165
  freebsd-elf*)
 
3166
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3167
    ;;
 
3168
  freebsd* | dragonfly*)
 
3169
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
3170
    # conventions
 
3171
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3172
    ;;
 
3173
  gnu*)
 
3174
    ;;
 
3175
  hpux9*)
 
3176
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3177
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3178
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3179
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3180
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3181
                                # but as the default
 
3182
                                # location of the library.
 
3183
 
 
3184
    case $cc_basename in
 
3185
    CC*)
 
3186
      # FIXME: insert proper C++ library support
 
3187
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3188
      ;;
 
3189
    aCC*)
 
3190
      _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'
 
3191
      # Commands to make compiler produce verbose output that lists
 
3192
      # what "hidden" libraries, object files and flags are used when
 
3193
      # linking a shared library.
 
3194
      #
 
3195
      # There doesn't appear to be a way to prevent this compiler from
 
3196
      # explicitly linking system object files so we need to strip them
 
3197
      # from the output so that they don't get included in the library
 
3198
      # dependencies.
 
3199
      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'
 
3200
      ;;
 
3201
    *)
 
3202
      if test "$GXX" = yes; then
 
3203
        _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'
 
3204
      else
 
3205
        # FIXME: insert proper C++ library support
 
3206
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3207
      fi
 
3208
      ;;
 
3209
    esac
 
3210
    ;;
 
3211
  hpux10*|hpux11*)
 
3212
    if test $with_gnu_ld = no; then
 
3213
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3214
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3215
 
 
3216
      case $host_cpu in
 
3217
      hppa*64*|ia64*) ;;
 
3218
      *)
 
3219
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3220
        ;;
 
3221
      esac
 
3222
    fi
 
3223
    case $host_cpu in
 
3224
    hppa*64*|ia64*)
 
3225
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3226
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3227
      ;;
 
3228
    *)
 
3229
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3230
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
3231
                                              # but as the default
 
3232
                                              # location of the library.
 
3233
      ;;
 
3234
    esac
 
3235
 
 
3236
    case $cc_basename in
 
3237
      CC*)
 
3238
        # FIXME: insert proper C++ library support
 
3239
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3240
        ;;
 
3241
      aCC*)
 
3242
        case $host_cpu in
 
3243
        hppa*64*)
 
3244
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3245
          ;;
 
3246
        ia64*)
 
3247
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3248
          ;;
 
3249
        *)
 
3250
          _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'
 
3251
          ;;
 
3252
        esac
 
3253
        # Commands to make compiler produce verbose output that lists
 
3254
        # what "hidden" libraries, object files and flags are used when
 
3255
        # linking a shared library.
 
3256
        #
 
3257
        # There doesn't appear to be a way to prevent this compiler from
 
3258
        # explicitly linking system object files so we need to strip them
 
3259
        # from the output so that they don't get included in the library
 
3260
        # dependencies.
 
3261
        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'
 
3262
        ;;
 
3263
      *)
 
3264
        if test "$GXX" = yes; then
 
3265
          if test $with_gnu_ld = no; then
 
3266
            case $host_cpu in
 
3267
            hppa*64*)
 
3268
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3269
              ;;
 
3270
            ia64*)
 
3271
              _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'
 
3272
              ;;
 
3273
            *)
 
3274
              _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'
 
3275
              ;;
 
3276
            esac
 
3277
          fi
 
3278
        else
 
3279
          # FIXME: insert proper C++ library support
 
3280
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3281
        fi
 
3282
        ;;
 
3283
    esac
 
3284
    ;;
 
3285
  interix[[3-9]]*)
 
3286
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3287
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3288
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3289
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3290
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
3291
    # Instead, shared libraries are loaded at an image base (0x10000000 by
 
3292
    # default) and relocated if they conflict, which is a slow very memory
 
3293
    # consuming and fragmenting process.  To avoid this, we pick a random,
 
3294
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
3295
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
3296
    _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'
 
3297
    _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'
 
3298
    ;;
 
3299
  irix5* | irix6*)
 
3300
    case $cc_basename in
 
3301
      CC*)
 
3302
        # SGI C++
 
3303
        _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'
 
3304
 
 
3305
        # Archives containing C++ object files must be created using
 
3306
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
3307
        # necessary to make sure instantiated templates are included
 
3308
        # in the archive.
 
3309
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
3310
        ;;
 
3311
      *)
 
3312
        if test "$GXX" = yes; then
 
3313
          if test "$with_gnu_ld" = no; then
 
3314
            _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'
 
3315
          else
 
3316
            _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'
 
3317
          fi
 
3318
        fi
 
3319
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3320
        ;;
 
3321
    esac
 
3322
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3323
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3324
    ;;
 
3325
  linux* | k*bsd*-gnu)
 
3326
    case $cc_basename in
 
3327
      KCC*)
 
3328
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3329
 
 
3330
        # KCC will only create a shared library if the output file
 
3331
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3332
        # to its proper name (with version) after linking.
 
3333
        _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'
 
3334
        _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'
 
3335
        # Commands to make compiler produce verbose output that lists
 
3336
        # what "hidden" libraries, object files and flags are used when
 
3337
        # linking a shared library.
 
3338
        #
 
3339
        # There doesn't appear to be a way to prevent this compiler from
 
3340
        # explicitly linking system object files so we need to strip them
 
3341
        # from the output so that they don't get included in the library
 
3342
        # dependencies.
 
3343
        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'
 
3344
 
 
3345
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
3346
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3347
 
 
3348
        # Archives containing C++ object files must be created using
 
3349
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3350
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3351
        ;;
 
3352
      icpc*)
 
3353
        # Intel C++
 
3354
        with_gnu_ld=yes
 
3355
        # version 8.0 and above of icpc choke on multiply defined symbols
 
3356
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
3357
        # earlier do not add the objects themselves.
 
3358
        case `$CC -V 2>&1` in
 
3359
        *"Version 7."*)
 
3360
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3361
          _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'
 
3362
          ;;
 
3363
        *)  # Version 8.0 or newer
 
3364
          tmp_idyn=
 
3365
          case $host_cpu in
 
3366
            ia64*) tmp_idyn=' -i_dynamic';;
 
3367
          esac
 
3368
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3369
          _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'
 
3370
          ;;
 
3371
        esac
 
3372
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3373
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3374
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3375
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
3376
        ;;
 
3377
      pgCC*)
 
3378
        # Portland Group C++ compiler
 
3379
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
3380
        _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'
 
3381
 
 
3382
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
3383
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3384
        _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'
 
3385
        ;;
 
3386
      cxx*)
 
3387
        # Compaq C++
 
3388
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3389
        _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'
 
3390
 
 
3391
        runpath_var=LD_RUN_PATH
 
3392
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3393
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3394
 
 
3395
        # Commands to make compiler produce verbose output that lists
 
3396
        # what "hidden" libraries, object files and flags are used when
 
3397
        # linking a shared library.
 
3398
        #
 
3399
        # There doesn't appear to be a way to prevent this compiler from
 
3400
        # explicitly linking system object files so we need to strip them
 
3401
        # from the output so that they don't get included in the library
 
3402
        # dependencies.
 
3403
        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'
 
3404
        ;;
 
3405
      *)
 
3406
        case `$CC -V 2>&1 | sed 5q` in
 
3407
        *Sun\ C*)
 
3408
          # Sun C++ 5.9
 
3409
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
3410
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3411
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 
3412
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3413
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
3414
 
 
3415
          # Not sure whether something based on
 
3416
          # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 
3417
          # would be better.
 
3418
          output_verbose_link_cmd='echo'
 
3419
 
 
3420
          # Archives containing C++ object files must be created using
 
3421
          # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
3422
          # necessary to make sure instantiated templates are included
 
3423
          # in the archive.
 
3424
          _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
3425
          ;;
 
3426
        esac
 
3427
        ;;
 
3428
    esac
 
3429
    ;;
 
3430
  lynxos*)
 
3431
    # FIXME: insert proper C++ library support
 
3432
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3433
    ;;
 
3434
  m88k*)
 
3435
    # FIXME: insert proper C++ library support
 
3436
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3437
    ;;
 
3438
  mvs*)
 
3439
    case $cc_basename in
 
3440
      cxx*)
 
3441
        # FIXME: insert proper C++ library support
 
3442
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3443
        ;;
 
3444
      *)
 
3445
        # FIXME: insert proper C++ library support
 
3446
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3447
        ;;
 
3448
    esac
 
3449
    ;;
 
3450
  netbsd*)
 
3451
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
3452
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
3453
      wlarc=
 
3454
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3455
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3456
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3457
    fi
 
3458
    # Workaround some broken pre-1.5 toolchains
 
3459
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
3460
    ;;
 
3461
  openbsd2*)
 
3462
    # C++ shared libraries are fairly broken
 
3463
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3464
    ;;
 
3465
  openbsd*)
 
3466
    if test -f /usr/libexec/ld.so; then
 
3467
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3468
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3469
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
3470
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3471
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3472
        _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'
 
3473
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3474
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3475
      fi
 
3476
      output_verbose_link_cmd='echo'
 
3477
    else
 
3478
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3479
    fi
 
3480
    ;;
 
3481
  osf3*)
 
3482
    case $cc_basename in
 
3483
      KCC*)
 
3484
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3485
 
 
3486
        # KCC will only create a shared library if the output file
 
3487
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3488
        # to its proper name (with version) after linking.
 
3489
        _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'
 
3490
 
 
3491
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3492
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3493
 
 
3494
        # Archives containing C++ object files must be created using
 
3495
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
3496
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
3497
 
 
3498
        ;;
 
3499
      RCC*)
 
3500
        # Rational C++ 2.4.1
 
3501
        # FIXME: insert proper C++ library support
 
3502
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3503
        ;;
 
3504
      cxx*)
 
3505
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3506
        _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'
 
3507
 
 
3508
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3509
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3510
 
 
3511
        # Commands to make compiler produce verbose output that lists
 
3512
        # what "hidden" libraries, object files and flags are used when
 
3513
        # linking a shared library.
 
3514
        #
 
3515
        # There doesn't appear to be a way to prevent this compiler from
 
3516
        # explicitly linking system object files so we need to strip them
 
3517
        # from the output so that they don't get included in the library
 
3518
        # dependencies.
 
3519
        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'
 
3520
        ;;
 
3521
      *)
 
3522
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3523
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3524
          _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'
 
3525
 
 
3526
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3527
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3528
 
 
3529
          # Commands to make compiler produce verbose output that lists
 
3530
          # what "hidden" libraries, object files and flags are used when
 
3531
          # linking a shared library.
 
3532
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3533
 
 
3534
        else
 
3535
          # FIXME: insert proper C++ library support
 
3536
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3537
        fi
 
3538
        ;;
 
3539
    esac
 
3540
    ;;
 
3541
  osf4* | osf5*)
 
3542
    case $cc_basename in
 
3543
      KCC*)
 
3544
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
3545
 
 
3546
        # KCC will only create a shared library if the output file
 
3547
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
3548
        # to its proper name (with version) after linking.
 
3549
        _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'
 
3550
 
 
3551
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
3552
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3553
 
 
3554
        # Archives containing C++ object files must be created using
 
3555
        # the KAI C++ compiler.
 
3556
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
3557
        ;;
 
3558
      RCC*)
 
3559
        # Rational C++ 2.4.1
 
3560
        # FIXME: insert proper C++ library support
 
3561
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3562
        ;;
 
3563
      cxx*)
 
3564
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
3565
        _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'
 
3566
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
3567
          echo "-hidden">> $lib.exp~
 
3568
          $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~
 
3569
          $rm $lib.exp'
 
3570
 
 
3571
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
3572
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3573
 
 
3574
        # Commands to make compiler produce verbose output that lists
 
3575
        # what "hidden" libraries, object files and flags are used when
 
3576
        # linking a shared library.
 
3577
        #
 
3578
        # There doesn't appear to be a way to prevent this compiler from
 
3579
        # explicitly linking system object files so we need to strip them
 
3580
        # from the output so that they don't get included in the library
 
3581
        # dependencies.
 
3582
        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'
 
3583
        ;;
 
3584
      *)
 
3585
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3586
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
3587
         _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'
 
3588
 
 
3589
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3590
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3591
 
 
3592
          # Commands to make compiler produce verbose output that lists
 
3593
          # what "hidden" libraries, object files and flags are used when
 
3594
          # linking a shared library.
 
3595
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
3596
 
 
3597
        else
 
3598
          # FIXME: insert proper C++ library support
 
3599
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3600
        fi
 
3601
        ;;
 
3602
    esac
 
3603
    ;;
 
3604
  psos*)
 
3605
    # FIXME: insert proper C++ library support
 
3606
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3607
    ;;
 
3608
  sunos4*)
 
3609
    case $cc_basename in
 
3610
      CC*)
 
3611
        # Sun C++ 4.x
 
3612
        # FIXME: insert proper C++ library support
 
3613
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3614
        ;;
 
3615
      lcc*)
 
3616
        # Lucid
 
3617
        # FIXME: insert proper C++ library support
 
3618
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3619
        ;;
 
3620
      *)
 
3621
        # FIXME: insert proper C++ library support
 
3622
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3623
        ;;
 
3624
    esac
 
3625
    ;;
 
3626
  solaris*)
 
3627
    case $cc_basename in
 
3628
      CC*)
 
3629
        # Sun C++ 4.2, 5.x and Centerline C++
 
3630
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
 
3631
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
3632
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
3633
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3634
        $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'
 
3635
 
 
3636
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3637
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3638
        case $host_os in
 
3639
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
3640
          *)
 
3641
            # The compiler driver will combine and reorder linker options,
 
3642
            # but understands `-z linker_flag'.
 
3643
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
3644
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
3645
            ;;
 
3646
        esac
 
3647
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3648
 
 
3649
        output_verbose_link_cmd='echo'
 
3650
 
 
3651
        # Archives containing C++ object files must be created using
 
3652
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
3653
        # necessary to make sure instantiated templates are included
 
3654
        # in the archive.
 
3655
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
3656
        ;;
 
3657
      gcx*)
 
3658
        # Green Hills C++ Compiler
 
3659
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3660
 
 
3661
        # The C++ compiler must be used to create the archive.
 
3662
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
3663
        ;;
 
3664
      *)
 
3665
        # GNU C++ compiler with Solaris linker
 
3666
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
3667
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
3668
          if $CC --version | grep -v '^2\.7' > /dev/null; then
 
3669
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3670
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3671
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3672
 
 
3673
            # Commands to make compiler produce verbose output that lists
 
3674
            # what "hidden" libraries, object files and flags are used when
 
3675
            # linking a shared library.
 
3676
            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3677
          else
 
3678
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
3679
            # platform.
 
3680
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
3681
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
3682
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
3683
 
 
3684
            # Commands to make compiler produce verbose output that lists
 
3685
            # what "hidden" libraries, object files and flags are used when
 
3686
            # linking a shared library.
 
3687
            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
 
3688
          fi
 
3689
 
 
3690
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
3691
          case $host_os in
 
3692
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
3693
          *)
 
3694
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
3695
            ;;
 
3696
          esac
 
3697
        fi
 
3698
        ;;
 
3699
    esac
 
3700
    ;;
 
3701
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
3702
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
3703
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3704
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3705
    runpath_var='LD_RUN_PATH'
 
3706
 
 
3707
    case $cc_basename in
 
3708
      CC*)
 
3709
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3710
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3711
        ;;
 
3712
      *)
 
3713
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3714
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3715
        ;;
 
3716
    esac
 
3717
    ;;
 
3718
  sysv5* | sco3.2v5* | sco5v6*)
 
3719
    # Note: We can NOT use -z defs as we might desire, because we do not
 
3720
    # link with -lc, and that would cause any symbols used from libc to
 
3721
    # always be unresolved, which means just about no library would
 
3722
    # ever link correctly.  If we're not using GNU ld we use -z text
 
3723
    # though, which does catch some bad symbols but isn't as heavy-handed
 
3724
    # as -z defs.
 
3725
    # For security reasons, it is highly recommended that you always
 
3726
    # use absolute paths for naming shared libraries, and exclude the
 
3727
    # DT_RUNPATH tag from executables and libraries.  But doing so
 
3728
    # requires that you compile everything twice, which is a pain.
 
3729
    # So that behaviour is only enabled if SCOABSPATH is set to a
 
3730
    # non-empty value in the environment.  Most likely only useful for
 
3731
    # creating official distributions of packages.
 
3732
    # This is a hack until libtool officially supports absolute path
 
3733
    # names for shared libraries.
 
3734
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
3735
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
3736
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3737
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3738
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
3739
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
3740
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3741
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
3742
    runpath_var='LD_RUN_PATH'
 
3743
 
 
3744
    case $cc_basename in
 
3745
      CC*)
 
3746
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3747
        _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'
 
3748
        ;;
 
3749
      *)
 
3750
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3751
        _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'
 
3752
        ;;
 
3753
    esac
 
3754
    ;;
 
3755
  tandem*)
 
3756
    case $cc_basename in
 
3757
      NCC*)
 
3758
        # NonStop-UX NCC 3.20
 
3759
        # FIXME: insert proper C++ library support
 
3760
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3761
        ;;
 
3762
      *)
 
3763
        # FIXME: insert proper C++ library support
 
3764
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3765
        ;;
 
3766
    esac
 
3767
    ;;
 
3768
  vxworks*)
 
3769
    # FIXME: insert proper C++ library support
 
3770
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3771
    ;;
 
3772
  *)
 
3773
    # FIXME: insert proper C++ library support
 
3774
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3775
    ;;
 
3776
esac
 
3777
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
3778
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
3779
 
 
3780
_LT_AC_TAGVAR(GCC, $1)="$GXX"
 
3781
_LT_AC_TAGVAR(LD, $1)="$LD"
 
3782
 
 
3783
AC_LIBTOOL_POSTDEP_PREDEP($1)
 
3784
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
3785
AC_LIBTOOL_PROG_CC_C_O($1)
 
3786
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
3787
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
3788
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
3789
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
3790
 
 
3791
AC_LIBTOOL_CONFIG($1)
 
3792
 
 
3793
AC_LANG_POP
 
3794
CC=$lt_save_CC
 
3795
LDCXX=$LD
 
3796
LD=$lt_save_LD
 
3797
GCC=$lt_save_GCC
 
3798
with_gnu_ldcxx=$with_gnu_ld
 
3799
with_gnu_ld=$lt_save_with_gnu_ld
 
3800
lt_cv_path_LDCXX=$lt_cv_path_LD
 
3801
lt_cv_path_LD=$lt_save_path_LD
 
3802
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
3803
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
3804
])# AC_LIBTOOL_LANG_CXX_CONFIG
 
3805
 
 
3806
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
3807
# ------------------------------------
 
3808
# Figure out "hidden" library dependencies from verbose
 
3809
# compiler output when linking a shared library.
 
3810
# Parse the compiler output and extract the necessary
 
3811
# objects, libraries and library flags.
 
3812
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
3813
dnl we can't use the lt_simple_compile_test_code here,
 
3814
dnl because it contains code intended for an executable,
 
3815
dnl not a library.  It's possible we should let each
 
3816
dnl tag define a new lt_????_link_test_code variable,
 
3817
dnl but it's only used here...
 
3818
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
 
3819
int a;
 
3820
void foo (void) { a = 0; }
 
3821
EOF
 
3822
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
 
3823
class Foo
 
3824
{
 
3825
public:
 
3826
  Foo (void) { a = 0; }
 
3827
private:
 
3828
  int a;
 
3829
};
 
3830
EOF
 
3831
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
 
3832
      subroutine foo
 
3833
      implicit none
 
3834
      integer*4 a
 
3835
      a=0
 
3836
      return
 
3837
      end
 
3838
EOF
 
3839
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
 
3840
public class foo {
 
3841
  private int a;
 
3842
  public void bar (void) {
 
3843
    a = 0;
 
3844
  }
 
3845
};
 
3846
EOF
 
3847
])
 
3848
dnl Parse the compiler output and extract the necessary
 
3849
dnl objects, libraries and library flags.
 
3850
if AC_TRY_EVAL(ac_compile); then
 
3851
  # Parse the compiler output and extract the necessary
 
3852
  # objects, libraries and library flags.
 
3853
 
 
3854
  # Sentinel used to keep track of whether or not we are before
 
3855
  # the conftest object file.
 
3856
  pre_test_object_deps_done=no
 
3857
 
 
3858
  # The `*' in the case matches for architectures that use `case' in
 
3859
  # $output_verbose_cmd can trigger glob expansion during the loop
 
3860
  # eval without this substitution.
 
3861
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
3862
 
 
3863
  for p in `eval $output_verbose_link_cmd`; do
 
3864
    case $p in
 
3865
 
 
3866
    -L* | -R* | -l*)
 
3867
       # Some compilers place space between "-{L,R}" and the path.
 
3868
       # Remove the space.
 
3869
       if test $p = "-L" \
 
3870
          || test $p = "-R"; then
 
3871
         prev=$p
 
3872
         continue
 
3873
       else
 
3874
         prev=
 
3875
       fi
 
3876
 
 
3877
       if test "$pre_test_object_deps_done" = no; then
 
3878
         case $p in
 
3879
         -L* | -R*)
 
3880
           # Internal compiler library paths should come after those
 
3881
           # provided the user.  The postdeps already come after the
 
3882
           # user supplied libs so there is no need to process them.
 
3883
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
3884
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
3885
           else
 
3886
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
3887
           fi
 
3888
           ;;
 
3889
         # The "-l" case would never come before the object being
 
3890
         # linked, so don't bother handling this case.
 
3891
         esac
 
3892
       else
 
3893
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
3894
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
3895
         else
 
3896
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
3897
         fi
 
3898
       fi
 
3899
       ;;
 
3900
 
 
3901
    *.$objext)
 
3902
       # This assumes that the test object file only shows up
 
3903
       # once in the compiler output.
 
3904
       if test "$p" = "conftest.$objext"; then
 
3905
         pre_test_object_deps_done=yes
 
3906
         continue
 
3907
       fi
 
3908
 
 
3909
       if test "$pre_test_object_deps_done" = no; then
 
3910
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
3911
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
3912
         else
 
3913
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
3914
         fi
 
3915
       else
 
3916
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
3917
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
3918
         else
 
3919
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
3920
         fi
 
3921
       fi
 
3922
       ;;
 
3923
 
 
3924
    *) ;; # Ignore the rest.
 
3925
 
 
3926
    esac
 
3927
  done
 
3928
 
 
3929
  # Clean up.
 
3930
  rm -f a.out a.exe
 
3931
else
 
3932
  echo "libtool.m4: error: problem compiling $1 test program"
 
3933
fi
 
3934
 
 
3935
$rm -f confest.$objext
 
3936
 
 
3937
# PORTME: override above test on systems where it is broken
 
3938
ifelse([$1],[CXX],
 
3939
[case $host_os in
 
3940
interix[[3-9]]*)
 
3941
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
3942
  # hack all around it, let's just trust "g++" to DTRT.
 
3943
  _LT_AC_TAGVAR(predep_objects,$1)=
 
3944
  _LT_AC_TAGVAR(postdep_objects,$1)=
 
3945
  _LT_AC_TAGVAR(postdeps,$1)=
 
3946
  ;;
 
3947
 
 
3948
linux*)
 
3949
  case `$CC -V 2>&1 | sed 5q` in
 
3950
  *Sun\ C*)
 
3951
    # Sun C++ 5.9
 
3952
    #
 
3953
    # The more standards-conforming stlport4 library is
 
3954
    # incompatible with the Cstd library. Avoid specifying
 
3955
    # it if it's in CXXFLAGS. Ignore libCrun as
 
3956
    # -library=stlport4 depends on it.
 
3957
    case " $CXX $CXXFLAGS " in
 
3958
    *" -library=stlport4 "*)
 
3959
      solaris_use_stlport4=yes
 
3960
      ;;
 
3961
    esac
 
3962
    if test "$solaris_use_stlport4" != yes; then
 
3963
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
3964
    fi
 
3965
    ;;
 
3966
  esac
 
3967
  ;;
 
3968
 
 
3969
solaris*)
 
3970
  case $cc_basename in
 
3971
  CC*)
 
3972
    # The more standards-conforming stlport4 library is
 
3973
    # incompatible with the Cstd library. Avoid specifying
 
3974
    # it if it's in CXXFLAGS. Ignore libCrun as
 
3975
    # -library=stlport4 depends on it.
 
3976
    case " $CXX $CXXFLAGS " in
 
3977
    *" -library=stlport4 "*)
 
3978
      solaris_use_stlport4=yes
 
3979
      ;;
 
3980
    esac
 
3981
 
 
3982
    # Adding this requires a known-good setup of shared libraries for
 
3983
    # Sun compiler versions before 5.6, else PIC objects from an old
 
3984
    # archive will be linked into the output, leading to subtle bugs.
 
3985
    if test "$solaris_use_stlport4" != yes; then
 
3986
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
 
3987
    fi
 
3988
    ;;
 
3989
  esac
 
3990
  ;;
 
3991
esac
 
3992
])
 
3993
 
 
3994
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
3995
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
3996
esac
 
3997
])# AC_LIBTOOL_POSTDEP_PREDEP
 
3998
 
 
3999
# AC_LIBTOOL_LANG_F77_CONFIG
 
4000
# --------------------------
 
4001
# Ensure that the configuration vars for the C compiler are
 
4002
# suitably defined.  Those variables are subsequently used by
 
4003
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4004
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
 
4005
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
 
4006
[AC_REQUIRE([AC_PROG_F77])
 
4007
AC_LANG_PUSH(Fortran 77)
 
4008
 
 
4009
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4010
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
4011
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4012
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
4013
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
4014
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4015
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
4016
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
4017
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4018
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
4019
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
4020
_LT_AC_TAGVAR(module_cmds, $1)=
 
4021
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
4022
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
4023
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4024
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
4025
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4026
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
4027
 
 
4028
# Source file extension for f77 test sources.
 
4029
ac_ext=f
 
4030
 
 
4031
# Object file extension for compiled f77 test sources.
 
4032
objext=o
 
4033
_LT_AC_TAGVAR(objext, $1)=$objext
 
4034
 
 
4035
# Code to be used in simple compile tests
 
4036
lt_simple_compile_test_code="\
 
4037
      subroutine t
 
4038
      return
 
4039
      end
 
4040
"
 
4041
 
 
4042
# Code to be used in simple link tests
 
4043
lt_simple_link_test_code="\
 
4044
      program t
 
4045
      end
 
4046
"
 
4047
 
 
4048
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4049
_LT_AC_SYS_COMPILER
 
4050
 
 
4051
# save warnings/boilerplate of simple test code
 
4052
_LT_COMPILER_BOILERPLATE
 
4053
_LT_LINKER_BOILERPLATE
 
4054
 
 
4055
# Allow CC to be a program name with arguments.
 
4056
lt_save_CC="$CC"
 
4057
CC=${F77-"f77"}
 
4058
compiler=$CC
 
4059
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4060
_LT_CC_BASENAME([$compiler])
 
4061
 
 
4062
AC_MSG_CHECKING([if libtool supports shared libraries])
 
4063
AC_MSG_RESULT([$can_build_shared])
 
4064
 
 
4065
AC_MSG_CHECKING([whether to build shared libraries])
 
4066
test "$can_build_shared" = "no" && enable_shared=no
 
4067
 
 
4068
# On AIX, shared libraries and static libraries use the same namespace, and
 
4069
# are all built from PIC.
 
4070
case $host_os in
 
4071
aix3*)
 
4072
  test "$enable_shared" = yes && enable_static=no
 
4073
  if test -n "$RANLIB"; then
 
4074
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
4075
    postinstall_cmds='$RANLIB $lib'
 
4076
  fi
 
4077
  ;;
 
4078
aix4* | aix5*)
 
4079
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
4080
    test "$enable_shared" = yes && enable_static=no
 
4081
  fi
 
4082
  ;;
 
4083
esac
 
4084
AC_MSG_RESULT([$enable_shared])
 
4085
 
 
4086
AC_MSG_CHECKING([whether to build static libraries])
 
4087
# Make sure either enable_shared or enable_static is yes.
 
4088
test "$enable_shared" = yes || enable_static=yes
 
4089
AC_MSG_RESULT([$enable_static])
 
4090
 
 
4091
_LT_AC_TAGVAR(GCC, $1)="$G77"
 
4092
_LT_AC_TAGVAR(LD, $1)="$LD"
 
4093
 
 
4094
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4095
AC_LIBTOOL_PROG_CC_C_O($1)
 
4096
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4097
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4098
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4099
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4100
 
 
4101
AC_LIBTOOL_CONFIG($1)
 
4102
 
 
4103
AC_LANG_POP
 
4104
CC="$lt_save_CC"
 
4105
])# AC_LIBTOOL_LANG_F77_CONFIG
 
4106
 
 
4107
 
 
4108
# AC_LIBTOOL_LANG_GCJ_CONFIG
 
4109
# --------------------------
 
4110
# Ensure that the configuration vars for the C compiler are
 
4111
# suitably defined.  Those variables are subsequently used by
 
4112
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4113
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
 
4114
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
 
4115
[AC_LANG_SAVE
 
4116
 
 
4117
# Source file extension for Java test sources.
 
4118
ac_ext=java
 
4119
 
 
4120
# Object file extension for compiled Java test sources.
 
4121
objext=o
 
4122
_LT_AC_TAGVAR(objext, $1)=$objext
 
4123
 
 
4124
# Code to be used in simple compile tests
 
4125
lt_simple_compile_test_code="class foo {}"
 
4126
 
 
4127
# Code to be used in simple link tests
 
4128
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
4129
 
 
4130
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4131
_LT_AC_SYS_COMPILER
 
4132
 
 
4133
# save warnings/boilerplate of simple test code
 
4134
_LT_COMPILER_BOILERPLATE
 
4135
_LT_LINKER_BOILERPLATE
 
4136
 
 
4137
# Allow CC to be a program name with arguments.
 
4138
lt_save_CC="$CC"
 
4139
CC=${GCJ-"gcj"}
 
4140
compiler=$CC
 
4141
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4142
_LT_CC_BASENAME([$compiler])
 
4143
 
 
4144
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
4145
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4146
 
 
4147
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4148
 
 
4149
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
4150
AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4151
AC_LIBTOOL_PROG_CC_C_O($1)
 
4152
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4153
AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4154
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4155
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4156
 
 
4157
AC_LIBTOOL_CONFIG($1)
 
4158
 
 
4159
AC_LANG_RESTORE
 
4160
CC="$lt_save_CC"
 
4161
])# AC_LIBTOOL_LANG_GCJ_CONFIG
 
4162
 
 
4163
 
 
4164
# AC_LIBTOOL_LANG_RC_CONFIG
 
4165
# -------------------------
 
4166
# Ensure that the configuration vars for the Windows resource compiler are
 
4167
# suitably defined.  Those variables are subsequently used by
 
4168
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
 
4169
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
 
4170
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
 
4171
[AC_LANG_SAVE
 
4172
 
 
4173
# Source file extension for RC test sources.
 
4174
ac_ext=rc
 
4175
 
 
4176
# Object file extension for compiled RC test sources.
 
4177
objext=o
 
4178
_LT_AC_TAGVAR(objext, $1)=$objext
 
4179
 
 
4180
# Code to be used in simple compile tests
 
4181
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
4182
 
 
4183
# Code to be used in simple link tests
 
4184
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
4185
 
 
4186
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4187
_LT_AC_SYS_COMPILER
 
4188
 
 
4189
# save warnings/boilerplate of simple test code
 
4190
_LT_COMPILER_BOILERPLATE
 
4191
_LT_LINKER_BOILERPLATE
 
4192
 
 
4193
# Allow CC to be a program name with arguments.
 
4194
lt_save_CC="$CC"
 
4195
CC=${RC-"windres"}
 
4196
compiler=$CC
 
4197
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4198
_LT_CC_BASENAME([$compiler])
 
4199
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
4200
 
 
4201
AC_LIBTOOL_CONFIG($1)
 
4202
 
 
4203
AC_LANG_RESTORE
 
4204
CC="$lt_save_CC"
 
4205
])# AC_LIBTOOL_LANG_RC_CONFIG
 
4206
 
 
4207
 
 
4208
# AC_LIBTOOL_CONFIG([TAGNAME])
 
4209
# ----------------------------
 
4210
# If TAGNAME is not passed, then create an initial libtool script
 
4211
# with a default configuration from the untagged config vars.  Otherwise
 
4212
# add code to config.status for appending the configuration named by
 
4213
# TAGNAME from the matching tagged config vars.
 
4214
AC_DEFUN([AC_LIBTOOL_CONFIG],
 
4215
[# The else clause should only fire when bootstrapping the
2657
4216
# libtool distribution, otherwise you forgot to ship ltmain.sh
2658
4217
# with your package, and you will get complaints that there are
2659
4218
# no rules to generate ltmain.sh.
2660
4219
if test -f "$ltmain"; then
2661
 
  :
2662
 
else
2663
 
  # If there is no Makefile yet, we rely on a make rule to execute
2664
 
  # `config.status --recheck' to rerun these tests and create the
2665
 
  # libtool script then.
2666
 
  test -f Makefile && make "$ltmain"
2667
 
fi
2668
 
 
2669
 
if test -f "$ltmain"; then
2670
 
  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2671
 
  $rm -f "${ofile}T"
2672
 
 
2673
 
  echo creating $ofile
2674
 
 
 
4220
  # See if we are running on zsh, and set the options which allow our commands through
 
4221
  # without removal of \ escapes.
 
4222
  if test -n "${ZSH_VERSION+set}" ; then
 
4223
    setopt NO_GLOB_SUBST
 
4224
  fi
2675
4225
  # Now quote all the things that may contain metacharacters while being
2676
4226
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
2677
4227
  # variables and quote the copies for generation of the libtool script.
2678
 
  for var in echo old_CC old_CFLAGS SED \
2679
 
    AR AR_FLAGS CC LD LN_S NM SHELL \
2680
 
    reload_flag reload_cmds wl \
2681
 
    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2682
 
    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2683
 
    library_names_spec soname_spec \
2684
 
    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2685
 
    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2686
 
    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2687
 
    old_striplib striplib file_magic_cmd export_symbols_cmds \
2688
 
    deplibs_check_method allow_undefined_flag no_undefined_flag \
2689
 
    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2690
 
    global_symbol_to_c_name_address \
2691
 
    hardcode_libdir_flag_spec hardcode_libdir_separator  \
 
4228
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
 
4229
    SED SHELL STRIP \
 
4230
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
 
4231
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
 
4232
    deplibs_check_method reload_flag reload_cmds need_locks \
 
4233
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
 
4234
    lt_cv_sys_global_symbol_to_c_name_address \
2692
4235
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2693
 
    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 
4236
    old_postinstall_cmds old_postuninstall_cmds \
 
4237
    _LT_AC_TAGVAR(compiler, $1) \
 
4238
    _LT_AC_TAGVAR(CC, $1) \
 
4239
    _LT_AC_TAGVAR(LD, $1) \
 
4240
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
 
4241
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
 
4242
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
 
4243
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
 
4244
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
 
4245
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
 
4246
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
 
4247
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
 
4248
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
 
4249
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
 
4250
    _LT_AC_TAGVAR(predep_objects, $1) \
 
4251
    _LT_AC_TAGVAR(postdep_objects, $1) \
 
4252
    _LT_AC_TAGVAR(predeps, $1) \
 
4253
    _LT_AC_TAGVAR(postdeps, $1) \
 
4254
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
 
4255
    _LT_AC_TAGVAR(archive_cmds, $1) \
 
4256
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
 
4257
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
 
4258
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
 
4259
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
 
4260
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
 
4261
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
 
4262
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
 
4263
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
 
4264
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
 
4265
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
 
4266
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
 
4267
    _LT_AC_TAGVAR(module_cmds, $1) \
 
4268
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
 
4269
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
 
4270
    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
 
4271
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
 
4272
    _LT_AC_TAGVAR(include_expsyms, $1); do
2694
4273
 
2695
4274
    case $var in
2696
 
    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
 
4275
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
 
4276
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
 
4277
    _LT_AC_TAGVAR(archive_cmds, $1) | \
 
4278
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
 
4279
    _LT_AC_TAGVAR(module_cmds, $1) | \
 
4280
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
 
4281
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
 
4282
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
 
4283
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
 
4284
    postinstall_cmds | postuninstall_cmds | \
2697
4285
    old_postinstall_cmds | old_postuninstall_cmds | \
2698
 
    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2699
 
    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2700
 
    postinstall_cmds | postuninstall_cmds | \
2701
 
    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
4286
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2702
4287
      # Double-quote double-evaled strings.
2703
4288
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2704
4289
      ;;
2708
4293
    esac
2709
4294
  done
2710
4295
 
2711
 
  cat <<__EOF__ > "${ofile}T"
2712
 
#! $SHELL
2713
 
 
2714
 
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
4296
  case $lt_echo in
 
4297
  *'\[$]0 --fallback-echo"')
 
4298
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
 
4299
    ;;
 
4300
  esac
 
4301
 
 
4302
ifelse([$1], [],
 
4303
  [cfgfile="${ofile}T"
 
4304
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
4305
  $rm -f "$cfgfile"
 
4306
  AC_MSG_NOTICE([creating $ofile])],
 
4307
  [cfgfile="$ofile"])
 
4308
 
 
4309
  cat <<__EOF__ >> "$cfgfile"
 
4310
ifelse([$1], [],
 
4311
[#! $SHELL
 
4312
 
 
4313
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2715
4314
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2716
4315
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2717
4316
#
2718
 
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
4317
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
 
4318
# Free Software Foundation, Inc.
 
4319
#
 
4320
# This file is part of GNU Libtool:
2719
4321
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2720
4322
#
2721
4323
# This program is free software; you can redistribute it and/or modify
2730
4332
#
2731
4333
# You should have received a copy of the GNU General Public License
2732
4334
# along with this program; if not, write to the Free Software
2733
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
4335
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2734
4336
#
2735
4337
# As a special exception to the GNU General Public License, if you
2736
4338
# distribute this file as part of a program that contains a
2737
4339
# configuration script generated by Autoconf, you may include it under
2738
4340
# the same distribution terms that you use for the rest of that program.
2739
4341
 
2740
 
# A sed that does not truncate output.
 
4342
# A sed program that does not truncate output.
2741
4343
SED=$lt_SED
2742
4344
 
2743
4345
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2744
 
Xsed="${SED} -e s/^X//"
 
4346
Xsed="$SED -e 1s/^X//"
2745
4347
 
2746
4348
# The HP-UX ksh and POSIX shell print the target directory to stdout
2747
4349
# if CDPATH is set.
2748
 
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2749
 
 
2750
 
# ### BEGIN LIBTOOL CONFIG
 
4350
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
4351
 
 
4352
# The names of the tagged configurations supported by this script.
 
4353
available_tags=
 
4354
 
 
4355
# ### BEGIN LIBTOOL CONFIG],
 
4356
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
2751
4357
 
2752
4358
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2753
4359
 
2761
4367
build_old_libs=$enable_static
2762
4368
 
2763
4369
# Whether or not to add -lc for building shared libraries.
2764
 
build_libtool_need_lc=$need_lc
 
4370
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
 
4371
 
 
4372
# Whether or not to disallow shared libs when runtime libs are static
 
4373
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
2765
4374
 
2766
4375
# Whether or not to optimize for fast installation.
2767
4376
fast_install=$enable_fast_install
2769
4378
# The host system.
2770
4379
host_alias=$host_alias
2771
4380
host=$host
 
4381
host_os=$host_os
 
4382
 
 
4383
# The build system.
 
4384
build_alias=$build_alias
 
4385
build=$build
 
4386
build_os=$build_os
2772
4387
 
2773
4388
# An echo program that does not interpret backslashes.
2774
4389
echo=$lt_echo
2777
4392
AR=$lt_AR
2778
4393
AR_FLAGS=$lt_AR_FLAGS
2779
4394
 
2780
 
# The default C compiler.
2781
 
CC=$lt_CC
 
4395
# A C compiler.
 
4396
LTCC=$lt_LTCC
 
4397
 
 
4398
# LTCC compiler flags.
 
4399
LTCFLAGS=$lt_LTCFLAGS
 
4400
 
 
4401
# A language-specific compiler.
 
4402
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
2782
4403
 
2783
4404
# Is the compiler the GNU C compiler?
2784
 
with_gcc=$GCC
 
4405
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
4406
 
 
4407
# An ERE matcher.
 
4408
EGREP=$lt_EGREP
2785
4409
 
2786
4410
# The linker used to build libraries.
2787
 
LD=$lt_LD
 
4411
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
2788
4412
 
2789
4413
# Whether we need hard or soft links.
2790
4414
LN_S=$lt_LN_S
2793
4417
NM=$lt_NM
2794
4418
 
2795
4419
# A symbol stripping program
2796
 
STRIP=$STRIP
 
4420
STRIP=$lt_STRIP
2797
4421
 
2798
4422
# Used to examine libraries when file_magic_cmd begins "file"
2799
4423
MAGIC_CMD=$MAGIC_CMD
2815
4439
reload_cmds=$lt_reload_cmds
2816
4440
 
2817
4441
# How to pass a linker flag through the compiler.
2818
 
wl=$lt_wl
 
4442
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
2819
4443
 
2820
4444
# Object file suffix (normally "o").
2821
4445
objext="$ac_objext"
2823
4447
# Old archive suffix (normally "a").
2824
4448
libext="$libext"
2825
4449
 
 
4450
# Shared library suffix (normally ".so").
 
4451
shrext_cmds='$shrext_cmds'
 
4452
 
2826
4453
# Executable file suffix (normally "").
2827
4454
exeext="$exeext"
2828
4455
 
2829
4456
# Additional compiler flags for building library objects.
2830
 
pic_flag=$lt_pic_flag
 
4457
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
2831
4458
pic_mode=$pic_mode
2832
4459
 
 
4460
# What is the maximum length of a command?
 
4461
max_cmd_len=$lt_cv_sys_max_cmd_len
 
4462
 
2833
4463
# Does compiler simultaneously support -c and -o options?
2834
 
compiler_c_o=$lt_compiler_c_o
2835
 
 
2836
 
# Can we write directly to a .lo ?
2837
 
compiler_o_lo=$lt_compiler_o_lo
2838
 
 
2839
 
# Must we lock files when doing compilation ?
 
4464
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
 
4465
 
 
4466
# Must we lock files when doing compilation?
2840
4467
need_locks=$lt_need_locks
2841
4468
 
2842
4469
# Do we need the lib prefix for modules?
2855
4482
dlopen_self_static=$enable_dlopen_self_static
2856
4483
 
2857
4484
# Compiler flag to prevent dynamic linking.
2858
 
link_static_flag=$lt_link_static_flag
 
4485
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
2859
4486
 
2860
4487
# Compiler flag to turn off builtin functions.
2861
 
no_builtin_flag=$lt_no_builtin_flag
 
4488
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
2862
4489
 
2863
4490
# Compiler flag to allow reflexive dlopens.
2864
 
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
4491
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
2865
4492
 
2866
4493
# Compiler flag to generate shared objects directly from archives.
2867
 
whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
4494
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
2868
4495
 
2869
4496
# Compiler flag to generate thread-safe objects.
2870
 
thread_safe_flag_spec=$lt_thread_safe_flag_spec
 
4497
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
2871
4498
 
2872
4499
# Library versioning type.
2873
4500
version_type=$version_type
2884
4511
 
2885
4512
# Commands used to build and install an old-style archive.
2886
4513
RANLIB=$lt_RANLIB
2887
 
old_archive_cmds=$lt_old_archive_cmds
 
4514
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
2888
4515
old_postinstall_cmds=$lt_old_postinstall_cmds
2889
4516
old_postuninstall_cmds=$lt_old_postuninstall_cmds
2890
4517
 
2891
4518
# Create an old-style archive from a shared archive.
2892
 
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
4519
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
2893
4520
 
2894
4521
# Create a temporary old-style archive to link instead of a shared archive.
2895
 
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
4522
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
2896
4523
 
2897
4524
# Commands used to build and install a shared archive.
2898
 
archive_cmds=$lt_archive_cmds
2899
 
archive_expsym_cmds=$lt_archive_expsym_cmds
 
4525
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
 
4526
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
2900
4527
postinstall_cmds=$lt_postinstall_cmds
2901
4528
postuninstall_cmds=$lt_postuninstall_cmds
2902
4529
 
 
4530
# Commands used to build a loadable module (assumed same as above if empty)
 
4531
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
 
4532
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
 
4533
 
2903
4534
# Commands to strip libraries.
2904
4535
old_striplib=$lt_old_striplib
2905
4536
striplib=$lt_striplib
2906
4537
 
 
4538
# Dependencies to place before the objects being linked to create a
 
4539
# shared library.
 
4540
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
4541
 
 
4542
# Dependencies to place after the objects being linked to create a
 
4543
# shared library.
 
4544
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
4545
 
 
4546
# Dependencies to place before the objects being linked to create a
 
4547
# shared library.
 
4548
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
 
4549
 
 
4550
# Dependencies to place after the objects being linked to create a
 
4551
# shared library.
 
4552
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
4553
 
 
4554
# The library search path used internally by the compiler when linking
 
4555
# a shared library.
 
4556
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
4557
 
2907
4558
# Method to check whether dependent libraries are shared objects.
2908
4559
deplibs_check_method=$lt_deplibs_check_method
2909
4560
 
2911
4562
file_magic_cmd=$lt_file_magic_cmd
2912
4563
 
2913
4564
# Flag that allows shared libraries with undefined symbols to be built.
2914
 
allow_undefined_flag=$lt_allow_undefined_flag
 
4565
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
2915
4566
 
2916
4567
# Flag that forces no undefined symbols.
2917
 
no_undefined_flag=$lt_no_undefined_flag
 
4568
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
2918
4569
 
2919
4570
# Commands used to finish a libtool library installation in a directory.
2920
4571
finish_cmds=$lt_finish_cmds
2923
4574
finish_eval=$lt_finish_eval
2924
4575
 
2925
4576
# Take the output of nm and produce a listing of raw symbols and C names.
2926
 
global_symbol_pipe=$lt_global_symbol_pipe
 
4577
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
2927
4578
 
2928
4579
# Transform the output of nm in a proper C declaration
2929
 
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
 
4580
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
2930
4581
 
2931
4582
# Transform the output of nm in a C name address pair
2932
 
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
 
4583
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
2933
4584
 
2934
4585
# This is the shared library runtime path variable.
2935
4586
runpath_var=$runpath_var
2941
4592
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2942
4593
 
2943
4594
# How to hardcode a shared library path into an executable.
2944
 
hardcode_action=$hardcode_action
 
4595
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
2945
4596
 
2946
4597
# Whether we should hardcode library paths into libraries.
2947
4598
hardcode_into_libs=$hardcode_into_libs
2948
4599
 
2949
4600
# Flag to hardcode \$libdir into a binary during linking.
2950
4601
# This must work even if \$libdir does not exist.
2951
 
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
4602
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
 
4603
 
 
4604
# If ld is used when linking, flag to hardcode \$libdir into
 
4605
# a binary during linking. This must work even if \$libdir does
 
4606
# not exist.
 
4607
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
2952
4608
 
2953
4609
# Whether we need a single -rpath flag with a separated argument.
2954
 
hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
4610
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
2955
4611
 
2956
 
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
4612
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
2957
4613
# resulting binary.
2958
 
hardcode_direct=$hardcode_direct
 
4614
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
2959
4615
 
2960
4616
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2961
4617
# resulting binary.
2962
 
hardcode_minus_L=$hardcode_minus_L
 
4618
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
2963
4619
 
2964
4620
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2965
4621
# the resulting binary.
2966
 
hardcode_shlibpath_var=$hardcode_shlibpath_var
 
4622
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
 
4623
 
 
4624
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
4625
# and all subsequent libraries and executables linked against it.
 
4626
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
2967
4627
 
2968
4628
# Variables whose values should be saved in libtool wrapper scripts and
2969
4629
# restored at relink time.
2970
4630
variables_saved_for_relink="$variables_saved_for_relink"
2971
4631
 
2972
4632
# Whether libtool must link a program against all its dependency libraries.
2973
 
link_all_deplibs=$link_all_deplibs
 
4633
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
2974
4634
 
2975
4635
# Compile-time system search path for libraries
2976
4636
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
2979
4639
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
2980
4640
 
2981
4641
# Fix the shell variable \$srcfile for the compiler.
2982
 
fix_srcfile_path="$fix_srcfile_path"
 
4642
fix_srcfile_path=$lt_fix_srcfile_path
2983
4643
 
2984
4644
# Set to yes if exported symbols are required.
2985
 
always_export_symbols=$always_export_symbols
 
4645
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
2986
4646
 
2987
4647
# The commands to list exported symbols.
2988
 
export_symbols_cmds=$lt_export_symbols_cmds
 
4648
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
2989
4649
 
2990
4650
# The commands to extract the exported symbol list from a shared archive.
2991
4651
extract_expsyms_cmds=$lt_extract_expsyms_cmds
2992
4652
 
2993
4653
# Symbols that should not be listed in the preloaded symbols.
2994
 
exclude_expsyms=$lt_exclude_expsyms
 
4654
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
2995
4655
 
2996
4656
# Symbols that must always be exported.
2997
 
include_expsyms=$lt_include_expsyms
 
4657
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
2998
4658
 
2999
 
# ### END LIBTOOL CONFIG
 
4659
ifelse([$1],[],
 
4660
[# ### END LIBTOOL CONFIG],
 
4661
[# ### END LIBTOOL TAG CONFIG: $tagname])
3000
4662
 
3001
4663
__EOF__
3002
4664
 
 
4665
ifelse([$1],[], [
3003
4666
  case $host_os in
3004
4667
  aix3*)
3005
 
    cat <<\EOF >> "${ofile}T"
 
4668
    cat <<\EOF >> "$cfgfile"
3006
4669
 
3007
4670
# AIX sometimes has problems with the GCC collect2 program.  For some
3008
4671
# reason, if we set the COLLECT_NAMES environment variable, the problems
3015
4678
    ;;
3016
4679
  esac
3017
4680
 
3018
 
  case $host_os in
3019
 
  cygwin* | mingw* | pw32* | os2*)
3020
 
    cat <<'EOF' >> "${ofile}T"
3021
 
      # This is a source program that is used to create dlls on Windows
3022
 
      # Don't remove nor modify the starting and closing comments
 
4681
  # We use sed instead of cat because bash on DJGPP gets confused if
 
4682
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
4683
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
4684
  # is reportedly fixed, but why not run on old versions too?
 
4685
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
4686
 
 
4687
  mv -f "$cfgfile" "$ofile" || \
 
4688
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
4689
  chmod +x "$ofile"
 
4690
])
 
4691
else
 
4692
  # If there is no Makefile yet, we rely on a make rule to execute
 
4693
  # `config.status --recheck' to rerun these tests and create the
 
4694
  # libtool script then.
 
4695
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
 
4696
  if test -f "$ltmain_in"; then
 
4697
    test -f Makefile && make "$ltmain"
 
4698
  fi
 
4699
fi
 
4700
])# AC_LIBTOOL_CONFIG
 
4701
 
 
4702
 
 
4703
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
4704
# -------------------------------------------
 
4705
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
4706
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
4707
 
 
4708
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4709
 
 
4710
if test "$GCC" = yes; then
 
4711
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4712
 
 
4713
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
4714
    lt_cv_prog_compiler_rtti_exceptions,
 
4715
    [-fno-rtti -fno-exceptions], [],
 
4716
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
4717
fi
 
4718
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
4719
 
 
4720
 
 
4721
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4722
# ---------------------------------
 
4723
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
4724
[AC_REQUIRE([AC_CANONICAL_HOST])
 
4725
AC_REQUIRE([LT_AC_PROG_SED])
 
4726
AC_REQUIRE([AC_PROG_NM])
 
4727
AC_REQUIRE([AC_OBJEXT])
 
4728
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
4729
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
4730
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
4731
[
 
4732
# These are sane defaults that work on at least a few old systems.
 
4733
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
4734
 
 
4735
# Character class describing NM global symbol codes.
 
4736
symcode='[[BCDEGRST]]'
 
4737
 
 
4738
# Regexp to match symbols that can be accessed directly from C.
 
4739
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
4740
 
 
4741
# Transform an extracted symbol line into a proper C declaration
 
4742
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
4743
 
 
4744
# Transform an extracted symbol line into symbol name and symbol address
 
4745
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'"
 
4746
 
 
4747
# Define system-specific variables.
 
4748
case $host_os in
 
4749
aix*)
 
4750
  symcode='[[BCDT]]'
 
4751
  ;;
 
4752
cygwin* | mingw* | pw32*)
 
4753
  symcode='[[ABCDGISTW]]'
 
4754
  ;;
 
4755
hpux*) # Its linker distinguishes data from code symbols
 
4756
  if test "$host_cpu" = ia64; then
 
4757
    symcode='[[ABCDEGRST]]'
 
4758
  fi
 
4759
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4760
  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'"
 
4761
  ;;
 
4762
linux* | k*bsd*-gnu)
 
4763
  if test "$host_cpu" = ia64; then
 
4764
    symcode='[[ABCDGIRSTW]]'
 
4765
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
4766
    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'"
 
4767
  fi
 
4768
  ;;
 
4769
irix* | nonstopux*)
 
4770
  symcode='[[BCDEGRST]]'
 
4771
  ;;
 
4772
osf*)
 
4773
  symcode='[[BCDEGQRST]]'
 
4774
  ;;
 
4775
solaris*)
 
4776
  symcode='[[BDRT]]'
 
4777
  ;;
 
4778
sco3.2v5*)
 
4779
  symcode='[[DT]]'
 
4780
  ;;
 
4781
sysv4.2uw2*)
 
4782
  symcode='[[DT]]'
 
4783
  ;;
 
4784
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
4785
  symcode='[[ABDT]]'
 
4786
  ;;
 
4787
sysv4)
 
4788
  symcode='[[DFNSTU]]'
 
4789
  ;;
 
4790
esac
 
4791
 
 
4792
# Handle CRLF in mingw tool chain
 
4793
opt_cr=
 
4794
case $build_os in
 
4795
mingw*)
 
4796
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
4797
  ;;
 
4798
esac
 
4799
 
 
4800
# If we're using GNU nm, then use its standard symbol codes.
 
4801
case `$NM -V 2>&1` in
 
4802
*GNU* | *'with BFD'*)
 
4803
  symcode='[[ABCDGIRSTW]]' ;;
 
4804
esac
 
4805
 
 
4806
# Try without a prefix undercore, then with it.
 
4807
for ac_symprfx in "" "_"; do
 
4808
 
 
4809
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
4810
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
4811
 
 
4812
  # Write the raw and C identifiers.
 
4813
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
 
4814
 
 
4815
  # Check to see that the pipe works correctly.
 
4816
  pipe_works=no
 
4817
 
 
4818
  rm -f conftest*
 
4819
  cat > conftest.$ac_ext <<EOF
 
4820
#ifdef __cplusplus
 
4821
extern "C" {
 
4822
#endif
 
4823
char nm_test_var;
 
4824
void nm_test_func(){}
 
4825
#ifdef __cplusplus
 
4826
}
 
4827
#endif
 
4828
int main(){nm_test_var='a';nm_test_func();return(0);}
 
4829
EOF
 
4830
 
 
4831
  if AC_TRY_EVAL(ac_compile); then
 
4832
    # Now try to grab the symbols.
 
4833
    nlist=conftest.nm
 
4834
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
4835
      # Try sorting and uniquifying the output.
 
4836
      if sort "$nlist" | uniq > "$nlist"T; then
 
4837
        mv -f "$nlist"T "$nlist"
 
4838
      else
 
4839
        rm -f "$nlist"T
 
4840
      fi
 
4841
 
 
4842
      # Make sure that we snagged all the symbols we need.
 
4843
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
 
4844
        if grep ' nm_test_func$' "$nlist" >/dev/null; then
 
4845
          cat <<EOF > conftest.$ac_ext
 
4846
#ifdef __cplusplus
 
4847
extern "C" {
 
4848
#endif
 
4849
 
 
4850
EOF
 
4851
          # Now generate the symbol file.
 
4852
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
 
4853
 
 
4854
          cat <<EOF >> conftest.$ac_ext
 
4855
#if defined (__STDC__) && __STDC__
 
4856
# define lt_ptr_t void *
 
4857
#else
 
4858
# define lt_ptr_t char *
 
4859
# define const
 
4860
#endif
 
4861
 
 
4862
/* The mapping between symbol names and symbols. */
 
4863
const struct {
 
4864
  const char *name;
 
4865
  lt_ptr_t address;
 
4866
}
 
4867
lt_preloaded_symbols[[]] =
 
4868
{
 
4869
EOF
 
4870
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
 
4871
          cat <<\EOF >> conftest.$ac_ext
 
4872
  {0, (lt_ptr_t) 0}
 
4873
};
 
4874
 
 
4875
#ifdef __cplusplus
 
4876
}
 
4877
#endif
 
4878
EOF
 
4879
          # Now try linking the two files.
 
4880
          mv conftest.$ac_objext conftstm.$ac_objext
 
4881
          lt_save_LIBS="$LIBS"
 
4882
          lt_save_CFLAGS="$CFLAGS"
 
4883
          LIBS="conftstm.$ac_objext"
 
4884
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
4885
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
4886
            pipe_works=yes
 
4887
          fi
 
4888
          LIBS="$lt_save_LIBS"
 
4889
          CFLAGS="$lt_save_CFLAGS"
 
4890
        else
 
4891
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
4892
        fi
 
4893
      else
 
4894
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
4895
      fi
 
4896
    else
 
4897
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
4898
    fi
 
4899
  else
 
4900
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
4901
    cat conftest.$ac_ext >&5
 
4902
  fi
 
4903
  rm -f conftest* conftst*
 
4904
 
 
4905
  # Do not use the global_symbol_pipe unless it works.
 
4906
  if test "$pipe_works" = yes; then
 
4907
    break
 
4908
  else
 
4909
    lt_cv_sys_global_symbol_pipe=
 
4910
  fi
 
4911
done
 
4912
])
 
4913
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
4914
  lt_cv_sys_global_symbol_to_cdecl=
 
4915
fi
 
4916
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
4917
  AC_MSG_RESULT(failed)
 
4918
else
 
4919
  AC_MSG_RESULT(ok)
 
4920
fi
 
4921
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
4922
 
 
4923
 
 
4924
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
4925
# ---------------------------------------
 
4926
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
4927
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
4928
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4929
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
4930
 
 
4931
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
4932
 ifelse([$1],[CXX],[
 
4933
  # C++ specific cases for pic, static, wl, etc.
 
4934
  if test "$GXX" = yes; then
 
4935
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
4936
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
4937
 
 
4938
    case $host_os in
 
4939
    aix*)
 
4940
      # All AIX code is PIC.
 
4941
      if test "$host_cpu" = ia64; then
 
4942
        # AIX 5 now supports IA64 processor
 
4943
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
4944
      fi
 
4945
      ;;
 
4946
    amigaos*)
 
4947
      # FIXME: we need at least 68020 code to build shared libraries, but
 
4948
      # adding the `-m68020' flag to GCC prevents building anything better,
 
4949
      # like `-m68040'.
 
4950
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
4951
      ;;
 
4952
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
4953
      # PIC is the default for these OSes.
 
4954
      ;;
 
4955
    mingw* | cygwin* | os2* | pw32*)
 
4956
      # This hack is so that the source file can tell whether it is being
 
4957
      # built for inclusion in a dll (and should export symbols for example).
 
4958
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
4959
      # (--disable-auto-import) libraries
 
4960
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
4961
      ;;
 
4962
    darwin* | rhapsody*)
 
4963
      # PIC is the default on this platform
 
4964
      # Common symbols not allowed in MH_DYLIB files
 
4965
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
4966
      ;;
 
4967
    *djgpp*)
 
4968
      # DJGPP does not support shared libraries at all
 
4969
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
4970
      ;;
 
4971
    interix[[3-9]]*)
 
4972
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
4973
      # Instead, we relocate shared libraries at runtime.
 
4974
      ;;
 
4975
    sysv4*MP*)
 
4976
      if test -d /usr/nec; then
 
4977
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
4978
      fi
 
4979
      ;;
 
4980
    hpux*)
 
4981
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
4982
      # not for PA HP-UX.
 
4983
      case $host_cpu in
 
4984
      hppa*64*|ia64*)
 
4985
        ;;
 
4986
      *)
 
4987
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4988
        ;;
 
4989
      esac
 
4990
      ;;
 
4991
    *)
 
4992
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
4993
      ;;
 
4994
    esac
 
4995
  else
 
4996
    case $host_os in
 
4997
      aix4* | aix5*)
 
4998
        # All AIX code is PIC.
 
4999
        if test "$host_cpu" = ia64; then
 
5000
          # AIX 5 now supports IA64 processor
 
5001
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5002
        else
 
5003
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5004
        fi
 
5005
        ;;
 
5006
      chorus*)
 
5007
        case $cc_basename in
 
5008
        cxch68*)
 
5009
          # Green Hills C++ Compiler
 
5010
          # _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"
 
5011
          ;;
 
5012
        esac
 
5013
        ;;
 
5014
       darwin*)
 
5015
         # PIC is the default on this platform
 
5016
         # Common symbols not allowed in MH_DYLIB files
 
5017
         case $cc_basename in
 
5018
           xlc*)
 
5019
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
5020
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5021
           ;;
 
5022
         esac
 
5023
       ;;
 
5024
      dgux*)
 
5025
        case $cc_basename in
 
5026
          ec++*)
 
5027
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5028
            ;;
 
5029
          ghcx*)
 
5030
            # Green Hills C++ Compiler
 
5031
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5032
            ;;
 
5033
          *)
 
5034
            ;;
 
5035
        esac
 
5036
        ;;
 
5037
      freebsd* | dragonfly*)
 
5038
        # FreeBSD uses GNU C++
 
5039
        ;;
 
5040
      hpux9* | hpux10* | hpux11*)
 
5041
        case $cc_basename in
 
5042
          CC*)
 
5043
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5044
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5045
            if test "$host_cpu" != ia64; then
 
5046
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5047
            fi
 
5048
            ;;
 
5049
          aCC*)
 
5050
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5051
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5052
            case $host_cpu in
 
5053
            hppa*64*|ia64*)
 
5054
              # +Z the default
 
5055
              ;;
 
5056
            *)
 
5057
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5058
              ;;
 
5059
            esac
 
5060
            ;;
 
5061
          *)
 
5062
            ;;
 
5063
        esac
 
5064
        ;;
 
5065
      interix*)
 
5066
        # This is c89, which is MS Visual C++ (no shared libs)
 
5067
        # Anyone wants to do a port?
 
5068
        ;;
 
5069
      irix5* | irix6* | nonstopux*)
 
5070
        case $cc_basename in
 
5071
          CC*)
 
5072
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5073
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5074
            # CC pic flag -KPIC is the default.
 
5075
            ;;
 
5076
          *)
 
5077
            ;;
 
5078
        esac
 
5079
        ;;
 
5080
      linux* | k*bsd*-gnu)
 
5081
        case $cc_basename in
 
5082
          KCC*)
 
5083
            # KAI C++ Compiler
 
5084
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5085
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5086
            ;;
 
5087
          icpc* | ecpc*)
 
5088
            # Intel C++
 
5089
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5090
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5091
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5092
            ;;
 
5093
          pgCC*)
 
5094
            # Portland Group C++ compiler.
 
5095
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5096
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5097
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5098
            ;;
 
5099
          cxx*)
 
5100
            # Compaq C++
 
5101
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5102
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5103
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5104
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5105
            ;;
 
5106
          *)
 
5107
            case `$CC -V 2>&1 | sed 5q` in
 
5108
            *Sun\ C*)
 
5109
              # Sun C++ 5.9
 
5110
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5111
              _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5112
              _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5113
              ;;
 
5114
            esac
 
5115
            ;;
 
5116
        esac
 
5117
        ;;
 
5118
      lynxos*)
 
5119
        ;;
 
5120
      m88k*)
 
5121
        ;;
 
5122
      mvs*)
 
5123
        case $cc_basename in
 
5124
          cxx*)
 
5125
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
5126
            ;;
 
5127
          *)
 
5128
            ;;
 
5129
        esac
 
5130
        ;;
 
5131
      netbsd*)
 
5132
        ;;
 
5133
      osf3* | osf4* | osf5*)
 
5134
        case $cc_basename in
 
5135
          KCC*)
 
5136
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
5137
            ;;
 
5138
          RCC*)
 
5139
            # Rational C++ 2.4.1
 
5140
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5141
            ;;
 
5142
          cxx*)
 
5143
            # Digital/Compaq C++
 
5144
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5145
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
5146
            # Linux and Compaq Tru64 Unix objects are PIC.
 
5147
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5148
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5149
            ;;
 
5150
          *)
 
5151
            ;;
 
5152
        esac
 
5153
        ;;
 
5154
      psos*)
 
5155
        ;;
 
5156
      solaris*)
 
5157
        case $cc_basename in
 
5158
          CC*)
 
5159
            # Sun C++ 4.2, 5.x and Centerline C++
 
5160
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5161
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5162
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5163
            ;;
 
5164
          gcx*)
 
5165
            # Green Hills C++ Compiler
 
5166
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5167
            ;;
 
5168
          *)
 
5169
            ;;
 
5170
        esac
 
5171
        ;;
 
5172
      sunos4*)
 
5173
        case $cc_basename in
 
5174
          CC*)
 
5175
            # Sun C++ 4.x
 
5176
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5177
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5178
            ;;
 
5179
          lcc*)
 
5180
            # Lucid
 
5181
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5182
            ;;
 
5183
          *)
 
5184
            ;;
 
5185
        esac
 
5186
        ;;
 
5187
      tandem*)
 
5188
        case $cc_basename in
 
5189
          NCC*)
 
5190
            # NonStop-UX NCC 3.20
 
5191
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5192
            ;;
 
5193
          *)
 
5194
            ;;
 
5195
        esac
 
5196
        ;;
 
5197
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5198
        case $cc_basename in
 
5199
          CC*)
 
5200
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5201
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5202
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5203
            ;;
 
5204
        esac
 
5205
        ;;
 
5206
      vxworks*)
 
5207
        ;;
 
5208
      *)
 
5209
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5210
        ;;
 
5211
    esac
 
5212
  fi
 
5213
],
 
5214
[
 
5215
  if test "$GCC" = yes; then
 
5216
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5217
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5218
 
 
5219
    case $host_os in
 
5220
      aix*)
 
5221
      # All AIX code is PIC.
 
5222
      if test "$host_cpu" = ia64; then
 
5223
        # AIX 5 now supports IA64 processor
 
5224
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5225
      fi
 
5226
      ;;
 
5227
 
 
5228
    amigaos*)
 
5229
      # FIXME: we need at least 68020 code to build shared libraries, but
 
5230
      # adding the `-m68020' flag to GCC prevents building anything better,
 
5231
      # like `-m68040'.
 
5232
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
5233
      ;;
 
5234
 
 
5235
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
5236
      # PIC is the default for these OSes.
 
5237
      ;;
 
5238
 
 
5239
    mingw* | cygwin* | pw32* | os2*)
 
5240
      # This hack is so that the source file can tell whether it is being
 
5241
      # built for inclusion in a dll (and should export symbols for example).
 
5242
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
 
5243
      # (--disable-auto-import) libraries
 
5244
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5245
      ;;
 
5246
 
 
5247
    darwin* | rhapsody*)
 
5248
      # PIC is the default on this platform
 
5249
      # Common symbols not allowed in MH_DYLIB files
 
5250
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
5251
      ;;
 
5252
 
 
5253
    interix[[3-9]]*)
 
5254
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5255
      # Instead, we relocate shared libraries at runtime.
 
5256
      ;;
 
5257
 
 
5258
    msdosdjgpp*)
 
5259
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
5260
      # on systems that don't support them.
 
5261
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5262
      enable_shared=no
 
5263
      ;;
 
5264
 
 
5265
    sysv4*MP*)
 
5266
      if test -d /usr/nec; then
 
5267
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
5268
      fi
 
5269
      ;;
 
5270
 
 
5271
    hpux*)
 
5272
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5273
      # not for PA HP-UX.
 
5274
      case $host_cpu in
 
5275
      hppa*64*|ia64*)
 
5276
        # +Z the default
 
5277
        ;;
 
5278
      *)
 
5279
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5280
        ;;
 
5281
      esac
 
5282
      ;;
 
5283
 
 
5284
    *)
 
5285
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
5286
      ;;
 
5287
    esac
 
5288
  else
 
5289
    # PORTME Check for flag to pass linker flags through the system compiler.
 
5290
    case $host_os in
 
5291
    aix*)
 
5292
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5293
      if test "$host_cpu" = ia64; then
 
5294
        # AIX 5 now supports IA64 processor
 
5295
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5296
      else
 
5297
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
5298
      fi
 
5299
      ;;
 
5300
      darwin*)
 
5301
        # PIC is the default on this platform
 
5302
        # Common symbols not allowed in MH_DYLIB files
 
5303
       case $cc_basename in
 
5304
         xlc*)
 
5305
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
5306
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5307
         ;;
 
5308
       esac
 
5309
       ;;
 
5310
 
 
5311
    mingw* | cygwin* | pw32* | os2*)
 
5312
      # This hack is so that the source file can tell whether it is being
 
5313
      # built for inclusion in a dll (and should export symbols for example).
 
5314
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
5315
      ;;
 
5316
 
 
5317
    hpux9* | hpux10* | hpux11*)
 
5318
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5319
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
5320
      # not for PA HP-UX.
 
5321
      case $host_cpu in
 
5322
      hppa*64*|ia64*)
 
5323
        # +Z the default
 
5324
        ;;
 
5325
      *)
 
5326
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
5327
        ;;
 
5328
      esac
 
5329
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
5330
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5331
      ;;
 
5332
 
 
5333
    irix5* | irix6* | nonstopux*)
 
5334
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5335
      # PIC (with -KPIC) is the default.
 
5336
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5337
      ;;
 
5338
 
 
5339
    newsos6)
 
5340
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5341
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5342
      ;;
 
5343
 
 
5344
    linux* | k*bsd*-gnu)
 
5345
      case $cc_basename in
 
5346
      icc* | ecc*)
 
5347
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5348
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5349
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
5350
        ;;
 
5351
      pgcc* | pgf77* | pgf90* | pgf95*)
 
5352
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
5353
        # which looks to be a dead project)
 
5354
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5355
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5356
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5357
        ;;
 
5358
      ccc*)
 
5359
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5360
        # All Alpha code is PIC.
 
5361
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5362
        ;;
 
5363
      *)
 
5364
        case `$CC -V 2>&1 | sed 5q` in
 
5365
        *Sun\ C*)
 
5366
          # Sun C 5.9
 
5367
          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5368
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5369
          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5370
          ;;
 
5371
        *Sun\ F*)
 
5372
          # Sun Fortran 8.3 passes all unrecognized flags to the linker
 
5373
          _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5374
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5375
          _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
 
5376
          ;;
 
5377
        esac
 
5378
        ;;
 
5379
      esac
 
5380
      ;;
 
5381
 
 
5382
    osf3* | osf4* | osf5*)
 
5383
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5384
      # All OSF/1 code is PIC.
 
5385
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5386
      ;;
 
5387
 
 
5388
    rdos*)
 
5389
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
5390
      ;;
 
5391
 
 
5392
    solaris*)
 
5393
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5394
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5395
      case $cc_basename in
 
5396
      f77* | f90* | f95*)
 
5397
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
5398
      *)
 
5399
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
5400
      esac
 
5401
      ;;
 
5402
 
 
5403
    sunos4*)
 
5404
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
5405
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
5406
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5407
      ;;
 
5408
 
 
5409
    sysv4 | sysv4.2uw2* | sysv4.3*)
 
5410
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5411
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5412
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5413
      ;;
 
5414
 
 
5415
    sysv4*MP*)
 
5416
      if test -d /usr/nec ;then
 
5417
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
5418
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5419
      fi
 
5420
      ;;
 
5421
 
 
5422
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5423
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5424
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5425
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5426
      ;;
 
5427
 
 
5428
    unicos*)
 
5429
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5430
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5431
      ;;
 
5432
 
 
5433
    uts4*)
 
5434
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
5435
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5436
      ;;
 
5437
 
 
5438
    *)
 
5439
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
5440
      ;;
 
5441
    esac
 
5442
  fi
 
5443
])
 
5444
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
5445
 
 
5446
#
 
5447
# Check to make sure the PIC flag actually works.
 
5448
#
 
5449
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
5450
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
5451
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
 
5452
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
 
5453
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
5454
     "" | " "*) ;;
 
5455
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
5456
     esac],
 
5457
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5458
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
5459
fi
 
5460
case $host_os in
 
5461
  # For platforms which do not support PIC, -DPIC is meaningless:
 
5462
  *djgpp*)
 
5463
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
5464
    ;;
 
5465
  *)
 
5466
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
 
5467
    ;;
 
5468
esac
 
5469
 
 
5470
#
 
5471
# Check to make sure the static flag actually works.
 
5472
#
 
5473
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
 
5474
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
5475
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
5476
  $lt_tmp_static_flag,
 
5477
  [],
 
5478
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
5479
])
 
5480
 
 
5481
 
 
5482
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
5483
# ------------------------------------
 
5484
# See if the linker supports building shared libraries.
 
5485
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
5486
[AC_REQUIRE([LT_AC_PROG_SED])dnl
 
5487
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
5488
ifelse([$1],[CXX],[
 
5489
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5490
  case $host_os in
 
5491
  aix4* | aix5*)
 
5492
    # If we're using GNU nm, then we don't want the "-C" option.
 
5493
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5494
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5495
      _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'
 
5496
    else
 
5497
      _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'
 
5498
    fi
 
5499
    ;;
 
5500
  pw32*)
 
5501
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
5502
  ;;
 
5503
  cygwin* | mingw*)
 
5504
    _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'
 
5505
  ;;
 
5506
  *)
 
5507
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5508
  ;;
 
5509
  esac
 
5510
],[
 
5511
  runpath_var=
 
5512
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5513
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5514
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
5515
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5516
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
 
5517
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
5518
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5519
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5520
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
5521
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5522
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5523
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5524
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5525
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5526
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5527
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5528
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5529
  _LT_AC_TAGVAR(module_cmds, $1)=
 
5530
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5531
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5532
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
5533
  # include_expsyms should be a list of space-separated symbols to be *always*
 
5534
  # included in the symbol list
 
5535
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
5536
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
5537
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
5538
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
5539
  # as well as any symbol that contains `d'.
 
5540
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
5541
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
5542
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
5543
  # the symbol is explicitly referenced.  Since portable code cannot
 
5544
  # rely on this symbol name, it's probably fine to never include it in
 
5545
  # preloaded symbol tables.
 
5546
  extract_expsyms_cmds=
 
5547
  # Just being paranoid about ensuring that cc_basename is set.
 
5548
  _LT_CC_BASENAME([$compiler])
 
5549
  case $host_os in
 
5550
  cygwin* | mingw* | pw32*)
 
5551
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
5552
    # When not using gcc, we currently assume that we are using
 
5553
    # Microsoft Visual C++.
 
5554
    if test "$GCC" != yes; then
 
5555
      with_gnu_ld=no
 
5556
    fi
 
5557
    ;;
 
5558
  interix*)
 
5559
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
5560
    with_gnu_ld=yes
 
5561
    ;;
 
5562
  openbsd*)
 
5563
    with_gnu_ld=no
 
5564
    ;;
 
5565
  esac
 
5566
 
 
5567
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5568
  if test "$with_gnu_ld" = yes; then
 
5569
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
5570
    wlarc='${wl}'
 
5571
 
 
5572
    # Set some defaults for GNU ld with shared library support. These
 
5573
    # are reset later if shared libraries are not supported. Putting them
 
5574
    # here allows them to be overridden if necessary.
 
5575
    runpath_var=LD_RUN_PATH
 
5576
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
5577
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
5578
    # ancient GNU ld didn't support --whole-archive et. al.
 
5579
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
5580
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5581
      else
 
5582
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5583
    fi
 
5584
    supports_anon_versioning=no
 
5585
    case `$LD -v 2>/dev/null` in
 
5586
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
5587
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
5588
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
5589
      *\ 2.11.*) ;; # other 2.11 versions
 
5590
      *) supports_anon_versioning=yes ;;
 
5591
    esac
 
5592
 
 
5593
    # See if GNU ld supports shared libraries.
 
5594
    case $host_os in
 
5595
    aix3* | aix4* | aix5*)
 
5596
      # On AIX/PPC, the GNU linker is very broken
 
5597
      if test "$host_cpu" != ia64; then
 
5598
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5599
        cat <<EOF 1>&2
 
5600
 
 
5601
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
5602
*** to be unable to reliably create shared libraries on AIX.
 
5603
*** Therefore, libtool is disabling shared libraries support.  If you
 
5604
*** really care for shared libraries, you may want to modify your PATH
 
5605
*** so that a non-GNU linker is found, and then restart.
 
5606
 
 
5607
EOF
 
5608
      fi
 
5609
      ;;
 
5610
 
 
5611
    amigaos*)
 
5612
      _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)'
 
5613
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5614
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5615
 
 
5616
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
5617
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
5618
      # to version 4, is to share data among multiple programs linked
 
5619
      # with the same dynamic library.  Since this doesn't match the
 
5620
      # behavior of shared libraries on other platforms, we can't use
 
5621
      # them.
 
5622
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5623
      ;;
 
5624
 
 
5625
    beos*)
 
5626
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5627
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5628
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
5629
        # support --undefined.  This deserves some investigation.  FIXME
 
5630
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5631
      else
 
5632
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5633
      fi
 
5634
      ;;
 
5635
 
 
5636
    cygwin* | mingw* | pw32*)
 
5637
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
5638
      # as there is no search path for DLLs.
 
5639
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5640
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5641
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5642
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5643
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
 
5644
 
 
5645
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
 
5646
        _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'
 
5647
        # If the export-symbols file already is a .def file (1st line
 
5648
        # is EXPORTS), use it as is; otherwise, prepend...
 
5649
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
5650
          cp $export_symbols $output_objdir/$soname.def;
 
5651
        else
 
5652
          echo EXPORTS > $output_objdir/$soname.def;
 
5653
          cat $export_symbols >> $output_objdir/$soname.def;
 
5654
        fi~
 
5655
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
5656
      else
 
5657
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5658
      fi
 
5659
      ;;
 
5660
 
 
5661
    interix[[3-9]]*)
 
5662
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5663
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5664
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5665
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5666
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
5667
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
5668
      # default) and relocated if they conflict, which is a slow very memory
 
5669
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
5670
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
5671
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
5672
      _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'
 
5673
      _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'
 
5674
      ;;
 
5675
 
 
5676
    gnu* | linux* | k*bsd*-gnu)
 
5677
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5678
        tmp_addflag=
 
5679
        case $cc_basename,$host_cpu in
 
5680
        pgcc*)                          # Portland Group C compiler
 
5681
          _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'
 
5682
          tmp_addflag=' $pic_flag'
 
5683
          ;;
 
5684
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
5685
          _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'
 
5686
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
5687
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
5688
          tmp_addflag=' -i_dynamic' ;;
 
5689
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
5690
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
5691
        ifc* | ifort*)                  # Intel Fortran compiler
 
5692
          tmp_addflag=' -nofor_main' ;;
 
5693
        esac
 
5694
        case `$CC -V 2>&1 | sed 5q` in
 
5695
        *Sun\ C*)                       # Sun C 5.9
 
5696
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
5697
          tmp_sharedflag='-G' ;;
 
5698
        *Sun\ F*)                       # Sun Fortran 8.3
 
5699
          tmp_sharedflag='-G' ;;
 
5700
        *)
 
5701
          tmp_sharedflag='-shared' ;;
 
5702
        esac
 
5703
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5704
 
 
5705
        if test $supports_anon_versioning = yes; then
 
5706
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
5707
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
5708
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
5709
          $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
5710
        fi
 
5711
      else
 
5712
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5713
      fi
 
5714
      ;;
 
5715
 
 
5716
    netbsd*)
 
5717
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
5718
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
5719
        wlarc=
 
5720
      else
 
5721
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5722
        _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'
 
5723
      fi
 
5724
      ;;
 
5725
 
 
5726
    solaris*)
 
5727
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
 
5728
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5729
        cat <<EOF 1>&2
 
5730
 
 
5731
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
5732
*** create shared libraries on Solaris systems.  Therefore, libtool
 
5733
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5734
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
5735
*** your PATH or compiler configuration so that the native linker is
 
5736
*** used, and then restart.
 
5737
 
 
5738
EOF
 
5739
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5740
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5741
        _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'
 
5742
      else
 
5743
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5744
      fi
 
5745
      ;;
 
5746
 
 
5747
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
5748
      case `$LD -v 2>&1` in
 
5749
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
 
5750
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5751
        cat <<_LT_EOF 1>&2
 
5752
 
 
5753
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
5754
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
5755
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
5756
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
5757
*** your PATH or compiler configuration so that the native linker is
 
5758
*** used, and then restart.
 
5759
 
 
5760
_LT_EOF
 
5761
        ;;
 
5762
        *)
 
5763
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5764
            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
 
5765
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
 
5766
            _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'
 
5767
          else
 
5768
            _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5769
          fi
 
5770
        ;;
 
5771
      esac
 
5772
      ;;
 
5773
 
 
5774
    sunos4*)
 
5775
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
5776
      wlarc=
 
5777
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5778
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5779
      ;;
 
5780
 
 
5781
    *)
 
5782
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
5783
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5784
        _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'
 
5785
      else
 
5786
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5787
      fi
 
5788
      ;;
 
5789
    esac
 
5790
 
 
5791
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
5792
      runpath_var=
 
5793
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5794
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5795
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5796
    fi
 
5797
  else
 
5798
    # PORTME fill in a description of your system's linker (not GNU ld)
 
5799
    case $host_os in
 
5800
    aix3*)
 
5801
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5802
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5803
      _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'
 
5804
      # Note: this linker hardcodes the directories in LIBPATH if there
 
5805
      # are no directories specified by -L.
 
5806
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5807
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
 
5808
        # Neither direct hardcoding nor static linking is supported with a
 
5809
        # broken collect2.
 
5810
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5811
      fi
 
5812
      ;;
 
5813
 
 
5814
    aix4* | aix5*)
 
5815
      if test "$host_cpu" = ia64; then
 
5816
        # On IA64, the linker does run time linking by default, so we don't
 
5817
        # have to do anything special.
 
5818
        aix_use_runtimelinking=no
 
5819
        exp_sym_flag='-Bexport'
 
5820
        no_entry_flag=""
 
5821
      else
 
5822
        # If we're using GNU nm, then we don't want the "-C" option.
 
5823
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
5824
        if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
 
5825
          _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'
 
5826
        else
 
5827
          _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'
 
5828
        fi
 
5829
        aix_use_runtimelinking=no
 
5830
 
 
5831
        # Test if we are trying to use run time linking or normal
 
5832
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
5833
        # need to do runtime linking.
 
5834
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
5835
          for ld_flag in $LDFLAGS; do
 
5836
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
5837
            aix_use_runtimelinking=yes
 
5838
            break
 
5839
          fi
 
5840
          done
 
5841
          ;;
 
5842
        esac
 
5843
 
 
5844
        exp_sym_flag='-bexport'
 
5845
        no_entry_flag='-bnoentry'
 
5846
      fi
 
5847
 
 
5848
      # When large executables or shared objects are built, AIX ld can
 
5849
      # have problems creating the table of contents.  If linking a library
 
5850
      # or program results in "error TOC overflow" add -mminimal-toc to
 
5851
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
5852
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
5853
 
 
5854
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
5855
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5856
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
5857
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5858
 
 
5859
      if test "$GCC" = yes; then
 
5860
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
5861
        # We only want to do this on AIX 4.2 and lower, the check
 
5862
        # below for broken collect2 doesn't work under 4.3+
 
5863
          collect2name=`${CC} -print-prog-name=collect2`
 
5864
          if test -f "$collect2name" && \
 
5865
           strings "$collect2name" | grep resolve_lib_name >/dev/null
 
5866
          then
 
5867
          # We have reworked collect2
 
5868
          :
 
5869
          else
 
5870
          # We have old collect2
 
5871
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
5872
          # It fails to find uninstalled libraries when the uninstalled
 
5873
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
5874
          # to unsupported forces relinking
 
5875
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5876
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5877
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5878
          fi
 
5879
          ;;
 
5880
        esac
 
5881
        shared_flag='-shared'
 
5882
        if test "$aix_use_runtimelinking" = yes; then
 
5883
          shared_flag="$shared_flag "'${wl}-G'
 
5884
        fi
 
5885
      else
 
5886
        # not using gcc
 
5887
        if test "$host_cpu" = ia64; then
 
5888
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
5889
        # chokes on -Wl,-G. The following line is correct:
 
5890
          shared_flag='-G'
 
5891
        else
 
5892
          if test "$aix_use_runtimelinking" = yes; then
 
5893
            shared_flag='${wl}-G'
 
5894
          else
 
5895
            shared_flag='${wl}-bM:SRE'
 
5896
          fi
 
5897
        fi
 
5898
      fi
 
5899
 
 
5900
      # It seems that -bexpall does not export symbols beginning with
 
5901
      # underscore (_), so it is better to generate a list of symbols to export.
 
5902
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
5903
      if test "$aix_use_runtimelinking" = yes; then
 
5904
        # Warning - without using the other runtime loading flags (-brtl),
 
5905
        # -berok will link without error, but may produce a broken library.
 
5906
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
5907
       # Determine the default libpath from the value encoded in an empty executable.
 
5908
       _LT_AC_SYS_LIBPATH_AIX
 
5909
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5910
        _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"
 
5911
       else
 
5912
        if test "$host_cpu" = ia64; then
 
5913
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
5914
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
5915
          _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"
 
5916
        else
 
5917
         # Determine the default libpath from the value encoded in an empty executable.
 
5918
         _LT_AC_SYS_LIBPATH_AIX
 
5919
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
5920
          # Warning - without using the other run time loading flags,
 
5921
          # -berok will link without error, but may produce a broken library.
 
5922
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
5923
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
5924
          # Exported symbols can be pulled into shared objects from archives
 
5925
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 
5926
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
5927
          # This is similar to how AIX traditionally builds its shared libraries.
 
5928
          _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'
 
5929
        fi
 
5930
      fi
 
5931
      ;;
 
5932
 
 
5933
    amigaos*)
 
5934
      _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)'
 
5935
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
5936
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
5937
      # see comment about different semantics on the GNU ld section
 
5938
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5939
      ;;
 
5940
 
 
5941
    bsdi[[45]]*)
 
5942
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
5943
      ;;
 
5944
 
 
5945
    cygwin* | mingw* | pw32*)
 
5946
      # When not using gcc, we currently assume that we are using
 
5947
      # Microsoft Visual C++.
 
5948
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
5949
      # no search path for DLLs.
 
5950
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
5951
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
5952
      # Tell ltmain to make .lib files, not .a files.
 
5953
      libext=lib
 
5954
      # Tell ltmain to make .dll files, not .so files.
 
5955
      shrext_cmds=".dll"
 
5956
      # FIXME: Setting linknames here is a bad hack.
 
5957
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
5958
      # The linker will automatically build a .lib file if we build a DLL.
 
5959
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
 
5960
      # FIXME: Should let the user specify the lib program.
 
5961
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
 
5962
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
 
5963
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
5964
      ;;
 
5965
 
 
5966
    darwin* | rhapsody*)
 
5967
      case $host_os in
 
5968
        rhapsody* | darwin1.[[012]])
 
5969
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
5970
         ;;
 
5971
       *) # Darwin 1.3 on
 
5972
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
5973
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5974
         else
 
5975
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
5976
             10.[[012]])
 
5977
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
5978
               ;;
 
5979
             10.*)
 
5980
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
5981
               ;;
 
5982
           esac
 
5983
         fi
 
5984
         ;;
 
5985
      esac
 
5986
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5987
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5988
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
5989
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
5990
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
5991
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5992
    if test "$GCC" = yes ; then
 
5993
        output_verbose_link_cmd='echo'
 
5994
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
5995
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
5996
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
5997
      _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}'
 
5998
      _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}'
 
5999
    else
 
6000
      case $cc_basename in
 
6001
        xlc*)
 
6002
         output_verbose_link_cmd='echo'
 
6003
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
 
6004
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
6005
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
6006
         _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 $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
6007
          _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}'
 
6008
          ;;
 
6009
       *)
 
6010
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6011
          ;;
 
6012
      esac
 
6013
    fi
 
6014
      ;;
 
6015
 
 
6016
    dgux*)
 
6017
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6018
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6019
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6020
      ;;
 
6021
 
 
6022
    freebsd1*)
 
6023
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6024
      ;;
 
6025
 
 
6026
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
6027
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
6028
    # does not break anything, and helps significantly (at the cost of a little
 
6029
    # extra space).
 
6030
    freebsd2.2*)
 
6031
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
6032
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6033
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6034
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6035
      ;;
 
6036
 
 
6037
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
6038
    freebsd2*)
 
6039
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6040
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6041
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6042
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6043
      ;;
 
6044
 
 
6045
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
6046
    freebsd* | dragonfly*)
 
6047
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
6048
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6049
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6050
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6051
      ;;
 
6052
 
 
6053
    hpux9*)
 
6054
      if test "$GCC" = yes; then
 
6055
        _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'
 
6056
      else
 
6057
        _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'
 
6058
      fi
 
6059
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6060
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6061
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6062
 
 
6063
      # hardcode_minus_L: Not really in the search PATH,
 
6064
      # but as the default location of the library.
 
6065
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6066
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6067
      ;;
 
6068
 
 
6069
    hpux10*)
 
6070
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6071
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6072
      else
 
6073
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6074
      fi
 
6075
      if test "$with_gnu_ld" = no; then
 
6076
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6077
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6078
 
 
6079
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6080
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6081
 
 
6082
        # hardcode_minus_L: Not really in the search PATH,
 
6083
        # but as the default location of the library.
 
6084
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6085
      fi
 
6086
      ;;
 
6087
 
 
6088
    hpux11*)
 
6089
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6090
        case $host_cpu in
 
6091
        hppa*64*)
 
6092
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6093
          ;;
 
6094
        ia64*)
 
6095
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6096
          ;;
 
6097
        *)
 
6098
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6099
          ;;
 
6100
        esac
 
6101
      else
 
6102
        case $host_cpu in
 
6103
        hppa*64*)
 
6104
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6105
          ;;
 
6106
        ia64*)
 
6107
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6108
          ;;
 
6109
        *)
 
6110
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6111
          ;;
 
6112
        esac
 
6113
      fi
 
6114
      if test "$with_gnu_ld" = no; then
 
6115
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6116
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6117
 
 
6118
        case $host_cpu in
 
6119
        hppa*64*|ia64*)
 
6120
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
6121
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6122
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6123
          ;;
 
6124
        *)
 
6125
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6126
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6127
 
 
6128
          # hardcode_minus_L: Not really in the search PATH,
 
6129
          # but as the default location of the library.
 
6130
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6131
          ;;
 
6132
        esac
 
6133
      fi
 
6134
      ;;
 
6135
 
 
6136
    irix5* | irix6* | nonstopux*)
 
6137
      if test "$GCC" = yes; then
 
6138
        _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'
 
6139
      else
 
6140
        _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'
 
6141
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
 
6142
      fi
 
6143
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6144
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6145
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6146
      ;;
 
6147
 
 
6148
    netbsd*)
 
6149
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
6150
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
6151
      else
 
6152
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
6153
      fi
 
6154
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6155
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6156
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6157
      ;;
 
6158
 
 
6159
    newsos6)
 
6160
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6161
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6162
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6163
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6164
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6165
      ;;
 
6166
 
 
6167
    openbsd*)
 
6168
      if test -f /usr/libexec/ld.so; then
 
6169
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6170
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6171
        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
6172
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6173
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
6174
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6175
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6176
        else
 
6177
          case $host_os in
 
6178
           openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
6179
             _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
6180
             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6181
             ;;
 
6182
           *)
 
6183
             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6184
             _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6185
             ;;
 
6186
          esac
 
6187
        fi
 
6188
      else
 
6189
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6190
      fi
 
6191
      ;;
 
6192
 
 
6193
    os2*)
 
6194
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6195
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6196
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
6197
      _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'
 
6198
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
6199
      ;;
 
6200
 
 
6201
    osf3*)
 
6202
      if test "$GCC" = yes; then
 
6203
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6204
        _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'
 
6205
      else
 
6206
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6207
        _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'
 
6208
      fi
 
6209
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6210
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6211
      ;;
 
6212
 
 
6213
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
6214
      if test "$GCC" = yes; then
 
6215
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
6216
        _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'
 
6217
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
6218
      else
 
6219
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
6220
        _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'
 
6221
        _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~
 
6222
        $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'
 
6223
 
 
6224
        # Both c and cxx compiler support -rpath directly
 
6225
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
6226
      fi
 
6227
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6228
      ;;
 
6229
 
 
6230
    solaris*)
 
6231
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
6232
      if test "$GCC" = yes; then
 
6233
        wlarc='${wl}'
 
6234
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6235
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6236
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
6237
      else
 
6238
        wlarc=''
 
6239
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6240
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
6241
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
6242
      fi
 
6243
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
6244
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6245
      case $host_os in
 
6246
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
6247
      *)
 
6248
        # The compiler driver will combine and reorder linker options,
 
6249
        # but understands `-z linker_flag'.  GCC discards it without `$wl',
 
6250
        # but is careful enough not to reorder.
 
6251
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6252
        if test "$GCC" = yes; then
 
6253
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
6254
        else
 
6255
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 
6256
        fi
 
6257
        ;;
 
6258
      esac
 
6259
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6260
      ;;
 
6261
 
 
6262
    sunos4*)
 
6263
      if test "x$host_vendor" = xsequent; then
 
6264
        # Use $CC to link under sequent, because it throws in some extra .o
 
6265
        # files that make .init and .fini sections work.
 
6266
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
6267
      else
 
6268
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
6269
      fi
 
6270
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6271
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6272
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6273
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6274
      ;;
 
6275
 
 
6276
    sysv4)
 
6277
      case $host_vendor in
 
6278
        sni)
 
6279
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6280
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
6281
        ;;
 
6282
        siemens)
 
6283
          ## LD is ld it makes a PLAMLIB
 
6284
          ## CC just makes a GrossModule.
 
6285
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
6286
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
6287
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6288
        ;;
 
6289
        motorola)
 
6290
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6291
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
6292
        ;;
 
6293
      esac
 
6294
      runpath_var='LD_RUN_PATH'
 
6295
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6296
      ;;
 
6297
 
 
6298
    sysv4.3*)
 
6299
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6300
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6301
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
6302
      ;;
 
6303
 
 
6304
    sysv4*MP*)
 
6305
      if test -d /usr/nec; then
 
6306
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6307
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6308
        runpath_var=LD_RUN_PATH
 
6309
        hardcode_runpath_var=yes
 
6310
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
6311
      fi
 
6312
      ;;
 
6313
 
 
6314
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
6315
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6316
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6317
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6318
      runpath_var='LD_RUN_PATH'
 
6319
 
 
6320
      if test "$GCC" = yes; then
 
6321
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6322
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6323
      else
 
6324
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6325
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6326
      fi
 
6327
      ;;
 
6328
 
 
6329
    sysv5* | sco3.2v5* | sco5v6*)
 
6330
      # Note: We can NOT use -z defs as we might desire, because we do not
 
6331
      # link with -lc, and that would cause any symbols used from libc to
 
6332
      # always be unresolved, which means just about no library would
 
6333
      # ever link correctly.  If we're not using GNU ld we use -z text
 
6334
      # though, which does catch some bad symbols but isn't as heavy-handed
 
6335
      # as -z defs.
 
6336
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6337
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
6338
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6339
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6340
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
6341
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
6342
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6343
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
6344
      runpath_var='LD_RUN_PATH'
 
6345
 
 
6346
      if test "$GCC" = yes; then
 
6347
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6348
        _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'
 
6349
      else
 
6350
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6351
        _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'
 
6352
      fi
 
6353
      ;;
 
6354
 
 
6355
    uts4*)
 
6356
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6357
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
6358
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6359
      ;;
 
6360
 
 
6361
    *)
 
6362
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6363
      ;;
 
6364
    esac
 
6365
  fi
 
6366
])
 
6367
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
6368
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
6369
 
 
6370
#
 
6371
# Do we need to explicitly link libc?
 
6372
#
 
6373
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
6374
x|xyes)
 
6375
  # Assume -lc should be added
 
6376
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6377
 
 
6378
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
6379
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
6380
    *'~'*)
 
6381
      # FIXME: we may have to deal with multi-command sequences.
 
6382
      ;;
 
6383
    '$CC '*)
 
6384
      # Test whether the compiler implicitly links with -lc since on some
 
6385
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
6386
      # to ld, don't add -lc before -lgcc.
 
6387
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
6388
      $rm conftest*
 
6389
      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
6390
 
 
6391
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
6392
        soname=conftest
 
6393
        lib=conftest
 
6394
        libobjs=conftest.$ac_objext
 
6395
        deplibs=
 
6396
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
6397
        pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
 
6398
        compiler_flags=-v
 
6399
        linker_flags=-v
 
6400
        verstring=
 
6401
        output_objdir=.
 
6402
        libname=conftest
 
6403
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
6404
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
6405
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
6406
        then
 
6407
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6408
        else
 
6409
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
6410
        fi
 
6411
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
6412
      else
 
6413
        cat conftest.err 1>&5
 
6414
      fi
 
6415
      $rm conftest*
 
6416
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
6417
      ;;
 
6418
    esac
 
6419
  fi
 
6420
  ;;
 
6421
esac
 
6422
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
6423
 
 
6424
 
 
6425
# _LT_AC_FILE_LTDLL_C
 
6426
# -------------------
 
6427
# Be careful that the start marker always follows a newline.
 
6428
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
3023
6429
# /* ltdll.c starts here */
3024
6430
# #define WIN32_LEAN_AND_MEAN
3025
6431
# #include <windows.h>
3053
6459
#   return TRUE;
3054
6460
# }
3055
6461
# /* ltdll.c ends here */
3056
 
        # This is a source program that is used to create import libraries
3057
 
        # on Windows for dlls which lack them. Don't remove nor modify the
3058
 
        # starting and closing comments
3059
 
# /* impgen.c starts here */
3060
 
# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3061
 
#
3062
 
#  This file is part of GNU libtool.
3063
 
#
3064
 
#  This program is free software; you can redistribute it and/or modify
3065
 
#  it under the terms of the GNU General Public License as published by
3066
 
#  the Free Software Foundation; either version 2 of the License, or
3067
 
#  (at your option) any later version.
3068
 
#
3069
 
#  This program is distributed in the hope that it will be useful,
3070
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
3071
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3072
 
#  GNU General Public License for more details.
3073
 
#
3074
 
#  You should have received a copy of the GNU General Public License
3075
 
#  along with this program; if not, write to the Free Software
3076
 
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3077
 
#  */
3078
 
#
3079
 
# #include <stdio.h>            /* for printf() */
3080
 
# #include <unistd.h>           /* for open(), lseek(), read() */
3081
 
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3082
 
# #include <string.h>           /* for strdup() */
3083
 
#
3084
 
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
3085
 
# #ifndef O_BINARY
3086
 
# #define O_BINARY 0
3087
 
# #endif
3088
 
#
3089
 
# static unsigned int
3090
 
# pe_get16 (fd, offset)
3091
 
#      int fd;
3092
 
#      int offset;
3093
 
# {
3094
 
#   unsigned char b[2];
3095
 
#   lseek (fd, offset, SEEK_SET);
3096
 
#   read (fd, b, 2);
3097
 
#   return b[0] + (b[1]<<8);
3098
 
# }
3099
 
#
3100
 
# static unsigned int
3101
 
# pe_get32 (fd, offset)
3102
 
#     int fd;
3103
 
#     int offset;
3104
 
# {
3105
 
#   unsigned char b[4];
3106
 
#   lseek (fd, offset, SEEK_SET);
3107
 
#   read (fd, b, 4);
3108
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3109
 
# }
3110
 
#
3111
 
# static unsigned int
3112
 
# pe_as32 (ptr)
3113
 
#      void *ptr;
3114
 
# {
3115
 
#   unsigned char *b = ptr;
3116
 
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3117
 
# }
3118
 
#
3119
 
# int
3120
 
# main (argc, argv)
3121
 
#     int argc;
3122
 
#     char *argv[];
3123
 
# {
3124
 
#     int dll;
3125
 
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3126
 
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
3127
 
#     unsigned long name_rvas, nexp;
3128
 
#     unsigned char *expdata, *erva;
3129
 
#     char *filename, *dll_name;
3130
 
#
3131
 
#     filename = argv[1];
3132
 
#
3133
 
#     dll = open(filename, O_RDONLY|O_BINARY);
3134
 
#     if (dll < 1)
3135
 
#       return 1;
3136
 
#
3137
 
#     dll_name = filename;
3138
 
#
3139
 
#     for (i=0; filename[i]; i++)
3140
 
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3141
 
#           dll_name = filename + i +1;
3142
 
#
3143
 
#     pe_header_offset = pe_get32 (dll, 0x3c);
3144
 
#     opthdr_ofs = pe_header_offset + 4 + 20;
3145
 
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3146
 
#
3147
 
#     if (num_entries < 1) /* no exports */
3148
 
#       return 1;
3149
 
#
3150
 
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3151
 
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
3152
 
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3153
 
#     secptr = (pe_header_offset + 4 + 20 +
3154
 
#             pe_get16 (dll, pe_header_offset + 4 + 16));
3155
 
#
3156
 
#     expptr = 0;
3157
 
#     for (i = 0; i < nsections; i++)
3158
 
#     {
3159
 
#       char sname[8];
3160
 
#       unsigned long secptr1 = secptr + 40 * i;
3161
 
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3162
 
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3163
 
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3164
 
#       lseek(dll, secptr1, SEEK_SET);
3165
 
#       read(dll, sname, 8);
3166
 
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3167
 
#       {
3168
 
#           expptr = fptr + (export_rva - vaddr);
3169
 
#           if (export_rva + export_size > vaddr + vsize)
3170
 
#               export_size = vsize - (export_rva - vaddr);
3171
 
#           break;
3172
 
#       }
3173
 
#     }
3174
 
#
3175
 
#     expdata = (unsigned char*)malloc(export_size);
3176
 
#     lseek (dll, expptr, SEEK_SET);
3177
 
#     read (dll, expdata, export_size);
3178
 
#     erva = expdata - export_rva;
3179
 
#
3180
 
#     nexp = pe_as32 (expdata+24);
3181
 
#     name_rvas = pe_as32 (expdata+32);
3182
 
#
3183
 
#     printf ("EXPORTS\n");
3184
 
#     for (i = 0; i<nexp; i++)
3185
 
#     {
3186
 
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3187
 
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3188
 
#     }
3189
 
#
3190
 
#     return 0;
3191
 
# }
3192
 
# /* impgen.c ends here */
3193
 
 
3194
 
EOF
3195
 
    ;;
3196
 
  esac
3197
 
 
3198
 
  # We use sed instead of cat because bash on DJGPP gets confused if
3199
 
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3200
 
  # text mode, it properly converts lines to CR/LF.  This bash problem
3201
 
  # is reportedly fixed, but why not run on old versions too?
3202
 
  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3203
 
 
3204
 
  mv -f "${ofile}T" "$ofile" || \
3205
 
    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3206
 
  chmod +x "$ofile"
3207
 
fi
3208
 
##
3209
 
## END FIXME
3210
 
 
3211
 
])# _LT_AC_LTCONFIG_HACK
3212
 
 
3213
 
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3214
 
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3215
 
 
3216
 
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3217
 
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3218
 
 
3219
 
# AC_ENABLE_SHARED - implement the --enable-shared flag
3220
 
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
3221
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3222
 
#   `yes'.
3223
 
AC_DEFUN([AC_ENABLE_SHARED],
3224
 
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3225
 
AC_ARG_ENABLE(shared,
3226
 
changequote(<<, >>)dnl
3227
 
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3228
 
changequote([, ])dnl
3229
 
[p=${PACKAGE-default}
3230
 
case $enableval in
3231
 
yes) enable_shared=yes ;;
3232
 
no) enable_shared=no ;;
3233
 
*)
3234
 
  enable_shared=no
3235
 
  # Look at the argument we got.  We use all the common list separators.
3236
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3237
 
  for pkg in $enableval; do
3238
 
    if test "X$pkg" = "X$p"; then
3239
 
      enable_shared=yes
3240
 
    fi
3241
 
  done
3242
 
  IFS="$ac_save_ifs"
3243
 
  ;;
3244
 
esac],
3245
 
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3246
 
])
3247
 
 
3248
 
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3249
 
AC_DEFUN([AC_DISABLE_SHARED],
3250
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3251
 
AC_ENABLE_SHARED(no)])
3252
 
 
3253
 
# AC_ENABLE_STATIC - implement the --enable-static flag
3254
 
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
3255
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3256
 
#   `yes'.
3257
 
AC_DEFUN([AC_ENABLE_STATIC],
3258
 
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3259
 
AC_ARG_ENABLE(static,
3260
 
changequote(<<, >>)dnl
3261
 
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3262
 
changequote([, ])dnl
3263
 
[p=${PACKAGE-default}
3264
 
case $enableval in
3265
 
yes) enable_static=yes ;;
3266
 
no) enable_static=no ;;
3267
 
*)
3268
 
  enable_static=no
3269
 
  # Look at the argument we got.  We use all the common list separators.
3270
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3271
 
  for pkg in $enableval; do
3272
 
    if test "X$pkg" = "X$p"; then
3273
 
      enable_static=yes
3274
 
    fi
3275
 
  done
3276
 
  IFS="$ac_save_ifs"
3277
 
  ;;
3278
 
esac],
3279
 
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3280
 
])
3281
 
 
3282
 
# AC_DISABLE_STATIC - set the default static flag to --disable-static
3283
 
AC_DEFUN([AC_DISABLE_STATIC],
3284
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3285
 
AC_ENABLE_STATIC(no)])
3286
 
 
3287
 
 
3288
 
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3289
 
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3290
 
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3291
 
#   `yes'.
3292
 
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3293
 
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3294
 
AC_ARG_ENABLE(fast-install,
3295
 
changequote(<<, >>)dnl
3296
 
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3297
 
changequote([, ])dnl
3298
 
[p=${PACKAGE-default}
3299
 
case $enableval in
3300
 
yes) enable_fast_install=yes ;;
3301
 
no) enable_fast_install=no ;;
3302
 
*)
3303
 
  enable_fast_install=no
3304
 
  # Look at the argument we got.  We use all the common list separators.
3305
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3306
 
  for pkg in $enableval; do
3307
 
    if test "X$pkg" = "X$p"; then
3308
 
      enable_fast_install=yes
3309
 
    fi
3310
 
  done
3311
 
  IFS="$ac_save_ifs"
3312
 
  ;;
3313
 
esac],
3314
 
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3315
 
])
3316
 
 
3317
 
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3318
 
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3319
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3320
 
AC_ENABLE_FAST_INSTALL(no)])
3321
 
 
3322
 
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
3323
 
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
3324
 
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3325
 
#   `both'.
3326
 
AC_DEFUN([AC_LIBTOOL_PICMODE],
3327
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3328
 
pic_mode=ifelse($#,1,$1,default)])
3329
 
 
3330
 
 
3331
 
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3332
 
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3333
 
[AC_MSG_CHECKING([for $1])
3334
 
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3335
 
[case $MAGIC_CMD in
3336
 
  /*)
3337
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3338
 
  ;;
3339
 
  ?:/*)
3340
 
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3341
 
  ;;
3342
 
  *)
3343
 
  ac_save_MAGIC_CMD="$MAGIC_CMD"
3344
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345
 
dnl $ac_dummy forces splitting on constant user-supplied paths.
3346
 
dnl POSIX.2 word splitting is done only on the output of word expansions,
3347
 
dnl not every word.  This closes a longstanding sh security hole.
3348
 
  ac_dummy="ifelse([$2], , $PATH, [$2])"
3349
 
  for ac_dir in $ac_dummy; do
3350
 
    test -z "$ac_dir" && ac_dir=.
3351
 
    if test -f $ac_dir/$1; then
3352
 
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3353
 
      if test -n "$file_magic_test_file"; then
3354
 
        case $deplibs_check_method in
3355
 
        "file_magic "*)
3356
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3357
 
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3358
 
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3359
 
            egrep "$file_magic_regex" > /dev/null; then
3360
 
            :
3361
 
          else
3362
 
            cat <<EOF 1>&2
3363
 
 
3364
 
*** Warning: the command libtool uses to detect shared libraries,
3365
 
*** $file_magic_cmd, produces output that libtool cannot recognize.
3366
 
*** The result is that libtool may fail to recognize shared libraries
3367
 
*** as such.  This will affect the creation of libtool libraries that
3368
 
*** depend on shared libraries, but programs linked with such libtool
3369
 
*** libraries will work regardless of this problem.  Nevertheless, you
3370
 
*** may want to report the problem to your system manager and/or to
3371
 
*** bug-libtool@gnu.org
3372
 
 
3373
 
EOF
3374
 
          fi ;;
3375
 
        esac
3376
 
      fi
3377
 
      break
3378
 
    fi
3379
 
  done
3380
 
  IFS="$ac_save_ifs"
3381
 
  MAGIC_CMD="$ac_save_MAGIC_CMD"
3382
 
  ;;
3383
 
esac])
3384
 
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3385
 
if test -n "$MAGIC_CMD"; then
3386
 
  AC_MSG_RESULT($MAGIC_CMD)
3387
 
else
3388
 
  AC_MSG_RESULT(no)
3389
 
fi
3390
 
])
3391
 
 
3392
 
 
3393
 
# AC_PATH_MAGIC - find a file program which can recognise a shared library
3394
 
AC_DEFUN([AC_PATH_MAGIC],
3395
 
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3396
 
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3397
 
if test -z "$lt_cv_path_MAGIC_CMD"; then
3398
 
  if test -n "$ac_tool_prefix"; then
3399
 
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3400
 
  else
3401
 
    MAGIC_CMD=:
3402
 
  fi
3403
 
fi
3404
 
])
3405
 
 
3406
 
 
3407
 
# AC_PROG_LD - find the path to the GNU or non-GNU linker
3408
 
AC_DEFUN([AC_PROG_LD],
3409
 
[AC_ARG_WITH(gnu-ld,
3410
 
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
3411
 
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3412
 
AC_REQUIRE([AC_PROG_CC])dnl
3413
 
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3414
 
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3415
 
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3416
 
ac_prog=ld
3417
 
if test "$GCC" = yes; then
3418
 
  # Check if gcc -print-prog-name=ld gives a path.
3419
 
  AC_MSG_CHECKING([for ld used by GCC])
3420
 
  case $host in
3421
 
  *-*-mingw*)
3422
 
    # gcc leaves a trailing carriage return which upsets mingw
3423
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3424
 
  *)
3425
 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3426
 
  esac
3427
 
  case $ac_prog in
3428
 
    # Accept absolute paths.
3429
 
    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3430
 
      re_direlt='/[[^/]][[^/]]*/\.\./'
3431
 
      # Canonicalize the path of ld
3432
 
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3433
 
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3434
 
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3435
 
      done
3436
 
      test -z "$LD" && LD="$ac_prog"
3437
 
      ;;
3438
 
  "")
3439
 
    # If it fails, then pretend we aren't using GCC.
3440
 
    ac_prog=ld
3441
 
    ;;
3442
 
  *)
3443
 
    # If it is relative, then search for the first ld in PATH.
3444
 
    with_gnu_ld=unknown
3445
 
    ;;
3446
 
  esac
3447
 
elif test "$with_gnu_ld" = yes; then
3448
 
  AC_MSG_CHECKING([for GNU ld])
3449
 
else
3450
 
  AC_MSG_CHECKING([for non-GNU ld])
3451
 
fi
3452
 
AC_CACHE_VAL(lt_cv_path_LD,
3453
 
[if test -z "$LD"; then
3454
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3455
 
  for ac_dir in $PATH; do
3456
 
    test -z "$ac_dir" && ac_dir=.
3457
 
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3458
 
      lt_cv_path_LD="$ac_dir/$ac_prog"
3459
 
      # Check to see if the program is GNU ld.  I'd rather use --version,
3460
 
      # but apparently some GNU ld's only accept -v.
3461
 
      # Break only if it was the GNU/non-GNU ld that we prefer.
3462
 
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3463
 
        test "$with_gnu_ld" != no && break
3464
 
      else
3465
 
        test "$with_gnu_ld" != yes && break
3466
 
      fi
3467
 
    fi
3468
 
  done
3469
 
  IFS="$ac_save_ifs"
3470
 
else
3471
 
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3472
 
fi])
3473
 
LD="$lt_cv_path_LD"
3474
 
if test -n "$LD"; then
3475
 
  AC_MSG_RESULT($LD)
3476
 
else
3477
 
  AC_MSG_RESULT(no)
3478
 
fi
3479
 
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3480
 
AC_PROG_LD_GNU
3481
 
])
3482
 
 
3483
 
# AC_PROG_LD_GNU -
3484
 
AC_DEFUN([AC_PROG_LD_GNU],
3485
 
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3486
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3487
 
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3488
 
  lt_cv_prog_gnu_ld=yes
3489
 
else
3490
 
  lt_cv_prog_gnu_ld=no
3491
 
fi])
3492
 
with_gnu_ld=$lt_cv_prog_gnu_ld
3493
 
])
3494
 
 
3495
 
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3496
 
#   -- PORTME Some linkers may need a different reload flag.
3497
 
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3498
 
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3499
 
[lt_cv_ld_reload_flag='-r'])
3500
 
reload_flag=$lt_cv_ld_reload_flag
3501
 
test -n "$reload_flag" && reload_flag=" $reload_flag"
3502
 
])
3503
 
 
3504
 
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3505
 
#  -- PORTME fill in with the dynamic library characteristics
3506
 
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3507
 
[AC_CACHE_CHECK([how to recognise dependent libraries],
3508
 
lt_cv_deplibs_check_method,
3509
 
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3510
 
lt_cv_file_magic_test_file=
3511
 
lt_cv_deplibs_check_method='unknown'
3512
 
# Need to set the preceding variable on all platforms that support
3513
 
# interlibrary dependencies.
3514
 
# 'none' -- dependencies not supported.
3515
 
# `unknown' -- same as none, but documents that we really don't know.
3516
 
# 'pass_all' -- all dependencies passed with no checks.
3517
 
# 'test_compile' -- check by making test program.
3518
 
# 'file_magic [[regex]]' -- check by looking for files in library path
3519
 
# which responds to the $file_magic_cmd with a given egrep regex.
3520
 
# If you have `file' or equivalent on your system and you're not sure
3521
 
# whether `pass_all' will *always* work, you probably want this one.
3522
 
 
3523
 
case $host_os in
3524
 
aix4* | aix5*)
3525
 
  lt_cv_deplibs_check_method=pass_all
3526
 
  ;;
3527
 
 
3528
 
beos*)
3529
 
  lt_cv_deplibs_check_method=pass_all
3530
 
  ;;
3531
 
 
3532
 
bsdi4*)
3533
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3534
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3535
 
  lt_cv_file_magic_test_file=/shlib/libc.so
3536
 
  ;;
3537
 
 
3538
 
cygwin* | mingw* | pw32*)
3539
 
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3540
 
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3541
 
  ;;
3542
 
 
3543
 
darwin* | rhapsody*)
3544
 
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3545
 
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3546
 
  case "$host_os" in
3547
 
  rhapsody* | darwin1.[[012]])
3548
 
    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3549
 
    ;;
3550
 
  *) # Darwin 1.3 on
3551
 
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3552
 
    ;;
3553
 
  esac
3554
 
  ;;
3555
 
 
3556
 
freebsd*)
3557
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3558
 
    case $host_cpu in
3559
 
    i*86 )
3560
 
      # Not sure whether the presence of OpenBSD here was a mistake.
3561
 
      # Let's accept both of them until this is cleared up.
3562
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3563
 
      lt_cv_file_magic_cmd=/usr/bin/file
3564
 
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3565
 
      ;;
3566
 
    esac
3567
 
  else
3568
 
    lt_cv_deplibs_check_method=pass_all
3569
 
  fi
3570
 
  ;;
3571
 
 
3572
 
gnu*)
3573
 
  lt_cv_deplibs_check_method=pass_all
3574
 
  ;;
3575
 
 
3576
 
hpux10.20*|hpux11*)
3577
 
  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3578
 
  lt_cv_file_magic_cmd=/usr/bin/file
3579
 
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
3580
 
  ;;
3581
 
 
3582
 
irix5* | irix6* | nonstopux*)
3583
 
  case $host_os in
3584
 
  irix5* | nonstopux*)
3585
 
    # this will be overridden with pass_all, but let us keep it just in case
3586
 
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3587
 
    ;;
3588
 
  *)
3589
 
    case $LD in
3590
 
    *-32|*"-32 ") libmagic=32-bit;;
3591
 
    *-n32|*"-n32 ") libmagic=N32;;
3592
 
    *-64|*"-64 ") libmagic=64-bit;;
3593
 
    *) libmagic=never-match;;
3594
 
    esac
3595
 
    # this will be overridden with pass_all, but let us keep it just in case
3596
 
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3597
 
    ;;
3598
 
  esac
3599
 
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3600
 
  lt_cv_deplibs_check_method=pass_all
3601
 
  ;;
3602
 
 
3603
 
# This must be Linux ELF.
3604
 
linux-gnu*)
3605
 
  case $host_cpu in
3606
 
  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3607
 
    lt_cv_deplibs_check_method=pass_all ;;
3608
 
  *)
3609
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
3610
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3611
 
  esac
3612
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3613
 
  ;;
3614
 
 
3615
 
netbsd*)
3616
 
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3617
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3618
 
  else
3619
 
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3620
 
  fi
3621
 
  ;;
3622
 
 
3623
 
newos6*)
3624
 
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3625
 
  lt_cv_file_magic_cmd=/usr/bin/file
3626
 
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3627
 
  ;;
3628
 
 
3629
 
openbsd*)
3630
 
  lt_cv_file_magic_cmd=/usr/bin/file
3631
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3632
 
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3633
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3634
 
  else
3635
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3636
 
  fi
3637
 
  ;;
3638
 
 
3639
 
osf3* | osf4* | osf5*)
3640
 
  # this will be overridden with pass_all, but let us keep it just in case
3641
 
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3642
 
  lt_cv_file_magic_test_file=/shlib/libc.so
3643
 
  lt_cv_deplibs_check_method=pass_all
3644
 
  ;;
3645
 
 
3646
 
sco3.2v5*)
3647
 
  lt_cv_deplibs_check_method=pass_all
3648
 
  ;;
3649
 
 
3650
 
solaris*)
3651
 
  lt_cv_deplibs_check_method=pass_all
3652
 
  lt_cv_file_magic_test_file=/lib/libc.so
3653
 
  ;;
3654
 
 
3655
 
sysv5uw[[78]]* | sysv4*uw2*)
3656
 
  lt_cv_deplibs_check_method=pass_all
3657
 
  ;;
3658
 
 
3659
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3660
 
  case $host_vendor in
3661
 
  motorola)
3662
 
    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]]'
3663
 
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3664
 
    ;;
3665
 
  ncr)
3666
 
    lt_cv_deplibs_check_method=pass_all
3667
 
    ;;
3668
 
  sequent)
3669
 
    lt_cv_file_magic_cmd='/bin/file'
3670
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3671
 
    ;;
3672
 
  sni)
3673
 
    lt_cv_file_magic_cmd='/bin/file'
3674
 
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3675
 
    lt_cv_file_magic_test_file=/lib/libc.so
3676
 
    ;;
3677
 
  siemens)
3678
 
    lt_cv_deplibs_check_method=pass_all
3679
 
    ;;
3680
 
  esac
3681
 
  ;;
3682
 
esac
3683
 
])
3684
 
file_magic_cmd=$lt_cv_file_magic_cmd
3685
 
deplibs_check_method=$lt_cv_deplibs_check_method
3686
 
])
3687
 
 
3688
 
 
3689
 
# AC_PROG_NM - find the path to a BSD-compatible name lister
3690
 
AC_DEFUN([AC_PROG_NM],
3691
 
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3692
 
AC_MSG_CHECKING([for BSD-compatible nm])
3693
 
AC_CACHE_VAL(lt_cv_path_NM,
3694
 
[if test -n "$NM"; then
3695
 
  # Let the user override the test.
3696
 
  lt_cv_path_NM="$NM"
3697
 
else
3698
 
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3699
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3700
 
    test -z "$ac_dir" && ac_dir=.
3701
 
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
3702
 
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3703
 
      # Check to see if the nm accepts a BSD-compat flag.
3704
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3705
 
      #   nm: unknown option "B" ignored
3706
 
      # Tru64's nm complains that /dev/null is an invalid object file
3707
 
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3708
 
        lt_cv_path_NM="$tmp_nm -B"
3709
 
        break
3710
 
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3711
 
        lt_cv_path_NM="$tmp_nm -p"
3712
 
        break
3713
 
      else
3714
 
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3715
 
        continue # so that we can try to find one that supports BSD flags
3716
 
      fi
3717
 
    fi
3718
 
  done
3719
 
  IFS="$ac_save_ifs"
3720
 
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3721
 
fi])
3722
 
NM="$lt_cv_path_NM"
3723
 
AC_MSG_RESULT([$NM])
3724
 
])
3725
 
 
3726
 
# AC_CHECK_LIBM - check for math library
3727
 
AC_DEFUN([AC_CHECK_LIBM],
3728
 
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3729
 
LIBM=
3730
 
case $host in
3731
 
*-*-beos* | *-*-cygwin* | *-*-pw32*)
3732
 
  # These system don't have libm
3733
 
  ;;
3734
 
*-ncr-sysv4.3*)
3735
 
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3736
 
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3737
 
  ;;
3738
 
*)
3739
 
  AC_CHECK_LIB(m, main, LIBM="-lm")
3740
 
  ;;
3741
 
esac
3742
 
])
3743
 
 
3744
 
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3745
 
# the libltdl convenience library and LTDLINCL to the include flags for
3746
 
# the libltdl header and adds --enable-ltdl-convenience to the
3747
 
# configure arguments.  Note that LIBLTDL and LTDLINCL are not
3748
 
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
3749
 
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
3750
 
# with '${top_builddir}/' and LTDLINCL will be prefixed with
3751
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
3752
 
# flat and you're not using automake, define top_builddir and
3753
 
# top_srcdir appropriately in the Makefiles.
3754
 
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3755
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3756
 
  case $enable_ltdl_convenience in
3757
 
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3758
 
  "") enable_ltdl_convenience=yes
3759
 
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3760
 
  esac
3761
 
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3762
 
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3763
 
  # For backwards non-gettext consistent compatibility...
3764
 
  INCLTDL="$LTDLINCL"
3765
 
])
3766
 
 
3767
 
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3768
 
# the libltdl installable library and LTDLINCL to the include flags for
3769
 
# the libltdl header and adds --enable-ltdl-install to the configure
3770
 
# arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3771
 
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
3772
 
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
3773
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3774
 
# with '${top_srcdir}/' (note the single quotes!).  If your package is
3775
 
# not flat and you're not using automake, define top_builddir and
3776
 
# top_srcdir appropriately in the Makefiles.
3777
 
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3778
 
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3779
 
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3780
 
  AC_CHECK_LIB(ltdl, main,
3781
 
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3782
 
  [if test x"$enable_ltdl_install" = xno; then
3783
 
     AC_MSG_WARN([libltdl not installed, but installation disabled])
3784
 
   else
3785
 
     enable_ltdl_install=yes
3786
 
   fi
3787
 
  ])
3788
 
  if test x"$enable_ltdl_install" = x"yes"; then
3789
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3790
 
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3791
 
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3792
 
  else
3793
 
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3794
 
    LIBLTDL="-lltdl"
3795
 
    LTDLINCL=
3796
 
  fi
3797
 
  # For backwards non-gettext consistent compatibility...
3798
 
  INCLTDL="$LTDLINCL"
3799
 
])
 
6462
])# _LT_AC_FILE_LTDLL_C
 
6463
 
 
6464
 
 
6465
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
6466
# ---------------------------------
 
6467
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
 
6468
 
3800
6469
 
3801
6470
# old names
3802
6471
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
3810
6479
# This is just to silence aclocal about the macro not being used
3811
6480
ifelse([AC_DISABLE_FAST_INSTALL])
3812
6481
 
3813
 
############################################################
 
6482
AC_DEFUN([LT_AC_PROG_GCJ],
 
6483
[AC_CHECK_TOOL(GCJ, gcj, no)
 
6484
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
6485
  AC_SUBST(GCJFLAGS)
 
6486
])
 
6487
 
 
6488
AC_DEFUN([LT_AC_PROG_RC],
 
6489
[AC_CHECK_TOOL(RC, windres, no)
 
6490
])
 
6491
 
 
6492
 
 
6493
# Cheap backport of AS_EXECUTABLE_P and required macros
 
6494
# from Autoconf 2.59; we should not use $as_executable_p directly.
 
6495
 
 
6496
# _AS_TEST_PREPARE
 
6497
# ----------------
 
6498
m4_ifndef([_AS_TEST_PREPARE],
 
6499
[m4_defun([_AS_TEST_PREPARE],
 
6500
[if test -x / >/dev/null 2>&1; then
 
6501
  as_executable_p='test -x'
 
6502
else
 
6503
  as_executable_p='test -f'
 
6504
fi
 
6505
])])# _AS_TEST_PREPARE
 
6506
 
 
6507
# AS_EXECUTABLE_P
 
6508
# ---------------
 
6509
# Check whether a file is executable.
 
6510
m4_ifndef([AS_EXECUTABLE_P],
 
6511
[m4_defun([AS_EXECUTABLE_P],
 
6512
[AS_REQUIRE([_AS_TEST_PREPARE])dnl
 
6513
$as_executable_p $1[]dnl
 
6514
])])# AS_EXECUTABLE_P
 
6515
 
3814
6516
# NOTE: This macro has been submitted for inclusion into   #
3815
6517
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
3816
6518
#  a released version of Autoconf we should remove this    #
3817
6519
#  macro and use it instead.                               #
3818
 
############################################################
3819
6520
# LT_AC_PROG_SED
3820
6521
# --------------
3821
6522
# Check for a fully-functional sed program, that truncates
3825
6526
AC_CACHE_VAL(lt_cv_path_SED,
3826
6527
[# Loop through the user's path and test for sed and gsed.
3827
6528
# Then use that list of sed's as ones to test for truncation.
3828
 
as_executable_p="test -f"
3829
6529
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830
6530
for as_dir in $PATH
3831
6531
do
3832
6532
  IFS=$as_save_IFS
3833
6533
  test -z "$as_dir" && as_dir=.
3834
 
  for ac_prog in sed gsed; do
 
6534
  for lt_ac_prog in sed gsed; do
3835
6535
    for ac_exec_ext in '' $ac_executable_extensions; do
3836
 
      if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3837
 
        _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 
6536
      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
 
6537
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
3838
6538
      fi
3839
6539
    done
3840
6540
  done
3841
6541
done
3842
 
 
3843
 
  # Create a temporary directory, and hook for its removal unless debugging.
3844
 
$debug ||
3845
 
{
3846
 
  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3847
 
  trap '{ (exit 1); exit 1; }' 1 2 13 15
3848
 
}
3849
 
 
3850
 
# Create a (secure) tmp directory for tmp files.
3851
 
: ${TMPDIR=/tmp}
3852
 
{
3853
 
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3854
 
  test -n "$tmp" && test -d "$tmp"
3855
 
}  ||
3856
 
{
3857
 
  tmp=$TMPDIR/sed$$-$RANDOM
3858
 
  (umask 077 && mkdir $tmp)
3859
 
} ||
3860
 
{
3861
 
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3862
 
   { (exit 1); exit 1; }
3863
 
}
3864
 
  _max=0
3865
 
  _count=0
3866
 
  # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3867
 
  # along with /bin/sed that truncates output.
3868
 
  for _sed in $_sed_list /usr/xpg4/bin/sed; do
3869
 
    test ! -f ${_sed} && break
3870
 
    cat /dev/null > "$tmp/sed.in"
3871
 
    _count=0
3872
 
    echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3873
 
    # Check for GNU sed and select it if it is found.
3874
 
    if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3875
 
      lt_cv_path_SED=${_sed}
3876
 
      break
 
6542
IFS=$as_save_IFS
 
6543
lt_ac_max=0
 
6544
lt_ac_count=0
 
6545
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
6546
# along with /bin/sed that truncates output.
 
6547
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
6548
  test ! -f $lt_ac_sed && continue
 
6549
  cat /dev/null > conftest.in
 
6550
  lt_ac_count=0
 
6551
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
6552
  # Check for GNU sed and select it if it is found.
 
6553
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
6554
    lt_cv_path_SED=$lt_ac_sed
 
6555
    break
 
6556
  fi
 
6557
  while true; do
 
6558
    cat conftest.in conftest.in >conftest.tmp
 
6559
    mv conftest.tmp conftest.in
 
6560
    cp conftest.in conftest.nl
 
6561
    echo >>conftest.nl
 
6562
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
6563
    cmp -s conftest.out conftest.nl || break
 
6564
    # 10000 chars as input seems more than enough
 
6565
    test $lt_ac_count -gt 10 && break
 
6566
    lt_ac_count=`expr $lt_ac_count + 1`
 
6567
    if test $lt_ac_count -gt $lt_ac_max; then
 
6568
      lt_ac_max=$lt_ac_count
 
6569
      lt_cv_path_SED=$lt_ac_sed
3877
6570
    fi
3878
 
    while true; do
3879
 
      cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3880
 
      mv "$tmp/sed.tmp" "$tmp/sed.in"
3881
 
      cp "$tmp/sed.in" "$tmp/sed.nl"
3882
 
      echo >>"$tmp/sed.nl"
3883
 
      ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3884
 
      cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3885
 
      # 40000 chars as input seems more than enough
3886
 
      test $_count -gt 10 && break
3887
 
      _count=`expr $_count + 1`
3888
 
      if test $_count -gt $_max; then
3889
 
        _max=$_count
3890
 
        lt_cv_path_SED=$_sed
3891
 
      fi
3892
 
    done
3893
6571
  done
3894
 
  rm -rf "$tmp"
 
6572
done
3895
6573
])
3896
 
if test "X$SED" != "X"; then
3897
 
  lt_cv_path_SED=$SED
3898
 
else
3899
 
  SED=$lt_cv_path_SED
3900
 
fi
 
6574
SED=$lt_cv_path_SED
 
6575
AC_SUBST([SED])
3901
6576
AC_MSG_RESULT([$SED])
3902
6577
])
 
6578
 
 
6579
m4_include([acinclude.m4])