~ubuntu-branches/ubuntu/trusty/libdv/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2004-07-19 12:19:44 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040719121944-17vuryc01yeyx8hf
Tags: 0.103-2
* debian/rules: Provide separate doc directory for libdv4-dev.
* debian/libdv4-dev.links: No longer symlink doc dir to the one
  from libdv4.
* debian/NEWS: Only install into libdv4-dev. Closes: #259694

Show diffs side-by-side

added added

removed removed

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