The R Project SVN R

Rev

Rev 27343 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27343 Rev 28320
1
### R.m4 -- extra macros for configuring R		-*- Autoconf -*-
1
### R.m4 -- extra macros for configuring R		-*- Autoconf -*-
2
###
2
###
3
### Copyright (C) 1998-2003 R Core Team
3
### Copyright (C) 1998-2003 R Core Team
4
###
4
###
5
### This file is part of R.
5
### This file is part of R.
6
###
6
###
7
### R is free software; you can redistribute it and/or modify it under
7
### R is free software; you can redistribute it and/or modify it under
8
### the terms of the GNU General Public License as published by the Free
8
### the terms of the GNU General Public License as published by the Free
9
### Software Foundation; either version 2 of the License, or (at your
9
### Software Foundation; either version 2 of the License, or (at your
10
### option) any later version.
10
### option) any later version.
11
###
11
###
12
### R is distributed in the hope that it will be useful, but WITHOUT ANY
12
### R is distributed in the hope that it will be useful, but WITHOUT ANY
13
### WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
### WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14
### FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15
### License for more details.
15
### License for more details.
16
###
16
###
17
### You should have received a copy of the GNU General Public License
17
### You should have received a copy of the GNU General Public License
18
### along with R; if not, you can obtain it via the World Wide Web at
18
### along with R; if not, you can obtain it via the World Wide Web at
19
### `http://www.gnu.org/copyleft/gpl.html', or by writing to the Free
19
### `http://www.gnu.org/copyleft/gpl.html', or by writing to the Free
20
### Software Foundation, 59 Temple Place -- Suite 330, Boston, MA
20
### Software Foundation, 59 Temple Place -- Suite 330, Boston, MA
21
### 02111-3307, USA.
21
### 02111-3307, USA.
22
 
22
 
23
### * General support macros
23
### * General support macros
24
 
24
 
25
## R_ARG_USE
25
## R_ARG_USE
26
## ---------
26
## ---------
27
AC_DEFUN([R_ARG_USE],
27
AC_DEFUN([R_ARG_USE],
28
[if test "${withval}" = no; then
28
[if test "${withval}" = no; then
29
  use_$1=no
29
  use_$1=no
30
else
30
else
31
  use_$1=yes
31
  use_$1=yes
32
fi
32
fi
33
])# R_ARG_USE
33
])# R_ARG_USE
34
 
34
 
35
## R_SH_VAR_ADD(VARIABLE, VALUE, [SEPARATOR = " "])
35
## R_SH_VAR_ADD(VARIABLE, VALUE, [SEPARATOR = " "])
36
## ---------------------------------------------------
36
## ---------------------------------------------------
37
## Set sh variable VARIABLE to VALUE if empty (or undefined), or append
37
## Set sh variable VARIABLE to VALUE if empty (or undefined), or append
38
## VALUE to the value of VARIABLE, separated by SEPARATOR.
38
## VALUE to the value of VARIABLE, separated by SEPARATOR.
39
## Currently, safe only if all arguments are literals.
39
## Currently, safe only if all arguments are literals.
40
## Useful mostly when we do not know whether VARIABLE is empty or not.
40
## Useful mostly when we do not know whether VARIABLE is empty or not.
41
## Should maybe also have a fourth argument to control whether adding
41
## Should maybe also have a fourth argument to control whether adding
42
## happens by appending (default) or prepending ...
42
## happens by appending (default) or prepending ...
43
AC_DEFUN([R_SH_VAR_ADD],
43
AC_DEFUN([R_SH_VAR_ADD],
44
[separator="$3"
44
[separator="$3"
45
test -z "${separator}" && separator=" "
45
test -z "${separator}" && separator=" "
46
if test -z "${[$1]}"; then
46
if test -z "${[$1]}"; then
47
  $1="$2"
47
  $1="$2"
48
else
48
else
49
  $1="${[$1]}${separator}$2"
49
  $1="${[$1]}${separator}$2"
50
fi])# R_SH_VAR_ADD
50
fi])# R_SH_VAR_ADD
51
 
51
 
52
### * Programs
52
### * Programs
53
 
53
 
54
## R_PROG_AR
54
## R_PROG_AR
55
## ---------
55
## ---------
56
AC_DEFUN([R_PROG_AR],
56
AC_DEFUN([R_PROG_AR],
57
[AC_CHECK_PROGS(AR, [${AR} ar])
57
[AC_CHECK_PROGS(AR, [${AR} ar])
58
: ${ARFLAGS="rc"}
58
: ${ARFLAGS="rc"}
59
AC_SUBST(ARFLAGS)
59
AC_SUBST(ARFLAGS)
60
])# R_PROG_AR
60
])# R_PROG_AR
61
 
61
 
62
## R_PROG_INSTALL
62
## R_PROG_INSTALL
63
## --------------
63
## --------------
64
## Find a good install program.
64
## Find a good install program.
65
## We like to provide INSTALL in the top-level Makeconf.
65
## We like to provide INSTALL in the top-level Makeconf.
66
## Hence, if AC_PROG_INSTALL ends up with the 'tools/install-sh' script,
66
## Hence, if AC_PROG_INSTALL ends up with the 'tools/install-sh' script,
67
## we need to ensure a relative path (i.e., in case we build in srcdir)
67
## we need to ensure a relative path (i.e., in case we build in srcdir)
68
## gets prefixed by top_srcdir.  (This would not be necessary if we had
68
## gets prefixed by top_srcdir.  (This would not be necessary if we had
69
## '@INSTALL@' in each Makefile.in, but we prefer to share ...)
69
## '@INSTALL@' in each Makefile.in, but we prefer to share ...)
70
AC_DEFUN([R_PROG_INSTALL],
70
AC_DEFUN([R_PROG_INSTALL],
71
[AC_REQUIRE([AC_PROG_INSTALL])
71
[AC_REQUIRE([AC_PROG_INSTALL])
72
case "${INSTALL}" in
72
case "${INSTALL}" in
73
  [[\\/]]* | ?:[[\\/]]* ) # absolute
73
  [[\\/]]* | ?:[[\\/]]* ) # absolute
74
    ;;
74
    ;;
75
  *)
75
  *)
76
    INSTALL="\$\(top_srcdir\)/tools/install-sh -c"
76
    INSTALL="\$\(top_srcdir\)/tools/install-sh -c"
77
    ;;
77
    ;;
78
esac
78
esac
79
case "${host_os}" in
79
case "${host_os}" in
80
  hpux*)
80
  hpux*)
81
    ## On some versions of HP-UX (seen on both 10.20 and 11.0) we end up
81
    ## On some versions of HP-UX (seen on both 10.20 and 11.0) we end up
82
    ## a broken install (seen in /opt/imake/bin) which has the default
82
    ## a broken install (seen in /opt/imake/bin) which has the default
83
    ## permissions wrong (PR#2091).  Let's just always use install-sh on
83
    ## permissions wrong (PR#2091).  Let's just always use install-sh on
84
    ## HP-UX.
84
    ## HP-UX.
85
    INSTALL="\$\(top_srcdir\)/tools/install-sh -c"
85
    INSTALL="\$\(top_srcdir\)/tools/install-sh -c"
86
    ;;
86
    ;;
87
esac
87
esac
88
])# R_PROG_INSTALL
88
])# R_PROG_INSTALL
89
 
89
 
90
## R_PROG_PAGER
90
## R_PROG_PAGER
91
## ------------
91
## ------------
92
AC_DEFUN([R_PROG_PAGER],
92
AC_DEFUN([R_PROG_PAGER],
93
[AC_PATH_PROGS(PAGER, [${PAGER} less more page pg], false)
93
[AC_PATH_PROGS(PAGER, [${PAGER} less more page pg], false)
94
if test "${PAGER}" = false; then
94
if test "${PAGER}" = false; then
95
  warn_pager="I could not determine a pager"
95
  warn_pager="I could not determine a pager"
96
  AC_MSG_WARN([${warn_pager}])
96
  AC_MSG_WARN([${warn_pager}])
97
fi
97
fi
98
])# R_PROG_PAGER
98
])# R_PROG_PAGER
99
 
99
 
100
## R_PROG_PERL
100
## R_PROG_PERL
101
## -----------
101
## -----------
102
AC_DEFUN([R_PROG_PERL],
102
AC_DEFUN([R_PROG_PERL],
103
[AC_PATH_PROGS(PERL, [${PERL} perl])
103
[AC_PATH_PROGS(PERL, [${PERL} perl])
104
if test -n "${PERL}"; then
104
if test -n "${PERL}"; then
105
  _R_PROG_PERL_VERSION
105
  _R_PROG_PERL_VERSION
106
else
106
else
107
  ## <NOTE>
107
  ## <NOTE>
108
  ## Need a full path for '@PERL@' substitutions when starting Perl
108
  ## Need a full path for '@PERL@' substitutions when starting Perl
109
  ## scripts with a line of the form '#! FOO'.
109
  ## scripts with a line of the form '#! FOO'.
110
  AC_PATH_PROGS(FALSE, false)
110
  AC_PATH_PROGS(FALSE, false)
111
  PERL="${FALSE}"
111
  PERL="${FALSE}"
112
  ## </NOTE>
112
  ## </NOTE>
113
fi
113
fi
114
if test "${r_cv_prog_perl_v5}" = yes; then
114
if test "${r_cv_prog_perl_v5}" = yes; then
115
  NO_PERL5=false
115
  NO_PERL5=false
116
else
116
else
117
  warn_perl5="you cannot build the object documentation system"
117
  warn_perl5="you cannot build the object documentation system"
118
  AC_MSG_WARN([${warn_perl5}])
118
  AC_MSG_WARN([${warn_perl5}])
119
  NO_PERL5=true
119
  NO_PERL5=true
120
fi
120
fi
121
AC_SUBST(NO_PERL5)
121
AC_SUBST(NO_PERL5)
122
])# R_PROG_PERL
122
])# R_PROG_PERL
123
 
123
 
124
## _R_PROG_PERL_VERSION
124
## _R_PROG_PERL_VERSION
125
## --------------------
125
## --------------------
126
## Building the R documentation system (Rdconv and friends) requires
126
## Building the R documentation system (Rdconv and friends) requires
127
## Perl version 5.004 or better.
127
## Perl version 5.004 or better.
128
## Set shell variable r_cv_prog_perl_v5 to 'yes' if a recent enough
128
## Set shell variable r_cv_prog_perl_v5 to 'yes' if a recent enough
129
## Perl is found, and to 'no' otherwise.
129
## Perl is found, and to 'no' otherwise.
130
AC_DEFUN([_R_PROG_PERL_VERSION],
130
AC_DEFUN([_R_PROG_PERL_VERSION],
131
[AC_CACHE_CHECK([whether perl version is at least 5.004],
131
[AC_CACHE_CHECK([whether perl version is at least 5.004],
132
                [r_cv_prog_perl_v5],
132
                [r_cv_prog_perl_v5],
133
[if ${PERL} -e 'require 5.004 or exit 1'; then
133
[if ${PERL} -e 'require 5.004 or exit 1'; then
134
  r_cv_prog_perl_v5=yes
134
  r_cv_prog_perl_v5=yes
135
else
135
else
136
  r_cv_prog_perl_v5=no
136
  r_cv_prog_perl_v5=no
137
fi])
137
fi])
138
])# _R_PROG_PERL_VERSION
138
])# _R_PROG_PERL_VERSION
139
 
139
 
140
## R_PROG_TEXMF
140
## R_PROG_TEXMF
141
## ------------
141
## ------------
142
AC_DEFUN([R_PROG_TEXMF],
142
AC_DEFUN([R_PROG_TEXMF],
143
[AC_REQUIRE([R_PROG_PERL])
143
[AC_REQUIRE([R_PROG_PERL])
144
AC_PATH_PROGS(DVIPS, [${DVIPS} dvips], false)
144
AC_PATH_PROGS(DVIPS, [${DVIPS} dvips], false)
145
AC_PATH_PROGS(TEX, [${TEX} tex], false)
145
AC_PATH_PROGS(TEX, [${TEX} tex], false)
146
AC_PATH_PROGS(LATEX, [${LATEX} latex], false)
146
AC_PATH_PROGS(LATEX, [${LATEX} latex], false)
147
if test -z "${ac_cv_path_TEX}" ; then
147
if test -z "${ac_cv_path_TEX}" ; then
148
  warn_dvi="you cannot build DVI versions of the R manuals"
148
  warn_dvi="you cannot build DVI versions of the R manuals"
149
elif test -z "${ac_cv_path_LATEX}"; then
149
elif test -z "${ac_cv_path_LATEX}"; then
150
  warn_dvi="you cannot build DVI versions of all the help pages"
150
  warn_dvi="you cannot build DVI versions of all the help pages"
151
fi
151
fi
152
if test -n "${warn_dvi}"; then
152
if test -n "${warn_dvi}"; then
153
  AC_MSG_WARN([${warn_dvi}])
153
  AC_MSG_WARN([${warn_dvi}])
154
fi
154
fi
155
AC_PATH_PROGS(MAKEINDEX, [${MAKEINDEX} makeindex], false)
155
AC_PATH_PROGS(MAKEINDEX, [${MAKEINDEX} makeindex], false)
156
AC_PATH_PROGS(PDFTEX, [${PDFTEX} pdftex], false)
156
AC_PATH_PROGS(PDFTEX, [${PDFTEX} pdftex], false)
157
AC_PATH_PROGS(PDFLATEX, [${PDFLATEX} pdflatex], false)
157
AC_PATH_PROGS(PDFLATEX, [${PDFLATEX} pdflatex], false)
158
if test -z "${ac_cv_path_PDFTEX}" ; then
158
if test -z "${ac_cv_path_PDFTEX}" ; then
159
  warn_pdf="you cannot build PDF versions of the R manuals"
159
  warn_pdf="you cannot build PDF versions of the R manuals"
160
elif test -z "${ac_cv_path_PDFLATEX}" ; then
160
elif test -z "${ac_cv_path_PDFLATEX}" ; then
161
  warn_pdf="you cannot build PDF versions of all the help pages"
161
  warn_pdf="you cannot build PDF versions of all the help pages"
162
fi
162
fi
163
if test -n "${warn_pdf}"; then
163
if test -n "${warn_pdf}"; then
164
  AC_MSG_WARN([${warn_pdf}])
164
  AC_MSG_WARN([${warn_pdf}])
165
fi
165
fi
166
AC_PATH_PROGS(MAKEINFO_CMD, [${MAKEINFO} makeinfo])
166
AC_PATH_PROGS(MAKEINFO_CMD, [${MAKEINFO} makeinfo])
167
## This test admittedly looks a bit strange ... see R_PROG_PERL.
167
## This test admittedly looks a bit strange ... see R_PROG_PERL.
168
if test "${PERL}" = "${FALSE}"; then
168
if test "${PERL}" = "${FALSE}"; then
169
  AC_PATH_PROGS(INSTALL_INFO, [${INSTALL_INFO} install-info], false)
169
  AC_PATH_PROGS(INSTALL_INFO, [${INSTALL_INFO} install-info], false)
170
else
170
else
171
  INSTALL_INFO="\$(PERL) \$(top_srcdir)/tools/install-info.pl"
171
  INSTALL_INFO="\$(PERL) \$(top_srcdir)/tools/install-info.pl"
172
  AC_SUBST(INSTALL_INFO)
172
  AC_SUBST(INSTALL_INFO)
173
fi
173
fi
174
: ${R_RD4DVI="ae"}
174
: ${R_RD4DVI="ae"}
175
AC_SUBST(R_RD4DVI)
175
AC_SUBST(R_RD4DVI)
176
: ${R_RD4PDF="ae,hyper"}
176
: ${R_RD4PDF="ae,hyper"}
177
AC_SUBST(R_RD4PDF)
177
AC_SUBST(R_RD4PDF)
178
])# R_PROG_TEXMF
178
])# R_PROG_TEXMF
179
 
179
 
180
## R_PROG_MAKEINFO
180
## R_PROG_MAKEINFO
181
## ---------------
181
## ---------------
182
AC_DEFUN([R_PROG_MAKEINFO],
182
AC_DEFUN([R_PROG_MAKEINFO],
183
## This used to be part of R_PROG_TEXMF, where it really belongs.
183
## This used to be part of R_PROG_TEXMF, where it really belongs.
184
## Unfortunately, AC_PROG_LIBTOOL unconditionally overwrites MAKEINFO
184
## Unfortunately, AC_PROG_LIBTOOL unconditionally overwrites MAKEINFO
185
## by makeinfo or missing.  To allow users to pass a MAKEINFO setting to
185
## by makeinfo or missing.  To allow users to pass a MAKEINFO setting to
186
## configure, we thus have to run R_PROG_TEXMF before AC_PROG_LIBTOOL,
186
## configure, we thus have to run R_PROG_TEXMF before AC_PROG_LIBTOOL,
187
## save the result to something not overwritten (hence MAKEINFO_CMD),
187
## save the result to something not overwritten (hence MAKEINFO_CMD),
188
## and finally set MAKEINFO according to our needs.
188
## and finally set MAKEINFO according to our needs.
189
[AC_REQUIRE([R_PROG_TEXMF])
189
[AC_REQUIRE([R_PROG_TEXMF])
190
AC_REQUIRE([AC_PROG_LIBTOOL])
190
AC_REQUIRE([AC_PROG_LIBTOOL])
191
if test -n "${MAKEINFO_CMD}"; then
191
if test -n "${MAKEINFO_CMD}"; then
192
  _R_PROG_MAKEINFO_VERSION
192
  _R_PROG_MAKEINFO_VERSION
193
fi
193
fi
194
if test "${r_cv_prog_makeinfo_v4}" != yes; then
194
if test "${r_cv_prog_makeinfo_v4}" != yes; then
195
  warn_info="you cannot build info versions of the R manuals"
195
  warn_info="you cannot build info versions of the R manuals"
196
  AC_MSG_WARN([${warn_info}])
196
  AC_MSG_WARN([${warn_info}])
197
  MAKEINFO=false
197
  MAKEINFO=false
198
else
198
else
199
  MAKEINFO="${MAKEINFO_CMD}"
199
  MAKEINFO="${MAKEINFO_CMD}"
200
fi
200
fi
201
])# R_PROG_MAKEINFO
201
])# R_PROG_MAKEINFO
202
 
202
 
203
## _R_PROG_MAKEINFO_VERSION
203
## _R_PROG_MAKEINFO_VERSION
204
## ------------------------
204
## ------------------------
205
## Building the R Texinfo manuals requires Makeinfo v4 or better.
205
## Building the R Texinfo manuals requires Makeinfo v4 or better.
206
## Set shell variable r_cv_prog_makeinfo_v4 to 'yes' if a recent
206
## Set shell variable r_cv_prog_makeinfo_v4 to 'yes' if a recent
207
## enough Makeinfo is found, and to 'no' otherwise.
207
## enough Makeinfo is found, and to 'no' otherwise.
208
AC_DEFUN([_R_PROG_MAKEINFO_VERSION],
208
AC_DEFUN([_R_PROG_MAKEINFO_VERSION],
209
[AC_CACHE_CHECK([whether makeinfo version is at least 4],
209
[AC_CACHE_CHECK([whether makeinfo version is at least 4],
210
                [r_cv_prog_makeinfo_v4],
210
                [r_cv_prog_makeinfo_v4],
211
[makeinfo_version=`${MAKEINFO_CMD} --version | \
211
[makeinfo_version=`${MAKEINFO_CMD} --version | \
212
  grep "^makeinfo" | sed 's/[[^)]]*) \(.\).*/\1/'`
212
  grep "^makeinfo" | sed 's/[[^)]]*) \(.\).*/\1/'`
213
if test -z "${makeinfo_version}"; then
213
if test -z "${makeinfo_version}"; then
214
  r_cv_prog_makeinfo_v4=no
214
  r_cv_prog_makeinfo_v4=no
215
elif test ${makeinfo_version} -lt 4; then
215
elif test ${makeinfo_version} -lt 4; then
216
  r_cv_prog_makeinfo_v4=no
216
  r_cv_prog_makeinfo_v4=no
217
else
217
else
218
  r_cv_prog_makeinfo_v4=yes
218
  r_cv_prog_makeinfo_v4=yes
219
fi])
219
fi])
220
])# _R_PROG_MAKEINFO_VERSION
220
])# _R_PROG_MAKEINFO_VERSION
221
 
221
 
222
## R_PROG_BROWSER
222
## R_PROG_BROWSER
223
## --------------
223
## --------------
224
AC_DEFUN([R_PROG_BROWSER],
224
AC_DEFUN([R_PROG_BROWSER],
225
[if test -z "${R_BROWSER}"; then
225
[if test -z "${R_BROWSER}"; then
226
  AC_PATH_PROGS(R_BROWSER, [netscape mozilla galeon kfmclient opera gnome-moz-remote open])
226
  AC_PATH_PROGS(R_BROWSER, [netscape mozilla galeon kfmclient opera gnome-moz-remote open])
227
fi
227
fi
228
if test -z "${R_BROWSER}"; then
228
if test -z "${R_BROWSER}"; then
229
  warn_browser="I could not determine a browser"
229
  warn_browser="I could not determine a browser"
230
  AC_MSG_WARN([${warn_browser}])
230
  AC_MSG_WARN([${warn_browser}])
231
else
231
else
232
  AC_MSG_RESULT([using default browser ... ${R_BROWSER}])
232
  AC_MSG_RESULT([using default browser ... ${R_BROWSER}])
233
fi
233
fi
234
AC_SUBST(R_BROWSER)
234
AC_SUBST(R_BROWSER)
235
])# R_BROWSER
235
])# R_BROWSER
236
 
236
 
237
## R_PROG_PDFVIEWER
237
## R_PROG_PDFVIEWER
238
## ----------------
238
## ----------------
239
## Try to determine a PDF viewer.
239
## Try to determine a PDF viewer.
240
## According to Jeff Gentry <jgentry@jimmy.harvard.edu>, 'acroread4' is
240
## According to Jeff Gentry <jgentry@jimmy.harvard.edu>, 'acroread4' is
241
## the FreeBSD acroread port.
241
## the FreeBSD acroread port.
242
AC_DEFUN([R_PROG_PDFVIEWER],
242
AC_DEFUN([R_PROG_PDFVIEWER],
243
[AC_PATH_PROGS(R_PDFVIEWER,
243
[AC_PATH_PROGS(R_PDFVIEWER,
244
               [${R_PDFVIEWER} acroread acroread4 xpdf gv gnome-gv kghostview open])
244
               [${R_PDFVIEWER} acroread acroread4 xpdf gv gnome-gv kghostview open])
245
if test -z "${R_PDFVIEWER}"; then
245
if test -z "${R_PDFVIEWER}"; then
246
  warn_pdfviewer="I could not determine a PDF viewer"
246
  warn_pdfviewer="I could not determine a PDF viewer"
247
  AC_MSG_WARN([${warn_pdfviewer}])
247
  AC_MSG_WARN([${warn_pdfviewer}])
248
fi
248
fi
249
AC_SUBST(R_PDFVIEWER)
249
AC_SUBST(R_PDFVIEWER)
250
])# R_PDFVIEWER
250
])# R_PDFVIEWER
251
 
251
 
252
### * C compiler and its characteristics.
252
### * C compiler and its characteristics.
253
 
253
 
254
## R_PROG_CPP_CPPFLAGS
254
## R_PROG_CPP_CPPFLAGS
255
## -------------------
255
## -------------------
256
## In case of gcc, check whether the C preprocessor complains about
256
## In case of gcc, check whether the C preprocessor complains about
257
## having '/usr/local/include' in its header search path (no matter how
257
## having '/usr/local/include' in its header search path (no matter how
258
## it came there).  GCC 3.1 and 3.2 (at least) give warnings about
258
## it came there).  GCC 3.1 and 3.2 (at least) give warnings about
259
## 'changing search order for system directory "/usr/local/include" as
259
## 'changing search order for system directory "/usr/local/include" as
260
## it has already been specified as a non-system directory' which are at
260
## it has already been specified as a non-system directory' which are at
261
## least quite annoying.
261
## least quite annoying.
262
## <NOTE>
262
## <NOTE>
263
## We currently do not distinguish whether '/usr/local/include' was
263
## We currently do not distinguish whether '/usr/local/include' was
264
## added as the R default, or by an explicit CPPFLAGS arg to configure.
264
## added as the R default, or by an explicit CPPFLAGS arg to configure.
265
## If we wanted to, we should change
265
## If we wanted to, we should change
266
##     : ${CPPFLAGS="-I/usr/local/include"}
266
##     : ${CPPFLAGS="-I/usr/local/include"}
267
## in 'configure.ac' by something like
267
## in 'configure.ac' by something like
268
##     : ${CPPFLAGS=${r_default_CPPFLAGS="-I/usr/local/include"}}
268
##     : ${CPPFLAGS=${r_default_CPPFLAGS="-I/usr/local/include"}}
269
## and test whether r_default_CPPFLAGS is non-empty.
269
## and test whether r_default_CPPFLAGS is non-empty.
270
## </NOTE>
270
## </NOTE>
271
AC_DEFUN([R_PROG_CPP_CPPFLAGS],
271
AC_DEFUN([R_PROG_CPP_CPPFLAGS],
272
[AC_REQUIRE([AC_PROG_CC])
272
[AC_REQUIRE([AC_PROG_CC])
273
AC_REQUIRE([AC_PROG_CPP])
273
AC_REQUIRE([AC_PROG_CPP])
274
if test "${GCC}" = yes; then
274
if test "${GCC}" = yes; then
275
  AC_LANG_PUSH(C)
275
  AC_LANG_PUSH(C)
276
  AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
276
  AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
277
  if ${CPP} ${CPPFLAGS} conftest.${ac_ext} 2>&1 1>/dev/null | \
277
  if ${CPP} ${CPPFLAGS} conftest.${ac_ext} 2>&1 1>/dev/null | \
278
      grep 'warning:.*system directory.*/usr/local/include' >/dev/null; then
278
      grep 'warning:.*system directory.*/usr/local/include' >/dev/null; then
279
    CPPFLAGS=`echo ${CPPFLAGS} | \
279
    CPPFLAGS=`echo ${CPPFLAGS} | \
280
      sed 's|\(.*\)-I/usr/local/include *\(.*\)|\1\2|'`
280
      sed 's|\(.*\)-I/usr/local/include *\(.*\)|\1\2|'`
281
  fi
281
  fi
282
  rm -f conftest.${ac_ext}
282
  rm -f conftest.${ac_ext}
283
  AC_LANG_POP(C)
283
  AC_LANG_POP(C)
284
fi])# R_PROG_CPP_CPPFLAGS
284
fi])# R_PROG_CPP_CPPFLAGS
285
 
285
 
286
## R_PROG_CC_M
286
## R_PROG_CC_M
287
## -----------
287
## -----------
288
## Check whether we can figure out C Make dependencies.
288
## Check whether we can figure out C Make dependencies.
289
AC_DEFUN([R_PROG_CC_M],
289
AC_DEFUN([R_PROG_CC_M],
290
[AC_MSG_CHECKING([whether we can compute C Make dependencies])
290
[AC_MSG_CHECKING([whether we can compute C Make dependencies])
291
AC_CACHE_VAL([r_cv_prog_cc_m],
291
AC_CACHE_VAL([r_cv_prog_cc_m],
292
[echo "#include <math.h>" > conftest.c
292
[echo "#include <math.h>" > conftest.c
293
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
293
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
294
## hard-wired suffix rules.
294
## hard-wired suffix rules.
295
## Another obvious candidate to try is '${MAKEDEPEND-makedepend} -f-'.
295
## Another obvious candidate to try is '${MAKEDEPEND-makedepend} -f-'.
296
## However, this does not work out of the box when srcdir and builddir
296
## However, this does not work out of the box when srcdir and builddir
297
## are different, as it creates dependencies of the form
297
## are different, as it creates dependencies of the form
298
##   ${srcdir}/foo.o: /path/to/bar.h
298
##   ${srcdir}/foo.o: /path/to/bar.h
299
## Could be made to work, of course ...
299
## Could be made to work, of course ...
300
## Note also that it does not create a 'conftest.o: conftest.c' line.
300
## Note also that it does not create a 'conftest.o: conftest.c' line.
301
## For gcc 3.2 or better, we want to use '-MM' in case this works.
301
## For gcc 3.2 or better, we want to use '-MM' in case this works.
302
cc_minus_MM=false
302
cc_minus_MM=false
303
if test "${GCC}" = yes; then
303
if test "${GCC}" = yes; then
304
  gcc_version=`${CC} -v 2>&1 | grep "^.*g.. version" | \
304
  gcc_version=`${CC} -v 2>&1 | grep "^.*g.. version" | \
305
    sed -e 's/^.*g.. version *//'`
305
    sed -e 's/^.*g.. version *//'`
306
  case "${gcc_version}" in
306
  case "${gcc_version}" in
307
    1.*|2.*|3.[[01]]*) ;;
307
    1.*|2.*|3.[[01]]*) ;;
308
    *) cc_minus_MM="${CC} -MM" ;;
308
    *) cc_minus_MM="${CC} -MM" ;;
309
  esac
309
  esac
310
fi
310
fi
311
for prog in "${cc_minus_MM}" "${CC} -M" "${CPP} -M" "cpp -M"; do
311
for prog in "${cc_minus_MM}" "${CC} -M" "${CPP} -M" "cpp -M"; do
312
  if ${prog} conftest.c 2>/dev/null | \
312
  if ${prog} conftest.c 2>/dev/null | \
313
      grep 'conftest.o: conftest.c' >/dev/null; then
313
      grep 'conftest.o: conftest.c' >/dev/null; then
314
    r_cv_prog_cc_m="${prog}"
314
    r_cv_prog_cc_m="${prog}"
315
    break
315
    break
316
  fi
316
  fi
317
done])
317
done])
318
if test -z "${r_cv_prog_cc_m}"; then
318
if test -z "${r_cv_prog_cc_m}"; then
319
  AC_MSG_RESULT([no])
319
  AC_MSG_RESULT([no])
320
else
320
else
321
  AC_MSG_RESULT([yes, using ${r_cv_prog_cc_m}])
321
  AC_MSG_RESULT([yes, using ${r_cv_prog_cc_m}])
322
fi
322
fi
323
])# R_PROG_CC_M
323
])# R_PROG_CC_M
324
 
324
 
325
## R_PROG_CC_C_O_LO
325
## R_PROG_CC_C_O_LO
326
## ----------------
326
## ----------------
327
## Check whether the C compiler supports '-c -o FILE.lo'.
327
## Check whether the C compiler supports '-c -o FILE.lo'.
328
AC_DEFUN([R_PROG_CC_C_O_LO],
328
AC_DEFUN([R_PROG_CC_C_O_LO],
329
[AC_CACHE_CHECK([whether ${CC} supports -c -o FILE.lo],
329
[AC_CACHE_CHECK([whether ${CC} supports -c -o FILE.lo],
330
                [r_cv_prog_cc_c_o_lo],
330
                [r_cv_prog_cc_c_o_lo],
331
[test -d TMP || mkdir TMP
331
[test -d TMP || mkdir TMP
332
echo "int some_variable = 0;" > conftest.c
332
echo "int some_variable = 0;" > conftest.c
333
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
333
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
334
## hard-wired suffix rules. 
334
## hard-wired suffix rules. 
335
ac_try='${CC} ${CFLAGS} -c conftest.c -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
335
ac_try='${CC} ${CFLAGS} -c conftest.c -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
336
if AC_TRY_EVAL(ac_try) \
336
if AC_TRY_EVAL(ac_try) \
337
    && test -f TMP/conftest.lo \
337
    && test -f TMP/conftest.lo \
338
    && AC_TRY_EVAL(ac_try); then
338
    && AC_TRY_EVAL(ac_try); then
339
  r_cv_prog_cc_c_o_lo=yes
339
  r_cv_prog_cc_c_o_lo=yes
340
else
340
else
341
  r_cv_prog_cc_c_o_lo=no
341
  r_cv_prog_cc_c_o_lo=no
342
fi
342
fi
343
rm -rf conftest* TMP])
343
rm -rf conftest* TMP])
344
])# R_PROG_CC_C_O_LO
344
])# R_PROG_CC_C_O_LO
345
 
345
 
346
## R_PROG_CC_MAKEFRAG
346
## R_PROG_CC_MAKEFRAG
347
## ------------------
347
## ------------------
348
## Generate a Make fragment with suffix rules for the C compiler.
348
## Generate a Make fragment with suffix rules for the C compiler.
349
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
349
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
350
## NB test -d .libs || mkdir .libs can be run more than once
350
## NB test -d .libs || mkdir .libs can be run more than once
351
##    and hence race when a parallel make is used
351
##    and hence race when a parallel make is used
352
AC_DEFUN([R_PROG_CC_MAKEFRAG],
352
AC_DEFUN([R_PROG_CC_MAKEFRAG],
353
[r_cc_rules_frag=Makefrag.cc
353
[r_cc_rules_frag=Makefrag.cc
354
AC_REQUIRE([R_PROG_CC_M])
354
AC_REQUIRE([R_PROG_CC_M])
355
AC_REQUIRE([R_PROG_CC_C_O_LO])
355
AC_REQUIRE([R_PROG_CC_C_O_LO])
356
cat << \EOF > ${r_cc_rules_frag}
356
cat << \EOF > ${r_cc_rules_frag}
357
.c.o:
357
.c.o:
358
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $[@]
358
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $[@]
359
EOF
359
EOF
360
if test -n "${r_cv_prog_cc_m}"; then
360
if test -n "${r_cv_prog_cc_m}"; then
361
  cat << EOF >> ${r_cc_rules_frag}
361
  cat << EOF >> ${r_cc_rules_frag}
362
.c.d:
362
.c.d:
363
	@echo "making \$[@] from \$<"
363
	@echo "making \$[@] from \$<"
364
	@${r_cv_prog_cc_m} \$(ALL_CPPFLAGS) $< | \\
364
	@${r_cv_prog_cc_m} \$(ALL_CPPFLAGS) $< | \\
365
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > \$[@]
365
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > \$[@]
366
EOF
366
EOF
367
else
367
else
368
  cat << \EOF >> ${r_cc_rules_frag}
368
  cat << \EOF >> ${r_cc_rules_frag}
369
.c.d:
369
.c.d:
370
	@echo > $[@]
370
	@echo > $[@]
371
EOF
371
EOF
372
fi
372
fi
373
if test "${r_cv_prog_cc_c_o_lo}" = yes; then
373
if test "${r_cv_prog_cc_c_o_lo}" = yes; then
374
  cat << \EOF >> ${r_cc_rules_frag}
374
  cat << \EOF >> ${r_cc_rules_frag}
375
.c.lo:
375
.c.lo:
376
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $< -o $[@]
376
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $< -o $[@]
377
EOF
377
EOF
378
else
378
else
379
  cat << \EOF >> ${r_cc_rules_frag}
379
  cat << \EOF >> ${r_cc_rules_frag}
380
.c.lo:
380
.c.lo:
381
	@-test -d .libs || mkdir .libs
381
	@-test -d .libs || mkdir .libs
382
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $< -o .libs/$[*].o
382
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $< -o .libs/$[*].o
383
	mv .libs/$[*].o $[*].lo
383
	mv .libs/$[*].o $[*].lo
384
EOF
384
EOF
385
fi
385
fi
386
AC_SUBST_FILE(r_cc_rules_frag)
386
AC_SUBST_FILE(r_cc_rules_frag)
387
])# R_PROG_CC_MAKEFRAG
387
])# R_PROG_CC_MAKEFRAG
388
 
388
 
389
## R_PROG_CC_FLAG(FLAG, [ACTION-IF-TRUE])
389
## R_PROG_CC_FLAG(FLAG, [ACTION-IF-TRUE])
390
## ---------------------------------------
390
## ---------------------------------------
391
## Check whether the C compiler handles command line option FLAG,
391
## Check whether the C compiler handles command line option FLAG,
392
## and set shell variable r_cv_prog_cc_flag_SFLAG accordingly (where
392
## and set shell variable r_cv_prog_cc_flag_SFLAG accordingly (where
393
## SFLAG is a shell-safe transliteration of FLAG).
393
## SFLAG is a shell-safe transliteration of FLAG).
394
## In addition, execute ACTION-IF-TRUE in case of success.
394
## In addition, execute ACTION-IF-TRUE in case of success.
395
AC_DEFUN([R_PROG_CC_FLAG],
395
AC_DEFUN([R_PROG_CC_FLAG],
396
[ac_safe=AS_TR_SH($1)
396
[ac_safe=AS_TR_SH($1)
397
AC_MSG_CHECKING([whether ${CC} accepts $1])
397
AC_MSG_CHECKING([whether ${CC} accepts $1])
398
AC_CACHE_VAL([r_cv_prog_cc_flag_${ac_safe}],
398
AC_CACHE_VAL([r_cv_prog_cc_flag_${ac_safe}],
399
[AC_LANG_PUSH(C)
399
[AC_LANG_PUSH(C)
400
r_save_CFLAGS="${CFLAGS}"
400
r_save_CFLAGS="${CFLAGS}"
401
CFLAGS="${CFLAGS} $1"
401
CFLAGS="${CFLAGS} $1"
402
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
402
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
403
               [eval "r_cv_prog_cc_flag_${ac_safe}=yes"],
403
               [eval "r_cv_prog_cc_flag_${ac_safe}=yes"],
404
               [eval "r_cv_prog_cc_flag_${ac_safe}=no"])
404
               [eval "r_cv_prog_cc_flag_${ac_safe}=no"])
405
CFLAGS="${r_save_CFLAGS}"
405
CFLAGS="${r_save_CFLAGS}"
406
AC_LANG_POP(C)
406
AC_LANG_POP(C)
407
])
407
])
408
if eval "test \"`echo '$r_cv_prog_cc_flag_'$ac_safe`\" = yes"; then
408
if eval "test \"`echo '$r_cv_prog_cc_flag_'$ac_safe`\" = yes"; then
409
  AC_MSG_RESULT([yes])
409
  AC_MSG_RESULT([yes])
410
  [$2]
410
  [$2]
411
else
411
else
412
  AC_MSG_RESULT([no])
412
  AC_MSG_RESULT([no])
413
fi
413
fi
414
])# R_PROG_CC_FLAG
414
])# R_PROG_CC_FLAG
415
 
415
 
416
## R_PROG_CC_FLAG_D__NO_MATH_INLINES
416
## R_PROG_CC_FLAG_D__NO_MATH_INLINES
417
## ---------------------------
417
## ---------------------------
418
## In current glibc, inline version [x86] of exp is broken.
418
## In current glibc, inline version [x86] of exp is broken.
419
## We fix this by adding '-D__NO_MATH_INLINES' to R_XTRA_CFLAGS rather
419
## We fix this by adding '-D__NO_MATH_INLINES' to R_XTRA_CFLAGS rather
420
## than AC_DEFINE(__NO_MATH_INLINES) as the former also takes care of
420
## than AC_DEFINE(__NO_MATH_INLINES) as the former also takes care of
421
## compiling C code for add-on packages.
421
## compiling C code for add-on packages.
422
AC_DEFUN([R_PROG_CC_FLAG_D__NO_MATH_INLINES],
422
AC_DEFUN([R_PROG_CC_FLAG_D__NO_MATH_INLINES],
423
[AC_EGREP_CPP([yes],
423
[AC_EGREP_CPP([yes],
424
[#include <math.h>
424
[#include <math.h>
425
#if defined(__GLIBC__)
425
#if defined(__GLIBC__)
426
  yes
426
  yes
427
#endif
427
#endif
428
],
428
],
429
              [R_SH_VAR_ADD(R_XTRA_CFLAGS, [-D__NO_MATH_INLINES])])
429
              [R_SH_VAR_ADD(R_XTRA_CFLAGS, [-D__NO_MATH_INLINES])])
430
])# R_PROG_CC_FLAG_D__NO_MATH_INLINES
430
])# R_PROG_CC_FLAG_D__NO_MATH_INLINES
431
 
431
 
432
## R_C_OPTIEEE
432
## R_C_OPTIEEE
433
## -----------
433
## -----------
434
## Check whether the C compiler needs '-OPT:IEEE_NaN_inf=ON' to
434
## Check whether the C compiler needs '-OPT:IEEE_NaN_inf=ON' to
435
## correctly deal with IEEE NaN/Inf.
435
## correctly deal with IEEE NaN/Inf.
436
## This flag is needed for the native SGI C compiler.
436
## This flag is needed for the native SGI C compiler.
437
## If needed, add the flag to R_XTRA_CFLAGS.
437
## If needed, add the flag to R_XTRA_CFLAGS.
438
AC_DEFUN([R_C_OPTIEEE],
438
AC_DEFUN([R_C_OPTIEEE],
439
[AC_CACHE_CHECK([whether C compiler needs -OPT:IEEE_NaN_inf=ON],
439
[AC_CACHE_CHECK([whether C compiler needs -OPT:IEEE_NaN_inf=ON],
440
                [r_cv_c_optieee],
440
                [r_cv_c_optieee],
441
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
441
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
442
#include <math.h>
442
#include <math.h>
443
#include <ieeefp.h>
443
#include <ieeefp.h>
444
int main () {
444
int main () {
445
  double x = 0;
445
  double x = 0;
446
  fpsetmask(0); x = x / x; exit (x != x);
446
  fpsetmask(0); x = x / x; exit (x != x);
447
}
447
}
448
]])],
448
]])],
449
              [r_cv_c_optieee=yes],
449
              [r_cv_c_optieee=yes],
450
              [r_cv_c_optieee=no],
450
              [r_cv_c_optieee=no],
451
              [r_cv_c_optieee=no])])
451
              [r_cv_c_optieee=no])])
452
if test "${r_cv_c_optieee}" = yes; then
452
if test "${r_cv_c_optieee}" = yes; then
453
  R_SH_VAR_ADD(R_XTRA_CFLAGS, [-OPT:IEEE_NaN_inf=ON])
453
  R_SH_VAR_ADD(R_XTRA_CFLAGS, [-OPT:IEEE_NaN_inf=ON])
454
fi
454
fi
455
])# R_C_OPTIEEE
455
])# R_C_OPTIEEE
456
 
456
 
457
### * C++ compiler and its characteristics.
457
### * C++ compiler and its characteristics.
458
 
458
 
459
## R_PROG_CXX_M
459
## R_PROG_CXX_M
460
## ------------
460
## ------------
461
## Check whether the C++ compiler accepts '-M' for generating
461
## Check whether the C++ compiler accepts '-M' for generating
462
## dependencies.
462
## dependencies.
463
AC_DEFUN([R_PROG_CXX_M],
463
AC_DEFUN([R_PROG_CXX_M],
464
[AC_REQUIRE([R_PROG_CC_M])
464
[AC_REQUIRE([R_PROG_CC_M])
465
AC_CACHE_CHECK([whether ${CXX} accepts -M for generating dependencies],
465
AC_CACHE_CHECK([whether ${CXX} accepts -M for generating dependencies],
466
               [r_cv_prog_cxx_m],
466
               [r_cv_prog_cxx_m],
467
[echo "#include <math.h>" > conftest.cc
467
[echo "#include <math.h>" > conftest.cc
468
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
468
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
469
## hard-wired suffix rules.  We could be a bit more careful as we
469
## hard-wired suffix rules.  We could be a bit more careful as we
470
## actually only test suffix '.cc'. 
470
## actually only test suffix '.cc'. 
471
if test -n "`${CXX} -M conftest.cc 2>/dev/null | grep conftest`"; then
471
if test -n "`${CXX} -M conftest.cc 2>/dev/null | grep conftest`"; then
472
  r_cv_prog_cxx_m=yes
472
  r_cv_prog_cxx_m=yes
473
else
473
else
474
  r_cv_prog_cxx_m=no
474
  r_cv_prog_cxx_m=no
475
fi])
475
fi])
476
])# R_PROG_CXX_M
476
])# R_PROG_CXX_M
477
 
477
 
478
## R_PROG_CXX_C_O_LO
478
## R_PROG_CXX_C_O_LO
479
## -----------------
479
## -----------------
480
## Check whether the C++ compiler supports '-c -o FILE.lo'.
480
## Check whether the C++ compiler supports '-c -o FILE.lo'.
481
AC_DEFUN([R_PROG_CXX_C_O_LO],
481
AC_DEFUN([R_PROG_CXX_C_O_LO],
482
[cxx_o_lo_rules_frag=Makefrag.cxx
482
[cxx_o_lo_rules_frag=Makefrag.cxx
483
AC_CACHE_CHECK([whether ${CXX} supports -c -o FILE.lo],
483
AC_CACHE_CHECK([whether ${CXX} supports -c -o FILE.lo],
484
               [r_cv_prog_cxx_c_o_lo],
484
               [r_cv_prog_cxx_c_o_lo],
485
[test -d TMP || mkdir TMP
485
[test -d TMP || mkdir TMP
486
echo "int some_variable = 0;" > conftest.cc
486
echo "int some_variable = 0;" > conftest.cc
487
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
487
## No real point in using AC_LANG_* and ${ac_ext}, as we need to create
488
## hard-wired suffix rules.  We could be a bit more careful as we
488
## hard-wired suffix rules.  We could be a bit more careful as we
489
## actually only test suffix '.cc'.
489
## actually only test suffix '.cc'.
490
ac_try='${CXX} ${CXXFLAGS} -c conftest.cc -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
490
ac_try='${CXX} ${CXXFLAGS} -c conftest.cc -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
491
if AC_TRY_EVAL(ac_try) \
491
if AC_TRY_EVAL(ac_try) \
492
    && test -f TMP/conftest.lo \
492
    && test -f TMP/conftest.lo \
493
    && AC_TRY_EVAL(ac_try); then
493
    && AC_TRY_EVAL(ac_try); then
494
  r_cv_prog_cxx_c_o_lo=yes
494
  r_cv_prog_cxx_c_o_lo=yes
495
else
495
else
496
  r_cv_prog_cxx_c_o_lo=no
496
  r_cv_prog_cxx_c_o_lo=no
497
fi
497
fi
498
rm -rf conftest* TMP])
498
rm -rf conftest* TMP])
499
])# R_PROG_CXX_C_O_LO
499
])# R_PROG_CXX_C_O_LO
500
 
500
 
501
## R_PROG_CXX_MAKEFRAG
501
## R_PROG_CXX_MAKEFRAG
502
## -------------------
502
## -------------------
503
## Generate a Make fragment with suffix rules for the C++ compiler.
503
## Generate a Make fragment with suffix rules for the C++ compiler.
504
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
504
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
505
AC_DEFUN([R_PROG_CXX_MAKEFRAG],
505
AC_DEFUN([R_PROG_CXX_MAKEFRAG],
506
[r_cxx_rules_frag=Makefrag.cxx
506
[r_cxx_rules_frag=Makefrag.cxx
507
AC_REQUIRE([R_PROG_CXX_M])
507
AC_REQUIRE([R_PROG_CXX_M])
508
AC_REQUIRE([R_PROG_CXX_C_O_LO])
508
AC_REQUIRE([R_PROG_CXX_C_O_LO])
509
cat << \EOF > ${r_cxx_rules_frag}
509
cat << \EOF > ${r_cxx_rules_frag}
510
.cc.o:
510
.cc.o:
511
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
511
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
512
.cpp.o:
512
.cpp.o:
513
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
513
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
514
.C.o:
514
.C.o:
515
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
515
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $[@]
516
EOF
516
EOF
517
if test "${r_cv_prog_cxx_m}" = yes; then
517
if test "${r_cv_prog_cxx_m}" = yes; then
518
  cat << \EOF >> ${r_cxx_rules_frag}
518
  cat << \EOF >> ${r_cxx_rules_frag}
519
.cc.d:
519
.cc.d:
520
	@echo "making $[@] from $<"
520
	@echo "making $[@] from $<"
521
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
521
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
522
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
522
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
523
.cpp.d:
523
.cpp.d:
524
	@echo "making $[@] from $<"
524
	@echo "making $[@] from $<"
525
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
525
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
526
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
526
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
527
.C.d:
527
.C.d:
528
	@echo "making $[@] from $<"
528
	@echo "making $[@] from $<"
529
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
529
	@$(CXX) -M $(ALL_CPPFLAGS) $< | \
530
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
530
	  sed -e 's/^\([[^:]]*\)\.o\([[ 	]]\)*:/\1.o \1.lo\2:/' > $[@]
531
EOF
531
EOF
532
else
532
else
533
  cat << \EOF >> ${r_cxx_rules_frag}
533
  cat << \EOF >> ${r_cxx_rules_frag}
534
.cc.d:
534
.cc.d:
535
	@echo > $[@]
535
	@echo > $[@]
536
.cpp.d:
536
.cpp.d:
537
	@echo > $[@]
537
	@echo > $[@]
538
.C.d:
538
.C.d:
539
	@echo > $[@]
539
	@echo > $[@]
540
EOF
540
EOF
541
fi
541
fi
542
if test "${r_cv_prog_cxx_c_o_lo}" = yes; then
542
if test "${r_cv_prog_cxx_c_o_lo}" = yes; then
543
  cat << \EOF >> ${r_cxx_rules_frag}
543
  cat << \EOF >> ${r_cxx_rules_frag}
544
.cc.lo:
544
.cc.lo:
545
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
545
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
546
.cpp.lo:
546
.cpp.lo:
547
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
547
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
548
.C.lo:
548
.C.lo:
549
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
549
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o $[@]
550
EOF
550
EOF
551
else
551
else
552
  cat << \EOF >> ${r_cxx_rules_frag}
552
  cat << \EOF >> ${r_cxx_rules_frag}
553
.cc.lo:
553
.cc.lo:
554
	@test -d .libs || mkdir .libs
554
	@test -d .libs || mkdir .libs
555
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
555
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
556
	mv .libs/$[*].o $[*].lo
556
	mv .libs/$[*].o $[*].lo
557
.cpp.lo:
557
.cpp.lo:
558
	@test -d .libs || mkdir .libs
558
	@test -d .libs || mkdir .libs
559
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
559
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
560
	mv .libs/$[*].o $[*].lo
560
	mv .libs/$[*].o $[*].lo
561
.C.lo:
561
.C.lo:
562
	@test -d .libs || mkdir .libs
562
	@test -d .libs || mkdir .libs
563
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
563
	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS_LO) -c $< -o .libs/$[*].o
564
	mv .libs/$[*].o $[*].lo
564
	mv .libs/$[*].o $[*].lo
565
EOF
565
EOF
566
fi
566
fi
567
AC_SUBST_FILE(r_cxx_rules_frag)
567
AC_SUBST_FILE(r_cxx_rules_frag)
568
])# R_PROG_CXX_MAKEFRAG
568
])# R_PROG_CXX_MAKEFRAG
569
 
569
 
570
## R_PROG_CXX_FLAG
570
## R_PROG_CXX_FLAG
571
## ---------------
571
## ---------------
572
## Check whether the C++ compiler handles command line option FLAG,
572
## Check whether the C++ compiler handles command line option FLAG,
573
## and set shell variable r_cv_prog_cc_flag_SFLAG accordingly (where
573
## and set shell variable r_cv_prog_cc_flag_SFLAG accordingly (where
574
## SFLAG is a shell-safe transliteration of FLAG).
574
## SFLAG is a shell-safe transliteration of FLAG).
575
## In addition, execute ACTION-IF-TRUE in case of success.
575
## In addition, execute ACTION-IF-TRUE in case of success.
576
AC_DEFUN([R_PROG_CXX_FLAG],
576
AC_DEFUN([R_PROG_CXX_FLAG],
577
[ac_safe=AS_TR_SH($1)
577
[ac_safe=AS_TR_SH($1)
578
AC_MSG_CHECKING([whether ${CXX-c++} accepts $1])
578
AC_MSG_CHECKING([whether ${CXX-c++} accepts $1])
579
AC_CACHE_VAL([r_cv_prog_cxx_flag_${ac_safe}],
579
AC_CACHE_VAL([r_cv_prog_cxx_flag_${ac_safe}],
580
[AC_LANG_PUSH(C++)
580
[AC_LANG_PUSH(C++)
581
r_save_CXXFLAGS="${CXXFLAGS}"
581
r_save_CXXFLAGS="${CXXFLAGS}"
582
CXXFLAGS="${CXXFLAGS} $1"
582
CXXFLAGS="${CXXFLAGS} $1"
583
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
583
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
584
               [eval "r_cv_prog_cxx_flag_${ac_safe}=yes"],
584
               [eval "r_cv_prog_cxx_flag_${ac_safe}=yes"],
585
               [eval "r_cv_prog_cxx_flag_${ac_safe}=no"])
585
               [eval "r_cv_prog_cxx_flag_${ac_safe}=no"])
586
CXXFLAGS="${r_save_CXXFLAGS}"
586
CXXFLAGS="${r_save_CXXFLAGS}"
587
AC_LANG_POP(C++)
587
AC_LANG_POP(C++)
588
])
588
])
589
if eval "test \"`echo '$r_cv_prog_cxx_flag_'$ac_safe`\" = yes"; then
589
if eval "test \"`echo '$r_cv_prog_cxx_flag_'$ac_safe`\" = yes"; then
590
  AC_MSG_RESULT([yes])
590
  AC_MSG_RESULT([yes])
591
  [$2]
591
  [$2]
592
else
592
else
593
  AC_MSG_RESULT([no])
593
  AC_MSG_RESULT([no])
594
fi
594
fi
595
])# R_PROG_CXX_FLAG
595
])# R_PROG_CXX_FLAG
596
 
596
 
597
### * Fortran 77 compiler/converter and its characteristics.
597
### * Fortran 77 compiler/converter and its characteristics.
598
 
598
 
599
## R_PROG_F77_OR_F2C
599
## R_PROG_F77_OR_F2C
600
## -----------------
600
## -----------------
601
## Find a Fortran 77 compiler, or f2c.
601
## Find a Fortran 77 compiler, or f2c.
602
##
602
##
603
## If we have not been forced to use a particular Fortran compiler, try
603
## If we have not been forced to use a particular Fortran compiler, try
604
## to find one using one of the several common names.  The list is based
604
## to find one using one of the several common names.  The list is based
605
## on what the current autoconf CVS contains.  This says,
605
## on what the current autoconf CVS contains.  This says,
606
##
606
##
607
## <Quote>
607
## <Quote>
608
## Compilers are ordered by
608
## Compilers are ordered by
609
##  1. F77, F90, F95
609
##  1. F77, F90, F95
610
##  2. Good/tested native compilers, bad/untested native compilers
610
##  2. Good/tested native compilers, bad/untested native compilers
611
##  3. Wrappers around f2c go last.
611
##  3. Wrappers around f2c go last.
612
##
612
##
613
## 'fort77' and fc' are wrappers around 'f2c', 'fort77' being better.
613
## 'fort77' and fc' are wrappers around 'f2c', 'fort77' being better.
614
## It is believed that under HP-UX 'fort77' is the name of the native
614
## It is believed that under HP-UX 'fort77' is the name of the native
615
## compiler.  On some Cray systems, fort77 is a native compiler.
615
## compiler.  On some Cray systems, fort77 is a native compiler.
616
## frt is the Fujitsu F77 compiler.
616
## frt is the Fujitsu F77 compiler.
617
## pgf77 and pgf90 are the Portland Group F77 and F90 compilers.
617
## pgf77 and pgf90 are the Portland Group F77 and F90 compilers.
618
## xlf/xlf90/xlf95 are IBM (AIX) F77/F90/F95 compilers.
618
## xlf/xlf90/xlf95 are IBM (AIX) F77/F90/F95 compilers.
619
## lf95 is the Lahey-Fujitsu compiler.
619
## lf95 is the Lahey-Fujitsu compiler.
620
## fl32 is the Microsoft Fortran "PowerStation" compiler.
620
## fl32 is the Microsoft Fortran "PowerStation" compiler.
621
## af77 is the Apogee F77 compiler for Intergraph hardware running CLIX.
621
## af77 is the Apogee F77 compiler for Intergraph hardware running CLIX.
622
## epcf90 is the "Edinburgh Portable Compiler" F90.
622
## epcf90 is the "Edinburgh Portable Compiler" F90.
623
## fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and
623
## fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and
624
## Linux/Alpha.
624
## Linux/Alpha.
625
## </Quote>
625
## </Quote>
626
##
626
##
627
## In fact, on HP-UX fort77 is the POSIX-compatible native compiler and
627
## In fact, on HP-UX fort77 is the POSIX-compatible native compiler and
628
## f77 is not: hence we need look for fort77 first!
628
## f77 is not: hence we need look for fort77 first!
629
AC_DEFUN([R_PROG_F77_OR_F2C],
629
AC_DEFUN([R_PROG_F77_OR_F2C],
630
[AC_BEFORE([$0], [AC_PROG_LIBTOOL])
630
[AC_BEFORE([$0], [AC_PROG_LIBTOOL])
631
if test -n "${F77}" && test -n "${F2C}"; then
631
if test -n "${F77}" && test -n "${F2C}"; then
632
  warn_F77_and_F2C="both 'F77' and 'F2C' given.
632
  warn_F77_and_F2C="both 'F77' and 'F2C' given.
633
Using the given Fortran 77 compiler ..."
633
Using the given Fortran 77 compiler ..."
634
  AC_MSG_WARN([${warn_F77_and_F2C}])
634
  AC_MSG_WARN([${warn_F77_and_F2C}])
635
  F2C=
635
  F2C=
636
fi
636
fi
637
if test -n "${F77}"; then
637
if test -n "${F77}"; then
638
  AC_MSG_RESULT([defining F77 to be ${F77}])
638
  AC_MSG_RESULT([defining F77 to be ${F77}])
639
elif test -z "${F2C}"; then
639
elif test -z "${F2C}"; then
640
  F77=
640
  F77=
641
  case "${host_os}" in
641
  case "${host_os}" in
642
    hpux*)
642
    hpux*)
643
      AC_CHECK_PROGS(F77, [g77 fort77 f77 xlf frt pgf77 fl32 af77 f90 \
643
      AC_CHECK_PROGS(F77, [g77 fort77 f77 xlf frt pgf77 fl32 af77 f90 \
644
                           xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])
644
                           xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])
645
      ;;
645
      ;;
646
    *)
646
    *)
647
      AC_CHECK_PROGS(F77, [g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 \
647
      AC_CHECK_PROGS(F77, [g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 \
648
                           xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])
648
                           xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 fc])
649
      ;;
649
      ;;
650
  esac
650
  esac
651
  if test -z "${F77}"; then
651
  if test -z "${F77}"; then
652
    AC_CHECK_PROG(F2C, f2c, f2c, [])
652
    AC_CHECK_PROG(F2C, f2c, f2c, [])
653
  fi
653
  fi
654
else
654
else
655
  AC_MSG_RESULT([defining F2C to be ${F2C}])
655
  AC_MSG_RESULT([defining F2C to be ${F2C}])
656
fi
656
fi
657
if test -n "${F77}"; then
657
if test -n "${F77}"; then
658
  ## If the above 'found' a Fortran 77 compiler, we run AC_PROG_F77 as
658
  ## If the above 'found' a Fortran 77 compiler, we run AC_PROG_F77 as
659
  ## this does additional testing (GNU, '-g', ...).
659
  ## this does additional testing (GNU, '-g', ...).
660
  AC_PROG_F77
660
  AC_PROG_F77
661
elif test -z "${F2C}"; then
661
elif test -z "${F2C}"; then
662
  AC_MSG_ERROR([Neither an F77 compiler nor f2c found])
662
  AC_MSG_ERROR([Neither an F77 compiler nor f2c found])
663
fi
663
fi
664
])# R_PROG_F77_OR_F2C
664
])# R_PROG_F77_OR_F2C
665
 
665
 
666
## R_PROG_F77_FLIBS
666
## R_PROG_F77_FLIBS
667
## ----------------
667
## ----------------
668
## Run AC_F77_LIBRARY_LDFLAGS, and fix some known problems with FLIBS.
668
## Run AC_F77_LIBRARY_LDFLAGS, and fix some known problems with FLIBS.
669
AC_DEFUN([R_PROG_F77_FLIBS],
669
AC_DEFUN([R_PROG_F77_FLIBS],
670
[AC_BEFORE([$0], [AC_F77_LIBRARY_LDFLAGS])
670
[AC_BEFORE([$0], [AC_F77_LIBRARY_LDFLAGS])
671
## Currently (Autoconf 2.50 or better, it seems) FLIBS also contains all
671
## Currently (Autoconf 2.50 or better, it seems) FLIBS also contains all
672
## elements of LIBS when AC_F77_LIBRARY_LDFLAGS is run.  This is because
672
## elements of LIBS when AC_F77_LIBRARY_LDFLAGS is run.  This is because
673
## _AC_PROG_F77_V_OUTPUT() uses 'eval $ac_link' for obtaining verbose
673
## _AC_PROG_F77_V_OUTPUT() uses 'eval $ac_link' for obtaining verbose
674
## linker output, and AC_LANG(Fortran 77) sets up ac_link to contain
674
## linker output, and AC_LANG(Fortran 77) sets up ac_link to contain
675
## LIBS.  Most likely a bug, and a nuisance in any case ... 
675
## LIBS.  Most likely a bug, and a nuisance in any case ... 
676
## But we cannot simply eliminate the elements in FLIBS duplicated from
676
## But we cannot simply eliminate the elements in FLIBS duplicated from
677
## LIBS (e.g. '-lm' should be preserved).  Hence, we try to call
677
## LIBS (e.g. '-lm' should be preserved).  Hence, we try to call
678
## AC_F77_LIBRARY_LDFLAGS() with LIBS temporarily set to empty.
678
## AC_F77_LIBRARY_LDFLAGS() with LIBS temporarily set to empty.
679
r_save_LIBS="${LIBS}"
679
r_save_LIBS="${LIBS}"
680
LIBS=
680
LIBS=
681
AC_F77_LIBRARY_LDFLAGS
681
AC_F77_LIBRARY_LDFLAGS
682
LIBS="${r_save_LIBS}"
682
LIBS="${r_save_LIBS}"
683
## Currently g77 on Darwin links against '-lcrt1.o' (and for GCC 3.1 or
683
## Currently g77 on Darwin links against '-lcrt1.o' (and for GCC 3.1 or
684
## better also against '-lcrtbegin.o'), which (unlike '-lcrt0.o') are
684
## better also against '-lcrtbegin.o'), which (unlike '-lcrt0.o') are
685
## not stripped by AC_F77_LIBRARY_LDFLAGS.  This in particular causes
685
## not stripped by AC_F77_LIBRARY_LDFLAGS.  This in particular causes
686
## R_PROG_F77_CC_COMPAT to fail.  Hence, we make sure all -lcrt*.o are
686
## R_PROG_F77_CC_COMPAT to fail.  Hence, we make sure all -lcrt*.o are
687
## removed.
687
## removed.
688
##
688
##
689
## Native f90 on HPUX 11 comes up with '-l:libF90.a' causing trouble
689
## Native f90 on HPUX 11 comes up with '-l:libF90.a' causing trouble
690
## when using gcc for linking.  The '-l:' construction is similar to
690
## when using gcc for linking.  The '-l:' construction is similar to
691
## plain '-l' except that search order (archive/shared) given by '-a'
691
## plain '-l' except that search order (archive/shared) given by '-a'
692
## is not important.  We escape such flags via '-Wl,' in case of gcc.
692
## is not important.  We escape such flags via '-Wl,' in case of gcc.
693
## Note that the current Autoconf CVS uses _AC_LINKER_OPTION for a
693
## Note that the current Autoconf CVS uses _AC_LINKER_OPTION for a
694
## similar purpose when computing FLIBS: this uses '-Xlinker' escapes
694
## similar purpose when computing FLIBS: this uses '-Xlinker' escapes
695
## for gcc and does nothing otherwise.  Note also that we cannot simply
695
## for gcc and does nothing otherwise.  Note also that we cannot simply
696
## unconditionally escape with '${wl}' from libtool as on HPUX we need
696
## unconditionally escape with '${wl}' from libtool as on HPUX we need
697
## SHLIB_LD=ld for native C compilers (problem with non-PIC 'crt0.o',
697
## SHLIB_LD=ld for native C compilers (problem with non-PIC 'crt0.o',
698
## see 'Individual platform overrides' in section 'DLL stuff' in file
698
## see 'Individual platform overrides' in section 'DLL stuff' in file
699
## 'configure.ac'.
699
## 'configure.ac'.
700
##
700
##
701
## Using the Intel Fortran compiler (ifc) one typically gets incorrect
701
## Using the Intel Fortran compiler (ifc) one typically gets incorrect
702
## flags, as the output from _AC_PROG_F77_V_OUTPUT() contains double
702
## flags, as the output from _AC_PROG_F77_V_OUTPUT() contains double
703
## quoted options, e.g. "-mGLOB_options_string=......", see also e.g.
703
## quoted options, e.g. "-mGLOB_options_string=......", see also e.g.
704
## http://www.octave.org/octave-lists/archive/octave-maintainers.2002/msg00038.html.
704
## http://www.octave.org/octave-lists/archive/octave-maintainers.2002/msg00038.html.
705
## One possible solution is to change AC_F77_LIBRARY_LDFLAGS() to remove
705
## One possible solution is to change AC_F77_LIBRARY_LDFLAGS() to remove
706
## double quotes for ifc, as it already does for the Cray cft90.  As we
706
## double quotes for ifc, as it already does for the Cray cft90.  As we
707
## prefer not to overload Autoconf code, we try to fix things here ...
707
## prefer not to overload Autoconf code, we try to fix things here ...
708
flibs=
708
flibs=
709
if test "${GCC}" = yes; then
709
if test "${GCC}" = yes; then
710
  linker_option="-Wl,"
710
  linker_option="-Wl,"
711
else
711
else
712
  linker_option=
712
  linker_option=
713
fi
713
fi
714
for arg in ${FLIBS}; do
714
for arg in ${FLIBS}; do
715
  case "${arg}" in
715
  case "${arg}" in
716
    -lcrt*.o)
716
    -lcrt*.o)
717
      ;;
717
      ;;
718
    -[[a-zA-Z]]/*\" | -[[a-zA-Z]]*\\) # ifc
718
    -[[a-zA-Z]]/*\" | -[[a-zA-Z]]*\\) # ifc
719
      ;;
719
      ;;
720
    -l:*)
720
    -l:*)
721
      flibs="${flibs} ${linker_option}${arg}"
721
      flibs="${flibs} ${linker_option}${arg}"
722
      ;;
722
      ;;
723
    *)
723
    *)
724
      flibs="${flibs} ${arg}"
724
      flibs="${flibs} ${arg}"
725
      ;;
725
      ;;
726
  esac
726
  esac
727
done
727
done
728
FLIBS="${flibs}"
728
FLIBS="${flibs}"
729
## Versions of g77 up to 3.0.x only have a non-PIC (static) -lg2c which
729
## Versions of g77 up to 3.0.x only have a non-PIC (static) -lg2c which
730
## on some platforms means one cannot build dynamically loadable modules
730
## on some platforms means one cannot build dynamically loadable modules
731
## containing Fortran code.  (g77 3.1 will have a shared -lg2c too.)  As
731
## containing Fortran code.  (g77 3.1 will have a shared -lg2c too.)  As
732
## a workaround, Debian provides -lg2c-pic which holds pic objects only,
732
## a workaround, Debian provides -lg2c-pic which holds pic objects only,
733
## and we should use in case we can find it ...
733
## and we should use in case we can find it ...
734
if test "${G77}" = yes; then
734
if test "${G77}" = yes; then
735
  r_save_LIBS="${LIBS}"
735
  r_save_LIBS="${LIBS}"
736
  flibs=`echo "${FLIBS}" | sed 's/-lg2c/-lg2c-pic/'`
736
  flibs=`echo "${FLIBS}" | sed 's/-lg2c/-lg2c-pic/'`
737
  LIBS="${flibs} ${LIBS}"
737
  LIBS="${flibs} ${LIBS}"
738
  AC_LANG_PUSH(C)
738
  AC_LANG_PUSH(C)
739
  AC_LINK_IFELSE([AC_LANG_PROGRAM()], [FLIBS="${flibs}"], [])
739
  AC_LINK_IFELSE([AC_LANG_PROGRAM()], [FLIBS="${flibs}"], [])
740
  AC_LANG_POP(C)
740
  AC_LANG_POP(C)
741
  LIBS="${r_save_LIBS}"
741
  LIBS="${r_save_LIBS}"
742
fi
742
fi
743
])# R_PROG_F77_FLIBS
743
])# R_PROG_F77_FLIBS
744
 
744
 
745
## R_PROG_F77_APPEND_UNDERSCORE
745
## R_PROG_F77_APPEND_UNDERSCORE
746
## ----------------------------
746
## ----------------------------
747
## See if the Fortran 77 compiler appends underscores.
747
## See if the Fortran 77 compiler appends underscores.
748
## What we really should do is determine how to properly mangle the 
748
## What we really should do is determine how to properly mangle the 
749
## names of C/C++ identifiers (potentially containing underscores) so
749
## names of C/C++ identifiers (potentially containing underscores) so
750
## that they match the name-mangling scheme used by the Fortran 77
750
## that they match the name-mangling scheme used by the Fortran 77
751
## compiler.  Autoconf 2.50 or better has macros F77_FUNC(name, NAME)
751
## compiler.  Autoconf 2.50 or better has macros F77_FUNC(name, NAME)
752
## and F77_FUNC_(name, NAME) for this.  However, the F77_* macros in
752
## and F77_FUNC_(name, NAME) for this.  However, the F77_* macros in
753
## the R API have one argument only and therefore cannot deal with 
753
## the R API have one argument only and therefore cannot deal with 
754
## Fortran 77 compilers which convert to upper case or add an extra
754
## Fortran 77 compilers which convert to upper case or add an extra
755
## underscore for identifiers containing underscores.  We give an error
755
## underscore for identifiers containing underscores.  We give an error
756
## in the former case; as ISO Fortran 77 does not allow underscores in
756
## in the former case; as ISO Fortran 77 does not allow underscores in
757
## function names, we do nothing about the latter.
757
## function names, we do nothing about the latter.
758
AC_DEFUN([R_PROG_F77_APPEND_UNDERSCORE],
758
AC_DEFUN([R_PROG_F77_APPEND_UNDERSCORE],
759
[AC_REQUIRE([AC_F77_WRAPPERS])
759
[AC_REQUIRE([AC_F77_WRAPPERS])
760
## DANGER!  We really needs the results of _AC_F77_NAME_MANGLING as
760
## DANGER!  We really needs the results of _AC_F77_NAME_MANGLING as
761
## stored in the cache var ac_cv_f77_mangling which is not documented
761
## stored in the cache var ac_cv_f77_mangling which is not documented
762
## and hence may change ...
762
## and hence may change ...
763
case "${ac_cv_f77_mangling}" in
763
case "${ac_cv_f77_mangling}" in
764
  "upper "*)
764
  "upper "*)
765
    AC_MSG_WARN([Fortran compiler uses uppercase external names])
765
    AC_MSG_WARN([Fortran compiler uses uppercase external names])
766
    AC_MSG_ERROR([cannot use Fortran])
766
    AC_MSG_ERROR([cannot use Fortran])
767
    ;;
767
    ;;
768
esac
768
esac
769
AC_MSG_CHECKING([whether ${F77} appends underscores to external names])
769
AC_MSG_CHECKING([whether ${F77} appends underscores to external names])
770
AC_CACHE_VAL([r_cv_prog_f77_append_underscore],
770
AC_CACHE_VAL([r_cv_prog_f77_append_underscore],
771
[case "${ac_cv_f77_mangling}" in
771
[case "${ac_cv_f77_mangling}" in
772
  *", underscore, "*)
772
  *", underscore, "*)
773
    r_cv_prog_f77_append_underscore=yes
773
    r_cv_prog_f77_append_underscore=yes
774
    ;;
774
    ;;
775
  *", no underscore, "*)
775
  *", no underscore, "*)
776
    r_cv_prog_f77_append_underscore=no
776
    r_cv_prog_f77_append_underscore=no
777
    ;;
777
    ;;
778
esac])
778
esac])
779
if test -n "${r_cv_prog_f77_append_underscore}"; then
779
if test -n "${r_cv_prog_f77_append_underscore}"; then
780
  AC_MSG_RESULT([${r_cv_prog_f77_append_underscore}])
780
  AC_MSG_RESULT([${r_cv_prog_f77_append_underscore}])
781
else
781
else
782
  AC_MSG_RESULT([unknown])
782
  AC_MSG_RESULT([unknown])
783
  AC_MSG_ERROR([cannot use Fortran])
783
  AC_MSG_ERROR([cannot use Fortran])
784
fi
784
fi
785
if test "${r_cv_prog_f77_append_underscore}" = yes; then
785
if test "${r_cv_prog_f77_append_underscore}" = yes; then
786
  AC_DEFINE(HAVE_F77_UNDERSCORE, 1,
786
  AC_DEFINE(HAVE_F77_UNDERSCORE, 1,
787
            [Define if your Fortran compiler appends an underscore to
787
            [Define if your Fortran compiler appends an underscore to
788
             external names.])
788
             external names.])
789
fi
789
fi
790
])# R_PROG_F77_APPEND_UNDERSCORE
790
])# R_PROG_F77_APPEND_UNDERSCORE
791
 
791
 
792
## R_PROG_F77_CAN_RUN
792
## R_PROG_F77_CAN_RUN
793
## --------------------
793
## --------------------
794
## Check whether the C/Fortran set up produces runnable code, as
794
## Check whether the C/Fortran set up produces runnable code, as
795
## a preliminary to the compatibility tests.
795
## a preliminary to the compatibility tests.
796
## May fail if Fortran shared libraries are not in the library path.
796
## May fail if Fortran shared libraries are not in the library path.
797
AC_DEFUN([R_PROG_F77_CAN_RUN],
797
AC_DEFUN([R_PROG_F77_CAN_RUN],
798
[AC_REQUIRE([AC_CHECK_LIBM])
798
[AC_REQUIRE([AC_CHECK_LIBM])
799
AC_MSG_CHECKING([whether mixed C/Fortran code can be run])
799
AC_MSG_CHECKING([whether mixed C/Fortran code can be run])
800
AC_CACHE_VAL([r_cv_prog_f77_can_run],
800
AC_CACHE_VAL([r_cv_prog_f77_can_run],
801
[cat > conftestf.f <<EOF
801
[cat > conftestf.f <<EOF
802
      subroutine cftest(a, b, x, y)
802
      subroutine cftest(a, b, x, y)
803
      integer a(3), b(2)
803
      integer a(3), b(2)
804
      double precision x(3), y(3)
804
      double precision x(3), y(3)
805
      end
805
      end
806
EOF
806
EOF
807
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
807
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
808
## Yes we need to double quote this ...
808
## Yes we need to double quote this ...
809
[cat > conftest.c <<EOF
809
[cat > conftest.c <<EOF
810
#include <math.h>
810
#include <math.h>
811
#include "confdefs.h"
811
#include "confdefs.h"
812
#ifdef HAVE_F77_UNDERSCORE
812
#ifdef HAVE_F77_UNDERSCORE
813
# define F77_SYMBOL(x)   x ## _
813
# define F77_SYMBOL(x)   x ## _
814
#else
814
#else
815
# define F77_SYMBOL(x)   x
815
# define F77_SYMBOL(x)   x
816
#endif
816
#endif
817
int main () {
817
int main () {
818
  exit(0);
818
  exit(0);
819
}
819
}
820
EOF]
820
EOF]
821
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
821
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
822
  ## <NOTE>
822
  ## <NOTE>
823
  ## This should really use MAIN_LD, and hence come after this is
823
  ## This should really use MAIN_LD, and hence come after this is
824
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
824
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
825
  ## But it seems that we currently can always use the C compiler.
825
  ## But it seems that we currently can always use the C compiler.
826
  ## Also, to be defensive there should be a similar test with SHLIB_LD
826
  ## Also, to be defensive there should be a similar test with SHLIB_LD
827
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
827
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
828
  ## use ld for SHLIB_LD) ...
828
  ## use ld for SHLIB_LD) ...
829
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
829
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
830
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
830
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
831
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
831
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
832
  ## </NOTE>
832
  ## </NOTE>
833
  then
833
  then
834
    output=`./conftest${ac_exeext} 2>&1`
834
    output=`./conftest${ac_exeext} 2>&1`
835
    if test ${?} = 0; then
835
    if test ${?} = 0; then
836
      r_cv_prog_f77_can_run=yes
836
      r_cv_prog_f77_can_run=yes
837
    fi
837
    fi
838
  fi
838
  fi
839
fi
839
fi
840
])
840
])
841
rm -rf conftest conftest.* conftestf.* core
841
rm -rf conftest conftest.* conftestf.* core
842
if test -n "${r_cv_prog_f77_can_run}"; then
842
if test -n "${r_cv_prog_f77_can_run}"; then
843
  AC_MSG_RESULT([yes])
843
  AC_MSG_RESULT([yes])
844
else
844
else
845
  AC_MSG_WARN([cannot run mixed C/Fortan code])
845
  AC_MSG_WARN([cannot run mixed C/Fortan code])
846
  AC_MSG_ERROR([Maybe check LDFLAGS for paths to Fortran libraries?])
846
  AC_MSG_ERROR([Maybe check LDFLAGS for paths to Fortran libraries?])
847
fi
847
fi
848
])# R_PROG_F77_CAN_RUN
848
])# R_PROG_F77_CAN_RUN
849
 
849
 
850
## R_PROG_F77_CC_COMPAT
850
## R_PROG_F77_CC_COMPAT
851
## --------------------
851
## --------------------
852
## Check whether the Fortran 77 and C compilers agree on int and double.
852
## Check whether the Fortran 77 and C compilers agree on int and double.
853
AC_DEFUN([R_PROG_F77_CC_COMPAT],
853
AC_DEFUN([R_PROG_F77_CC_COMPAT],
854
[AC_REQUIRE([AC_CHECK_LIBM])
854
[AC_REQUIRE([AC_CHECK_LIBM])
855
AC_MSG_CHECKING([whether ${F77} and ${CC} agree on int and double])
855
AC_MSG_CHECKING([whether ${F77} and ${CC} agree on int and double])
856
AC_CACHE_VAL([r_cv_prog_f77_cc_compat],
856
AC_CACHE_VAL([r_cv_prog_f77_cc_compat],
857
[cat > conftestf.f <<EOF
857
[cat > conftestf.f <<EOF
858
      subroutine cftest(a, b, x, y)
858
      subroutine cftest(a, b, x, y)
859
      integer a(3), b(2)
859
      integer a(3), b(2)
860
      double precision x(3), y(3)
860
      double precision x(3), y(3)
861
 
861
 
862
      b(1) = a(3)/a(2)
862
      b(1) = a(3)/a(2)
863
      b(2) = a(3) - a(1)*a(2)
863
      b(2) = a(3) - a(1)*a(2)
864
      y(1) = dble(a(3))/x(2)
864
      y(1) = dble(a(3))/x(2)
865
      y(2) = x(3)*x(1)
865
      y(2) = x(3)*x(1)
866
      y(3) = (x(2)/x(1)) ** a(1)
866
      y(3) = (x(2)/x(1)) ** a(1)
867
      end
867
      end
868
EOF
868
EOF
869
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
869
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
870
## Yes we need to double quote this ...
870
## Yes we need to double quote this ...
871
[cat > conftest.c <<EOF
871
[cat > conftest.c <<EOF
872
#include <math.h>
872
#include <math.h>
873
#include "confdefs.h"
873
#include "confdefs.h"
874
#ifdef HAVE_F77_UNDERSCORE
874
#ifdef HAVE_F77_UNDERSCORE
875
# define F77_SYMBOL(x)   x ## _
875
# define F77_SYMBOL(x)   x ## _
876
#else
876
#else
877
# define F77_SYMBOL(x)   x
877
# define F77_SYMBOL(x)   x
878
#endif
878
#endif
879
 
879
 
880
extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
880
extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
881
 
881
 
882
int main () {
882
int main () {
883
  int a[3] = {17, 237, 2000000000}, b[2], res = 0;
883
  int a[3] = {17, 237, 2000000000}, b[2], res = 0;
884
  double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
884
  double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
885
  double eps = 1e-6;
885
  double eps = 1e-6;
886
  double zres[3];
886
  double zres[3];
887
  int i, bres[2];
887
  int i, bres[2];
888
 
888
 
889
  zres[0] = (double) a[2]/x[1];
889
  zres[0] = (double) a[2]/x[1];
890
  zres[1] = x[2]*x[0];
890
  zres[1] = x[2]*x[0];
891
  zres[2] = pow(x[1]/x[0], 17.0);
891
  zres[2] = pow(x[1]/x[0], 17.0);
892
  bres[0] = a[2]/a[1];
892
  bres[0] = a[2]/a[1];
893
  bres[1] = a[2] - a[0]*a[1];
893
  bres[1] = a[2] - a[0]*a[1];
894
  F77_SYMBOL(cftest)(a, b, x, z);
894
  F77_SYMBOL(cftest)(a, b, x, z);
895
  if(b[0] != bres[0]) res++;
895
  if(b[0] != bres[0]) res++;
896
  if(b[1] != bres[1]) res++;
896
  if(b[1] != bres[1]) res++;
897
  for(i = 0; i < 3; i++)
897
  for(i = 0; i < 3; i++)
898
    if(fabs(z[i]/zres[i] - 1) > eps) res++;
898
    if(fabs(z[i]/zres[i] - 1) > eps) res++;
899
  printf("number of errors %d\n", res);
899
  printf("number of errors %d\n", res);
900
  exit(res);
900
  exit(res);
901
}
901
}
902
EOF]
902
EOF]
903
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
903
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
904
  ## <NOTE>
904
  ## <NOTE>
905
  ## This should really use MAIN_LD, and hence come after this is
905
  ## This should really use MAIN_LD, and hence come after this is
906
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
906
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
907
  ## But it seems that we currently can always use the C compiler.
907
  ## But it seems that we currently can always use the C compiler.
908
  ## Also, to be defensive there should be a similar test with SHLIB_LD
908
  ## Also, to be defensive there should be a similar test with SHLIB_LD
909
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
909
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
910
  ## use ld for SHLIB_LD) ...
910
  ## use ld for SHLIB_LD) ...
911
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
911
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
912
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
912
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
913
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
913
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
914
  ## </NOTE>
914
  ## </NOTE>
915
  then
915
  then
916
    output=`./conftest${ac_exeext} 2>&1`
916
    output=`./conftest${ac_exeext} 2>&1`
917
    if test ${?} = 0; then
917
    if test ${?} = 0; then
918
      r_cv_prog_f77_cc_compat=yes
918
      r_cv_prog_f77_cc_compat=yes
919
    fi
919
    fi
920
  fi
920
  fi
921
fi
921
fi
922
])
922
])
923
rm -rf conftest conftest.* conftestf.* core
923
rm -rf conftest conftest.* conftestf.* core
924
if test -n "${r_cv_prog_f77_cc_compat}"; then
924
if test -n "${r_cv_prog_f77_cc_compat}"; then
925
  AC_MSG_RESULT([yes])
925
  AC_MSG_RESULT([yes])
926
else
926
else
927
  AC_MSG_WARN([${F77} and ${CC} disagree on int and double])
927
  AC_MSG_WARN([${F77} and ${CC} disagree on int and double])
928
  AC_MSG_ERROR([Maybe change CFLAGS or FFLAGS?])
928
  AC_MSG_ERROR([Maybe change CFLAGS or FFLAGS?])
929
fi
929
fi
930
])# R_PROG_F77_CC_COMPAT
930
])# R_PROG_F77_CC_COMPAT
931
 
931
 
932
## R_PROG_F77_CC_COMPAT_COMPLEX
932
## R_PROG_F77_CC_COMPAT_COMPLEX
933
## ----------------------------
933
## ----------------------------
934
## Check whether the Fortran 77 and C compilers agree on double complex.
934
## Check whether the Fortran 77 and C compilers agree on double complex.
935
AC_DEFUN([R_PROG_F77_CC_COMPAT_COMPLEX],
935
AC_DEFUN([R_PROG_F77_CC_COMPAT_COMPLEX],
936
[AC_REQUIRE([AC_CHECK_LIBM])
936
[AC_REQUIRE([AC_CHECK_LIBM])
937
AC_MSG_CHECKING([whether ${F77} and ${CC} agree on double complex])
937
AC_MSG_CHECKING([whether ${F77} and ${CC} agree on double complex])
938
AC_CACHE_VAL([r_cv_prog_f77_cc_compat_complex],
938
AC_CACHE_VAL([r_cv_prog_f77_cc_compat_complex],
939
[cat > conftestf.f <<EOF
939
[cat > conftestf.f <<EOF
940
      subroutine cftest(x)
940
      subroutine cftest(x)
941
      complex*16 x(3)
941
      complex*16 x(3)
942
      integer i
942
      integer i
943
 
943
 
944
c a few tests of constructs that are sometimes missing
944
c a few tests of constructs that are sometimes missing
945
      if(x(1) .eq. x(1)) i = 0
945
      if(x(1) .eq. x(1)) i = 0
946
      x(1) = x(1)*x(2) + x(3)
946
      x(1) = x(1)*x(2) + x(3)
947
      end
947
      end
948
EOF
948
EOF
949
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
949
${F77} ${FFLAGS} -c conftestf.f 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
950
## Yes we need to double quote this ...
950
## Yes we need to double quote this ...
951
[cat > conftest.c <<EOF
951
[cat > conftest.c <<EOF
952
#include <math.h>
952
#include <math.h>
953
#include "confdefs.h"
953
#include "confdefs.h"
954
#ifdef HAVE_F77_UNDERSCORE
954
#ifdef HAVE_F77_UNDERSCORE
955
# define F77_SYMBOL(x)   x ## _
955
# define F77_SYMBOL(x)   x ## _
956
#else
956
#else
957
# define F77_SYMBOL(x)   x
957
# define F77_SYMBOL(x)   x
958
#endif
958
#endif
959
 
959
 
960
typedef struct {
960
typedef struct {
961
        double r;
961
        double r;
962
        double i;
962
        double i;
963
} Rcomplex;
963
} Rcomplex;
964
 
964
 
965
extern void F77_SYMBOL(cftest)(Rcomplex *x);
965
extern void F77_SYMBOL(cftest)(Rcomplex *x);
966
 
966
 
967
int main () {
967
int main () {
968
    Rcomplex z[3];
968
    Rcomplex z[3];
969
    
969
    
970
    z[0].r = 3.14159265;
970
    z[0].r = 3.14159265;
971
    z[0].i = 2.172;
971
    z[0].i = 2.172;
972
    z[1].i = 3.14159265;
972
    z[1].i = 3.14159265;
973
    z[1].r = 2.172;
973
    z[1].r = 2.172;
974
    z[2].r = 123.456;
974
    z[2].r = 123.456;
975
    z[2].i = 0.123456;
975
    z[2].i = 0.123456;
976
    F77_SYMBOL(cftest)(z);
976
    F77_SYMBOL(cftest)(z);
977
    printf("%f %f\n", z[0].r, z[0].i);
977
    printf("%f %f\n", z[0].r, z[0].i);
978
    if(fabs(z[0].r - 123.456) < 1e-4 && fabs(z[0].i - 14.71065) < 1e-4)
978
    if(fabs(z[0].r - 123.456) < 1e-4 && fabs(z[0].i - 14.71065) < 1e-4)
979
	exit(0);
979
	exit(0);
980
    else exit(1);
980
    else exit(1);
981
}
981
}
982
EOF]
982
EOF]
983
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
983
if ${CC} ${CFLAGS} -c conftest.c 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
984
  ## <NOTE>
984
  ## <NOTE>
985
  ## This should really use MAIN_LD, and hence come after this is
985
  ## This should really use MAIN_LD, and hence come after this is
986
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
986
  ## determined (and necessary additions to MAIN_LDFLAGS were made).
987
  ## But it seems that we currently can always use the C compiler.
987
  ## But it seems that we currently can always use the C compiler.
988
  ## Also, to be defensive there should be a similar test with SHLIB_LD
988
  ## Also, to be defensive there should be a similar test with SHLIB_LD
989
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
989
  ## and SHLIB_LDFLAGS (and note that on HPUX with native cc we have to
990
  ## use ld for SHLIB_LD) ...
990
  ## use ld for SHLIB_LD) ...
991
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
991
  if ${CC} ${LDFLAGS} ${MAIN_LDFLAGS} -o conftest${ac_exeext} \
992
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
992
       conftest.${ac_objext} conftestf.${ac_objext} ${FLIBS} \
993
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
993
       ${LIBM} 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
994
  ## </NOTE>
994
  ## </NOTE>
995
  then
995
  then
996
    output=`./conftest${ac_exeext} 2>&1`
996
    output=`./conftest${ac_exeext} 2>&1`
997
    if test ${?} = 0; then
997
    if test ${?} = 0; then
998
      r_cv_prog_f77_cc_compat_complex=yes
998
      r_cv_prog_f77_cc_compat_complex=yes
999
    fi
999
    fi
1000
  fi
1000
  fi
1001
fi
1001
fi
1002
])
1002
])
1003
rm -rf conftest conftest.* conftestf.* core
1003
rm -rf conftest conftest.* conftestf.* core
1004
if test -n "${r_cv_prog_f77_cc_compat_complex}"; then
1004
if test -n "${r_cv_prog_f77_cc_compat_complex}"; then
1005
  AC_MSG_RESULT([yes])
1005
  AC_MSG_RESULT([yes])
1006
  AC_DEFINE(HAVE_DOUBLE_COMPLEX, 1,
1006
  AC_DEFINE(HAVE_DOUBLE_COMPLEX, 1,
1007
            [Define if C's Rcomplex and Fortran's COMPLEX*16 can be
1007
            [Define if C's Rcomplex and Fortran's COMPLEX*16 can be
1008
             interchanged, and can do arithmetic on the latter.])
1008
             interchanged, and can do arithmetic on the latter.])
1009
else
1009
else
1010
  warn_f77_cc_double_complex="${F77} and ${CC} disagree on double complex"
1010
  warn_f77_cc_double_complex="${F77} and ${CC} disagree on double complex"
1011
  AC_MSG_WARN([${warn_f77_cc_double_complex}])
1011
  AC_MSG_WARN([${warn_f77_cc_double_complex}])
1012
fi
1012
fi
1013
AC_SUBST(HAVE_DOUBLE_COMPLEX)
1013
AC_SUBST(HAVE_DOUBLE_COMPLEX)
1014
])# R_PROG_F77_CC_COMPAT_COMPLEX
1014
])# R_PROG_F77_CC_COMPAT_COMPLEX
1015
 
1015
 
1016
## R_PROG_F77_C_O_LO
1016
## R_PROG_F77_C_O_LO
1017
## -----------------
1017
## -----------------
1018
## Check whether the Fortran compiler supports '-c -o FILE.lo'.
1018
## Check whether the Fortran compiler supports '-c -o FILE.lo'.
1019
AC_DEFUN([R_PROG_F77_C_O_LO],
1019
AC_DEFUN([R_PROG_F77_C_O_LO],
1020
[AC_CACHE_CHECK([whether ${F77} supports -c -o FILE.lo],
1020
[AC_CACHE_CHECK([whether ${F77} supports -c -o FILE.lo],
1021
                [r_cv_prog_f77_c_o_lo],
1021
                [r_cv_prog_f77_c_o_lo],
1022
[test -d TMP || mkdir TMP
1022
[test -d TMP || mkdir TMP
1023
cat > conftest.f <<EOF
1023
cat > conftest.f <<EOF
1024
      program conftest
1024
      program conftest
1025
      end
1025
      end
1026
EOF
1026
EOF
1027
ac_try='${F77} ${FFLAGS} -c conftest.f -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
1027
ac_try='${F77} ${FFLAGS} -c conftest.f -o TMP/conftest.lo 1>&AS_MESSAGE_LOG_FD'
1028
if AC_TRY_EVAL(ac_try) \
1028
if AC_TRY_EVAL(ac_try) \
1029
    && test -f TMP/conftest.lo \
1029
    && test -f TMP/conftest.lo \
1030
    && AC_TRY_EVAL(ac_try); then
1030
    && AC_TRY_EVAL(ac_try); then
1031
  r_cv_prog_f77_c_o_lo=yes
1031
  r_cv_prog_f77_c_o_lo=yes
1032
else
1032
else
1033
  r_cv_prog_f77_c_o_lo=no
1033
  r_cv_prog_f77_c_o_lo=no
1034
fi
1034
fi
1035
rm -rf conftest* TMP])
1035
rm -rf conftest* TMP])
1036
])# R_PROG_F77_C_O_LO
1036
])# R_PROG_F77_C_O_LO
1037
 
1037
 
1038
## R_PROG_F77_MAKEFRAG
1038
## R_PROG_F77_MAKEFRAG
1039
## -------------------
1039
## -------------------
1040
## Generate a Make fragment with suffix rules for Fortran 77 source
1040
## Generate a Make fragment with suffix rules for Fortran 77 source
1041
## files when using a Fortran 77 compiler.
1041
## files when using a Fortran 77 compiler.
1042
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
1042
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
1043
AC_DEFUN([R_PROG_F77_MAKEFRAG],
1043
AC_DEFUN([R_PROG_F77_MAKEFRAG],
1044
[AC_REQUIRE([R_PROG_F77_C_O_LO])
1044
[AC_REQUIRE([R_PROG_F77_C_O_LO])
1045
r_f77_rules_frag=Makefrag.f77
1045
r_f77_rules_frag=Makefrag.f77
1046
cat << \EOF > ${r_f77_rules_frag}
1046
cat << \EOF > ${r_f77_rules_frag}
1047
.f.c:
1047
.f.c:
1048
.f.o:
1048
.f.o:
1049
	$(F77) $(ALL_FFLAGS) -c $< -o $[@]
1049
	$(F77) $(ALL_FFLAGS) -c $< -o $[@]
1050
EOF
1050
EOF
1051
if test "${r_cv_prog_f77_c_o_lo}" = yes; then
1051
if test "${r_cv_prog_f77_c_o_lo}" = yes; then
1052
  cat << \EOF >> ${r_f77_rules_frag}
1052
  cat << \EOF >> ${r_f77_rules_frag}
1053
.f.lo:
1053
.f.lo:
1054
	$(F77) $(ALL_FFLAGS_LO) -c $< -o $[@]
1054
	$(F77) $(ALL_FFLAGS_LO) -c $< -o $[@]
1055
EOF
1055
EOF
1056
else
1056
else
1057
  cat << \EOF >> ${r_f77_rules_frag}
1057
  cat << \EOF >> ${r_f77_rules_frag}
1058
.f.lo:
1058
.f.lo:
1059
	@test -d .libs || mkdir .libs
1059
	@test -d .libs || mkdir .libs
1060
	$(F77) $(ALL_FFLAGS_LO) -c $< -o .libs/$[*].o
1060
	$(F77) $(ALL_FFLAGS_LO) -c $< -o .libs/$[*].o
1061
	mv .libs/$[*].o $[*].lo
1061
	mv .libs/$[*].o $[*].lo
1062
EOF
1062
EOF
1063
fi
1063
fi
1064
AC_SUBST_FILE(r_f77_rules_frag)
1064
AC_SUBST_FILE(r_f77_rules_frag)
1065
])# R_PROG_F77_MAKEFRAG
1065
])# R_PROG_F77_MAKEFRAG
1066
 
1066
 
1067
## R_PROG_F77_FLAG(FLAG, [ACTION-IF-TRUE])
1067
## R_PROG_F77_FLAG(FLAG, [ACTION-IF-TRUE])
1068
## ---------------------------------------
1068
## ---------------------------------------
1069
## Check whether the Fortran 77 compiler handles command line option
1069
## Check whether the Fortran 77 compiler handles command line option
1070
## FLAG, and set shell variable r_cv_prog_f77_flag_SFLAG accordingly
1070
## FLAG, and set shell variable r_cv_prog_f77_flag_SFLAG accordingly
1071
## (where SFLAG is a shell-safe transliteration of FLAG).
1071
## (where SFLAG is a shell-safe transliteration of FLAG).
1072
## In addition, execute ACTION-IF-TRUE in case of success.
1072
## In addition, execute ACTION-IF-TRUE in case of success.
1073
AC_DEFUN([R_PROG_F77_FLAG],
1073
AC_DEFUN([R_PROG_F77_FLAG],
1074
[ac_safe=AS_TR_SH($1)
1074
[ac_safe=AS_TR_SH($1)
1075
AC_MSG_CHECKING([whether ${F77} accepts $1])
1075
AC_MSG_CHECKING([whether ${F77} accepts $1])
1076
AC_CACHE_VAL([r_cv_prog_f77_flag_${ac_safe}],
1076
AC_CACHE_VAL([r_cv_prog_f77_flag_${ac_safe}],
1077
[AC_LANG_PUSH(Fortran 77)
1077
[AC_LANG_PUSH(Fortran 77)
1078
r_save_FFLAGS="${FFLAGS}"
1078
r_save_FFLAGS="${FFLAGS}"
1079
FFLAGS="${FFLAGS} $1"
1079
FFLAGS="${FFLAGS} $1"
1080
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
1080
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
1081
               [eval "r_cv_prog_f77_flag_${ac_safe}=yes"],
1081
               [eval "r_cv_prog_f77_flag_${ac_safe}=yes"],
1082
               [eval "r_cv_prog_f77_flag_${ac_safe}=no"])
1082
               [eval "r_cv_prog_f77_flag_${ac_safe}=no"])
1083
FFLAGS="${r_save_FFLAGS}"
1083
FFLAGS="${r_save_FFLAGS}"
1084
AC_LANG_POP(Fortran 77)
1084
AC_LANG_POP(Fortran 77)
1085
])
1085
])
1086
if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then
1086
if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then
1087
  AC_MSG_RESULT([yes])
1087
  AC_MSG_RESULT([yes])
1088
  [$2]
1088
  [$2]
1089
else
1089
else
1090
  AC_MSG_RESULT([no])
1090
  AC_MSG_RESULT([no])
1091
fi
1091
fi
1092
])# R_PROG_F77_FLAG
1092
])# R_PROG_F77_FLAG
1093
 
1093
 
1094
## R_PROG_F2C_FLIBS
1094
## R_PROG_F2C_FLIBS
1095
## ----------------
1095
## ----------------
1096
AC_DEFUN([R_PROG_F2C_FLIBS],
1096
AC_DEFUN([R_PROG_F2C_FLIBS],
1097
[AC_REQUIRE([AC_PROG_RANLIB])
1097
[AC_REQUIRE([AC_PROG_RANLIB])
1098
AC_REQUIRE([AC_CHECK_LIBM])
1098
AC_REQUIRE([AC_CHECK_LIBM])
1099
AC_CACHE_VAL([r_cv_f2c_flibs],
1099
AC_CACHE_VAL([r_cv_f2c_flibs],
1100
[
1100
[
1101
## <FIXME>
1101
## <FIXME>
1102
## Why do we need this?  What about AC_F77_DUMMY_MAIN?
1102
## Why do we need this?  What about AC_F77_DUMMY_MAIN?
1103
## This seems to be necessary on some Linux system. -- you bet! -pd
1103
## This seems to be necessary on some Linux system. -- you bet! -pd
1104
AC_LANG_PUSH(C)
1104
AC_LANG_PUSH(C)
1105
cat > conftest.${ac_ext} << EOF
1105
cat > conftest.${ac_ext} << EOF
1106
int MAIN_ () { exit(0); }
1106
int MAIN_ () { exit(0); }
1107
int MAIN__ () { exit(0); }
1107
int MAIN__ () { exit(0); }
1108
EOF
1108
EOF
1109
if AC_TRY_EVAL(ac_compile); then
1109
if AC_TRY_EVAL(ac_compile); then
1110
  ${AR} ${ARFLAGS} libconftest.a conftest.${ac_objext} 1>&AS_MESSAGE_LOG_FD
1110
  ${AR} ${ARFLAGS} libconftest.a conftest.${ac_objext} 1>&AS_MESSAGE_LOG_FD
1111
  ${RANLIB} libconftest.a 1>&AS_MESSAGE_LOG_FD
1111
  ${RANLIB} libconftest.a 1>&AS_MESSAGE_LOG_FD
1112
fi
1112
fi
1113
AC_LANG_POP(C)
1113
AC_LANG_POP(C)
1114
## </FIXME>
1114
## </FIXME>
1115
AC_CHECK_LIB(f2c, f_open, 
1115
AC_CHECK_LIB(f2c, f_open, 
1116
             [flibs=-lf2c],
1116
             [flibs=-lf2c],
1117
             [flibs=],
1117
             [flibs=],
1118
             [-L. -lconftest ${LIBM}])
1118
             [-L. -lconftest ${LIBM}])
1119
rm -f libconftest*
1119
rm -f libconftest*
1120
if test -z "${flibs}"; then
1120
if test -z "${flibs}"; then
1121
  AC_CHECK_LIB(F77, d_sin, [flibs=-lF77], [flibs=], [${LIBM}])
1121
  AC_CHECK_LIB(F77, d_sin, [flibs=-lF77], [flibs=], [${LIBM}])
1122
  if test -n "${flibs}"; then
1122
  if test -n "${flibs}"; then
1123
    AC_CHECK_LIB(I77, f_rew, [flibs="${flibs} -lI77"], [flibs=], [-lF77])
1123
    AC_CHECK_LIB(I77, f_rew, [flibs="${flibs} -lI77"], [flibs=], [-lF77])
1124
  fi
1124
  fi
1125
fi
1125
fi
1126
r_cv_f2c_flibs="${flibs}"])
1126
r_cv_f2c_flibs="${flibs}"])
1127
FLIBS="${r_cv_f2c_flibs}"
1127
FLIBS="${r_cv_f2c_flibs}"
1128
if test -z "${FLIBS}"; then
1128
if test -z "${FLIBS}"; then
1129
  warn_f2c_flibs="I found f2c but not libf2c, or libF77 and libI77"
1129
  warn_f2c_flibs="I found f2c but not libf2c, or libF77 and libI77"
1130
  AC_MSG_WARN([${warn_f2c_flibs}])
1130
  AC_MSG_WARN([${warn_f2c_flibs}])
1131
else
1131
else
1132
  FLIBS="${FLIBS} ${LIBM}"
1132
  FLIBS="${FLIBS} ${LIBM}"
1133
fi
1133
fi
1134
])# R_PROG_F2C_FLIBS
1134
])# R_PROG_F2C_FLIBS
1135
 
1135
 
1136
## R_PROG_F2C_MAKEFRAG
1136
## R_PROG_F2C_MAKEFRAG
1137
## -------------------
1137
## -------------------
1138
## Generate a Make fragment with suffix rules for Fortran 77 source
1138
## Generate a Make fragment with suffix rules for Fortran 77 source
1139
## files when using f2c, the Fortran-to-C converter.
1139
## files when using f2c, the Fortran-to-C converter.
1140
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
1140
## Used for both building R (Makeconf) and add-ons (etc/Makeconf).
1141
AC_DEFUN([R_PROG_F2C_MAKEFRAG],
1141
AC_DEFUN([R_PROG_F2C_MAKEFRAG],
1142
[AC_REQUIRE([R_PROG_CC_C_O_LO])
1142
[AC_REQUIRE([R_PROG_CC_C_O_LO])
1143
r_f77_rules_frag=Makefrag.f77
1143
r_f77_rules_frag=Makefrag.f77
1144
cat << \EOF > ${r_f77_rules_frag}
1144
cat << \EOF > ${r_f77_rules_frag}
1145
.f.o:
1145
.f.o:
1146
	$(F2C) $(F2CFLAGS) < $< > $[*].c
1146
	$(F2C) $(F2CFLAGS) < $< > $[*].c
1147
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $[*].c -o $[@]
1147
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $[*].c -o $[@]
1148
	@rm -f $[*].c
1148
	@rm -f $[*].c
1149
.f.lo:
1149
.f.lo:
1150
	$(F2C) $(F2CFLAGS) < $< > $[*].c
1150
	$(F2C) $(F2CFLAGS) < $< > $[*].c
1151
EOF
1151
EOF
1152
if test "${r_cv_prog_cc_c_o_lo}" = yes; then
1152
if test "${r_cv_prog_cc_c_o_lo}" = yes; then
1153
  cat << \EOF >> ${r_f77_rules_frag}
1153
  cat << \EOF >> ${r_f77_rules_frag}
1154
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $[*].c -o $[@]
1154
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $[*].c -o $[@]
1155
EOF
1155
EOF
1156
else
1156
else
1157
  cat << \EOF >> ${r_f77_rules_frag}
1157
  cat << \EOF >> ${r_f77_rules_frag}
1158
	@test -d .libs || mkdir .libs
1158
	@test -d .libs || mkdir .libs
1159
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $[*].c -o .libs/$[*].o
1159
	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS_LO) -c $[*].c -o .libs/$[*].o
1160
	mv .libs/$[*].o $[*].lo
1160
	mv .libs/$[*].o $[*].lo
1161
EOF
1161
EOF
1162
fi
1162
fi
1163
cat << \EOF >> ${r_f77_rules_frag}
1163
cat << \EOF >> ${r_f77_rules_frag}
1164
	@rm -f $[*].c
1164
	@rm -f $[*].c
1165
EOF
1165
EOF
1166
AC_SUBST_FILE(r_f77_rules_frag)
1166
AC_SUBST_FILE(r_f77_rules_frag)
1167
])# R_PROG_F2C_MAKEFRAG
1167
])# R_PROG_F2C_MAKEFRAG
1168
 
1168
 
1169
### * Library functions
1169
### * Library functions
1170
 
1170
 
1171
## R_FUNC___SETFPUCW
1171
## R_FUNC___SETFPUCW
1172
## -----------------
1172
## -----------------
1173
AC_DEFUN([R_FUNC___SETFPUCW],
1173
AC_DEFUN([R_FUNC___SETFPUCW],
1174
[AC_CHECK_FUNC(__setfpucw, 
1174
[AC_CHECK_FUNC(__setfpucw, 
1175
[AC_CACHE_CHECK([whether __setfpucw is needed],
1175
[AC_CACHE_CHECK([whether __setfpucw is needed],
1176
	        [r_cv_func___setfpucw_needed],
1176
	        [r_cv_func___setfpucw_needed],
1177
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1177
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1178
int main () {
1178
int main () {
1179
#include <fpu_control.h>
1179
#include <fpu_control.h>
1180
#if defined(_FPU_DEFAULT) && defined(_FPU_IEEE)
1180
#if defined(_FPU_DEFAULT) && defined(_FPU_IEEE)
1181
  exit(_FPU_DEFAULT != _FPU_IEEE);
1181
  exit(_FPU_DEFAULT != _FPU_IEEE);
1182
#endif
1182
#endif
1183
  exit(0);
1183
  exit(0);
1184
}
1184
}
1185
]])],
1185
]])],
1186
              [r_cv_func___setfpucw_needed=no],
1186
              [r_cv_func___setfpucw_needed=no],
1187
              [r_cv_func___setfpucw_needed=yes],
1187
              [r_cv_func___setfpucw_needed=yes],
1188
              [r_cv_func___setfpucw_needed=no])])
1188
              [r_cv_func___setfpucw_needed=no])])
1189
if test "x${r_cv_func___setfpucw_needed}" = xyes; then
1189
if test "x${r_cv_func___setfpucw_needed}" = xyes; then
1190
  AC_DEFINE(NEED___SETFPUCW, 1,
1190
  AC_DEFINE(NEED___SETFPUCW, 1,
1191
	    [Define if your system needs __setfpucw() to control
1191
	    [Define if your system needs __setfpucw() to control
1192
             FPU rounding. 
1192
             FPU rounding. 
1193
             This was used to control floating point precision,
1193
             This was used to control floating point precision,
1194
             rounding and floating point exceptions on older Linux
1194
             rounding and floating point exceptions on older Linux
1195
             systems. 
1195
             systems. 
1196
             As of GLIBC 2.1 this function is not used anymore.])
1196
             As of GLIBC 2.1 this function is not used anymore.])
1197
fi])
1197
fi])
1198
])# R_FUNC___SETFPUCW
1198
])# R_FUNC___SETFPUCW
1199
 
1199
 
1200
## R_FUNC_CALLOC
1200
## R_FUNC_CALLOC
1201
## -------------
1201
## -------------
1202
AC_DEFUN([R_FUNC_CALLOC],
1202
AC_DEFUN([R_FUNC_CALLOC],
1203
[AC_CACHE_CHECK([for working calloc], [r_cv_func_calloc_works],
1203
[AC_CACHE_CHECK([for working calloc], [r_cv_func_calloc_works],
1204
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1204
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1205
#include <stdlib.h>
1205
#include <stdlib.h>
1206
int main () {
1206
int main () {
1207
  int *p = calloc(0, sizeof(int));
1207
  int *p = calloc(0, sizeof(int));
1208
  exit(p == 0);
1208
  exit(p == 0);
1209
}
1209
}
1210
]])],
1210
]])],
1211
               [r_cv_func_calloc_works=yes],
1211
               [r_cv_func_calloc_works=yes],
1212
               [r_cv_func_calloc_works=no],
1212
               [r_cv_func_calloc_works=no],
1213
               [r_cv_func_calloc_works=no])])
1213
               [r_cv_func_calloc_works=no])])
1214
if test "x${r_cv_func_calloc_works}" = xyes; then
1214
if test "x${r_cv_func_calloc_works}" = xyes; then
1215
  AC_DEFINE(HAVE_WORKING_CALLOC, 1,
1215
  AC_DEFINE(HAVE_WORKING_CALLOC, 1,
1216
            [Define if calloc(0) returns a null pointer.])
1216
            [Define if calloc(0) returns a null pointer.])
1217
fi
1217
fi
1218
])# R_FUNC_CALLOC
1218
])# R_FUNC_CALLOC
1219
 
1219
 
1220
## R_FUNC_FINITE
1220
## R_FUNC_FINITE
1221
## -------------
1221
## -------------
1222
AC_DEFUN([R_FUNC_FINITE],
1222
AC_DEFUN([R_FUNC_FINITE],
1223
[AC_CACHE_CHECK([for working finite], [r_cv_func_finite_works],
1223
[AC_CACHE_CHECK([for working finite], [r_cv_func_finite_works],
1224
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1224
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1225
#include <math.h>
1225
#include <math.h>
1226
#include "confdefs.h"
1226
#include "confdefs.h"
1227
int main () {
1227
int main () {
1228
#ifdef HAVE_FINITE
1228
#ifdef HAVE_FINITE
1229
  exit(finite(1./0.) | finite(0./0.) | finite(-1./0.));
1229
  exit(finite(1./0.) | finite(0./0.) | finite(-1./0.));
1230
#else
1230
#else
1231
  exit(1);
1231
  exit(1);
1232
#endif
1232
#endif
1233
}
1233
}
1234
]])],
1234
]])],
1235
               [r_cv_func_finite_works=yes],
1235
               [r_cv_func_finite_works=yes],
1236
               [r_cv_func_finite_works=no],
1236
               [r_cv_func_finite_works=no],
1237
               [r_cv_func_finite_works=no])])
1237
               [r_cv_func_finite_works=no])])
1238
if test "x${r_cv_func_finite_works}" = xyes; then
1238
if test "x${r_cv_func_finite_works}" = xyes; then
1239
  AC_DEFINE(HAVE_WORKING_FINITE, 1,
1239
  AC_DEFINE(HAVE_WORKING_FINITE, 1,
1240
            [Define if finite() is correct for -Inf/NaN/Inf.])
1240
            [Define if finite() is correct for -Inf/NaN/Inf.])
1241
fi
1241
fi
1242
])# R_FUNC_FINITE
1242
])# R_FUNC_FINITE
1243
 
1243
 
1244
## R_FUNC_LOG
1244
## R_FUNC_LOG
1245
## ----------
1245
## ----------
1246
AC_DEFUN([R_FUNC_LOG],
1246
AC_DEFUN([R_FUNC_LOG],
1247
[AC_CACHE_CHECK([for working log], [r_cv_func_log_works],
1247
[AC_CACHE_CHECK([for working log], [r_cv_func_log_works],
1248
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1248
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1249
#include <math.h>
1249
#include <math.h>
1250
#include "confdefs.h"
1250
#include "confdefs.h"
1251
int main () {
1251
int main () {
1252
#ifdef HAVE_ISNAN
1252
#ifdef HAVE_ISNAN
1253
  exit(!(log(0.) == -1. / 0. && isnan(log(-1.))));
1253
  exit(!(log(0.) == -1. / 0. && isnan(log(-1.))));
1254
#else
1254
#else
1255
  exit(log(0.) != -1. / 0);
1255
  exit(log(0.) != -1. / 0);
1256
#endif
1256
#endif
1257
}
1257
}
1258
]])],
1258
]])],
1259
               [r_cv_func_log_works=yes],
1259
               [r_cv_func_log_works=yes],
1260
               [r_cv_func_log_works=no],
1260
               [r_cv_func_log_works=no],
1261
               [r_cv_func_log_works=no])])
1261
               [r_cv_func_log_works=no])])
1262
if test "x${r_cv_func_log_works}" = xyes; then
1262
if test "x${r_cv_func_log_works}" = xyes; then
1263
  AC_DEFINE(HAVE_WORKING_LOG, 1,
1263
  AC_DEFINE(HAVE_WORKING_LOG, 1,
1264
            [Define if log() is correct for 0/-1.])
1264
            [Define if log() is correct for 0/-1.])
1265
fi
1265
fi
1266
])# R_FUNC_LOG
1266
])# R_FUNC_LOG
1267
 
1267
 
1268
## R_FUNC_LOG1P
1268
## R_FUNC_LOG1P
1269
## ------------
1269
## ------------
1270
## Suggested by Nelson H. F. Beebe <beebe@math.utah.edu> to deal with
1270
## Suggested by Nelson H. F. Beebe <beebe@math.utah.edu> to deal with
1271
## inaccuracies on at least NetBSD 1.6 and OpenBSD 3.2.
1271
## inaccuracies on at least NetBSD 1.6 and OpenBSD 3.2.
1272
## However, don't test all the way into denormalized x (he had k > -1074)
1272
## However, don't test all the way into denormalized x (he had k > -1074)
1273
AC_DEFUN([R_FUNC_LOG1P],
1273
AC_DEFUN([R_FUNC_LOG1P],
1274
[AC_CACHE_CHECK([for working log1p], [r_cv_func_log1p_works],
1274
[AC_CACHE_CHECK([for working log1p], [r_cv_func_log1p_works],
1275
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1275
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1276
#include <math.h>
1276
#include <math.h>
1277
#include "confdefs.h"
1277
#include "confdefs.h"
1278
int main () {
1278
int main () {
1279
#ifdef HAVE_LOG1P
1279
#ifdef HAVE_LOG1P
1280
  int k;
1280
  int k;
1281
  double d;
1281
  double d;
1282
  double x;
1282
  double x;
1283
  /* log(1+x) = x - (1/2)x^2 + (1/3)x^3 - (1/4)x^4 ... */
1283
  /* log(1+x) = x - (1/2)x^2 + (1/3)x^3 - (1/4)x^4 ... */
1284
  /*          = x for x sufficiently small */
1284
  /*          = x for x sufficiently small */
1285
  x = pow(2.0, -53.0);
1285
  x = pow(2.0, -53.0);
1286
  for(k = -54; k > -1022; --k) {	
1286
  for(k = -54; k > -1022; --k) {	
1287
    x /= 2.0;
1287
    x /= 2.0;
1288
    if(x == 0.0)
1288
    if(x == 0.0)
1289
      exit(0);			/* OK: reached underflow limit */
1289
      exit(0);			/* OK: reached underflow limit */
1290
    d = log1p(x);
1290
    d = log1p(x);
1291
    if(d == 0.0)
1291
    if(d == 0.0)
1292
      exit(1);			/* ERROR: inaccurate log1p() */
1292
      exit(1);			/* ERROR: inaccurate log1p() */
1293
    if(d != x)
1293
    if(d != x)
1294
      exit(1);			/* ERROR: inaccurate log1p() */
1294
      exit(1);			/* ERROR: inaccurate log1p() */
1295
  }	
1295
  }	
1296
  exit(0);
1296
  exit(0);
1297
#else
1297
#else
1298
  exit(1);
1298
  exit(1);
1299
#endif
1299
#endif
1300
}
1300
}
1301
]])],
1301
]])],
1302
               [r_cv_func_log1p_works=yes],
1302
               [r_cv_func_log1p_works=yes],
1303
               [r_cv_func_log1p_works=no],
1303
               [r_cv_func_log1p_works=no],
1304
               [r_cv_func_log1p_works=no])])
1304
               [r_cv_func_log1p_works=no])])
1305
if test "x${r_cv_func_log1p_works}" = xyes; then
1305
if test "x${r_cv_func_log1p_works}" = xyes; then
1306
  AC_DEFINE(HAVE_WORKING_LOG1P, 1,
1306
  AC_DEFINE(HAVE_WORKING_LOG1P, 1,
1307
            [Define if log1p() exists and is accurate enough.])
1307
            [Define if log1p() exists and is accurate enough.])
1308
  RMATH_HAVE_WORKING_LOG1P="# define HAVE_WORKING_LOG1P 1"
1308
  RMATH_HAVE_WORKING_LOG1P="# define HAVE_WORKING_LOG1P 1"
1309
else
1309
else
1310
  RMATH_HAVE_WORKING_LOG1P="# undef HAVE_WORKING_LOG1P"
1310
  RMATH_HAVE_WORKING_LOG1P="# undef HAVE_WORKING_LOG1P"
1311
fi
1311
fi
1312
AC_SUBST(RMATH_HAVE_WORKING_LOG1P)
1312
AC_SUBST(RMATH_HAVE_WORKING_LOG1P)
1313
])# R_FUNC_LOG1P
1313
])# R_FUNC_LOG1P
1314
 
1314
 
1315
## R_FUNC_STRPTIME
1315
## R_FUNC_STRPTIME
1316
## ---------------
1316
## ---------------
1317
AC_DEFUN([R_FUNC_STRPTIME],
1317
AC_DEFUN([R_FUNC_STRPTIME],
1318
[AC_CACHE_CHECK([for working strptime], [r_cv_func_strptime_works],
1318
[AC_CACHE_CHECK([for working strptime], [r_cv_func_strptime_works],
1319
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1319
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
1320
#include <stdlib.h>
1320
#include <stdlib.h>
1321
#if defined(HAVE_GLIBC2) && !defined(__USE_XOPEN)
1321
#if defined(HAVE_GLIBC2) && !defined(__USE_XOPEN)
1322
#define __USE_XOPEN
1322
#define __USE_XOPEN
1323
#endif
1323
#endif
1324
#include <time.h>
1324
#include <time.h>
1325
int main () {
1325
int main () {
1326
#ifdef HAVE_STRPTIME
1326
#ifdef HAVE_STRPTIME
1327
  struct tm tm;
1327
  struct tm tm;
1328
  char *p, *q;
1328
  char *p, *q;
1329
 
1329
 
1330
  p = strptime("1960-01-01", "%Y-%m-%d", &tm);
1330
  p = strptime("1960-01-01", "%Y-%m-%d", &tm);
1331
  q = strptime("2003-02-40", "%Y-%m-%d", &tm);
1331
  q = strptime("2003-02-40", "%Y-%m-%d", &tm);
1332
  exit(p == 0 || q);
1332
  exit(p == 0 || q);
1333
#else
1333
#else
1334
  exit(1);
1334
  exit(1);
1335
#endif
1335
#endif
1336
}
1336
}
1337
]])],
1337
]])],
1338
               [r_cv_func_strptime_works=yes],
1338
               [r_cv_func_strptime_works=yes],
1339
               [r_cv_func_strptime_works=no],
1339
               [r_cv_func_strptime_works=no],
1340
               [r_cv_func_strptime_works=no])])
1340
               [r_cv_func_strptime_works=no])])
1341
if test "x${r_cv_func_strptime_works}" = xyes; then
1341
if test "x${r_cv_func_strptime_works}" = xyes; then
1342
  AC_DEFINE(HAVE_WORKING_STRPTIME, 1,
1342
  AC_DEFINE(HAVE_WORKING_STRPTIME, 1,
1343
            [Define if strptime() exists, validates and does not fail pre-1970.])
1343
            [Define if strptime() exists, validates and does not fail pre-1970.])
1344
fi
1344
fi
1345
])# R_FUNC_STRPTIME
1345
])# R_FUNC_STRPTIME
1346
 
1346
 
1347
### * Headers
1347
### * Headers
1348
 
1348
 
1349
## R_HEADER_SETJMP
1349
## R_HEADER_SETJMP
1350
## ---------------
1350
## ---------------
1351
AC_DEFUN([R_HEADER_SETJMP],
1351
AC_DEFUN([R_HEADER_SETJMP],
1352
[AC_CACHE_CHECK([whether setjmp.h is POSIX.1 compatible], 
1352
[AC_CACHE_CHECK([whether setjmp.h is POSIX.1 compatible], 
1353
                [r_cv_header_setjmp_posix],
1353
                [r_cv_header_setjmp_posix],
1354
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1354
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1355
[[#include <setjmp.h>]],
1355
[[#include <setjmp.h>]],
1356
[[sigjmp_buf b;
1356
[[sigjmp_buf b;
1357
sigsetjmp(b, 0);
1357
sigsetjmp(b, 0);
1358
siglongjmp(b, 1);]])],
1358
siglongjmp(b, 1);]])],
1359
                   [r_cv_header_setjmp_posix=yes],
1359
                   [r_cv_header_setjmp_posix=yes],
1360
                   [r_cv_header_setjmp_posix=no])])
1360
                   [r_cv_header_setjmp_posix=no])])
1361
if test "${r_cv_header_setjmp_posix}" = yes; then
1361
if test "${r_cv_header_setjmp_posix}" = yes; then
1362
  AC_DEFINE(HAVE_POSIX_SETJMP, 1,
1362
  AC_DEFINE(HAVE_POSIX_SETJMP, 1,
1363
            [Define if you have POSIX.1 compatible sigsetjmp/siglongjmp.])
1363
            [Define if you have POSIX.1 compatible sigsetjmp/siglongjmp.])
1364
fi
1364
fi
1365
])# R_HEADER_SETJMP
1365
])# R_HEADER_SETJMP
1366
 
1366
 
1367
## R_HEADER_GLIBC2
1367
## R_HEADER_GLIBC2
1368
## ---------------
1368
## ---------------
1369
AC_DEFUN([R_HEADER_GLIBC2],
1369
AC_DEFUN([R_HEADER_GLIBC2],
1370
[AC_CACHE_CHECK([for GNU C library with version >= 2],
1370
[AC_CACHE_CHECK([for GNU C library with version >= 2],
1371
                [r_cv_header_glibc2],
1371
                [r_cv_header_glibc2],
1372
[AC_EGREP_CPP([yes],
1372
[AC_EGREP_CPP([yes],
1373
[#include <stdio.h>
1373
[#include <stdio.h>
1374
#if defined __GLIBC__ && __GLIBC__ >= 2
1374
#if defined __GLIBC__ && __GLIBC__ >= 2
1375
  yes
1375
  yes
1376
#endif
1376
#endif
1377
],
1377
],
1378
              [r_cv_header_glibc2=yes],
1378
              [r_cv_header_glibc2=yes],
1379
              [r_cv_header_glibc2=no],
1379
              [r_cv_header_glibc2=no],
1380
              [r_cv_header_glibc2=no])
1380
              [r_cv_header_glibc2=no])
1381
])
1381
])
1382
if test "${r_cv_header_glibc2}" = yes; then
1382
if test "${r_cv_header_glibc2}" = yes; then
1383
  AC_DEFINE(HAVE_GLIBC2, 1,
1383
  AC_DEFINE(HAVE_GLIBC2, 1,
1384
            [Define if you have the GNU C library version >= 2.
1384
            [Define if you have the GNU C library version >= 2.
1385
             This is needed to fix a problem with getting the prototype
1385
             This is needed to fix a problem with getting the prototype
1386
             of strptime().])
1386
             of strptime().])
1387
fi
1387
fi
1388
])# R_HEADER_GLIBC2
1388
])# R_HEADER_GLIBC2
1389
 
1389
 
1390
## R_TYPE_SOCKLEN
1390
## R_TYPE_SOCKLEN
1391
## --------------
1391
## --------------
1392
AC_DEFUN([R_TYPE_SOCKLEN],
1392
AC_DEFUN([R_TYPE_SOCKLEN],
1393
[AC_MSG_CHECKING([for type of socket length])
1393
[AC_MSG_CHECKING([for type of socket length])
1394
AC_CACHE_VAL([r_cv_type_socklen],
1394
AC_CACHE_VAL([r_cv_type_socklen],
1395
[for t in socklen_t size_t int; do
1395
[for t in socklen_t size_t int; do
1396
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1396
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1397
#include <stddef.h>
1397
#include <stddef.h>
1398
#include <sys/types.h>
1398
#include <sys/types.h>
1399
#ifdef HAVE_SYS_SOCKET_H
1399
#ifdef HAVE_SYS_SOCKET_H
1400
# include <sys/socket.h>
1400
# include <sys/socket.h>
1401
#endif
1401
#endif
1402
#ifdef Win32
1402
#ifdef Win32
1403
# include <winsock.h>
1403
# include <winsock.h>
1404
#endif
1404
#endif
1405
]],
1405
]],
1406
[[(void)getsockopt (1, 1, 1, NULL, (${t} *)NULL)]])],
1406
[[(void)getsockopt (1, 1, 1, NULL, (${t} *)NULL)]])],
1407
                    [r_cv_type_socklen=${t}; break],
1407
                    [r_cv_type_socklen=${t}; break],
1408
                    [r_cv_type_socklen=])
1408
                    [r_cv_type_socklen=])
1409
done])
1409
done])
1410
## size_t works on Windows but is unsigned and int is correct
1410
## size_t works on Windows but is unsigned and int is correct
1411
case "${host_os}" in
1411
case "${host_os}" in
1412
  cygwin*|mingw*|windows*|winnt)
1412
  cygwin*|mingw*|windows*|winnt)
1413
    r_cv_type_socklen=int
1413
    r_cv_type_socklen=int
1414
    ;;
1414
    ;;
1415
esac
1415
esac
1416
if test "x${r_cv_type_socklen}" = x; then
1416
if test "x${r_cv_type_socklen}" = x; then
1417
  warn_type_socklen="could not determine type of socket length"
1417
  warn_type_socklen="could not determine type of socket length"
1418
  AC_MSG_WARN([${warn_type_socklen}])
1418
  AC_MSG_WARN([${warn_type_socklen}])
1419
else
1419
else
1420
  AC_MSG_RESULT([${r_cv_type_socklen} *])
1420
  AC_MSG_RESULT([${r_cv_type_socklen} *])
1421
fi
1421
fi
1422
AC_DEFINE_UNQUOTED(SOCKLEN_T, ${r_cv_type_socklen},
1422
AC_DEFINE_UNQUOTED(SOCKLEN_T, ${r_cv_type_socklen},
1423
                   [Type for socket lengths: socklen_t, sock_t, int?])
1423
                   [Type for socket lengths: socklen_t, sock_t, int?])
1424
])# R_TYPE_SOCKLEN
1424
])# R_TYPE_SOCKLEN
1425
 
1425
 
1426
### * System services
1426
### * System services
1427
 
1427
 
1428
## R_X11
1428
## R_X11
1429
## -----
1429
## -----
1430
AC_DEFUN([R_X11],
1430
AC_DEFUN([R_X11],
1431
[AC_PATH_XTRA			# standard X11 search macro
1431
[AC_PATH_XTRA			# standard X11 search macro
1432
if test -z "${no_x}"; then
1432
if test -z "${no_x}"; then
1433
  ## We force the use of -lX11 (perhaps this is not necessary?).
1433
  ## We force the use of -lX11 (perhaps this is not necessary?).
1434
  X_LIBS="${X_LIBS} -lX11"
1434
  X_LIBS="${X_LIBS} -lX11"
1435
  use_X11="yes"
1435
  use_X11="yes"
1436
  AC_DEFINE(HAVE_X11, 1,
1436
  AC_DEFINE(HAVE_X11, 1,
1437
            [Define if you have the X11 headers and libraries, and want
1437
            [Define if you have the X11 headers and libraries, and want
1438
             the X11 GUI to be built.])
1438
             the X11 GUI to be built.])
1439
else
1439
else
1440
  use_X11="no"
1440
  use_X11="no"
1441
fi])# R_X11
1441
fi])# R_X11
1442
 
1442
 
1443
## R_GNOME
1443
## R_GNOME
1444
## -------
1444
## -------
1445
AC_DEFUN([R_GNOME], 
1445
AC_DEFUN([R_GNOME], 
1446
[if test ${want_gnome} = yes; then
1446
[if test ${want_gnome} = yes; then
1447
  GNOME_INIT_HOOK([], [cont])
1447
  GNOME_INIT_HOOK([], [cont])
1448
  if test "${GNOMEUI_LIBS}"; then
1448
  if test "${GNOMEUI_LIBS}"; then
1449
    AM_PATH_LIBGLADE([use_gnome="yes"
1449
    AM_PATH_LIBGLADE([use_gnome="yes"
1450
                      GNOME_IF_FILES="gnome-interface.glade"],
1450
                      GNOME_IF_FILES="gnome-interface.glade"],
1451
                     [warn_libglade_version="GNOME support requires libglade version >= 0.3"
1451
                     [warn_libglade_version="GNOME support requires libglade version >= 0.3"
1452
                      AC_MSG_WARN([${warn_libglade_version}])],
1452
                      AC_MSG_WARN([${warn_libglade_version}])],
1453
                     [gnome])
1453
                     [gnome])
1454
  fi
1454
  fi
1455
fi
1455
fi
1456
if test "${use_gnome}" != yes; then
1456
if test "${use_gnome}" != yes; then
1457
  use_gnome="no"
1457
  use_gnome="no"
1458
  GNOME_IF_FILES=
1458
  GNOME_IF_FILES=
1459
else
1459
else
1460
  AC_DEFINE(HAVE_GNOME, 1,
1460
  AC_DEFINE(HAVE_GNOME, 1,
1461
            [Define if you have the GNOME headers and libraries,
1461
            [Define if you have the GNOME headers and libraries,
1462
             and want the GNOME GUI to be built.])
1462
             and want the GNOME GUI to be built.])
1463
fi
1463
fi
1464
AC_SUBST(HAVE_GNOME)
1464
AC_SUBST(HAVE_GNOME)
1465
AC_SUBST(GNOME_IF_FILES)
1465
AC_SUBST(GNOME_IF_FILES)
1466
])# R_GNOME
1466
])# R_GNOME
1467
 
1467
 
1468
## R_AQUA
1468
## R_AQUA
1469
## ------
1469
## ------
1470
AC_DEFUN([R_AQUA],
1470
AC_DEFUN([R_AQUA],
1471
[use_aqua=no
1471
[use_aqua=no
1472
if test "${want_aqua}" = yes; then
1472
if test "${want_aqua}" = yes; then
1473
  case "${host_os}" in
1473
  case "${host_os}" in
1474
    darwin*)
1474
    darwin*)
1475
      use_aqua=yes
1475
      use_aqua=yes
1476
      ;;
1476
      ;;
1477
  esac
1477
  esac
1478
fi
1478
fi
1479
if test "${use_aqua}" = yes; then
1479
if test "${use_aqua}" = yes; then
1480
  AC_DEFINE(HAVE_AQUA, 1,
1480
  AC_DEFINE(HAVE_AQUA, 1,
1481
            [Define if you have the Aqua headers and libraries,
1481
            [Define if you have the Aqua headers and libraries,
1482
             and want the Aqua GUI to be built.])
1482
             and want the Aqua GUI to be built.])
1483
fi
1483
fi
1484
])# R_AQUA
1484
])# R_AQUA
1485
 
1485
 
1486
## R_IEEE_754
1486
## R_IEEE_754
1487
## ----------
1487
## ----------
1488
AC_DEFUN([R_IEEE_754],
1488
AC_DEFUN([R_IEEE_754],
1489
[AC_CHECK_FUNCS([finite isnan])
1489
[AC_CHECK_FUNCS([finite isnan])
1490
AC_CHECK_DECLS([isfinite, isnan], , , [#include <math.h>])
1490
AC_CHECK_DECLS([isfinite, isnan], , , [#include <math.h>])
1491
AC_CACHE_CHECK([whether you have IEEE 754 floating-point arithmetic],
1491
AC_CACHE_CHECK([whether you have IEEE 754 floating-point arithmetic],
1492
               [r_cv_ieee_754],
1492
               [r_cv_ieee_754],
1493
[if (test "${ac_cv_func_finite}" = yes \
1493
[if (test "${ac_cv_func_finite}" = yes \
1494
      || test "${ac_cv_have_decl_isfinite}" = yes) \
1494
      || test "${ac_cv_have_decl_isfinite}" = yes) \
1495
    && (test "${ac_cv_func_isnan}" = yes \
1495
    && (test "${ac_cv_func_isnan}" = yes \
1496
      || test "${ac_cv_have_decl_isnan}" = yes); then
1496
      || test "${ac_cv_have_decl_isnan}" = yes); then
1497
  r_cv_ieee_754=yes
1497
  r_cv_ieee_754=yes
1498
else
1498
else
1499
  r_cv_ieee_754=no
1499
  r_cv_ieee_754=no
1500
fi])
1500
fi])
1501
if test "${r_cv_ieee_754}" = yes; then
1501
if test "${r_cv_ieee_754}" = yes; then
1502
  AC_DEFINE(IEEE_754, 1,
1502
  AC_DEFINE(IEEE_754, 1,
1503
            [Define if you have IEEE 754 floating point arithmetic.])
1503
            [Define if you have IEEE 754 floating point arithmetic.])
1504
fi
1504
fi
1505
])# R_IEEE_754
1505
])# R_IEEE_754
1506
 
1506
 
1507
## R_BSD_NETWORKING
1507
## R_BSD_NETWORKING
1508
## ----------------
1508
## ----------------
1509
AC_DEFUN([R_BSD_NETWORKING],
1509
AC_DEFUN([R_BSD_NETWORKING],
1510
[AC_CACHE_CHECK([for BSD networking],
1510
[AC_CACHE_CHECK([for BSD networking],
1511
                [r_cv_bsd_networking],
1511
                [r_cv_bsd_networking],
1512
[if test "${ac_cv_header_netdb_h}" = yes \
1512
[if test "${ac_cv_header_netdb_h}" = yes \
1513
     && test "${ac_cv_header_netinet_in_h}" = yes \
1513
     && test "${ac_cv_header_netinet_in_h}" = yes \
1514
     && test "${ac_cv_header_sys_socket_h}" = yes \
1514
     && test "${ac_cv_header_sys_socket_h}" = yes \
1515
     && test "${ac_cv_search_connect}" != no \
1515
     && test "${ac_cv_search_connect}" != no \
1516
     && test "${ac_cv_search_gethostbyname}" !=  no; then
1516
     && test "${ac_cv_search_gethostbyname}" !=  no; then
1517
  r_cv_bsd_networking=yes
1517
  r_cv_bsd_networking=yes
1518
else
1518
else
1519
  r_cv_bsd_networking=no
1519
  r_cv_bsd_networking=no
1520
fi])
1520
fi])
1521
if test "${r_cv_bsd_networking}" = yes; then
1521
if test "${r_cv_bsd_networking}" = yes; then
1522
  AC_DEFINE(HAVE_BSD_NETWORKING, 1,
1522
  AC_DEFINE(HAVE_BSD_NETWORKING, 1,
1523
            [Define if you have BSD networking headers and libraries.])
1523
            [Define if you have BSD networking headers and libraries.])
1524
  AC_DEFINE(HAVE_SOCKETS, 1,
1524
  AC_DEFINE(HAVE_SOCKETS, 1,
1525
            [Define if you have support for sockets.])
1525
            [Define if you have support for sockets.])
1526
  AC_DEFINE(HAVE_INTERNET, 1,
1526
  AC_DEFINE(HAVE_INTERNET, 1,
1527
            [Define if you have support for ftp/http access.])
1527
            [Define if you have support for ftp/http access.])
1528
  AC_DEFINE(SUPPORT_LIBXML, 1,
1528
  AC_DEFINE(SUPPORT_LIBXML, 1,
1529
            [Define if you provide support for the libxml ftp/http
1529
            [Define if you provide support for the libxml ftp/http
1530
	     functions.])
1530
	     functions.])
1531
fi
1531
fi
1532
])# R_BSD_NETWORKING
1532
])# R_BSD_NETWORKING
1533
 
1533
 
1534
## R_BITMAPS
1534
## R_BITMAPS
1535
## ---------
1535
## ---------
1536
## Here we only need any old -lz, and don't need zlib.h.
1536
## Here we only need any old -lz, and don't need zlib.h.
1537
## However, we do need recent enough libpng and jpeg, and so check both
1537
## However, we do need recent enough libpng and jpeg, and so check both
1538
## the header versions and for key routines in the library.
1538
## the header versions and for key routines in the library.
1539
## The png code will do a run-time check of the consistency of libpng
1539
## The png code will do a run-time check of the consistency of libpng
1540
## versions.
1540
## versions.
1541
AC_DEFUN([R_BITMAPS],
1541
AC_DEFUN([R_BITMAPS],
1542
[BITMAP_LIBS=
1542
[BITMAP_LIBS=
1543
if test "${use_jpeglib}" = yes; then
1543
if test "${use_jpeglib}" = yes; then
1544
  _R_HEADER_JPEGLIB
1544
  _R_HEADER_JPEGLIB
1545
  have_jpeg=${r_cv_header_jpeglib_h}
1545
  have_jpeg=${r_cv_header_jpeglib_h}
1546
  if test "${have_jpeg}" = yes; then
1546
  if test "${have_jpeg}" = yes; then
1547
    AC_CHECK_LIB(jpeg, jpeg_destroy_compress, 
1547
    AC_CHECK_LIB(jpeg, jpeg_destroy_compress, 
1548
		 [have_jpeg=yes],
1548
		 [have_jpeg=yes],
1549
		 [have_jpeg=no],
1549
		 [have_jpeg=no],
1550
		 [${LIBS}])
1550
		 [${LIBS}])
1551
  fi
1551
  fi
1552
  if test "${have_jpeg}" = yes; then
1552
  if test "${have_jpeg}" = yes; then
1553
    BITMAP_LIBS="-ljpeg"
1553
    BITMAP_LIBS="-ljpeg"
1554
    AC_DEFINE(HAVE_JPEG, 1,
1554
    AC_DEFINE(HAVE_JPEG, 1,
1555
	      [Define if you have the JPEG headers and libraries.])
1555
	      [Define if you have the JPEG headers and libraries.])
1556
  fi
1556
  fi
1557
fi
1557
fi
1558
if test "${use_libpng}" = yes; then
1558
if test "${use_libpng}" = yes; then
1559
  AC_CHECK_LIB(z, main, [have_png=yes], [have_png=no])
1559
  AC_CHECK_LIB(z, main, [have_png=yes], [have_png=no])
1560
  if test "${have_png}" = yes; then
1560
  if test "${have_png}" = yes; then
1561
    _R_HEADER_PNG
1561
    _R_HEADER_PNG
1562
    have_png=${r_cv_header_png_h}
1562
    have_png=${r_cv_header_png_h}
1563
  fi
1563
  fi
1564
  if test "${have_png}" = yes; then
1564
  if test "${have_png}" = yes; then
1565
    AC_CHECK_LIB(png, png_create_write_struct,
1565
    AC_CHECK_LIB(png, png_create_write_struct,
1566
		 [have_png=yes],
1566
		 [have_png=yes],
1567
		 [have_png=no],
1567
		 [have_png=no],
1568
		 [-lz ${LIBS}])
1568
		 [-lz ${LIBS}])
1569
  fi
1569
  fi
1570
  if test "${have_png}" = yes; then
1570
  if test "${have_png}" = yes; then
1571
    BITMAP_LIBS="${BITMAP_LIBS} -lpng -lz"
1571
    BITMAP_LIBS="${BITMAP_LIBS} -lpng -lz"
1572
    AC_DEFINE(HAVE_PNG, 1,
1572
    AC_DEFINE(HAVE_PNG, 1,
1573
	      [Define if you have the PNG headers and libraries.])
1573
	      [Define if you have the PNG headers and libraries.])
1574
  fi
1574
  fi
1575
fi
1575
fi
1576
AC_SUBST(BITMAP_LIBS)
1576
AC_SUBST(BITMAP_LIBS)
1577
])# R_BITMAPS
1577
])# R_BITMAPS
1578
 
1578
 
1579
## _R_HEADER_JPEGLIB
1579
## _R_HEADER_JPEGLIB
1580
## -----------------
1580
## -----------------
1581
## Set shell variable r_cv_header_jpeglib_h to 'yes' if a recent enough
1581
## Set shell variable r_cv_header_jpeglib_h to 'yes' if a recent enough
1582
## jpeglib.h is found, and to 'no' otherwise.
1582
## jpeglib.h is found, and to 'no' otherwise.
1583
AC_DEFUN([_R_HEADER_JPEGLIB],
1583
AC_DEFUN([_R_HEADER_JPEGLIB],
1584
[AC_CACHE_CHECK([if jpeglib version >= 6b],
1584
[AC_CACHE_CHECK([if jpeglib version >= 6b],
1585
                [r_cv_header_jpeglib_h],
1585
                [r_cv_header_jpeglib_h],
1586
AC_EGREP_CPP([yes],
1586
AC_EGREP_CPP([yes],
1587
[#include <jpeglib.h>
1587
[#include <jpeglib.h>
1588
#if (JPEG_LIB_VERSION >= 62)
1588
#if (JPEG_LIB_VERSION >= 62)
1589
  yes
1589
  yes
1590
#endif
1590
#endif
1591
],
1591
],
1592
             [r_cv_header_jpeglib_h=yes],
1592
             [r_cv_header_jpeglib_h=yes],
1593
             [r_cv_header_jpeglib_h=no]))
1593
             [r_cv_header_jpeglib_h=no]))
1594
])# _R_HEADER_JPEGLIB
1594
])# _R_HEADER_JPEGLIB
1595
 
1595
 
1596
## _R_HEADER_PNG
1596
## _R_HEADER_PNG
1597
## -------------
1597
## -------------
1598
## Set shell variable r_cv_header_png_h to 'yes' if a recent enough
1598
## Set shell variable r_cv_header_png_h to 'yes' if a recent enough
1599
## 'png.h' is found, and to 'no' otherwise.
1599
## 'png.h' is found, and to 'no' otherwise.
1600
AC_DEFUN([_R_HEADER_PNG],
1600
AC_DEFUN([_R_HEADER_PNG],
1601
[AC_CACHE_CHECK([if libpng version >= 1.0.5], 
1601
[AC_CACHE_CHECK([if libpng version >= 1.0.5], 
1602
                [r_cv_header_png_h],
1602
                [r_cv_header_png_h],
1603
AC_EGREP_CPP([yes],
1603
AC_EGREP_CPP([yes],
1604
[#include <png.h>
1604
[#include <png.h>
1605
#if (PNG_LIBPNG_VER >= 10005)
1605
#if (PNG_LIBPNG_VER >= 10005)
1606
  yes
1606
  yes
1607
#endif
1607
#endif
1608
],
1608
],
1609
             [r_cv_header_png_h=yes],
1609
             [r_cv_header_png_h=yes],
1610
             [r_cv_header_png_h=no]))
1610
             [r_cv_header_png_h=no]))
1611
])# _R_HEADER_PNG
1611
])# _R_HEADER_PNG
1612
 
1612
 
1613
## _R_PATH_TCL_CONFIG
1613
## _R_PATH_TCL_CONFIG
1614
## ------------------
1614
## ------------------
1615
## Try finding tclConfig.sh in common library directories and their
1615
## Try finding tclConfig.sh in common library directories and their
1616
## tcl$x.$y subdirectories.  Set shell variable r_cv_path_TCL_CONFIG
1616
## tcl$x.$y subdirectories.  Set shell variable r_cv_path_TCL_CONFIG
1617
## to the entire path of the script if found, and leave it empty
1617
## to the entire path of the script if found, and leave it empty
1618
## otherwise.
1618
## otherwise.
1619
AC_DEFUN([_R_PATH_TCL_CONFIG],
1619
AC_DEFUN([_R_PATH_TCL_CONFIG],
1620
[AC_MSG_CHECKING([for tclConfig.sh in library (sub)directories])
1620
[AC_MSG_CHECKING([for tclConfig.sh in library (sub)directories])
1621
AC_CACHE_VAL([r_cv_path_TCL_CONFIG],
1621
AC_CACHE_VAL([r_cv_path_TCL_CONFIG],
1622
[for ldir in /opt/lib /sw/lib /usr/local/lib /usr/lib /lib; do
1622
[for ldir in /opt/lib /sw/lib /usr/local/lib /usr/lib /lib /usr/lib64 ; do
1623
  for dir in \
1623
  for dir in \
1624
      ${ldir} \
1624
      ${ldir} \
1625
      `ls -d ${ldir}/tcl[[8-9]].[[0-9]]* 2>/dev/null | sort -r`; do
1625
      `ls -d ${ldir}/tcl[[8-9]].[[0-9]]* 2>/dev/null | sort -r`; do
1626
    if test -f ${dir}/tclConfig.sh; then
1626
    if test -f ${dir}/tclConfig.sh; then
1627
      r_cv_path_TCL_CONFIG="${dir}/tclConfig.sh"
1627
      r_cv_path_TCL_CONFIG="${dir}/tclConfig.sh"
1628
      break 2
1628
      break 2
1629
    fi
1629
    fi
1630
  done
1630
  done
1631
done])
1631
done])
1632
if test -n "${r_cv_path_TCL_CONFIG}"; then
1632
if test -n "${r_cv_path_TCL_CONFIG}"; then
1633
  AC_MSG_RESULT([${r_cv_path_TCL_CONFIG}])
1633
  AC_MSG_RESULT([${r_cv_path_TCL_CONFIG}])
1634
else
1634
else
1635
  AC_MSG_RESULT([no])
1635
  AC_MSG_RESULT([no])
1636
fi
1636
fi
1637
])# _R_PATH_TCL_CONFIG
1637
])# _R_PATH_TCL_CONFIG
1638
 
1638
 
1639
## _R_PATH_TK_CONFIG
1639
## _R_PATH_TK_CONFIG
1640
## ------------------
1640
## ------------------
1641
## Try finding tkConfig.sh in common library directories and their
1641
## Try finding tkConfig.sh in common library directories and their
1642
## tk$x.$y subdirectories.  Set shell variable r_cv_path_TK_CONFIG
1642
## tk$x.$y subdirectories.  Set shell variable r_cv_path_TK_CONFIG
1643
## to the entire path of the script if found, and leave it empty
1643
## to the entire path of the script if found, and leave it empty
1644
## otherwise.
1644
## otherwise.
1645
AC_DEFUN([_R_PATH_TK_CONFIG],
1645
AC_DEFUN([_R_PATH_TK_CONFIG],
1646
[AC_MSG_CHECKING([for tkConfig.sh in library (sub)directories])
1646
[AC_MSG_CHECKING([for tkConfig.sh in library (sub)directories])
1647
AC_CACHE_VAL([r_cv_path_TK_CONFIG],
1647
AC_CACHE_VAL([r_cv_path_TK_CONFIG],
1648
[for ldir in /opt/lib /sw/lib /usr/local/lib /usr/lib /lib; do
1648
[for ldir in /opt/lib /sw/lib /usr/local/lib /usr/lib /lib /usr/lib64 ; do
1649
  for dir in \
1649
  for dir in \
1650
      ${ldir} \
1650
      ${ldir} \
1651
      `ls -d ${ldir}/tk[[8-9]].[[0-9]]* 2>/dev/null | sort -r`; do
1651
      `ls -d ${ldir}/tk[[8-9]].[[0-9]]* 2>/dev/null | sort -r`; do
1652
    if test -f ${dir}/tkConfig.sh; then
1652
    if test -f ${dir}/tkConfig.sh; then
1653
      r_cv_path_TK_CONFIG="${dir}/tkConfig.sh"
1653
      r_cv_path_TK_CONFIG="${dir}/tkConfig.sh"
1654
      break 2
1654
      break 2
1655
    fi
1655
    fi
1656
  done
1656
  done
1657
done])
1657
done])
1658
if test -n "${r_cv_path_TK_CONFIG}"; then
1658
if test -n "${r_cv_path_TK_CONFIG}"; then
1659
  AC_MSG_RESULT([${r_cv_path_TK_CONFIG}])
1659
  AC_MSG_RESULT([${r_cv_path_TK_CONFIG}])
1660
else
1660
else
1661
  AC_MSG_RESULT([no])
1661
  AC_MSG_RESULT([no])
1662
fi
1662
fi
1663
])# _R_PATH_TK_CONFIG
1663
])# _R_PATH_TK_CONFIG
1664
 
1664
 
1665
## _R_TCLTK_CONFIG
1665
## _R_TCLTK_CONFIG
1666
## ---------------
1666
## ---------------
1667
## Try finding the tclConfig.sh and tkConfig.sh scripts in PATH as well
1667
## Try finding the tclConfig.sh and tkConfig.sh scripts in PATH as well
1668
## as in common library directories and their tcl/tk subdirectories.
1668
## as in common library directories and their tcl/tk subdirectories.
1669
## Set shell variables TCL_CONFIG and TK_CONFIG to the entire paths to
1669
## Set shell variables TCL_CONFIG and TK_CONFIG to the entire paths to
1670
## the scripts if found and check that the corresponding Tcl/Tk versions
1670
## the scripts if found and check that the corresponding Tcl/Tk versions
1671
## are at least 8; if not, set shell variable have_tcltk to 'no'.
1671
## are at least 8; if not, set shell variable have_tcltk to 'no'.
1672
AC_DEFUN([_R_TCLTK_CONFIG],
1672
AC_DEFUN([_R_TCLTK_CONFIG],
1673
[AC_PATH_PROGS(TCL_CONFIG, [${TCL_CONFIG} tclConfig.sh])
1673
[AC_PATH_PROGS(TCL_CONFIG, [${TCL_CONFIG} tclConfig.sh])
1674
if test -z "${TCL_CONFIG}"; then
1674
if test -z "${TCL_CONFIG}"; then
1675
  _R_PATH_TCL_CONFIG
1675
  _R_PATH_TCL_CONFIG
1676
  if test -n "${r_cv_path_TCL_CONFIG}"; then
1676
  if test -n "${r_cv_path_TCL_CONFIG}"; then
1677
    TCL_CONFIG="${r_cv_path_TCL_CONFIG}"
1677
    TCL_CONFIG="${r_cv_path_TCL_CONFIG}"
1678
  fi
1678
  fi
1679
fi
1679
fi
1680
AC_PATH_PROGS(TK_CONFIG, [${TK_CONFIG} tkConfig.sh])
1680
AC_PATH_PROGS(TK_CONFIG, [${TK_CONFIG} tkConfig.sh])
1681
if test -z "${TK_CONFIG}"; then
1681
if test -z "${TK_CONFIG}"; then
1682
  _R_PATH_TK_CONFIG
1682
  _R_PATH_TK_CONFIG
1683
  if test -n "${r_cv_path_TK_CONFIG}"; then
1683
  if test -n "${r_cv_path_TK_CONFIG}"; then
1684
    TK_CONFIG="${r_cv_path_TK_CONFIG}"
1684
    TK_CONFIG="${r_cv_path_TK_CONFIG}"
1685
  fi
1685
  fi
1686
fi
1686
fi
1687
if test -z "${TCLTK_CPPFLAGS}" \
1687
if test -z "${TCLTK_CPPFLAGS}" \
1688
    || test -z "${TCLTK_LIBS}"; then
1688
    || test -z "${TCLTK_LIBS}"; then
1689
  ## Check whether the versions found via the *Config.sh files are at
1689
  ## Check whether the versions found via the *Config.sh files are at
1690
  ## least 8; otherwise, issue a warning and turn off Tcl/Tk support.
1690
  ## least 8; otherwise, issue a warning and turn off Tcl/Tk support.
1691
  ## Note that in theory a system could have outdated versions of the
1691
  ## Note that in theory a system could have outdated versions of the
1692
  ## *Config.sh scripts and yet up-to-date installations of Tcl/Tk in
1692
  ## *Config.sh scripts and yet up-to-date installations of Tcl/Tk in
1693
  ## standard places ...
1693
  ## standard places ...
1694
  if test -n "${TCL_CONFIG}"; then
1694
  if test -n "${TCL_CONFIG}"; then
1695
    . ${TCL_CONFIG}
1695
    . ${TCL_CONFIG}
1696
    if test ${TCL_MAJOR_VERSION} -lt 8; then
1696
    if test ${TCL_MAJOR_VERSION} -lt 8; then
1697
      warn_tcltk_version="Tcl/Tk support requires Tcl version >= 8"
1697
      warn_tcltk_version="Tcl/Tk support requires Tcl version >= 8"
1698
      AC_MSG_WARN([${warn_tcltk_version}])
1698
      AC_MSG_WARN([${warn_tcltk_version}])
1699
      have_tcltk=no
1699
      have_tcltk=no
1700
    fi
1700
    fi
1701
  fi
1701
  fi
1702
  if test -n "${TK_CONFIG}" \
1702
  if test -n "${TK_CONFIG}" \
1703
      && test -z "${warn_tcltk_version}"; then
1703
      && test -z "${warn_tcltk_version}"; then
1704
    . ${TK_CONFIG}
1704
    . ${TK_CONFIG}
1705
    if test ${TK_MAJOR_VERSION} -lt 8; then
1705
    if test ${TK_MAJOR_VERSION} -lt 8; then
1706
      warn_tcltk_version="Tcl/Tk support requires Tk version >= 8"
1706
      warn_tcltk_version="Tcl/Tk support requires Tk version >= 8"
1707
      AC_MSG_WARN([${warn_tcltk_version}])
1707
      AC_MSG_WARN([${warn_tcltk_version}])
1708
      have_tcltk=no
1708
      have_tcltk=no
1709
    fi
1709
    fi
1710
  fi
1710
  fi
1711
  if test -n "${TCL_CONFIG}" \
1711
  if test -n "${TCL_CONFIG}" \
1712
      && test -n "${TK_CONFIG}" \
1712
      && test -n "${TK_CONFIG}" \
1713
      && test -z "${warn_tcltk_version}"; then
1713
      && test -z "${warn_tcltk_version}"; then
1714
    if test ${TCL_MAJOR_VERSION} -ne ${TK_MAJOR_VERSION} \
1714
    if test ${TCL_MAJOR_VERSION} -ne ${TK_MAJOR_VERSION} \
1715
      || test ${TCL_MINOR_VERSION} -ne ${TK_MINOR_VERSION}; then
1715
      || test ${TCL_MINOR_VERSION} -ne ${TK_MINOR_VERSION}; then
1716
     warn_tcltk_version="Tcl and Tk major or minor versions disagree"
1716
     warn_tcltk_version="Tcl and Tk major or minor versions disagree"
1717
      AC_MSG_WARN([${warn_tcltk_version}])
1717
      AC_MSG_WARN([${warn_tcltk_version}])
1718
      have_tcltk=no
1718
      have_tcltk=no
1719
    fi
1719
    fi
1720
  fi
1720
  fi
1721
fi
1721
fi
1722
])# _R_TCLTK_CONFIG
1722
])# _R_TCLTK_CONFIG
1723
 
1723
 
1724
## _R_HEADER_TCL
1724
## _R_HEADER_TCL
1725
## -------------
1725
## -------------
1726
## Set shell variable 'r_cv_header_tcl_h' to 'yes' if a recent enough
1726
## Set shell variable 'r_cv_header_tcl_h' to 'yes' if a recent enough
1727
## 'tcl.h' is found, and to 'no' otherwise.
1727
## 'tcl.h' is found, and to 'no' otherwise.
1728
AC_DEFUN([_R_HEADER_TCL],
1728
AC_DEFUN([_R_HEADER_TCL],
1729
[AC_CACHE_CHECK([for tcl.h], [r_cv_header_tcl_h],
1729
[AC_CACHE_CHECK([for tcl.h], [r_cv_header_tcl_h],
1730
[AC_EGREP_CPP([yes],
1730
[AC_EGREP_CPP([yes],
1731
[#include <tcl.h>
1731
[#include <tcl.h>
1732
#if (TCL_MAJOR_VERSION >= 8)
1732
#if (TCL_MAJOR_VERSION >= 8)
1733
  yes
1733
  yes
1734
#endif
1734
#endif
1735
],
1735
],
1736
             [r_cv_header_tcl_h=yes],
1736
             [r_cv_header_tcl_h=yes],
1737
             [r_cv_header_tcl_h=no])])
1737
             [r_cv_header_tcl_h=no])])
1738
])# _R_HEADER_TCL
1738
])# _R_HEADER_TCL
1739
 
1739
 
1740
## _R_HEADER_TK
1740
## _R_HEADER_TK
1741
## -------------
1741
## -------------
1742
## Set shell variable 'r_cv_header_tk_h' to 'yes' if a recent enough
1742
## Set shell variable 'r_cv_header_tk_h' to 'yes' if a recent enough
1743
## 'tk.h' is found, and to 'no' otherwise.
1743
## 'tk.h' is found, and to 'no' otherwise.
1744
AC_DEFUN([_R_HEADER_TK],
1744
AC_DEFUN([_R_HEADER_TK],
1745
[AC_CACHE_CHECK([for tk.h], [r_cv_header_tk_h],
1745
[AC_CACHE_CHECK([for tk.h], [r_cv_header_tk_h],
1746
[AC_EGREP_CPP([yes],
1746
[AC_EGREP_CPP([yes],
1747
[#include <tk.h>
1747
[#include <tk.h>
1748
#if (TK_MAJOR_VERSION >= 8)
1748
#if (TK_MAJOR_VERSION >= 8)
1749
  yes
1749
  yes
1750
#endif
1750
#endif
1751
],
1751
],
1752
             [r_cv_header_tk_h=yes],
1752
             [r_cv_header_tk_h=yes],
1753
             [r_cv_header_tk_h=no])])
1753
             [r_cv_header_tk_h=no])])
1754
])# _R_HEADER_TK
1754
])# _R_HEADER_TK
1755
 
1755
 
1756
## _R_TCLTK_CPPFLAGS
1756
## _R_TCLTK_CPPFLAGS
1757
## -----------------
1757
## -----------------
1758
## Need to ensure that we can find the tcl.h and tk.h headers, which
1758
## Need to ensure that we can find the tcl.h and tk.h headers, which
1759
## may be in non-standard and/or version-dependent directories, such as
1759
## may be in non-standard and/or version-dependent directories, such as
1760
## on FreeBSD systems.
1760
## on FreeBSD systems.
1761
##
1761
##
1762
## The logic is as follows.  If TCLTK_CPPFLAGS was specified, then we
1762
## The logic is as follows.  If TCLTK_CPPFLAGS was specified, then we
1763
## do not investigate any further.  Otherwise, if we still think we
1763
## do not investigate any further.  Otherwise, if we still think we
1764
## have Tcl/Tk, then first try via the corresponding *Config.sh file,
1764
## have Tcl/Tk, then first try via the corresponding *Config.sh file,
1765
## or else try the obvious.
1765
## or else try the obvious.
1766
AC_DEFUN([_R_TCLTK_CPPFLAGS],
1766
AC_DEFUN([_R_TCLTK_CPPFLAGS],
1767
[AC_REQUIRE([_R_TCLTK_CONFIG])
1767
[AC_REQUIRE([_R_TCLTK_CONFIG])
1768
if test -z "${TCLTK_CPPFLAGS}"; then
1768
if test -z "${TCLTK_CPPFLAGS}"; then
1769
  ## We have to do the work.
1769
  ## We have to do the work.
1770
  if test "${have_tcltk}" = yes; then
1770
  if test "${have_tcltk}" = yes; then
1771
    ## Part 1.  Check for tcl.h.
1771
    ## Part 1.  Check for tcl.h.
1772
    found_tcl_h=no
1772
    found_tcl_h=no
1773
    if test -n "${TCL_CONFIG}"; then
1773
    if test -n "${TCL_CONFIG}"; then
1774
      . ${TCL_CONFIG}
1774
      . ${TCL_CONFIG}
1775
      ## Look for tcl.h in
1775
      ## Look for tcl.h in
1776
      ##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}
1776
      ##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}
1777
      ##   ${TCL_PREFIX}/include
1777
      ##   ${TCL_PREFIX}/include
1778
      ## Also look in
1778
      ## Also look in
1779
      ##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic
1779
      ##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic
1780
      ## to deal with current FreeBSD layouts.  These also link the real
1780
      ## to deal with current FreeBSD layouts.  These also link the real
1781
      ## thing to the version subdir, but the link cannot be used as it
1781
      ## thing to the version subdir, but the link cannot be used as it
1782
      ## fails to include 'tclDecls.h' which is not linked.  Hence we
1782
      ## fails to include 'tclDecls.h' which is not linked.  Hence we
1783
      ## must look for the real thing first.  Argh ...
1783
      ## must look for the real thing first.  Argh ...
1784
      for dir in \
1784
      for dir in \
1785
          ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic \
1785
          ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic \
1786
          ${TCL_PREFIX}/include/tcl${TCL_VERSION} \
1786
          ${TCL_PREFIX}/include/tcl${TCL_VERSION} \
1787
          ${TCL_PREFIX}/include; do 
1787
          ${TCL_PREFIX}/include; do 
1788
        AC_CHECK_HEADER([${dir}/tcl.h],
1788
        AC_CHECK_HEADER([${dir}/tcl.h],
1789
                        [TCLTK_CPPFLAGS="-I${dir}"
1789
                        [TCLTK_CPPFLAGS="-I${dir}"
1790
                         found_tcl_h=yes
1790
                         found_tcl_h=yes
1791
                         break])
1791
                         break])
1792
      done
1792
      done
1793
    fi
1793
    fi
1794
    if test "${found_tcl_h}" = no; then
1794
    if test "${found_tcl_h}" = no; then
1795
      _R_HEADER_TCL
1795
      _R_HEADER_TCL
1796
      if test "${r_cv_header_tcl_h}" = yes; then
1796
      if test "${r_cv_header_tcl_h}" = yes; then
1797
        found_tcl_h=yes
1797
        found_tcl_h=yes
1798
      else
1798
      else
1799
        have_tcltk=no
1799
        have_tcltk=no
1800
      fi
1800
      fi
1801
    fi
1801
    fi
1802
  fi
1802
  fi
1803
  if test "${have_tcltk}" = yes; then
1803
  if test "${have_tcltk}" = yes; then
1804
    ## Part 2.  Check for tk.h.
1804
    ## Part 2.  Check for tk.h.
1805
    found_tk_h=no
1805
    found_tk_h=no
1806
    if test -n "${TK_CONFIG}"; then
1806
    if test -n "${TK_CONFIG}"; then
1807
      . ${TK_CONFIG}
1807
      . ${TK_CONFIG}
1808
      ## Look for tk.h in
1808
      ## Look for tk.h in
1809
      ##   ${TK_PREFIX}/include/tk${TK_VERSION}
1809
      ##   ${TK_PREFIX}/include/tk${TK_VERSION}
1810
      ##   ${TK_PREFIX}/include
1810
      ##   ${TK_PREFIX}/include
1811
      ## Also look in
1811
      ## Also look in
1812
      ##   ${TK_PREFIX}/include/tcl${TK_VERSION}
1812
      ##   ${TK_PREFIX}/include/tcl${TK_VERSION}
1813
      ## to compensate for Debian madness ...
1813
      ## to compensate for Debian madness ...
1814
      ## Also look in
1814
      ## Also look in
1815
      ##   ${TK_PREFIX}/include/tk${TK_VERSION}/generic
1815
      ##   ${TK_PREFIX}/include/tk${TK_VERSION}/generic
1816
      ## to deal with current FreeBSD layouts.  See above for details.
1816
      ## to deal with current FreeBSD layouts.  See above for details.
1817
      ##
1817
      ##
1818
      ## As the AC_CHECK_HEADER test tries including the header file and
1818
      ## As the AC_CHECK_HEADER test tries including the header file and
1819
      ## tk.h includes tcl.h and X11/Xlib.h, we need to change CPPFLAGS
1819
      ## tk.h includes tcl.h and X11/Xlib.h, we need to change CPPFLAGS
1820
      ## for the check.
1820
      ## for the check.
1821
      r_save_CPPFLAGS="${CPPFLAGS}"
1821
      r_save_CPPFLAGS="${CPPFLAGS}"
1822
      CPPFLAGS="${CPPFLAGS} ${TK_XINCLUDES} ${TCLTK_CPPFLAGS}"
1822
      CPPFLAGS="${CPPFLAGS} ${TK_XINCLUDES} ${TCLTK_CPPFLAGS}"
1823
      for dir in \
1823
      for dir in \
1824
          ${TK_PREFIX}/include/tk${TK_VERSION}/generic \
1824
          ${TK_PREFIX}/include/tk${TK_VERSION}/generic \
1825
          ${TK_PREFIX}/include/tk${TK_VERSION} \
1825
          ${TK_PREFIX}/include/tk${TK_VERSION} \
1826
          ${TK_PREFIX}/include/tcl${TK_VERSION} \
1826
          ${TK_PREFIX}/include/tcl${TK_VERSION} \
1827
          ${TK_PREFIX}/include; do 
1827
          ${TK_PREFIX}/include; do 
1828
        AC_CHECK_HEADER([${dir}/tk.h],
1828
        AC_CHECK_HEADER([${dir}/tk.h],
1829
                        [TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} -I${dir}"
1829
                        [TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} -I${dir}"
1830
                         found_tk_h=yes
1830
                         found_tk_h=yes
1831
                         break])
1831
                         break])
1832
      done
1832
      done
1833
      CPPFLAGS="${r_save_CPPFLAGS}"
1833
      CPPFLAGS="${r_save_CPPFLAGS}"
1834
    fi
1834
    fi
1835
    if test "${found_tk_h}" = no; then
1835
    if test "${found_tk_h}" = no; then
1836
      _R_HEADER_TK
1836
      _R_HEADER_TK
1837
      if test "{r_cv_header_tk_h}" = yes; then
1837
      if test "{r_cv_header_tk_h}" = yes; then
1838
        found_tk_h=yes
1838
        found_tk_h=yes
1839
      else
1839
      else
1840
        have_tcltk=no
1840
        have_tcltk=no
1841
      fi
1841
      fi
1842
    fi
1842
    fi
1843
  fi
1843
  fi
1844
fi
1844
fi
1845
if test "${have_tcltk}" = yes; then
1845
if test "${have_tcltk}" = yes; then
1846
  if test -n "${TK_XINCLUDES}"; then
1846
  if test -n "${TK_XINCLUDES}"; then
1847
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
1847
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
1848
  else
1848
  else
1849
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
1849
    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
1850
  fi
1850
  fi
1851
fi
1851
fi
1852
])# _R_TCLTK_CPPFLAGS
1852
])# _R_TCLTK_CPPFLAGS
1853
 
1853
 
1854
## _R_TCLTK_LIBS
1854
## _R_TCLTK_LIBS
1855
## -------------
1855
## -------------
1856
## Find the tcl and tk libraries.
1856
## Find the tcl and tk libraries.
1857
AC_DEFUN([_R_TCLTK_LIBS],
1857
AC_DEFUN([_R_TCLTK_LIBS],
1858
[AC_REQUIRE([AC_PATH_XTRA])
1858
[AC_REQUIRE([AC_PATH_XTRA])
1859
AC_REQUIRE([_R_TCLTK_CONFIG])
1859
AC_REQUIRE([_R_TCLTK_CONFIG])
1860
if test -z "${TCLTK_LIBS}"; then
1860
if test -z "${TCLTK_LIBS}"; then
1861
  ## We have to do the work.
1861
  ## We have to do the work.
1862
  if test "${have_tcltk}" = yes; then
1862
  if test "${have_tcltk}" = yes; then
1863
    ## Part 1.  Try finding the tcl library.
1863
    ## Part 1.  Try finding the tcl library.
1864
    if test -n "${TCL_CONFIG}"; then
1864
    if test -n "${TCL_CONFIG}"; then
1865
      . ${TCL_CONFIG}
1865
      . ${TCL_CONFIG}
1866
      TCLTK_LIBS="${TCL_LIB_SPEC}"
1866
      TCLTK_LIBS="${TCL_LIB_SPEC}"
1867
    else
1867
    else
1868
      AC_CHECK_LIB(tcl, Tcl_CreateInterp,
1868
      AC_CHECK_LIB(tcl, Tcl_CreateInterp,
1869
                   [TCLTK_LIBS=-ltcl],
1869
                   [TCLTK_LIBS=-ltcl],
1870
                   [have_tcltk=no])
1870
                   [have_tcltk=no])
1871
    fi
1871
    fi
1872
  fi
1872
  fi
1873
  if test "${have_tcltk}" = yes; then
1873
  if test "${have_tcltk}" = yes; then
1874
    ## Part 2.  Try finding the tk library.
1874
    ## Part 2.  Try finding the tk library.
1875
    if test -n "${TK_CONFIG}"; then
1875
    if test -n "${TK_CONFIG}"; then
1876
      . ${TK_CONFIG}
1876
      . ${TK_CONFIG}
1877
      TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_LIBS}"
1877
      TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_LIBS}"
1878
    else
1878
    else
1879
      AC_CHECK_LIB(tk, Tk_Init, , , [${TCLTK_LIBS}])
1879
      AC_CHECK_LIB(tk, Tk_Init, , , [${TCLTK_LIBS}])
1880
      if test "${ac_cv_lib_tk_Tk_Init}" = no; then
1880
      if test "${ac_cv_lib_tk_Tk_Init}" = no; then
1881
	## Grr, simple -ltk does not work.
1881
	## Grr, simple -ltk does not work.
1882
	## But maybe we simply need to add X11 libs.
1882
	## But maybe we simply need to add X11 libs.
1883
        ## Note that we cannot simply repeat the above test with extra
1883
        ## Note that we cannot simply repeat the above test with extra
1884
        ## libs, because AC_CHECK_LIB uses the corresponding cache var
1884
        ## libs, because AC_CHECK_LIB uses the corresponding cache var
1885
        ## (ac_cv_lib_tk_Tk_Init in our case) if set.  As using unset
1885
        ## (ac_cv_lib_tk_Tk_Init in our case) if set.  As using unset
1886
        ## is not portable shell programming according to the Autoconf
1886
        ## is not portable shell programming according to the Autoconf
1887
        ## docs, we use Tk_SafeInit in the test with X11 libs added.
1887
        ## docs, we use Tk_SafeInit in the test with X11 libs added.
1888
	AC_CHECK_LIB(tk, Tk_SafeInit,
1888
	AC_CHECK_LIB(tk, Tk_SafeInit,
1889
                     [TCLTK_LIBS="${TCLTK_LIBS} -ltk ${X_LIBS}"],
1889
                     [TCLTK_LIBS="${TCLTK_LIBS} -ltk ${X_LIBS}"],
1890
	             [have_tcltk=no],
1890
	             [have_tcltk=no],
1891
                     [${TCLTK_LIBS} ${X_LIBS}])
1891
                     [${TCLTK_LIBS} ${X_LIBS}])
1892
      fi
1892
      fi
1893
    fi
1893
    fi
1894
  fi
1894
  fi
1895
  ## Postprocessing for AIX.
1895
  ## Postprocessing for AIX.
1896
  ## On AIX, the *_LIB_SPEC variables need to contain '-bI:' flags for
1896
  ## On AIX, the *_LIB_SPEC variables need to contain '-bI:' flags for
1897
  ## the Tcl export file.  These are really flags for ld rather than the
1897
  ## the Tcl export file.  These are really flags for ld rather than the
1898
  ## C/C++ compilers, and hence may need protection via '-Wl,'.
1898
  ## C/C++ compilers, and hence may need protection via '-Wl,'.
1899
  ## We have two ways of doing that:
1899
  ## We have two ways of doing that:
1900
  ## * Recording whether '-Wl,' is needed for the C or C++ compilers,
1900
  ## * Recording whether '-Wl,' is needed for the C or C++ compilers,
1901
  ##   and getting this info into the TCLTK_LIBS make variable ... mess!
1901
  ##   and getting this info into the TCLTK_LIBS make variable ... mess!
1902
  ## * Protecting all entries in TCLTK_LIBS that do not start with '-l'
1902
  ## * Protecting all entries in TCLTK_LIBS that do not start with '-l'
1903
  ##   or '-L' with '-Wl,' (hoping that all compilers understand this).
1903
  ##   or '-L' with '-Wl,' (hoping that all compilers understand this).
1904
  ##   Easy, hence ...
1904
  ##   Easy, hence ...
1905
  case "${host_os}" in
1905
  case "${host_os}" in
1906
    aix*)
1906
    aix*)
1907
      orig_TCLTK_LIBS="${TCLTK_LIBS}"
1907
      orig_TCLTK_LIBS="${TCLTK_LIBS}"
1908
      TCLTK_LIBS=
1908
      TCLTK_LIBS=
1909
      for flag in ${orig_TCLTK_LIBS}; do
1909
      for flag in ${orig_TCLTK_LIBS}; do
1910
        case "${flag}" in
1910
        case "${flag}" in
1911
	  -l*|-L*|-Wl,*) ;;
1911
	  -l*|-L*|-Wl,*) ;;
1912
	  *) flag="-Wl,${flag}" ;;
1912
	  *) flag="-Wl,${flag}" ;;
1913
	esac
1913
	esac
1914
	TCLTK_LIBS="${TCLTK_LIBS} ${flag}"
1914
	TCLTK_LIBS="${TCLTK_LIBS} ${flag}"
1915
      done
1915
      done
1916
      ;;
1916
      ;;
1917
  esac
1917
  esac
1918
  ## Force evaluation ('-ltcl8.3${TCL_DBGX}' and friends ...).
1918
  ## Force evaluation ('-ltcl8.3${TCL_DBGX}' and friends ...).
1919
  eval "TCLTK_LIBS=\"${TCLTK_LIBS}\""
1919
  eval "TCLTK_LIBS=\"${TCLTK_LIBS}\""
1920
fi
1920
fi
1921
])# _R_TCLTK_LIBS
1921
])# _R_TCLTK_LIBS
1922
 
1922
 
1923
## _R_TCLTK_WORKS
1923
## _R_TCLTK_WORKS
1924
## --------------
1924
## --------------
1925
## Check whether compiling and linking code using Tcl/Tk works.
1925
## Check whether compiling and linking code using Tcl/Tk works.
1926
## Set shell variable r_cv_tcltk_works to 'yes' or 'no' accordingly.
1926
## Set shell variable r_cv_tcltk_works to 'yes' or 'no' accordingly.
1927
AC_DEFUN([_R_TCLTK_WORKS],
1927
AC_DEFUN([_R_TCLTK_WORKS],
1928
[AC_CACHE_CHECK([whether compiling/linking Tcl/Tk code works],
1928
[AC_CACHE_CHECK([whether compiling/linking Tcl/Tk code works],
1929
                [r_cv_tcltk_works],
1929
                [r_cv_tcltk_works],
1930
[AC_LANG_PUSH(C)
1930
[AC_LANG_PUSH(C)
1931
r_save_CPPFLAGS="${CPPFLAGS}"
1931
r_save_CPPFLAGS="${CPPFLAGS}"
1932
r_save_LIBS="${LIBS}"
1932
r_save_LIBS="${LIBS}"
1933
CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS}"
1933
CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS}"
1934
LIBS="${LIBS} ${TCLTK_LIBS}"
1934
LIBS="${LIBS} ${TCLTK_LIBS}"
1935
AC_LINK_IFELSE([AC_LANG_PROGRAM(
1935
AC_LINK_IFELSE([AC_LANG_PROGRAM(
1936
[[#include <tcl.h>
1936
[[#include <tcl.h>
1937
#include <tk.h>
1937
#include <tk.h>
1938
]],
1938
]],
1939
[[static char * p1 = (char *) Tcl_Init;
1939
[[static char * p1 = (char *) Tcl_Init;
1940
static char * p2 = (char *) Tk_Init;
1940
static char * p2 = (char *) Tk_Init;
1941
]])],
1941
]])],
1942
r_cv_tcltk_works=yes,
1942
r_cv_tcltk_works=yes,
1943
r_cv_tcltk_works=no)
1943
r_cv_tcltk_works=no)
1944
CPPFLAGS="${r_save_CPPFLAGS}"
1944
CPPFLAGS="${r_save_CPPFLAGS}"
1945
LIBS="${r_save_LIBS}"
1945
LIBS="${r_save_LIBS}"
1946
AC_LANG_POP(C)])
1946
AC_LANG_POP(C)])
1947
])# _R_TCLTK_WORKS
1947
])# _R_TCLTK_WORKS
1948
 
1948
 
1949
## R_TCLTK
1949
## R_TCLTK
1950
## -------
1950
## -------
1951
AC_DEFUN([R_TCLTK],
1951
AC_DEFUN([R_TCLTK],
1952
[if test "${want_tcltk}" = yes; then
1952
[if test "${want_tcltk}" = yes; then
1953
  have_tcltk=yes
1953
  have_tcltk=yes
1954
  ## (Note that the subsequent 3 macros assume that have_tcltk has been
1954
  ## (Note that the subsequent 3 macros assume that have_tcltk has been
1955
  ## set appropriately.)
1955
  ## set appropriately.)
1956
  _R_TCLTK_CONFIG
1956
  _R_TCLTK_CONFIG
1957
  _R_TCLTK_CPPFLAGS  
1957
  _R_TCLTK_CPPFLAGS  
1958
  _R_TCLTK_LIBS
1958
  _R_TCLTK_LIBS
1959
  if test "${have_tcltk}" = yes; then
1959
  if test "${have_tcltk}" = yes; then
1960
    _R_TCLTK_WORKS
1960
    _R_TCLTK_WORKS
1961
    have_tcltk=${r_cv_tcltk_works}
1961
    have_tcltk=${r_cv_tcltk_works}
1962
  fi
1962
  fi
1963
else
1963
else
1964
  have_tcltk=no
1964
  have_tcltk=no
1965
  ## Just making sure.
1965
  ## Just making sure.
1966
  TCLTK_CPPFLAGS=
1966
  TCLTK_CPPFLAGS=
1967
  TCLTK_LIBS=
1967
  TCLTK_LIBS=
1968
fi
1968
fi
1969
if test "${have_tcltk}" = yes; then
1969
if test "${have_tcltk}" = yes; then
1970
  AC_DEFINE(HAVE_TCLTK, 1,
1970
  AC_DEFINE(HAVE_TCLTK, 1,
1971
            [Define if you have the Tcl/Tk headers and libraries and
1971
            [Define if you have the Tcl/Tk headers and libraries and
1972
	     want Tcl/Tk support to be built.])
1972
	     want Tcl/Tk support to be built.])
1973
  use_tcltk=yes
1973
  use_tcltk=yes
1974
else
1974
else
1975
  use_tcltk=no
1975
  use_tcltk=no
1976
fi
1976
fi
1977
AC_SUBST(TCLTK_CPPFLAGS)
1977
AC_SUBST(TCLTK_CPPFLAGS)
1978
AC_SUBST(TCLTK_LIBS)
1978
AC_SUBST(TCLTK_LIBS)
1979
AC_SUBST(use_tcltk)
1979
AC_SUBST(use_tcltk)
1980
])# R_TCLTK
1980
])# R_TCLTK
1981
 
1981
 
1982
## R_BLAS_LIBS
1982
## R_BLAS_LIBS
1983
## -----------
1983
## -----------
1984
## Look for a library that implements the BLAS linear-algebra interface
1984
## Look for a library that implements the BLAS linear-algebra interface
1985
## (see http://www.netlib.org/blas/).  On success, sets BLAS_LIBS to the
1985
## (see http://www.netlib.org/blas/).  On success, sets BLAS_LIBS to the
1986
## requisite library linkages.
1986
## requisite library linkages.
1987
##
1987
##
1988
## This is based on ACX_BLAS by Steven G. Johnson <stevenj@alum.mit.edu>
1988
## This is based on ACX_BLAS by Steven G. Johnson <stevenj@alum.mit.edu>
1989
## from the Official Autoconf Macro Archive
1989
## from the Official Autoconf Macro Archive
1990
## (http://www.gnu.org/software/ac-archive/htmldoc/acx_blas.m4),
1990
## (http://www.gnu.org/software/ac-archive/htmldoc/acx_blas.m4),
1991
## with the following changes:
1991
## with the following changes:
1992
## * We also handle HPUX .sl command line specifications.
1992
## * We also handle HPUX .sl command line specifications.
1993
## * We explictly deal with the case of f2c.  Most likely pointless.
1993
## * We explictly deal with the case of f2c.  Most likely pointless.
1994
## * We only care about the Fortran 77 interface to Atlas, hence do not
1994
## * We only care about the Fortran 77 interface to Atlas, hence do not
1995
##   test for -lcblas.
1995
##   test for -lcblas.
1996
## * We do not use BLAS libs that caused problems in the past: Alpha
1996
## * We do not use BLAS libs that caused problems in the past: Alpha
1997
##   CXML and DXML, and SGI SCSL and SGIMATH (marked with COMMENT tags).
1997
##   CXML and DXML, and SGI SCSL and SGIMATH (marked with COMMENT tags).
1998
## * As we link with $BLAS_LIBS $FLIBS $LIBS (in that order), we use the
1998
## * As we link with $BLAS_LIBS $FLIBS $LIBS (in that order), we use the
1999
##   same order in the tests.
1999
##   same order in the tests.
2000
## * We do not use ACTION-IF-FOUND and ACTION-IF-NOT-FOUND.
2000
## * We do not use ACTION-IF-FOUND and ACTION-IF-NOT-FOUND.
2001
## The sunperf test calls the library as now required.
2001
## The sunperf test calls the library as now required.
2002
## Based on acx_blas.m4 version 1.2 (2001-12-13)
2002
## Based on acx_blas.m4 version 1.2 (2001-12-13)
2003
AC_DEFUN([R_BLAS_LIBS],
2003
AC_DEFUN([R_BLAS_LIBS],
2004
[AC_REQUIRE([R_PROG_F77_FLIBS])
2004
[AC_REQUIRE([R_PROG_F77_FLIBS])
2005
AC_REQUIRE([R_PROG_F77_APPEND_UNDERSCORE])
2005
AC_REQUIRE([R_PROG_F77_APPEND_UNDERSCORE])
2006
AC_REQUIRE([R_PROG_F2C_FLIBS])
2006
AC_REQUIRE([R_PROG_F2C_FLIBS])
2007
 
2007
 
2008
acx_blas_ok=no
2008
acx_blas_ok=no
2009
case "${with_blas}" in
2009
case "${with_blas}" in
2010
  yes | "") ;;
2010
  yes | "") ;;
2011
  no) acx_blas_ok=disable ;;
2011
  no) acx_blas_ok=disable ;;
2012
  -* | */* | *.a | *.so | *.so.* | *.sl | *.sl.* | *.o)
2012
  -* | */* | *.a | *.so | *.so.* | *.sl | *.sl.* | *.o)
2013
    BLAS_LIBS="${with_blas}" 
2013
    BLAS_LIBS="${with_blas}" 
2014
    ;;
2014
    ;;
2015
  *) BLAS_LIBS="-l${with_blas}" ;;
2015
  *) BLAS_LIBS="-l${with_blas}" ;;
2016
esac
2016
esac
2017
 
2017
 
2018
if test "${r_cv_prog_f77_append_underscore}" = yes \
2018
if test "${r_cv_prog_f77_append_underscore}" = yes \
2019
  || test -n "${F2C}"; then
2019
  || test -n "${F2C}"; then
2020
  dgemm=dgemm_
2020
  dgemm=dgemm_
2021
  sgemm=sgemm_
2021
  sgemm=sgemm_
2022
  xerbla=xerbla_
2022
  xerbla=xerbla_
2023
else
2023
else
2024
  dgemm=dgemm
2024
  dgemm=dgemm
2025
  sgemm=sgemm
2025
  sgemm=sgemm
2026
  xerbla=xerbla
2026
  xerbla=xerbla
2027
fi
2027
fi
2028
 
2028
 
2029
acx_blas_save_LIBS="${LIBS}"
2029
acx_blas_save_LIBS="${LIBS}"
2030
LIBS="${FLIBS} ${LIBS}"
2030
LIBS="${FLIBS} ${LIBS}"
2031
 
2031
 
2032
## First, check BLAS_LIBS environment variable
2032
## First, check BLAS_LIBS environment variable
2033
if test "${acx_blas_ok}" = no; then
2033
if test "${acx_blas_ok}" = no; then
2034
  if test "x${BLAS_LIBS}" != x; then
2034
  if test "x${BLAS_LIBS}" != x; then
2035
    r_save_LIBS="${LIBS}"; LIBS="${BLAS_LIBS} ${LIBS}"
2035
    r_save_LIBS="${LIBS}"; LIBS="${BLAS_LIBS} ${LIBS}"
2036
    AC_MSG_CHECKING([for ${sgemm} in ${BLAS_LIBS}])
2036
    AC_MSG_CHECKING([for ${sgemm} in ${BLAS_LIBS}])
2037
    AC_TRY_LINK([void ${xerbla}(char *srname, int *info){}], ${sgemm}(),
2037
    AC_TRY_LINK([void ${xerbla}(char *srname, int *info){}], ${sgemm}(),
2038
      [acx_blas_ok=yes], [BLAS_LIBS=""])
2038
      [acx_blas_ok=yes], [BLAS_LIBS=""])
2039
    AC_MSG_RESULT([${acx_blas_ok}])
2039
    AC_MSG_RESULT([${acx_blas_ok}])
2040
    LIBS="${r_save_LIBS}"
2040
    LIBS="${r_save_LIBS}"
2041
  fi
2041
  fi
2042
fi
2042
fi
2043
 
2043
 
2044
## BLAS linked to by default?  (happens on some supercomputers)
2044
## BLAS linked to by default?  (happens on some supercomputers)
2045
if test "${acx_blas_ok}" = no; then
2045
if test "${acx_blas_ok}" = no; then
2046
  AC_CHECK_FUNC(${sgemm}, [acx_blas_ok=yes])
2046
  AC_CHECK_FUNC(${sgemm}, [acx_blas_ok=yes])
2047
fi
2047
fi
2048
 
2048
 
2049
## BLAS in ATLAS library?  (http://math-atlas.sourceforge.net/)
2049
## BLAS in ATLAS library?  (http://math-atlas.sourceforge.net/)
2050
if test "${acx_blas_ok}" = no; then
2050
if test "${acx_blas_ok}" = no; then
2051
  AC_CHECK_LIB(atlas, ATL_xerbla,
2051
  AC_CHECK_LIB(atlas, ATL_xerbla,
2052
               [AC_CHECK_LIB(f77blas, ${sgemm},
2052
               [AC_CHECK_LIB(f77blas, ${sgemm},
2053
                             [acx_blas_ok=yes
2053
                             [acx_blas_ok=yes
2054
                              BLAS_LIBS="-lf77blas -latlas"],
2054
                              BLAS_LIBS="-lf77blas -latlas"],
2055
			     [], [-latlas])])
2055
			     [], [-latlas])])
2056
fi
2056
fi
2057
 
2057
 
2058
## BLAS in PhiPACK libraries?  (requires generic BLAS lib, too)
2058
## BLAS in PhiPACK libraries?  (requires generic BLAS lib, too)
2059
if test "${acx_blas_ok}" = no; then
2059
if test "${acx_blas_ok}" = no; then
2060
  AC_CHECK_LIB(blas, ${sgemm},
2060
  AC_CHECK_LIB(blas, ${sgemm},
2061
	       [AC_CHECK_LIB(dgemm, $dgemm,
2061
	       [AC_CHECK_LIB(dgemm, $dgemm,
2062
		             [AC_CHECK_LIB(sgemm, ${sgemm},
2062
		             [AC_CHECK_LIB(sgemm, ${sgemm},
2063
			                   [acx_blas_ok=yes
2063
			                   [acx_blas_ok=yes
2064
                                            BLAS_LIBS="-lsgemm -ldgemm -lblas"],
2064
                                            BLAS_LIBS="-lsgemm -ldgemm -lblas"],
2065
			                   [], [-lblas])],
2065
			                   [], [-lblas])],
2066
			     [], [-lblas])])
2066
			     [], [-lblas])])
2067
fi
2067
fi
2068
 
2068
 
2069
## <COMMENT>
2069
## <COMMENT>
2070
## ## BLAS in Alpha CXML library?
2070
## ## BLAS in Alpha CXML library?
2071
## if test "${acx_blas_ok}" = no; then
2071
## if test "${acx_blas_ok}" = no; then
2072
##   AC_CHECK_LIB(cxml, ${sgemm},
2072
##   AC_CHECK_LIB(cxml, ${sgemm},
2073
##                [acx_blas_ok=yes; BLAS_LIBS="-lcxml"])
2073
##                [acx_blas_ok=yes; BLAS_LIBS="-lcxml"])
2074
## fi
2074
## fi
2075
## </COMMENT>
2075
## </COMMENT>
2076
  
2076
  
2077
## <COMMENT>
2077
## <COMMENT>
2078
## # BLAS in Alpha DXML library? (now called CXML, see above)
2078
## # BLAS in Alpha DXML library? (now called CXML, see above)
2079
## if test "${acx_blas_ok}" = no; then
2079
## if test "${acx_blas_ok}" = no; then
2080
##   AC_CHECK_LIB(dxml, ${sgemm},
2080
##   AC_CHECK_LIB(dxml, ${sgemm},
2081
##                [acx_blas_ok=yes; BLAS_LIBS="-ldxml"])
2081
##                [acx_blas_ok=yes; BLAS_LIBS="-ldxml"])
2082
## fi
2082
## fi
2083
## </COMMENT>
2083
## </COMMENT>
2084
 
2084
 
2085
## BLAS in Sun Performance library?
2085
## BLAS in Sun Performance library?
2086
## Some versions require -xlic_lib=sunperf: -lsunperf will not work
2086
## Some versions require -xlic_lib=sunperf: -lsunperf will not work
2087
## Not sure whether -lsunmath is required, but it helps anyway
2087
## Not sure whether -lsunmath is required, but it helps anyway
2088
if test "${acx_blas_ok}" = no; then
2088
if test "${acx_blas_ok}" = no; then
2089
  if test "x$GCC" != xyes; then # only works with Sun CC
2089
  if test "x$GCC" != xyes; then # only works with Sun CC
2090
     AC_MSG_CHECKING([for ${sgemm} in -lsunperf])
2090
     AC_MSG_CHECKING([for ${sgemm} in -lsunperf])
2091
     r_save_LIBS="${LIBS}"
2091
     r_save_LIBS="${LIBS}"
2092
     LIBS="-xlic_lib=sunperf -lsunmath ${LIBS}"
2092
     LIBS="-xlic_lib=sunperf -lsunmath ${LIBS}"
2093
     AC_TRY_LINK_FUNC([${sgemm}], [R_sunperf=yes], [R_sunperf=no])
2093
     AC_TRY_LINK_FUNC([${sgemm}], [R_sunperf=yes], [R_sunperf=no])
2094
     if test "${R_sunperf}" = yes; then
2094
     if test "${R_sunperf}" = yes; then
2095
        BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
2095
        BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
2096
	acx_blas_ok=yes
2096
	acx_blas_ok=yes
2097
     fi
2097
     fi
2098
     LIBS="${r_save_LIBS}"
2098
     LIBS="${r_save_LIBS}"
2099
     AC_MSG_RESULT([${acx_blas_ok}])
2099
     AC_MSG_RESULT([${acx_blas_ok}])
2100
  fi
2100
  fi
2101
fi
2101
fi
2102
 
2102
 
2103
## <COMMENT>
2103
## <COMMENT>
2104
## ## BLAS in SCSL library?  (SGI/Cray Scientific Library)
2104
## ## BLAS in SCSL library?  (SGI/Cray Scientific Library)
2105
## if test "${acx_blas_ok}" = no; then
2105
## if test "${acx_blas_ok}" = no; then
2106
##   AC_CHECK_LIB(scs, ${sgemm},
2106
##   AC_CHECK_LIB(scs, ${sgemm},
2107
##                [acx_blas_ok=yes; BLAS_LIBS="-lscs"])
2107
##                [acx_blas_ok=yes; BLAS_LIBS="-lscs"])
2108
## fi
2108
## fi
2109
## </COMMENT>
2109
## </COMMENT>
2110
 
2110
 
2111
## <COMMENT>
2111
## <COMMENT>
2112
## ## BLAS in SGIMATH library?
2112
## ## BLAS in SGIMATH library?
2113
## if test "${acx_blas_ok}" = no; then
2113
## if test "${acx_blas_ok}" = no; then
2114
##   AC_CHECK_LIB(complib.sgimath, ${sgemm},
2114
##   AC_CHECK_LIB(complib.sgimath, ${sgemm},
2115
##                [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
2115
##                [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
2116
## fi
2116
## fi
2117
## </COMMENT>
2117
## </COMMENT>
2118
 
2118
 
2119
## BLAS in IBM ESSL library? (requires generic BLAS lib, too)
2119
## BLAS in IBM ESSL library? (requires generic BLAS lib, too)
2120
if test "${acx_blas_ok}" = no; then
2120
if test "${acx_blas_ok}" = no; then
2121
  AC_CHECK_LIB(blas, ${sgemm},
2121
  AC_CHECK_LIB(blas, ${sgemm},
2122
	       [AC_CHECK_LIB(essl, ${sgemm},
2122
	       [AC_CHECK_LIB(essl, ${sgemm},
2123
			     [acx_blas_ok=yes
2123
			     [acx_blas_ok=yes
2124
                              BLAS_LIBS="-lessl -lblas"],
2124
                              BLAS_LIBS="-lessl -lblas"],
2125
			     [], [-lblas ${FLIBS}])])
2125
			     [], [-lblas ${FLIBS}])])
2126
fi
2126
fi
2127
 
2127
 
2128
## Generic BLAS library?
2128
## Generic BLAS library?
2129
if test "${acx_blas_ok}" = no; then
2129
if test "${acx_blas_ok}" = no; then
2130
  AC_CHECK_LIB(blas, ${sgemm},
2130
  AC_CHECK_LIB(blas, ${sgemm},
2131
               [acx_blas_ok=yes; BLAS_LIBS="-lblas"])
2131
               [acx_blas_ok=yes; BLAS_LIBS="-lblas"])
2132
fi
2132
fi
2133
 
2133
 
2134
LIBS="${acx_blas_save_LIBS}"
2134
LIBS="${acx_blas_save_LIBS}"
2135
 
2135
 
2136
AC_SUBST(BLAS_LIBS)
2136
AC_SUBST(BLAS_LIBS)
2137
])# R_BLAS_LIBS
2137
])# R_BLAS_LIBS
2138
 
2138
 
2139
## R_LAPACK_LIBS
2139
## R_LAPACK_LIBS
2140
## -------------
2140
## -------------
2141
## Look for a library that implements LAPACK (see
2141
## Look for a library that implements LAPACK (see
2142
## http://www.netlib.org/lapack/).  On success, sets LAPACK_LIBS to the
2142
## http://www.netlib.org/lapack/).  On success, sets LAPACK_LIBS to the
2143
## requisite library linkages.  Only used by the lapack module at
2143
## requisite library linkages.  Only used by the lapack module at
2144
## present. 
2144
## present. 
2145
##
2145
##
2146
## This is roughly based on ACX_LAPACK by Steven G. Johnson
2146
## This is roughly based on ACX_LAPACK by Steven G. Johnson
2147
## <stevenj@alum.mit.edu> from the Official Autoconf Macro Archive
2147
## <stevenj@alum.mit.edu> from the Official Autoconf Macro Archive
2148
## (http://www.gnu.org/software/ac-archive/htmldoc/acx_lapack.m4),
2148
## (http://www.gnu.org/software/ac-archive/htmldoc/acx_lapack.m4),
2149
## with the following changes:
2149
## with the following changes:
2150
## * We also handle HPUX .sl command line specifications.
2150
## * We also handle HPUX .sl command line specifications.
2151
## * We explictly deal with the case of f2c.  Most likely pointless.
2151
## * We explictly deal with the case of f2c.  Most likely pointless.
2152
## * We test for a LAPACK_LIBS environment variable after checking
2152
## * We test for a LAPACK_LIBS environment variable after checking
2153
##   whether LAPACK is already linked (see below).
2153
##   whether LAPACK is already linked (see below).
2154
## * We do not test for the generic lapack_rs6k library (why not?).
2154
## * We do not test for the generic lapack_rs6k library (why not?).
2155
## * As we link with $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS (in that
2155
## * As we link with $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS (in that
2156
##   order), we use the same order in the tests.
2156
##   order), we use the same order in the tests.
2157
## * We do not use ACTION-IF-FOUND and ACTION-IF-NOT-FOUND.
2157
## * We do not use ACTION-IF-FOUND and ACTION-IF-NOT-FOUND.
2158
## Note that Debian ATLAS has LAPACK libs in /usr/lib/atlas (or $arch
2158
## Note that Debian ATLAS has LAPACK libs in /usr/lib/atlas (or $arch
2159
## variants) which should be used if ATLAS is used for BLAS, and not
2159
## variants) which should be used if ATLAS is used for BLAS, and not
2160
## found at configure time but used at run time ...
2160
## found at configure time but used at run time ...
2161
## Note also that (see R-admin) that our main intention is to allow a
2161
## Note also that (see R-admin) that our main intention is to allow a
2162
## LAPACK-containing BLAS to be used ... there are too many slow or
2162
## LAPACK-containing BLAS to be used ... there are too many slow or
2163
## broken LAPACKs out there.
2163
## broken LAPACKs out there.
2164
## Based on acx_lapack.m4 version 1.3 (2002-03-12).
2164
## Based on acx_lapack.m4 version 1.3 (2002-03-12).
2165
 
2165
 
2166
AC_DEFUN([R_LAPACK_LIBS],
2166
AC_DEFUN([R_LAPACK_LIBS],
2167
[AC_REQUIRE([R_PROG_F77_FLIBS])
2167
[AC_REQUIRE([R_PROG_F77_FLIBS])
2168
AC_REQUIRE([R_PROG_F77_APPEND_UNDERSCORE])
2168
AC_REQUIRE([R_PROG_F77_APPEND_UNDERSCORE])
2169
AC_REQUIRE([R_PROG_F2C_FLIBS])
2169
AC_REQUIRE([R_PROG_F2C_FLIBS])
2170
AC_REQUIRE([R_BLAS_LIBS])
2170
AC_REQUIRE([R_BLAS_LIBS])
2171
 
2171
 
2172
acx_lapack_ok=no
2172
acx_lapack_ok=no
2173
case "${with_lapack}" in
2173
case "${with_lapack}" in
2174
  yes | "") ;;
2174
  yes | "") ;;
2175
  no) acx_lapack_ok=disable ;;
2175
  no) acx_lapack_ok=disable ;;
2176
  -* | */* | *.a | *.so | *.so.* | *.sl | *.sl.* | *.o)
2176
  -* | */* | *.a | *.so | *.so.* | *.sl | *.sl.* | *.o)
2177
    LAPACK_LIBS="${with_lapack}" 
2177
    LAPACK_LIBS="${with_lapack}" 
2178
    ;;
2178
    ;;
2179
  *) LAPACK_LIBS="-l${with_lapack}" ;;
2179
  *) LAPACK_LIBS="-l${with_lapack}" ;;
2180
esac
2180
esac
2181
 
2181
 
2182
if test "${r_cv_prog_f77_append_underscore}" = yes \
2182
if test "${r_cv_prog_f77_append_underscore}" = yes \
2183
  || test -n "${F2C}"; then
2183
  || test -n "${F2C}"; then
2184
  zgeev=zgeev_
2184
  zgeev=zgeev_
2185
else
2185
else
2186
  zgeev=zgeev
2186
  zgeev=zgeev
2187
fi
2187
fi
2188
 
2188
 
2189
# We cannot use LAPACK if BLAS is not found
2189
# We cannot use LAPACK if BLAS is not found
2190
if test "x${acx_blas_ok}" != xyes; then
2190
if test "x${acx_blas_ok}" != xyes; then
2191
  acx_lapack_ok=noblas
2191
  acx_lapack_ok=noblas
2192
fi
2192
fi
2193
 
2193
 
2194
acx_lapack_save_LIBS="${LIBS}"
2194
acx_lapack_save_LIBS="${LIBS}"
2195
LIBS="${BLAS_LIBS} ${FLIBS} ${LIBS}"
2195
LIBS="${BLAS_LIBS} ${FLIBS} ${LIBS}"
2196
 
2196
 
2197
## LAPACK linked to by default?  (Could be in the BLAS libs.)
2197
## LAPACK linked to by default?  (Could be in the BLAS libs.)
2198
if test "${acx_lapack_ok}" = no; then
2198
if test "${acx_lapack_ok}" = no; then
2199
  AC_CHECK_FUNC(${zgeev}, [acx_lapack_ok=yes])
2199
  AC_CHECK_FUNC(${zgeev}, [acx_lapack_ok=yes])
2200
fi
2200
fi
2201
 
2201
 
2202
## Next, check LAPACK_LIBS environment variable
2202
## Next, check LAPACK_LIBS environment variable
2203
if test "${acx_lapack_ok}" = no; then
2203
if test "${acx_lapack_ok}" = no; then
2204
  if test "x${LAPACK_LIBS}" != x; then
2204
  if test "x${LAPACK_LIBS}" != x; then
2205
    r_save_LIBS="${LIBS}"; LIBS="${LAPACK_LIBS} ${LIBS}"
2205
    r_save_LIBS="${LIBS}"; LIBS="${LAPACK_LIBS} ${LIBS}"
2206
    AC_MSG_CHECKING([for ${zgeev} in ${LAPACK_LIBS}])
2206
    AC_MSG_CHECKING([for ${zgeev} in ${LAPACK_LIBS}])
2207
    AC_TRY_LINK_FUNC(${zgeev}, [acx_lapack_ok=yes], [LAPACK_LIBS=""])
2207
    AC_TRY_LINK_FUNC(${zgeev}, [acx_lapack_ok=yes], [LAPACK_LIBS=""])
2208
    AC_MSG_RESULT([${acx_lapack_ok}])
2208
    AC_MSG_RESULT([${acx_lapack_ok}])
2209
    LIBS="${r_save_LIBS}"
2209
    LIBS="${r_save_LIBS}"
2210
  fi
2210
  fi
2211
fi
2211
fi
2212
 
2212
 
2213
## LAPACK in Sun Performance library?
2213
## LAPACK in Sun Performance library?
2214
## No longer test here as will be picked up by the default test.
2214
## No longer test here as will be picked up by the default test.
2215
 
2215
 
2216
## Generic LAPACK library?
2216
## Generic LAPACK library?
2217
if test "${acx_lapack_ok}" = no; then
2217
if test "${acx_lapack_ok}" = no; then
2218
  AC_CHECK_LIB(lapack, ${zgeev},
2218
  AC_CHECK_LIB(lapack, ${zgeev},
2219
               [acx_lapack_ok=yes; LAPACK_LIBS="-llapack"])
2219
               [acx_lapack_ok=yes; LAPACK_LIBS="-llapack"])
2220
fi
2220
fi
2221
 
2221
 
2222
LIBS="${acx_lapack_save_LIBS}"
2222
LIBS="${acx_lapack_save_LIBS}"
2223
 
2223
 
2224
if test "${acx_lapack_ok}" = yes; then
2224
if test "${acx_lapack_ok}" = yes; then
2225
  AC_DEFINE(HAVE_LAPACK, 1,
2225
  AC_DEFINE(HAVE_LAPACK, 1,
2226
            [Define if external LAPACK is available.])
2226
            [Define if external LAPACK is available.])
2227
fi
2227
fi
2228
 
2228
 
2229
AC_SUBST(LAPACK_LIBS)
2229
AC_SUBST(LAPACK_LIBS)
2230
])# R_LAPACK_LIBS
2230
])# R_LAPACK_LIBS
2231
 
2231
 
2232
## R_XDR
2232
## R_XDR
2233
## -----
2233
## -----
2234
## Try finding XDR library functions and headers.
2234
## Try finding XDR library functions and headers.
2235
## FreeBSD in particular needs rpc/types.h before rpc/xdr.h.
2235
## FreeBSD in particular needs rpc/types.h before rpc/xdr.h.
2236
AC_DEFUN([R_XDR],
2236
AC_DEFUN([R_XDR],
2237
[AC_CHECK_HEADER(rpc/types.h)
2237
[AC_CHECK_HEADER(rpc/types.h)
2238
if test "${ac_cv_header_rpc_types_h}" = yes ; then
2238
if test "${ac_cv_header_rpc_types_h}" = yes ; then
2239
  AC_CHECK_HEADER(rpc/xdr.h, , , [#include <rpc/types.h>])
2239
  AC_CHECK_HEADER(rpc/xdr.h, , , [#include <rpc/types.h>])
2240
fi
2240
fi
2241
AC_CACHE_CHECK([for XDR support],
2241
AC_CACHE_CHECK([for XDR support],
2242
                [r_cv_xdr],
2242
                [r_cv_xdr],
2243
[if test "${ac_cv_header_rpc_types_h}" = yes \
2243
[if test "${ac_cv_header_rpc_types_h}" = yes \
2244
     && test "${ac_cv_header_rpc_xdr_h}" = yes \
2244
     && test "${ac_cv_header_rpc_xdr_h}" = yes \
2245
     && test "${ac_cv_search_xdr_string}" != no ; then
2245
     && test "${ac_cv_search_xdr_string}" != no ; then
2246
  r_cv_xdr=yes
2246
  r_cv_xdr=yes
2247
else
2247
else
2248
  r_cv_xdr=no
2248
  r_cv_xdr=no
2249
fi
2249
fi
2250
])
2250
])
2251
AM_CONDITIONAL(BUILD_XDR, [test "x${r_cv_xdr}" = xno])
2251
AM_CONDITIONAL(BUILD_XDR, [test "x${r_cv_xdr}" = xno])
2252
])# R_XDR
2252
])# R_XDR
2253
 
2253
 
2254
## R_ZLIB
2254
## R_ZLIB
2255
## ------
2255
## ------
2256
## Try finding zlib library and headers.
2256
## Try finding zlib library and headers.
2257
## We check that both are installed, and that the header >= 1.1.4
2257
## We check that both are installed, and that the header >= 1.1.4
2258
## and that gzeof is in the library (which suggests the library
2258
## and that gzeof is in the library (which suggests the library
2259
## is also recent enough).
2259
## is also recent enough).
2260
AC_DEFUN([R_ZLIB],
2260
AC_DEFUN([R_ZLIB],
2261
[if test "x${use_zlib}" = xyes; then
2261
[if test "x${use_zlib}" = xyes; then
2262
  AC_CHECK_LIB(z, gzeof, [have_zlib=yes], [have_zlib=no])
2262
  AC_CHECK_LIB(z, gzeof, [have_zlib=yes], [have_zlib=no])
2263
  if test "${have_zlib}" = yes; then
2263
  if test "${have_zlib}" = yes; then
2264
    AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
2264
    AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
2265
  fi
2265
  fi
2266
  if test "${have_zlib}" = yes; then
2266
  if test "${have_zlib}" = yes; then
2267
    _R_HEADER_ZLIB
2267
    _R_HEADER_ZLIB
2268
    have_zlib=${r_cv_header_zlib_h}
2268
    have_zlib=${r_cv_header_zlib_h}
2269
  fi
2269
  fi
2270
else
2270
else
2271
  have_zlib="no"
2271
  have_zlib="no"
2272
fi
2272
fi
2273
AC_MSG_CHECKING([whether zlib support needs to be compiled])
2273
AC_MSG_CHECKING([whether zlib support needs to be compiled])
2274
if test "${have_zlib}" = yes; then
2274
if test "${have_zlib}" = yes; then
2275
  AC_MSG_RESULT([no])
2275
  AC_MSG_RESULT([no])
2276
  LIBS="-lz ${LIBS}"
2276
  LIBS="-lz ${LIBS}"
2277
else
2277
else
2278
  AC_MSG_RESULT([yes])
2278
  AC_MSG_RESULT([yes])
2279
  _R_ZLIB_MMAP
2279
  _R_ZLIB_MMAP
2280
fi
2280
fi
2281
AM_CONDITIONAL(BUILD_ZLIB, [test "x${have_zlib}" = xno])
2281
AM_CONDITIONAL(BUILD_ZLIB, [test "x${have_zlib}" = xno])
2282
AM_CONDITIONAL(USE_MMAP_ZLIB,
2282
AM_CONDITIONAL(USE_MMAP_ZLIB,
2283
[test "x${have_zlib}" = xno && test "x${r_cv_zlib_mmap}" = xyes])
2283
[test "x${have_zlib}" = xno && test "x${r_cv_zlib_mmap}" = xyes])
2284
])# R_ZLIB
2284
])# R_ZLIB
2285
 
2285
 
2286
## _R_HEADER_ZLIB
2286
## _R_HEADER_ZLIB
2287
## --------------
2287
## --------------
2288
## Set shell variable r_cv_header_zlib_h to 'yes' if a recent enough
2288
## Set shell variable r_cv_header_zlib_h to 'yes' if a recent enough
2289
## zlib.h is found, and to 'no' otherwise.
2289
## zlib.h is found, and to 'no' otherwise.
2290
AC_DEFUN([_R_HEADER_ZLIB],
2290
AC_DEFUN([_R_HEADER_ZLIB],
2291
[AC_CACHE_CHECK([if zlib version >= 1.1.4],
2291
[AC_CACHE_CHECK([if zlib version >= 1.1.4],
2292
                [r_cv_header_zlib_h],
2292
                [r_cv_header_zlib_h],
2293
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2293
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2294
#include <string.h>
2294
#include <string.h>
2295
#include <zlib.h>
2295
#include <zlib.h>
2296
int main() {
2296
int main() {
2297
#ifdef ZLIB_VERSION
2297
#ifdef ZLIB_VERSION
2298
  exit(strcmp(ZLIB_VERSION, "1.1.4") < 0);
2298
  exit(strcmp(ZLIB_VERSION, "1.1.4") < 0);
2299
#else
2299
#else
2300
  exit(1);
2300
  exit(1);
2301
#endif
2301
#endif
2302
}
2302
}
2303
]])],
2303
]])],
2304
              [r_cv_header_zlib_h=yes],
2304
              [r_cv_header_zlib_h=yes],
2305
              [r_cv_header_zlib_h=no],
2305
              [r_cv_header_zlib_h=no],
2306
              [r_cv_header_zlib_h=no])])
2306
              [r_cv_header_zlib_h=no])])
2307
])# _R_HEADER_ZLIB
2307
])# _R_HEADER_ZLIB
2308
 
2308
 
2309
## _R_ZLIB_MMAP
2309
## _R_ZLIB_MMAP
2310
## ------------
2310
## ------------
2311
AC_DEFUN([_R_ZLIB_MMAP],
2311
AC_DEFUN([_R_ZLIB_MMAP],
2312
[AC_CACHE_CHECK([mmap support for zlib],
2312
[AC_CACHE_CHECK([mmap support for zlib],
2313
                [r_cv_zlib_mmap],
2313
                [r_cv_zlib_mmap],
2314
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2314
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2315
#include <sys/types.h>
2315
#include <sys/types.h>
2316
#include <sys/mman.h>
2316
#include <sys/mman.h>
2317
#include <sys/stat.h>
2317
#include <sys/stat.h>
2318
caddr_t hello() {
2318
caddr_t hello() {
2319
  exit(mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0)); 
2319
  exit(mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0)); 
2320
}
2320
}
2321
]])],
2321
]])],
2322
              [r_cv_zlib_mmap=no],
2322
              [r_cv_zlib_mmap=no],
2323
              [r_cv_zlib_mmap=yes],
2323
              [r_cv_zlib_mmap=yes],
2324
              [r_cv_zlib_mmap=yes])])
2324
              [r_cv_zlib_mmap=yes])])
2325
])# _R_ZLIB_MMAP
2325
])# _R_ZLIB_MMAP
2326
 
2326
 
2327
## R_PCRE
2327
## R_PCRE
2328
## ------
2328
## ------
2329
## Try finding pcre library and headers.
2329
## Try finding pcre library and headers.
2330
## RedHat puts the headers in /usr/include/pcre.
2330
## RedHat puts the headers in /usr/include/pcre.
2331
AC_DEFUN([R_PCRE],
2331
AC_DEFUN([R_PCRE],
2332
[if test "x${use_pcre}" = xyes; then
2332
[if test "x${use_pcre}" = xyes; then
2333
  AC_CHECK_LIB(pcre, pcre_fullinfo, [have_pcre=yes], [have_pcre=no])
2333
  AC_CHECK_LIB(pcre, pcre_fullinfo, [have_pcre=yes], [have_pcre=no])
2334
  if test "${have_pcre}" = yes; then
2334
  if test "${have_pcre}" = yes; then
2335
    AC_CHECK_HEADERS(pcre.h pcre/pcre.h)
2335
    AC_CHECK_HEADERS(pcre.h pcre/pcre.h)
2336
    if test "${ac_cv_header_pcre_h}" = no \
2336
    if test "${ac_cv_header_pcre_h}" = no \
2337
	&& test "${ac_cv_header_pcre_pcre_h}" = no; then
2337
	&& test "${ac_cv_header_pcre_pcre_h}" = no; then
2338
      have_pcre=no
2338
      have_pcre=no
2339
    fi
2339
    fi
2340
  fi
2340
  fi
2341
else
2341
else
2342
  have_pcre=no
2342
  have_pcre=no
2343
fi
2343
fi
2344
if test "x${have_pcre}" = xyes; then
2344
if test "x${have_pcre}" = xyes; then
2345
AC_CACHE_CHECK([if PCRE version >= 4.0], [r_have_pcre4],
2345
AC_CACHE_CHECK([if PCRE version >= 4.0], [r_have_pcre4],
2346
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2346
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2347
#ifdef HAVE_PCRE_PCRE_H
2347
#ifdef HAVE_PCRE_PCRE_H
2348
#include <pcre/pcre.h>
2348
#include <pcre/pcre.h>
2349
#else
2349
#else
2350
#ifdef HAVE_PCRE_H
2350
#ifdef HAVE_PCRE_H
2351
#include <pcre.h>
2351
#include <pcre.h>
2352
#endif
2352
#endif
2353
#endif
2353
#endif
2354
int main() {
2354
int main() {
2355
#ifdef PCRE_MAJOR
2355
#ifdef PCRE_MAJOR
2356
  exit(PCRE_MAJOR<4);
2356
  exit(PCRE_MAJOR<4);
2357
#else
2357
#else
2358
  exit(1);
2358
  exit(1);
2359
#endif
2359
#endif
2360
}
2360
}
2361
]])], [r_have_pcre4=yes], [r_have_pcre4=no], [r_have_pcre4=no])])
2361
]])], [r_have_pcre4=yes], [r_have_pcre4=no], [r_have_pcre4=no])])
2362
fi
2362
fi
2363
if test "x${r_have_pcre4}" = xyes; then
2363
if test "x${r_have_pcre4}" = xyes; then
2364
  LIBS="-lpcre ${LIBS}"
2364
  LIBS="-lpcre ${LIBS}"
2365
fi
2365
fi
2366
AC_MSG_CHECKING([whether PCRE support needs to be compiled])
2366
AC_MSG_CHECKING([whether PCRE support needs to be compiled])
2367
if test "x${r_have_pcre4}" = xyes; then
2367
if test "x${r_have_pcre4}" = xyes; then
2368
  AC_MSG_RESULT([no])
2368
  AC_MSG_RESULT([no])
2369
else
2369
else
2370
  AC_MSG_RESULT([yes])
2370
  AC_MSG_RESULT([yes])
2371
fi
2371
fi
2372
AM_CONDITIONAL(BUILD_PCRE, [test "x${r_have_pcre4}" != xyes])
2372
AM_CONDITIONAL(BUILD_PCRE, [test "x${r_have_pcre4}" != xyes])
2373
])# R_PCRE
2373
])# R_PCRE
2374
 
2374
 
2375
## R_BZLIB
2375
## R_BZLIB
2376
## -------
2376
## -------
2377
## Try finding bzlib library and headers.
2377
## Try finding bzlib library and headers.
2378
## We check that both are installed,
2378
## We check that both are installed,
2379
## and that BZ2_bzlibVersion is in the library.
2379
## and that BZ2_bzlibVersion is in the library.
2380
AC_DEFUN([R_BZLIB],
2380
AC_DEFUN([R_BZLIB],
2381
[if test "x${use_bzlib}" = xyes; then
2381
[if test "x${use_bzlib}" = xyes; then
2382
  AC_CHECK_LIB(bz2, BZ2_bzlibVersion, [have_bzlib=yes], [have_bzlib=no])
2382
  AC_CHECK_LIB(bz2, BZ2_bzlibVersion, [have_bzlib=yes], [have_bzlib=no])
2383
  if test "${have_bzlib}" = yes; then
2383
  if test "${have_bzlib}" = yes; then
2384
    AC_CHECK_HEADER(bzlib.h, [have_bzlib=yes], [have_bzlib=no])
2384
    AC_CHECK_HEADER(bzlib.h, [have_bzlib=yes], [have_bzlib=no])
2385
  fi
2385
  fi
2386
else
2386
else
2387
  have_bzlib=no
2387
  have_bzlib=no
2388
fi
2388
fi
2389
AC_MSG_CHECKING([whether bzip2 support needs to be compiled])
2389
AC_MSG_CHECKING([whether bzip2 support needs to be compiled])
2390
if test "x${have_bzlib}" = xyes; then
2390
if test "x${have_bzlib}" = xyes; then
2391
  AC_MSG_RESULT([no])
2391
  AC_MSG_RESULT([no])
2392
  LIBS="-lbz2 ${LIBS}"
2392
  LIBS="-lbz2 ${LIBS}"
2393
else
2393
else
2394
  AC_MSG_RESULT([yes])
2394
  AC_MSG_RESULT([yes])
2395
fi
2395
fi
2396
AM_CONDITIONAL(BUILD_BZLIB, [test "x${have_bzlib}" = xno])
2396
AM_CONDITIONAL(BUILD_BZLIB, [test "x${have_bzlib}" = xno])
2397
])# R_BZLIB
2397
])# R_BZLIB
2398
 
2398
 
2399
## R_SYS_POSIX_LEAPSECONDS
2399
## R_SYS_POSIX_LEAPSECONDS
2400
## -----------------------
2400
## -----------------------
2401
## See if your system time functions do not count leap seconds, as
2401
## See if your system time functions do not count leap seconds, as
2402
## required by POSIX.
2402
## required by POSIX.
2403
AC_DEFUN([R_SYS_POSIX_LEAPSECONDS],
2403
AC_DEFUN([R_SYS_POSIX_LEAPSECONDS],
2404
[AC_CACHE_CHECK([whether leap seconds are treated according to POSIX],
2404
[AC_CACHE_CHECK([whether leap seconds are treated according to POSIX],
2405
                [r_cv_sys_posix_leapseconds],
2405
                [r_cv_sys_posix_leapseconds],
2406
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2406
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
2407
#include <stdlib.h>
2407
#include <stdlib.h>
2408
#include <time.h>
2408
#include <time.h>
2409
#include <stdio.h>
2409
#include <stdio.h>
2410
#include "confdefs.h"
2410
#include "confdefs.h"
2411
 
2411
 
2412
int main () {
2412
int main () {
2413
  struct tm *tm;
2413
  struct tm *tm;
2414
  time_t ct;
2414
  time_t ct;
2415
 
2415
 
2416
  ctime(&ct);
2416
  ctime(&ct);
2417
  ct = ct - (ct % 60);
2417
  ct = ct - (ct % 60);
2418
  tm = gmtime(&ct);
2418
  tm = gmtime(&ct);
2419
  if(tm->tm_sec == 0) exit(1); else exit(0);
2419
  if(tm->tm_sec == 0) exit(1); else exit(0);
2420
}
2420
}
2421
]])],
2421
]])],
2422
              [r_cv_sys_posix_leapseconds=no],
2422
              [r_cv_sys_posix_leapseconds=no],
2423
              [r_cv_sys_posix_leapseconds=yes],
2423
              [r_cv_sys_posix_leapseconds=yes],
2424
              [r_cv_sys_posix_leapseconds=yes])])
2424
              [r_cv_sys_posix_leapseconds=yes])])
2425
if test "x${r_cv_sys_posix_leapseconds}" = xyes; then
2425
if test "x${r_cv_sys_posix_leapseconds}" = xyes; then
2426
  AC_DEFINE(HAVE_POSIX_LEAPSECONDS, 1,
2426
  AC_DEFINE(HAVE_POSIX_LEAPSECONDS, 1,
2427
            [Define if your system time functions do not count leap
2427
            [Define if your system time functions do not count leap
2428
	     seconds, as required by POSIX.])
2428
	     seconds, as required by POSIX.])
2429
fi
2429
fi
2430
])# R_SYS_POSIX_LEAPSECONDS
2430
])# R_SYS_POSIX_LEAPSECONDS
2431
 
2431
 
2432
### * Miscellaneous
2432
### * Miscellaneous
2433
 
2433
 
2434
## R_RECOMMENDED_PACKAGES
2434
## R_RECOMMENDED_PACKAGES
2435
## ----------------------
2435
## ----------------------
2436
## See if the sources for the recommended packages are available.
2436
## See if the sources for the recommended packages are available.
2437
AC_DEFUN([R_RECOMMENDED_PACKAGES],
2437
AC_DEFUN([R_RECOMMENDED_PACKAGES],
2438
[AC_CACHE_CHECK([for recommended packages],
2438
[AC_CACHE_CHECK([for recommended packages],
2439
                [r_cv_misc_recommended_packages],
2439
                [r_cv_misc_recommended_packages],
2440
[r_cv_misc_recommended_packages=yes
2440
[r_cv_misc_recommended_packages=yes
2441
recommended_pkgs=`grep '^R_PKGS_RECOMMENDED_SOURCES *=' \
2441
recommended_pkgs=`grep '^R_PKGS_RECOMMENDED_SOURCES *=' \
2442
  ${srcdir}/share/make/vars.mk | sed 's/.*=//'`
2442
  ${srcdir}/share/make/vars.mk | sed 's/.*=//'`
2443
for pkg in ${recommended_pkgs}; do
2443
for pkg in ${recommended_pkgs}; do
2444
  n_pkg=`ls ${srcdir}/src/library/Recommended/${pkg}_*.tar.gz | wc -l`
2444
  n_pkg=`ls ${srcdir}/src/library/Recommended/${pkg}_*.tar.gz | wc -l`
2445
  if test ${n_pkg} -ne 1; then
2445
  if test ${n_pkg} -ne 1; then
2446
    r_cv_misc_recommended_packages=no
2446
    r_cv_misc_recommended_packages=no
2447
    break
2447
    break
2448
  fi
2448
  fi
2449
done])
2449
done])
2450
use_recommended_packages=${r_cv_misc_recommended_packages}
2450
use_recommended_packages=${r_cv_misc_recommended_packages}
2451
])# R_RECOMMENDED_PACKAGES
2451
])# R_RECOMMENDED_PACKAGES
2452
 
2452
 
2453
### Local variables: ***
2453
### Local variables: ***
2454
### mode: outline-minor ***
2454
### mode: outline-minor ***
2455
### outline-regexp: "### [*]+" ***
2455
### outline-regexp: "### [*]+" ***
2456
### End: ***
2456
### End: ***
2457
dnl
2457
dnl
2458
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
2458
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
2459
dnl
2459
dnl
2460
dnl if failflag is "failure" it aborts if gnorba is not found.
2460
dnl if failflag is "failure" it aborts if gnorba is not found.
2461
dnl
2461
dnl
2462
 
2462
 
2463
AC_DEFUN([GNOME_GNORBA_HOOK],[
2463
AC_DEFUN([GNOME_GNORBA_HOOK],[
2464
	GNOME_ORBIT_HOOK([],$2)
2464
	GNOME_ORBIT_HOOK([],$2)
2465
	AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
2465
	AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
2466
		gnome_cv_gnorba_found=no
2466
		gnome_cv_gnorba_found=no
2467
		if test x$gnome_cv_orbit_found = xyes; then
2467
		if test x$gnome_cv_orbit_found = xyes; then
2468
			GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2468
			GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2469
			GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2469
			GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2470
			if test -n "$GNORBA_LIBS"; then
2470
			if test -n "$GNORBA_LIBS"; then
2471
				gnome_cv_gnorba_found=yes
2471
				gnome_cv_gnorba_found=yes
2472
			fi
2472
			fi
2473
		fi
2473
		fi
2474
	])
2474
	])
2475
	AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
2475
	AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
2476
	if test x$gnome_cv_orbit_found = xyes; then
2476
	if test x$gnome_cv_orbit_found = xyes; then
2477
		$1
2477
		$1
2478
		GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2478
		GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
2479
		GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2479
		GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
2480
		AC_SUBST(GNORBA_CFLAGS)
2480
		AC_SUBST(GNORBA_CFLAGS)
2481
		AC_SUBST(GNORBA_LIBS)
2481
		AC_SUBST(GNORBA_LIBS)
2482
	else
2482
	else
2483
	    	if test x$2 = xfailure; then
2483
	    	if test x$2 = xfailure; then
2484
			AC_MSG_ERROR(gnorba library not installed or installation problem)
2484
			AC_MSG_ERROR(gnorba library not installed or installation problem)
2485
	    	fi
2485
	    	fi
2486
	fi
2486
	fi
2487
])
2487
])
2488
 
2488
 
2489
AC_DEFUN([GNOME_GNORBA_CHECK], [
2489
AC_DEFUN([GNOME_GNORBA_CHECK], [
2490
	GNOME_GNORBA_HOOK([],failure)
2490
	GNOME_GNORBA_HOOK([],failure)
2491
])
2491
])
2492
dnl
2492
dnl
2493
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
2493
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
2494
dnl
2494
dnl
2495
dnl if failflag is "failure" it aborts if orbit is not found.
2495
dnl if failflag is "failure" it aborts if orbit is not found.
2496
dnl
2496
dnl
2497
 
2497
 
2498
AC_DEFUN([GNOME_ORBIT_HOOK],[
2498
AC_DEFUN([GNOME_ORBIT_HOOK],[
2499
	AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
2499
	AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
2500
	AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
2500
	AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
2501
	AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
2501
	AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
2502
		if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
2502
		if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
2503
			gnome_cv_orbit_found=no
2503
			gnome_cv_orbit_found=no
2504
		else
2504
		else
2505
			gnome_cv_orbit_found=yes
2505
			gnome_cv_orbit_found=yes
2506
		fi
2506
		fi
2507
	])
2507
	])
2508
	AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
2508
	AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
2509
	if test x$gnome_cv_orbit_found = xyes; then
2509
	if test x$gnome_cv_orbit_found = xyes; then
2510
		$1
2510
		$1
2511
		ORBIT_CFLAGS=`orbit-config --cflags client server`
2511
		ORBIT_CFLAGS=`orbit-config --cflags client server`
2512
		ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
2512
		ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
2513
		AC_SUBST(ORBIT_CFLAGS)
2513
		AC_SUBST(ORBIT_CFLAGS)
2514
		AC_SUBST(ORBIT_LIBS)
2514
		AC_SUBST(ORBIT_LIBS)
2515
	else
2515
	else
2516
    		if test x$2 = xfailure; then
2516
    		if test x$2 = xfailure; then
2517
			AC_MSG_ERROR(ORBit not installed or installation problem)
2517
			AC_MSG_ERROR(ORBit not installed or installation problem)
2518
    		fi
2518
    		fi
2519
	fi
2519
	fi
2520
])
2520
])
2521
 
2521
 
2522
AC_DEFUN([GNOME_ORBIT_CHECK], [
2522
AC_DEFUN([GNOME_ORBIT_CHECK], [
2523
	GNOME_ORBIT_HOOK([],failure)
2523
	GNOME_ORBIT_HOOK([],failure)
2524
])
2524
])
2525
dnl
2525
dnl
2526
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
2526
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
2527
dnl
2527
dnl
2528
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
2528
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
2529
dnl is not found. 
2529
dnl is not found. 
2530
dnl
2530
dnl
2531
 
2531
 
2532
AC_DEFUN([GNOME_INIT_HOOK],[
2532
AC_DEFUN([GNOME_INIT_HOOK],[
2533
	AC_SUBST(GNOME_LIBS)
2533
	AC_SUBST(GNOME_LIBS)
2534
	AC_SUBST(GNOMEUI_LIBS)
2534
	AC_SUBST(GNOMEUI_LIBS)
2535
	AC_SUBST(GNOMEGNORBA_LIBS)
2535
	AC_SUBST(GNOMEGNORBA_LIBS)
2536
	AC_SUBST(GTKXMHTML_LIBS)
2536
	AC_SUBST(GTKXMHTML_LIBS)
2537
	AC_SUBST(ZVT_LIBS)
2537
	AC_SUBST(ZVT_LIBS)
2538
	AC_SUBST(GNOME_LIBDIR)
2538
	AC_SUBST(GNOME_LIBDIR)
2539
	AC_SUBST(GNOME_INCLUDEDIR)
2539
	AC_SUBST(GNOME_INCLUDEDIR)
2540
 
2540
 
2541
	AC_ARG_WITH(gnome-includes,
2541
	AC_ARG_WITH(gnome-includes,
2542
        [  --with-gnome-includes=DIR
2542
        [  --with-gnome-includes=DIR
2543
                          specify location of GNOME headers []], [
2543
                          specify location of GNOME headers []], [
2544
	CPPFLAGS="$CPPFLAGS -I$withval"
2544
	CPPFLAGS="$CPPFLAGS -I$withval"
2545
	])
2545
	])
2546
	
2546
	
2547
	AC_ARG_WITH(gnome-libs,
2547
	AC_ARG_WITH(gnome-libs,
2548
        [  --with-gnome-libs=DIR   specify location of GNOME libs []], [
2548
        [  --with-gnome-libs=DIR   specify location of GNOME libs []], [
2549
	LIBS="$LIBS -L$withval"
2549
	LIBS="$LIBS -L$withval"
2550
	gnome_prefix=$withval
2550
	gnome_prefix=$withval
2551
	])
2551
	])
2552
 
2552
 
2553
	if test "x$want_gnome" = xyes; then
2553
	if test "x$want_gnome" = xyes; then
2554
 
2554
 
2555
	    AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
2555
	    AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
2556
	    if test "$GNOME_CONFIG" = "no"; then
2556
	    if test "$GNOME_CONFIG" = "no"; then
2557
	      no_gnome_config="yes"
2557
	      no_gnome_config="yes"
2558
	    else
2558
	    else
2559
	      AC_MSG_CHECKING(if $GNOME_CONFIG works)
2559
	      AC_MSG_CHECKING(if $GNOME_CONFIG works)
2560
	      if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
2560
	      if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
2561
	        AC_MSG_RESULT(yes)
2561
	        AC_MSG_RESULT(yes)
2562
	        GNOME_GNORBA_HOOK([],$2)
2562
	        GNOME_GNORBA_HOOK([],$2)
2563
	        GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
2563
	        GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
2564
	        GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
2564
	        GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
2565
	        GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
2565
	        GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
2566
	        GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
2566
	        GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
2567
		ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
2567
		ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
2568
	        GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
2568
	        GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
2569
	        GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
2569
	        GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
2570
                $1
2570
                $1
2571
	      else
2571
	      else
2572
	        AC_MSG_RESULT(no)
2572
	        AC_MSG_RESULT(no)
2573
	        no_gnome_config="yes"
2573
	        no_gnome_config="yes"
2574
              fi
2574
              fi
2575
            fi
2575
            fi
2576
 
2576
 
2577
	    if test x$gnome_prefix = x; then
2577
	    if test x$gnome_prefix = x; then
2578
	      if test x$exec_prefix = xNONE; then
2578
	      if test x$exec_prefix = xNONE; then
2579
	        if test x$prefix = xNONE; then
2579
	        if test x$prefix = xNONE; then
2580
		    gnome_prefix=$ac_default_prefix/lib
2580
		    gnome_prefix=$ac_default_prefix/lib
2581
	        else
2581
	        else
2582
 		    gnome_prefix=$prefix/lib
2582
 		    gnome_prefix=$prefix/lib
2583
	        fi
2583
	        fi
2584
	      else
2584
	      else
2585
	        gnome_prefix=`eval echo \`echo $libdir\``
2585
	        gnome_prefix=`eval echo \`echo $libdir\``
2586
	      fi
2586
	      fi
2587
	    fi
2587
	    fi
2588
	
2588
	
2589
	    if test "$no_gnome_config" = "yes"; then
2589
	    if test "$no_gnome_config" = "yes"; then
2590
              AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
2590
              AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
2591
	      if test -f $gnome_prefix/gnomeConf.sh; then
2591
	      if test -f $gnome_prefix/gnomeConf.sh; then
2592
	        AC_MSG_RESULT(found)
2592
	        AC_MSG_RESULT(found)
2593
	        echo "loading gnome configuration from" \
2593
	        echo "loading gnome configuration from" \
2594
		     "$gnome_prefix/gnomeConf.sh"
2594
		     "$gnome_prefix/gnomeConf.sh"
2595
	        . $gnome_prefix/gnomeConf.sh
2595
	        . $gnome_prefix/gnomeConf.sh
2596
	        $1
2596
	        $1
2597
	      else
2597
	      else
2598
	        AC_MSG_RESULT(not found)
2598
	        AC_MSG_RESULT(not found)
2599
 	        if test x$2 = xfail; then
2599
 	        if test x$2 = xfail; then
2600
	          AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
2600
	          AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
2601
 	        fi
2601
 	        fi
2602
	      fi
2602
	      fi
2603
            fi
2603
            fi
2604
	fi
2604
	fi
2605
 
2605
 
2606
	if test -n "$3"; then
2606
	if test -n "$3"; then
2607
	  n="$3"
2607
	  n="$3"
2608
	  for i in $n; do
2608
	  for i in $n; do
2609
	    AC_MSG_CHECKING(extra library \"$i\")
2609
	    AC_MSG_CHECKING(extra library \"$i\")
2610
	    case $i in 
2610
	    case $i in 
2611
	      applets)
2611
	      applets)
2612
		AC_SUBST(GNOME_APPLETS_LIBS)
2612
		AC_SUBST(GNOME_APPLETS_LIBS)
2613
		GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
2613
		GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
2614
		AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
2614
		AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
2615
	      capplet)
2615
	      capplet)
2616
		AC_SUBST(GNOME_CAPPLET_LIBS)
2616
		AC_SUBST(GNOME_CAPPLET_LIBS)
2617
		GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
2617
		GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
2618
		AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
2618
		AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
2619
	      *)
2619
	      *)
2620
		AC_MSG_RESULT(unknown library)
2620
		AC_MSG_RESULT(unknown library)
2621
	    esac
2621
	    esac
2622
	  done
2622
	  done
2623
	fi
2623
	fi
2624
])
2624
])
2625
 
2625
 
2626
dnl
2626
dnl
2627
dnl GNOME_INIT ([additional-inits])
2627
dnl GNOME_INIT ([additional-inits])
2628
dnl
2628
dnl
2629
 
2629
 
2630
AC_DEFUN([GNOME_INIT],[
2630
AC_DEFUN([GNOME_INIT],[
2631
	GNOME_INIT_HOOK([],fail,$1)
2631
	GNOME_INIT_HOOK([],fail,$1)
2632
])
2632
])
2633
# a macro to get the libs/cflags for libglade
2633
# a macro to get the libs/cflags for libglade
2634
# serial 1
2634
# serial 1
2635
 
2635
 
2636
dnl AM_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]])
2636
dnl AM_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]])
2637
dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS
2637
dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS
2638
dnl
2638
dnl
2639
AC_DEFUN(AM_PATH_LIBGLADE,
2639
AC_DEFUN(AM_PATH_LIBGLADE,
2640
[dnl
2640
[dnl
2641
dnl Get the cflags and libraries from the libglade-config script
2641
dnl Get the cflags and libraries from the libglade-config script
2642
dnl
2642
dnl
2643
AC_ARG_WITH(libglade-config,
2643
AC_ARG_WITH(libglade-config,
2644
[  --with-libglade-config=LIBGLADE_CONFIG
2644
[  --with-libglade-config=LIBGLADE_CONFIG
2645
                          specify location of libglade-config []],
2645
                          specify location of libglade-config []],
2646
LIBGLADE_CONFIG="$withval")
2646
LIBGLADE_CONFIG="$withval")
2647
 
2647
 
2648
module_args=
2648
module_args=
2649
for module in . $3; do
2649
for module in . $3; do
2650
  case "$module" in
2650
  case "$module" in
2651
    gnome)
2651
    gnome)
2652
      module_args="$module_args gnome"
2652
      module_args="$module_args gnome"
2653
      ;;
2653
      ;;
2654
    bonobo)
2654
    bonobo)
2655
      module_args="$module_args bonobo"
2655
      module_args="$module_args bonobo"
2656
      ;;
2656
      ;;
2657
    gnomedb)
2657
    gnomedb)
2658
      module_args="$module_args gnomedb"
2658
      module_args="$module_args gnomedb"
2659
      ;;
2659
      ;;
2660
  esac
2660
  esac
2661
done
2661
done
2662
 
2662
 
2663
AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no)
2663
AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no)
2664
AC_MSG_CHECKING(for libglade)
2664
AC_MSG_CHECKING(for libglade)
2665
if test "$LIBGLADE_CONFIG" = "no"; then
2665
if test "$LIBGLADE_CONFIG" = "no"; then
2666
  AC_MSG_RESULT(no)
2666
  AC_MSG_RESULT(no)
2667
  ifelse([$2], , :, [$2])
2667
  ifelse([$2], , :, [$2])
2668
else
2668
else
2669
  if $LIBGLADE_CONFIG --check $module_args; then
2669
  if $LIBGLADE_CONFIG --check $module_args; then
2670
    LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args`
2670
    LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args`
2671
    LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args`
2671
    LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args`
2672
    AC_MSG_RESULT(yes)
2672
    AC_MSG_RESULT(yes)
2673
    ifelse([$1], , :, [$1])
2673
    ifelse([$1], , :, [$1])
2674
  else
2674
  else
2675
    echo "*** libglade was not compiled with support for $module_args" 1>&2
2675
    echo "*** libglade was not compiled with support for $module_args" 1>&2
2676
    AC_MSG_RESULT(no)
2676
    AC_MSG_RESULT(no)
2677
    ifelse([$2], , :, [$2])
2677
    ifelse([$2], , :, [$2])
2678
  fi
2678
  fi
2679
fi
2679
fi
2680
AC_SUBST(LIBGLADE_CFLAGS)
2680
AC_SUBST(LIBGLADE_CFLAGS)
2681
AC_SUBST(LIBGLADE_LIBS)
2681
AC_SUBST(LIBGLADE_LIBS)
2682
])
2682
])
2683
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2683
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2684
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
2684
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
2685
## Free Software Foundation, Inc.
2685
## Free Software Foundation, Inc.
2686
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2686
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2687
##
2687
##
2688
## This program is free software; you can redistribute it and/or modify
2688
## This program is free software; you can redistribute it and/or modify
2689
## it under the terms of the GNU General Public License as published by
2689
## it under the terms of the GNU General Public License as published by
2690
## the Free Software Foundation; either version 2 of the License, or
2690
## the Free Software Foundation; either version 2 of the License, or
2691
## (at your option) any later version.
2691
## (at your option) any later version.
2692
##
2692
##
2693
## This program is distributed in the hope that it will be useful, but
2693
## This program is distributed in the hope that it will be useful, but
2694
## WITHOUT ANY WARRANTY; without even the implied warranty of
2694
## WITHOUT ANY WARRANTY; without even the implied warranty of
2695
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2695
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2696
## General Public License for more details.
2696
## General Public License for more details.
2697
##
2697
##
2698
## You should have received a copy of the GNU General Public License
2698
## You should have received a copy of the GNU General Public License
2699
## along with this program; if not, write to the Free Software
2699
## along with this program; if not, write to the Free Software
2700
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2700
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2701
##
2701
##
2702
## As a special exception to the GNU General Public License, if you
2702
## As a special exception to the GNU General Public License, if you
2703
## distribute this file as part of a program that contains a
2703
## distribute this file as part of a program that contains a
2704
## configuration script generated by Autoconf, you may include it under
2704
## configuration script generated by Autoconf, you may include it under
2705
## the same distribution terms that you use for the rest of that program.
2705
## the same distribution terms that you use for the rest of that program.
2706
 
2706
 
2707
# serial 47 AC_PROG_LIBTOOL
2707
# serial 47 AC_PROG_LIBTOOL
2708
 
2708
 
2709
 
2709
 
2710
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2710
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2711
# -----------------------------------------------------------
2711
# -----------------------------------------------------------
2712
# If this macro is not defined by Autoconf, define it here.
2712
# If this macro is not defined by Autoconf, define it here.
2713
m4_ifdef([AC_PROVIDE_IFELSE],
2713
m4_ifdef([AC_PROVIDE_IFELSE],
2714
         [],
2714
         [],
2715
         [m4_define([AC_PROVIDE_IFELSE],
2715
         [m4_define([AC_PROVIDE_IFELSE],
2716
	         [m4_ifdef([AC_PROVIDE_$1],
2716
	         [m4_ifdef([AC_PROVIDE_$1],
2717
		           [$2], [$3])])])
2717
		           [$2], [$3])])])
2718
 
2718
 
2719
 
2719
 
2720
# AC_PROG_LIBTOOL
2720
# AC_PROG_LIBTOOL
2721
# ---------------
2721
# ---------------
2722
AC_DEFUN([AC_PROG_LIBTOOL],
2722
AC_DEFUN([AC_PROG_LIBTOOL],
2723
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
2723
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
2724
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
2724
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
2725
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
2725
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
2726
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
2726
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
2727
    [AC_LIBTOOL_CXX],
2727
    [AC_LIBTOOL_CXX],
2728
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
2728
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
2729
  ])])
2729
  ])])
2730
dnl And a similar setup for Fortran 77 support
2730
dnl And a similar setup for Fortran 77 support
2731
  AC_PROVIDE_IFELSE([AC_PROG_F77],
2731
  AC_PROVIDE_IFELSE([AC_PROG_F77],
2732
    [AC_LIBTOOL_F77],
2732
    [AC_LIBTOOL_F77],
2733
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
2733
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
2734
])])
2734
])])
2735
 
2735
 
2736
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
2736
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
2737
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
2737
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
2738
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
2738
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
2739
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2739
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2740
    [AC_LIBTOOL_GCJ],
2740
    [AC_LIBTOOL_GCJ],
2741
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2741
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2742
      [AC_LIBTOOL_GCJ],
2742
      [AC_LIBTOOL_GCJ],
2743
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
2743
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
2744
	[AC_LIBTOOL_GCJ],
2744
	[AC_LIBTOOL_GCJ],
2745
      [ifdef([AC_PROG_GCJ],
2745
      [ifdef([AC_PROG_GCJ],
2746
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2746
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2747
       ifdef([A][M_PROG_GCJ],
2747
       ifdef([A][M_PROG_GCJ],
2748
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2748
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2749
       ifdef([LT_AC_PROG_GCJ],
2749
       ifdef([LT_AC_PROG_GCJ],
2750
	     [define([LT_AC_PROG_GCJ],
2750
	     [define([LT_AC_PROG_GCJ],
2751
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
2751
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
2752
])])# AC_PROG_LIBTOOL
2752
])])# AC_PROG_LIBTOOL
2753
 
2753
 
2754
 
2754
 
2755
# _AC_PROG_LIBTOOL
2755
# _AC_PROG_LIBTOOL
2756
# ----------------
2756
# ----------------
2757
AC_DEFUN([_AC_PROG_LIBTOOL],
2757
AC_DEFUN([_AC_PROG_LIBTOOL],
2758
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
2758
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
2759
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
2759
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
2760
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
2760
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
2761
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
2761
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
2762
 
2762
 
2763
# This can be used to rebuild libtool when needed
2763
# This can be used to rebuild libtool when needed
2764
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
2764
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
2765
 
2765
 
2766
# Always use our own libtool.
2766
# Always use our own libtool.
2767
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2767
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2768
AC_SUBST(LIBTOOL)dnl
2768
AC_SUBST(LIBTOOL)dnl
2769
 
2769
 
2770
# Prevent multiple expansion
2770
# Prevent multiple expansion
2771
define([AC_PROG_LIBTOOL], [])
2771
define([AC_PROG_LIBTOOL], [])
2772
])# _AC_PROG_LIBTOOL
2772
])# _AC_PROG_LIBTOOL
2773
 
2773
 
2774
 
2774
 
2775
# AC_LIBTOOL_SETUP
2775
# AC_LIBTOOL_SETUP
2776
# ----------------
2776
# ----------------
2777
AC_DEFUN([AC_LIBTOOL_SETUP],
2777
AC_DEFUN([AC_LIBTOOL_SETUP],
2778
[AC_PREREQ(2.50)dnl
2778
[AC_PREREQ(2.50)dnl
2779
AC_REQUIRE([AC_ENABLE_SHARED])dnl
2779
AC_REQUIRE([AC_ENABLE_SHARED])dnl
2780
AC_REQUIRE([AC_ENABLE_STATIC])dnl
2780
AC_REQUIRE([AC_ENABLE_STATIC])dnl
2781
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
2781
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
2782
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2782
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2783
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2783
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2784
AC_REQUIRE([AC_PROG_CC])dnl
2784
AC_REQUIRE([AC_PROG_CC])dnl
2785
AC_REQUIRE([AC_PROG_LD])dnl
2785
AC_REQUIRE([AC_PROG_LD])dnl
2786
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
2786
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
2787
AC_REQUIRE([AC_PROG_NM])dnl
2787
AC_REQUIRE([AC_PROG_NM])dnl
2788
 
2788
 
2789
AC_REQUIRE([AC_PROG_LN_S])dnl
2789
AC_REQUIRE([AC_PROG_LN_S])dnl
2790
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
2790
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
2791
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2791
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2792
AC_REQUIRE([AC_OBJEXT])dnl
2792
AC_REQUIRE([AC_OBJEXT])dnl
2793
AC_REQUIRE([AC_EXEEXT])dnl
2793
AC_REQUIRE([AC_EXEEXT])dnl
2794
dnl
2794
dnl
2795
 
2795
 
2796
AC_LIBTOOL_SYS_MAX_CMD_LEN
2796
AC_LIBTOOL_SYS_MAX_CMD_LEN
2797
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2797
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2798
AC_LIBTOOL_OBJDIR
2798
AC_LIBTOOL_OBJDIR
2799
 
2799
 
2800
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2800
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2801
_LT_AC_PROG_ECHO_BACKSLASH
2801
_LT_AC_PROG_ECHO_BACKSLASH
2802
 
2802
 
2803
case $host_os in
2803
case $host_os in
2804
aix3*)
2804
aix3*)
2805
  # AIX sometimes has problems with the GCC collect2 program.  For some
2805
  # AIX sometimes has problems with the GCC collect2 program.  For some
2806
  # reason, if we set the COLLECT_NAMES environment variable, the problems
2806
  # reason, if we set the COLLECT_NAMES environment variable, the problems
2807
  # vanish in a puff of smoke.
2807
  # vanish in a puff of smoke.
2808
  if test "X${COLLECT_NAMES+set}" != Xset; then
2808
  if test "X${COLLECT_NAMES+set}" != Xset; then
2809
    COLLECT_NAMES=
2809
    COLLECT_NAMES=
2810
    export COLLECT_NAMES
2810
    export COLLECT_NAMES
2811
  fi
2811
  fi
2812
  ;;
2812
  ;;
2813
esac
2813
esac
2814
 
2814
 
2815
# Sed substitution that helps us do robust quoting.  It backslashifies
2815
# Sed substitution that helps us do robust quoting.  It backslashifies
2816
# metacharacters that are still active within double-quoted strings.
2816
# metacharacters that are still active within double-quoted strings.
2817
Xsed='sed -e s/^X//'
2817
Xsed='sed -e s/^X//'
2818
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
2818
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
2819
 
2819
 
2820
# Same as above, but do not quote variable references.
2820
# Same as above, but do not quote variable references.
2821
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
2821
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
2822
 
2822
 
2823
# Sed substitution to delay expansion of an escaped shell variable in a
2823
# Sed substitution to delay expansion of an escaped shell variable in a
2824
# double_quote_subst'ed string.
2824
# double_quote_subst'ed string.
2825
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2825
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2826
 
2826
 
2827
# Sed substitution to avoid accidental globbing in evaled expressions
2827
# Sed substitution to avoid accidental globbing in evaled expressions
2828
no_glob_subst='s/\*/\\\*/g'
2828
no_glob_subst='s/\*/\\\*/g'
2829
 
2829
 
2830
# Constants:
2830
# Constants:
2831
rm="rm -f"
2831
rm="rm -f"
2832
 
2832
 
2833
# Global variables:
2833
# Global variables:
2834
default_ofile=libtool
2834
default_ofile=libtool
2835
can_build_shared=yes
2835
can_build_shared=yes
2836
 
2836
 
2837
# All known linkers require a `.a' archive for static linking (except M$VC,
2837
# All known linkers require a `.a' archive for static linking (except M$VC,
2838
# which needs '.lib').
2838
# which needs '.lib').
2839
libext=a
2839
libext=a
2840
ltmain="$ac_aux_dir/ltmain.sh"
2840
ltmain="$ac_aux_dir/ltmain.sh"
2841
ofile="$default_ofile"
2841
ofile="$default_ofile"
2842
with_gnu_ld="$lt_cv_prog_gnu_ld"
2842
with_gnu_ld="$lt_cv_prog_gnu_ld"
2843
 
2843
 
2844
AC_CHECK_TOOL(AR, ar, false)
2844
AC_CHECK_TOOL(AR, ar, false)
2845
AC_CHECK_TOOL(RANLIB, ranlib, :)
2845
AC_CHECK_TOOL(RANLIB, ranlib, :)
2846
AC_CHECK_TOOL(STRIP, strip, :)
2846
AC_CHECK_TOOL(STRIP, strip, :)
2847
 
2847
 
2848
old_CC="$CC"
2848
old_CC="$CC"
2849
old_CFLAGS="$CFLAGS"
2849
old_CFLAGS="$CFLAGS"
2850
 
2850
 
2851
# Set sane defaults for various variables
2851
# Set sane defaults for various variables
2852
test -z "$AR" && AR=ar
2852
test -z "$AR" && AR=ar
2853
test -z "$AR_FLAGS" && AR_FLAGS=cru
2853
test -z "$AR_FLAGS" && AR_FLAGS=cru
2854
test -z "$AS" && AS=as
2854
test -z "$AS" && AS=as
2855
test -z "$CC" && CC=cc
2855
test -z "$CC" && CC=cc
2856
test -z "$LTCC" && LTCC=$CC
2856
test -z "$LTCC" && LTCC=$CC
2857
test -z "$DLLTOOL" && DLLTOOL=dlltool
2857
test -z "$DLLTOOL" && DLLTOOL=dlltool
2858
test -z "$LD" && LD=ld
2858
test -z "$LD" && LD=ld
2859
test -z "$LN_S" && LN_S="ln -s"
2859
test -z "$LN_S" && LN_S="ln -s"
2860
test -z "$MAGIC_CMD" && MAGIC_CMD=file
2860
test -z "$MAGIC_CMD" && MAGIC_CMD=file
2861
test -z "$NM" && NM=nm
2861
test -z "$NM" && NM=nm
2862
test -z "$SED" && SED=sed
2862
test -z "$SED" && SED=sed
2863
test -z "$OBJDUMP" && OBJDUMP=objdump
2863
test -z "$OBJDUMP" && OBJDUMP=objdump
2864
test -z "$RANLIB" && RANLIB=:
2864
test -z "$RANLIB" && RANLIB=:
2865
test -z "$STRIP" && STRIP=:
2865
test -z "$STRIP" && STRIP=:
2866
test -z "$ac_objext" && ac_objext=o
2866
test -z "$ac_objext" && ac_objext=o
2867
 
2867
 
2868
# Determine commands to create old-style static archives.
2868
# Determine commands to create old-style static archives.
2869
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2869
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
2870
old_postinstall_cmds='chmod 644 $oldlib'
2870
old_postinstall_cmds='chmod 644 $oldlib'
2871
old_postuninstall_cmds=
2871
old_postuninstall_cmds=
2872
 
2872
 
2873
if test -n "$RANLIB"; then
2873
if test -n "$RANLIB"; then
2874
  case $host_os in
2874
  case $host_os in
2875
  openbsd*)
2875
  openbsd*)
2876
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2876
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
2877
    ;;
2877
    ;;
2878
  *)
2878
  *)
2879
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2879
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
2880
    ;;
2880
    ;;
2881
  esac
2881
  esac
2882
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2882
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2883
fi
2883
fi
2884
 
2884
 
2885
# Only perform the check for file, if the check method requires it
2885
# Only perform the check for file, if the check method requires it
2886
case $deplibs_check_method in
2886
case $deplibs_check_method in
2887
file_magic*)
2887
file_magic*)
2888
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2888
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2889
    AC_PATH_MAGIC
2889
    AC_PATH_MAGIC
2890
  fi
2890
  fi
2891
  ;;
2891
  ;;
2892
esac
2892
esac
2893
 
2893
 
2894
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
2894
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
2895
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2895
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2896
enable_win32_dll=yes, enable_win32_dll=no)
2896
enable_win32_dll=yes, enable_win32_dll=no)
2897
 
2897
 
2898
AC_ARG_ENABLE([libtool-lock],
2898
AC_ARG_ENABLE([libtool-lock],
2899
    [AC_HELP_STRING([--disable-libtool-lock],
2899
    [AC_HELP_STRING([--disable-libtool-lock],
2900
	[avoid locking (might break parallel builds)])])
2900
	[avoid locking (might break parallel builds)])])
2901
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2901
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2902
 
2902
 
2903
AC_ARG_WITH([pic],
2903
AC_ARG_WITH([pic],
2904
    [AC_HELP_STRING([--with-pic],
2904
    [AC_HELP_STRING([--with-pic],
2905
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
2905
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
2906
    [pic_mode="$withval"],
2906
    [pic_mode="$withval"],
2907
    [pic_mode=default])
2907
    [pic_mode=default])
2908
test -z "$pic_mode" && pic_mode=default
2908
test -z "$pic_mode" && pic_mode=default
2909
 
2909
 
2910
# Use C for the default configuration in the libtool script
2910
# Use C for the default configuration in the libtool script
2911
tagname=
2911
tagname=
2912
AC_LIBTOOL_LANG_C_CONFIG
2912
AC_LIBTOOL_LANG_C_CONFIG
2913
_LT_AC_TAGCONFIG
2913
_LT_AC_TAGCONFIG
2914
])# AC_LIBTOOL_SETUP
2914
])# AC_LIBTOOL_SETUP
2915
 
2915
 
2916
 
2916
 
2917
# _LT_AC_SYS_COMPILER
2917
# _LT_AC_SYS_COMPILER
2918
# -------------------
2918
# -------------------
2919
AC_DEFUN([_LT_AC_SYS_COMPILER],
2919
AC_DEFUN([_LT_AC_SYS_COMPILER],
2920
[AC_REQUIRE([AC_PROG_CC])dnl
2920
[AC_REQUIRE([AC_PROG_CC])dnl
2921
 
2921
 
2922
# If no C compiler was specified, use CC.
2922
# If no C compiler was specified, use CC.
2923
LTCC=${LTCC-"$CC"}
2923
LTCC=${LTCC-"$CC"}
2924
 
2924
 
2925
# Allow CC to be a program name with arguments.
2925
# Allow CC to be a program name with arguments.
2926
compiler=$CC
2926
compiler=$CC
2927
])# _LT_AC_SYS_COMPILER
2927
])# _LT_AC_SYS_COMPILER
2928
 
2928
 
2929
 
2929
 
2930
# _LT_AC_SYS_LIBPATH_AIX
2930
# _LT_AC_SYS_LIBPATH_AIX
2931
# ----------------------
2931
# ----------------------
2932
# Links a minimal program and checks the executable
2932
# Links a minimal program and checks the executable
2933
# for the system default hardcoded library path. In most cases,
2933
# for the system default hardcoded library path. In most cases,
2934
# this is /usr/lib:/lib, but when the MPI compilers are used
2934
# this is /usr/lib:/lib, but when the MPI compilers are used
2935
# the location of the communication and MPI libs are included too.
2935
# the location of the communication and MPI libs are included too.
2936
# If we don't find anything, use the default library path according
2936
# If we don't find anything, use the default library path according
2937
# to the aix ld manual.
2937
# to the aix ld manual.
2938
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2938
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2939
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2939
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2940
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
2940
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
2941
}'`
2941
}'`
2942
# Check for a 64-bit object if we didn't find anything.
2942
# Check for a 64-bit object if we didn't find anything.
2943
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; }
2943
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; }
2944
}'`; fi],[])
2944
}'`; fi],[])
2945
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2945
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2946
])# _LT_AC_SYS_LIBPATH_AIX
2946
])# _LT_AC_SYS_LIBPATH_AIX
2947
 
2947
 
2948
 
2948
 
2949
# _LT_AC_SHELL_INIT(ARG)
2949
# _LT_AC_SHELL_INIT(ARG)
2950
# ----------------------
2950
# ----------------------
2951
AC_DEFUN([_LT_AC_SHELL_INIT],
2951
AC_DEFUN([_LT_AC_SHELL_INIT],
2952
[ifdef([AC_DIVERSION_NOTICE],
2952
[ifdef([AC_DIVERSION_NOTICE],
2953
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2953
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2954
	 [AC_DIVERT_PUSH(NOTICE)])
2954
	 [AC_DIVERT_PUSH(NOTICE)])
2955
$1
2955
$1
2956
AC_DIVERT_POP
2956
AC_DIVERT_POP
2957
])# _LT_AC_SHELL_INIT
2957
])# _LT_AC_SHELL_INIT
2958
 
2958
 
2959
 
2959
 
2960
# _LT_AC_PROG_ECHO_BACKSLASH
2960
# _LT_AC_PROG_ECHO_BACKSLASH
2961
# --------------------------
2961
# --------------------------
2962
# Add some code to the start of the generated configure script which
2962
# Add some code to the start of the generated configure script which
2963
# will find an echo command which doesn't interpret backslashes.
2963
# will find an echo command which doesn't interpret backslashes.
2964
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2964
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2965
[_LT_AC_SHELL_INIT([
2965
[_LT_AC_SHELL_INIT([
2966
# Check that we are running under the correct shell.
2966
# Check that we are running under the correct shell.
2967
SHELL=${CONFIG_SHELL-/bin/sh}
2967
SHELL=${CONFIG_SHELL-/bin/sh}
2968
 
2968
 
2969
case X$ECHO in
2969
case X$ECHO in
2970
X*--fallback-echo)
2970
X*--fallback-echo)
2971
  # Remove one level of quotation (which was required for Make).
2971
  # Remove one level of quotation (which was required for Make).
2972
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2972
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2973
  ;;
2973
  ;;
2974
esac
2974
esac
2975
 
2975
 
2976
echo=${ECHO-echo}
2976
echo=${ECHO-echo}
2977
if test "X[$]1" = X--no-reexec; then
2977
if test "X[$]1" = X--no-reexec; then
2978
  # Discard the --no-reexec flag, and continue.
2978
  # Discard the --no-reexec flag, and continue.
2979
  shift
2979
  shift
2980
elif test "X[$]1" = X--fallback-echo; then
2980
elif test "X[$]1" = X--fallback-echo; then
2981
  # Avoid inline document here, it may be left over
2981
  # Avoid inline document here, it may be left over
2982
  :
2982
  :
2983
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2983
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2984
  # Yippee, $echo works!
2984
  # Yippee, $echo works!
2985
  :
2985
  :
2986
else
2986
else
2987
  # Restart under the correct shell.
2987
  # Restart under the correct shell.
2988
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2988
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2989
fi
2989
fi
2990
 
2990
 
2991
if test "X[$]1" = X--fallback-echo; then
2991
if test "X[$]1" = X--fallback-echo; then
2992
  # used as fallback echo
2992
  # used as fallback echo
2993
  shift
2993
  shift
2994
  cat <<EOF
2994
  cat <<EOF
2995
[$]*
2995
[$]*
2996
EOF
2996
EOF
2997
  exit 0
2997
  exit 0
2998
fi
2998
fi
2999
 
2999
 
3000
# The HP-UX ksh and POSIX shell print the target directory to stdout
3000
# The HP-UX ksh and POSIX shell print the target directory to stdout
3001
# if CDPATH is set.
3001
# if CDPATH is set.
3002
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3002
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3003
 
3003
 
3004
if test -z "$ECHO"; then
3004
if test -z "$ECHO"; then
3005
if test "X${echo_test_string+set}" != Xset; then
3005
if test "X${echo_test_string+set}" != Xset; then
3006
# find a string as large as possible, as long as the shell can cope with it
3006
# find a string as large as possible, as long as the shell can cope with it
3007
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3007
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3008
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3008
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3009
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
3009
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
3010
       echo_test_string="`eval $cmd`" &&
3010
       echo_test_string="`eval $cmd`" &&
3011
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3011
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3012
    then
3012
    then
3013
      break
3013
      break
3014
    fi
3014
    fi
3015
  done
3015
  done
3016
fi
3016
fi
3017
 
3017
 
3018
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3018
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3019
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3019
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3020
   test "X$echo_testing_string" = "X$echo_test_string"; then
3020
   test "X$echo_testing_string" = "X$echo_test_string"; then
3021
  :
3021
  :
3022
else
3022
else
3023
  # The Solaris, AIX, and Digital Unix default echo programs unquote
3023
  # The Solaris, AIX, and Digital Unix default echo programs unquote
3024
  # backslashes.  This makes it impossible to quote backslashes using
3024
  # backslashes.  This makes it impossible to quote backslashes using
3025
  #   echo "$something" | sed 's/\\/\\\\/g'
3025
  #   echo "$something" | sed 's/\\/\\\\/g'
3026
  #
3026
  #
3027
  # So, first we look for a working echo in the user's PATH.
3027
  # So, first we look for a working echo in the user's PATH.
3028
 
3028
 
3029
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3029
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3030
  for dir in $PATH /usr/ucb; do
3030
  for dir in $PATH /usr/ucb; do
3031
    IFS="$lt_save_ifs"
3031
    IFS="$lt_save_ifs"
3032
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3032
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3033
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3033
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3034
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3034
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3035
       test "X$echo_testing_string" = "X$echo_test_string"; then
3035
       test "X$echo_testing_string" = "X$echo_test_string"; then
3036
      echo="$dir/echo"
3036
      echo="$dir/echo"
3037
      break
3037
      break
3038
    fi
3038
    fi
3039
  done
3039
  done
3040
  IFS="$lt_save_ifs"
3040
  IFS="$lt_save_ifs"
3041
 
3041
 
3042
  if test "X$echo" = Xecho; then
3042
  if test "X$echo" = Xecho; then
3043
    # We didn't find a better echo, so look for alternatives.
3043
    # We didn't find a better echo, so look for alternatives.
3044
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
3044
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
3045
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
3045
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
3046
       test "X$echo_testing_string" = "X$echo_test_string"; then
3046
       test "X$echo_testing_string" = "X$echo_test_string"; then
3047
      # This shell has a builtin print -r that does the trick.
3047
      # This shell has a builtin print -r that does the trick.
3048
      echo='print -r'
3048
      echo='print -r'
3049
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
3049
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
3050
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
3050
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
3051
      # If we have ksh, try running configure again with it.
3051
      # If we have ksh, try running configure again with it.
3052
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3052
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3053
      export ORIGINAL_CONFIG_SHELL
3053
      export ORIGINAL_CONFIG_SHELL
3054
      CONFIG_SHELL=/bin/ksh
3054
      CONFIG_SHELL=/bin/ksh
3055
      export CONFIG_SHELL
3055
      export CONFIG_SHELL
3056
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3056
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3057
    else
3057
    else
3058
      # Try using printf.
3058
      # Try using printf.
3059
      echo='printf %s\n'
3059
      echo='printf %s\n'
3060
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3060
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3061
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3061
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3062
	 test "X$echo_testing_string" = "X$echo_test_string"; then
3062
	 test "X$echo_testing_string" = "X$echo_test_string"; then
3063
	# Cool, printf works
3063
	# Cool, printf works
3064
	:
3064
	:
3065
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3065
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3066
	   test "X$echo_testing_string" = 'X\t' &&
3066
	   test "X$echo_testing_string" = 'X\t' &&
3067
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3067
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3068
	   test "X$echo_testing_string" = "X$echo_test_string"; then
3068
	   test "X$echo_testing_string" = "X$echo_test_string"; then
3069
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3069
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3070
	export CONFIG_SHELL
3070
	export CONFIG_SHELL
3071
	SHELL="$CONFIG_SHELL"
3071
	SHELL="$CONFIG_SHELL"
3072
	export SHELL
3072
	export SHELL
3073
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
3073
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
3074
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3074
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3075
	   test "X$echo_testing_string" = 'X\t' &&
3075
	   test "X$echo_testing_string" = 'X\t' &&
3076
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3076
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3077
	   test "X$echo_testing_string" = "X$echo_test_string"; then
3077
	   test "X$echo_testing_string" = "X$echo_test_string"; then
3078
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
3078
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
3079
      else
3079
      else
3080
	# maybe with a smaller string...
3080
	# maybe with a smaller string...
3081
	prev=:
3081
	prev=:
3082
 
3082
 
3083
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3083
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3084
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
3084
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
3085
	  then
3085
	  then
3086
	    break
3086
	    break
3087
	  fi
3087
	  fi
3088
	  prev="$cmd"
3088
	  prev="$cmd"
3089
	done
3089
	done
3090
 
3090
 
3091
	if test "$prev" != 'sed 50q "[$]0"'; then
3091
	if test "$prev" != 'sed 50q "[$]0"'; then
3092
	  echo_test_string=`eval $prev`
3092
	  echo_test_string=`eval $prev`
3093
	  export echo_test_string
3093
	  export echo_test_string
3094
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3094
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3095
	else
3095
	else
3096
	  # Oops.  We lost completely, so just stick with echo.
3096
	  # Oops.  We lost completely, so just stick with echo.
3097
	  echo=echo
3097
	  echo=echo
3098
	fi
3098
	fi
3099
      fi
3099
      fi
3100
    fi
3100
    fi
3101
  fi
3101
  fi
3102
fi
3102
fi
3103
fi
3103
fi
3104
 
3104
 
3105
# Copy echo and quote the copy suitably for passing to libtool from
3105
# Copy echo and quote the copy suitably for passing to libtool from
3106
# the Makefile, instead of quoting the original, which is used later.
3106
# the Makefile, instead of quoting the original, which is used later.
3107
ECHO=$echo
3107
ECHO=$echo
3108
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3108
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3109
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3109
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3110
fi
3110
fi
3111
 
3111
 
3112
AC_SUBST(ECHO)
3112
AC_SUBST(ECHO)
3113
])])# _LT_AC_PROG_ECHO_BACKSLASH
3113
])])# _LT_AC_PROG_ECHO_BACKSLASH
3114
 
3114
 
3115
 
3115
 
3116
# _LT_AC_LOCK
3116
# _LT_AC_LOCK
3117
# -----------
3117
# -----------
3118
AC_DEFUN([_LT_AC_LOCK],
3118
AC_DEFUN([_LT_AC_LOCK],
3119
[AC_ARG_ENABLE([libtool-lock],
3119
[AC_ARG_ENABLE([libtool-lock],
3120
    [AC_HELP_STRING([--disable-libtool-lock],
3120
    [AC_HELP_STRING([--disable-libtool-lock],
3121
	[avoid locking (might break parallel builds)])])
3121
	[avoid locking (might break parallel builds)])])
3122
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3122
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3123
 
3123
 
3124
# Some flags need to be propagated to the compiler or linker for good
3124
# Some flags need to be propagated to the compiler or linker for good
3125
# libtool support.
3125
# libtool support.
3126
case $host in
3126
case $host in
3127
ia64-*-hpux*)
3127
ia64-*-hpux*)
3128
  # Find out which ABI we are using.
3128
  # Find out which ABI we are using.
3129
  echo 'int i;' > conftest.$ac_ext
3129
  echo 'int i;' > conftest.$ac_ext
3130
  if AC_TRY_EVAL(ac_compile); then
3130
  if AC_TRY_EVAL(ac_compile); then
3131
    case `/usr/bin/file conftest.$ac_objext` in
3131
    case `/usr/bin/file conftest.$ac_objext` in
3132
    *ELF-32*)
3132
    *ELF-32*)
3133
      HPUX_IA64_MODE="32"
3133
      HPUX_IA64_MODE="32"
3134
      ;;
3134
      ;;
3135
    *ELF-64*)
3135
    *ELF-64*)
3136
      HPUX_IA64_MODE="64"
3136
      HPUX_IA64_MODE="64"
3137
      ;;
3137
      ;;
3138
    esac
3138
    esac
3139
  fi
3139
  fi
3140
  rm -rf conftest*
3140
  rm -rf conftest*
3141
  ;;
3141
  ;;
3142
*-*-irix6*)
3142
*-*-irix6*)
3143
  # Find out which ABI we are using.
3143
  # Find out which ABI we are using.
3144
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3144
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3145
  if AC_TRY_EVAL(ac_compile); then
3145
  if AC_TRY_EVAL(ac_compile); then
3146
   if test "$lt_cv_prog_gnu_ld" = yes; then
3146
   if test "$lt_cv_prog_gnu_ld" = yes; then
3147
    case `/usr/bin/file conftest.$ac_objext` in
3147
    case `/usr/bin/file conftest.$ac_objext` in
3148
    *32-bit*)
3148
    *32-bit*)
3149
      LD="${LD-ld} -melf32bsmip"
3149
      LD="${LD-ld} -melf32bsmip"
3150
      ;;
3150
      ;;
3151
    *N32*)
3151
    *N32*)
3152
      LD="${LD-ld} -melf32bmipn32"
3152
      LD="${LD-ld} -melf32bmipn32"
3153
      ;;
3153
      ;;
3154
    *64-bit*)
3154
    *64-bit*)
3155
      LD="${LD-ld} -melf64bmip"
3155
      LD="${LD-ld} -melf64bmip"
3156
      ;;
3156
      ;;
3157
    esac
3157
    esac
3158
   else
3158
   else
3159
    case `/usr/bin/file conftest.$ac_objext` in
3159
    case `/usr/bin/file conftest.$ac_objext` in
3160
    *32-bit*)
3160
    *32-bit*)
3161
      LD="${LD-ld} -32"
3161
      LD="${LD-ld} -32"
3162
      ;;
3162
      ;;
3163
    *N32*)
3163
    *N32*)
3164
      LD="${LD-ld} -n32"
3164
      LD="${LD-ld} -n32"
3165
      ;;
3165
      ;;
3166
    *64-bit*)
3166
    *64-bit*)
3167
      LD="${LD-ld} -64"
3167
      LD="${LD-ld} -64"
3168
      ;;
3168
      ;;
3169
    esac
3169
    esac
3170
   fi
3170
   fi
3171
  fi
3171
  fi
3172
  rm -rf conftest*
3172
  rm -rf conftest*
3173
  ;;
3173
  ;;
3174
 
3174
 
3175
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
3175
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
3176
  # Find out which ABI we are using.
3176
  # Find out which ABI we are using.
3177
  echo 'int i;' > conftest.$ac_ext
3177
  echo 'int i;' > conftest.$ac_ext
3178
  if AC_TRY_EVAL(ac_compile); then
3178
  if AC_TRY_EVAL(ac_compile); then
3179
    case "`/usr/bin/file conftest.o`" in
3179
    case "`/usr/bin/file conftest.o`" in
3180
    *32-bit*)
3180
    *32-bit*)
3181
      case $host in
3181
      case $host in
3182
        x86_64-*linux*)
3182
        x86_64-*linux*)
3183
          LD="${LD-ld} -m elf_i386"
3183
          LD="${LD-ld} -m elf_i386"
3184
          ;;
3184
          ;;
3185
        ppc64-*linux*)
3185
        ppc64-*linux*)
3186
          LD="${LD-ld} -m elf32ppclinux"
3186
          LD="${LD-ld} -m elf32ppclinux"
3187
          ;;
3187
          ;;
3188
        s390x-*linux*)
3188
        s390x-*linux*)
3189
          LD="${LD-ld} -m elf_s390"
3189
          LD="${LD-ld} -m elf_s390"
3190
          ;;
3190
          ;;
3191
        sparc64-*linux*)
3191
        sparc64-*linux*)
3192
          LD="${LD-ld} -m elf32_sparc"
3192
          LD="${LD-ld} -m elf32_sparc"
3193
          ;;
3193
          ;;
3194
      esac
3194
      esac
3195
      ;;
3195
      ;;
3196
    *64-bit*)
3196
    *64-bit*)
3197
      case $host in
3197
      case $host in
3198
        x86_64-*linux*)
3198
        x86_64-*linux*)
3199
          LD="${LD-ld} -m elf_x86_64"
3199
          LD="${LD-ld} -m elf_x86_64"
3200
          ;;
3200
          ;;
3201
        ppc*-*linux*|powerpc*-*linux*)
3201
        ppc*-*linux*|powerpc*-*linux*)
3202
          LD="${LD-ld} -m elf64ppc"
3202
          LD="${LD-ld} -m elf64ppc"
3203
          ;;
3203
          ;;
3204
        s390*-*linux*)
3204
        s390*-*linux*)
3205
          LD="${LD-ld} -m elf64_s390"
3205
          LD="${LD-ld} -m elf64_s390"
3206
          ;;
3206
          ;;
3207
        sparc*-*linux*)
3207
        sparc*-*linux*)
3208
          LD="${LD-ld} -m elf64_sparc"
3208
          LD="${LD-ld} -m elf64_sparc"
3209
          ;;
3209
          ;;
3210
      esac
3210
      esac
3211
      ;;
3211
      ;;
3212
    esac
3212
    esac
3213
  fi
3213
  fi
3214
  rm -rf conftest*
3214
  rm -rf conftest*
3215
  ;;
3215
  ;;
3216
 
3216
 
3217
*-*-sco3.2v5*)
3217
*-*-sco3.2v5*)
3218
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3218
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3219
  SAVE_CFLAGS="$CFLAGS"
3219
  SAVE_CFLAGS="$CFLAGS"
3220
  CFLAGS="$CFLAGS -belf"
3220
  CFLAGS="$CFLAGS -belf"
3221
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3221
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3222
    [AC_LANG_PUSH(C)
3222
    [AC_LANG_PUSH(C)
3223
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3223
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3224
     AC_LANG_POP])
3224
     AC_LANG_POP])
3225
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3225
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3226
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3226
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3227
    CFLAGS="$SAVE_CFLAGS"
3227
    CFLAGS="$SAVE_CFLAGS"
3228
  fi
3228
  fi
3229
  ;;
3229
  ;;
3230
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3230
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3231
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3231
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3232
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3232
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3233
  AC_CHECK_TOOL(AS, as, false)
3233
  AC_CHECK_TOOL(AS, as, false)
3234
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
3234
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
3235
  ;;
3235
  ;;
3236
  ])
3236
  ])
3237
esac
3237
esac
3238
 
3238
 
3239
need_locks="$enable_libtool_lock"
3239
need_locks="$enable_libtool_lock"
3240
 
3240
 
3241
])# _LT_AC_LOCK
3241
])# _LT_AC_LOCK
3242
 
3242
 
3243
 
3243
 
3244
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3244
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3245
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3245
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3246
# ----------------------------------------------------------------
3246
# ----------------------------------------------------------------
3247
# Check whether the given compiler option works
3247
# Check whether the given compiler option works
3248
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
3248
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
3249
[AC_CACHE_CHECK([$1], [$2],
3249
[AC_CACHE_CHECK([$1], [$2],
3250
  [$2=no
3250
  [$2=no
3251
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3251
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3252
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3252
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3253
   lt_compiler_flag="$3"
3253
   lt_compiler_flag="$3"
3254
   # Insert the option either (1) after the last *FLAGS variable, or
3254
   # Insert the option either (1) after the last *FLAGS variable, or
3255
   # (2) before a word containing "conftest.", or (3) at the end.
3255
   # (2) before a word containing "conftest.", or (3) at the end.
3256
   # Note that $ac_compile itself does not contain backslashes and begins
3256
   # Note that $ac_compile itself does not contain backslashes and begins
3257
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3257
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3258
   # The option is referenced via a variable to avoid confusing sed.
3258
   # The option is referenced via a variable to avoid confusing sed.
3259
   lt_compile=`echo "$ac_compile" | $SED \
3259
   lt_compile=`echo "$ac_compile" | $SED \
3260
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
3260
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
3261
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3261
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3262
   -e 's:$: $lt_compiler_flag:'`
3262
   -e 's:$: $lt_compiler_flag:'`
3263
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3263
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3264
   (eval "$lt_compile" 2>conftest.err)
3264
   (eval "$lt_compile" 2>conftest.err)
3265
   ac_status=$?
3265
   ac_status=$?
3266
   cat conftest.err >&AS_MESSAGE_LOG_FD
3266
   cat conftest.err >&AS_MESSAGE_LOG_FD
3267
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3267
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3268
   if (exit $ac_status) && test -s "$ac_outfile"; then
3268
   if (exit $ac_status) && test -s "$ac_outfile"; then
3269
     # The compiler can only warn and ignore the option if not recognized
3269
     # The compiler can only warn and ignore the option if not recognized
3270
     # So say no if there are warnings
3270
     # So say no if there are warnings
3271
     if test ! -s conftest.err; then
3271
     if test ! -s conftest.err; then
3272
       $2=yes
3272
       $2=yes
3273
     fi
3273
     fi
3274
   fi
3274
   fi
3275
   $rm conftest*
3275
   $rm conftest*
3276
])
3276
])
3277
 
3277
 
3278
if test x"[$]$2" = xyes; then
3278
if test x"[$]$2" = xyes; then
3279
    ifelse([$5], , :, [$5])
3279
    ifelse([$5], , :, [$5])
3280
else
3280
else
3281
    ifelse([$6], , :, [$6])
3281
    ifelse([$6], , :, [$6])
3282
fi
3282
fi
3283
])# AC_LIBTOOL_COMPILER_OPTION
3283
])# AC_LIBTOOL_COMPILER_OPTION
3284
 
3284
 
3285
 
3285
 
3286
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3286
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3287
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
3287
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
3288
# ------------------------------------------------------------
3288
# ------------------------------------------------------------
3289
# Check whether the given compiler option works
3289
# Check whether the given compiler option works
3290
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
3290
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
3291
[AC_CACHE_CHECK([$1], [$2],
3291
[AC_CACHE_CHECK([$1], [$2],
3292
  [$2=no
3292
  [$2=no
3293
   save_LDFLAGS="$LDFLAGS"
3293
   save_LDFLAGS="$LDFLAGS"
3294
   LDFLAGS="$LDFLAGS $3"
3294
   LDFLAGS="$LDFLAGS $3"
3295
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
3295
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
3296
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3296
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3297
     # The compiler can only warn and ignore the option if not recognized
3297
     # The compiler can only warn and ignore the option if not recognized
3298
     # So say no if there are warnings
3298
     # So say no if there are warnings
3299
     if test -s conftest.err; then
3299
     if test -s conftest.err; then
3300
       # Append any errors to the config.log.
3300
       # Append any errors to the config.log.
3301
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3301
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3302
     else
3302
     else
3303
       $2=yes
3303
       $2=yes
3304
     fi
3304
     fi
3305
   fi
3305
   fi
3306
   $rm conftest*
3306
   $rm conftest*
3307
   LDFLAGS="$save_LDFLAGS"
3307
   LDFLAGS="$save_LDFLAGS"
3308
])
3308
])
3309
 
3309
 
3310
if test x"[$]$2" = xyes; then
3310
if test x"[$]$2" = xyes; then
3311
    ifelse([$4], , :, [$4])
3311
    ifelse([$4], , :, [$4])
3312
else
3312
else
3313
    ifelse([$5], , :, [$5])
3313
    ifelse([$5], , :, [$5])
3314
fi
3314
fi
3315
])# AC_LIBTOOL_LINKER_OPTION
3315
])# AC_LIBTOOL_LINKER_OPTION
3316
 
3316
 
3317
 
3317
 
3318
# AC_LIBTOOL_SYS_MAX_CMD_LEN
3318
# AC_LIBTOOL_SYS_MAX_CMD_LEN
3319
# --------------------------
3319
# --------------------------
3320
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
3320
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
3321
[# find the maximum length of command line arguments
3321
[# find the maximum length of command line arguments
3322
AC_MSG_CHECKING([the maximum length of command line arguments])
3322
AC_MSG_CHECKING([the maximum length of command line arguments])
3323
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3323
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3324
  i=0
3324
  i=0
3325
  testring="ABCD"
3325
  testring="ABCD"
3326
 
3326
 
3327
  case $build_os in
3327
  case $build_os in
3328
  msdosdjgpp*)
3328
  msdosdjgpp*)
3329
    # On DJGPP, this test can blow up pretty badly due to problems in libc
3329
    # On DJGPP, this test can blow up pretty badly due to problems in libc
3330
    # (any single argument exceeding 2000 bytes causes a buffer overrun
3330
    # (any single argument exceeding 2000 bytes causes a buffer overrun
3331
    # during glob expansion).  Even if it were fixed, the result of this
3331
    # during glob expansion).  Even if it were fixed, the result of this
3332
    # check would be larger than it should be.
3332
    # check would be larger than it should be.
3333
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3333
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3334
    ;;
3334
    ;;
3335
 
3335
 
3336
  gnu*)
3336
  gnu*)
3337
    # Under GNU Hurd, this test is not required because there is
3337
    # Under GNU Hurd, this test is not required because there is
3338
    # no limit to the length of command line arguments.
3338
    # no limit to the length of command line arguments.
3339
    # Libtool will interpret -1 as no limit whatsoever
3339
    # Libtool will interpret -1 as no limit whatsoever
3340
    lt_cv_sys_max_cmd_len=-1;
3340
    lt_cv_sys_max_cmd_len=-1;
3341
    ;;
3341
    ;;
3342
 
3342
 
3343
  cygwin* | mingw*)
3343
  cygwin* | mingw*)
3344
    # On Win9x/ME, this test blows up -- it succeeds, but takes
3344
    # On Win9x/ME, this test blows up -- it succeeds, but takes
3345
    # about 5 minutes as the teststring grows exponentially.
3345
    # about 5 minutes as the teststring grows exponentially.
3346
    # Worse, since 9x/ME are not pre-emptively multitasking,
3346
    # Worse, since 9x/ME are not pre-emptively multitasking,
3347
    # you end up with a "frozen" computer, even though with patience
3347
    # you end up with a "frozen" computer, even though with patience
3348
    # the test eventually succeeds (with a max line length of 256k).
3348
    # the test eventually succeeds (with a max line length of 256k).
3349
    # Instead, let's just punt: use the minimum linelength reported by
3349
    # Instead, let's just punt: use the minimum linelength reported by
3350
    # all of the supported platforms: 8192 (on NT/2K/XP).
3350
    # all of the supported platforms: 8192 (on NT/2K/XP).
3351
    lt_cv_sys_max_cmd_len=8192;
3351
    lt_cv_sys_max_cmd_len=8192;
3352
    ;;
3352
    ;;
3353
 
3353
 
3354
 *)
3354
 *)
3355
    # If test is not a shell built-in, we'll probably end up computing a
3355
    # If test is not a shell built-in, we'll probably end up computing a
3356
    # maximum length that is only half of the actual maximum length, but
3356
    # maximum length that is only half of the actual maximum length, but
3357
    # we can't tell.
3357
    # we can't tell.
3358
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
3358
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
3359
	       = "XX$testring") >/dev/null 2>&1 &&
3359
	       = "XX$testring") >/dev/null 2>&1 &&
3360
	    new_result=`expr "X$testring" : ".*" 2>&1` &&
3360
	    new_result=`expr "X$testring" : ".*" 2>&1` &&
3361
	    lt_cv_sys_max_cmd_len=$new_result &&
3361
	    lt_cv_sys_max_cmd_len=$new_result &&
3362
	    test $i != 17 # 1/2 MB should be enough
3362
	    test $i != 17 # 1/2 MB should be enough
3363
    do
3363
    do
3364
      i=`expr $i + 1`
3364
      i=`expr $i + 1`
3365
      testring=$testring$testring
3365
      testring=$testring$testring
3366
    done
3366
    done
3367
    testring=
3367
    testring=
3368
    # Add a significant safety factor because C++ compilers can tack on massive
3368
    # Add a significant safety factor because C++ compilers can tack on massive
3369
    # amounts of additional arguments before passing them to the linker.
3369
    # amounts of additional arguments before passing them to the linker.
3370
    # It appears as though 1/2 is a usable value.
3370
    # It appears as though 1/2 is a usable value.
3371
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3371
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3372
    ;;
3372
    ;;
3373
  esac
3373
  esac
3374
])
3374
])
3375
if test -n $lt_cv_sys_max_cmd_len ; then
3375
if test -n $lt_cv_sys_max_cmd_len ; then
3376
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3376
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3377
else
3377
else
3378
  AC_MSG_RESULT(none)
3378
  AC_MSG_RESULT(none)
3379
fi
3379
fi
3380
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
3380
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
3381
 
3381
 
3382
 
3382
 
3383
# _LT_AC_CHECK_DLFCN
3383
# _LT_AC_CHECK_DLFCN
3384
# --------------------
3384
# --------------------
3385
AC_DEFUN([_LT_AC_CHECK_DLFCN],
3385
AC_DEFUN([_LT_AC_CHECK_DLFCN],
3386
[AC_CHECK_HEADERS(dlfcn.h)dnl
3386
[AC_CHECK_HEADERS(dlfcn.h)dnl
3387
])# _LT_AC_CHECK_DLFCN
3387
])# _LT_AC_CHECK_DLFCN
3388
 
3388
 
3389
 
3389
 
3390
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3390
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3391
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3391
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3392
# ------------------------------------------------------------------
3392
# ------------------------------------------------------------------
3393
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
3393
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
3394
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3394
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3395
if test "$cross_compiling" = yes; then :
3395
if test "$cross_compiling" = yes; then :
3396
  [$4]
3396
  [$4]
3397
else
3397
else
3398
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3398
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3399
  lt_status=$lt_dlunknown
3399
  lt_status=$lt_dlunknown
3400
  cat > conftest.$ac_ext <<EOF
3400
  cat > conftest.$ac_ext <<EOF
3401
[#line __oline__ "configure"
3401
[#line __oline__ "configure"
3402
#include "confdefs.h"
3402
#include "confdefs.h"
3403
 
3403
 
3404
#if HAVE_DLFCN_H
3404
#if HAVE_DLFCN_H
3405
#include <dlfcn.h>
3405
#include <dlfcn.h>
3406
#endif
3406
#endif
3407
 
3407
 
3408
#include <stdio.h>
3408
#include <stdio.h>
3409
 
3409
 
3410
#ifdef RTLD_GLOBAL
3410
#ifdef RTLD_GLOBAL
3411
#  define LT_DLGLOBAL		RTLD_GLOBAL
3411
#  define LT_DLGLOBAL		RTLD_GLOBAL
3412
#else
3412
#else
3413
#  ifdef DL_GLOBAL
3413
#  ifdef DL_GLOBAL
3414
#    define LT_DLGLOBAL		DL_GLOBAL
3414
#    define LT_DLGLOBAL		DL_GLOBAL
3415
#  else
3415
#  else
3416
#    define LT_DLGLOBAL		0
3416
#    define LT_DLGLOBAL		0
3417
#  endif
3417
#  endif
3418
#endif
3418
#endif
3419
 
3419
 
3420
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3420
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3421
   find out it does not work in some platform. */
3421
   find out it does not work in some platform. */
3422
#ifndef LT_DLLAZY_OR_NOW
3422
#ifndef LT_DLLAZY_OR_NOW
3423
#  ifdef RTLD_LAZY
3423
#  ifdef RTLD_LAZY
3424
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3424
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3425
#  else
3425
#  else
3426
#    ifdef DL_LAZY
3426
#    ifdef DL_LAZY
3427
#      define LT_DLLAZY_OR_NOW		DL_LAZY
3427
#      define LT_DLLAZY_OR_NOW		DL_LAZY
3428
#    else
3428
#    else
3429
#      ifdef RTLD_NOW
3429
#      ifdef RTLD_NOW
3430
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3430
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3431
#      else
3431
#      else
3432
#        ifdef DL_NOW
3432
#        ifdef DL_NOW
3433
#          define LT_DLLAZY_OR_NOW	DL_NOW
3433
#          define LT_DLLAZY_OR_NOW	DL_NOW
3434
#        else
3434
#        else
3435
#          define LT_DLLAZY_OR_NOW	0
3435
#          define LT_DLLAZY_OR_NOW	0
3436
#        endif
3436
#        endif
3437
#      endif
3437
#      endif
3438
#    endif
3438
#    endif
3439
#  endif
3439
#  endif
3440
#endif
3440
#endif
3441
 
3441
 
3442
#ifdef __cplusplus
3442
#ifdef __cplusplus
3443
extern "C" void exit (int);
3443
extern "C" void exit (int);
3444
#endif
3444
#endif
3445
 
3445
 
3446
void fnord() { int i=42;}
3446
void fnord() { int i=42;}
3447
int main ()
3447
int main ()
3448
{
3448
{
3449
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3449
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3450
  int status = $lt_dlunknown;
3450
  int status = $lt_dlunknown;
3451
 
3451
 
3452
  if (self)
3452
  if (self)
3453
    {
3453
    {
3454
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3454
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3455
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3455
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3456
      /* dlclose (self); */
3456
      /* dlclose (self); */
3457
    }
3457
    }
3458
 
3458
 
3459
    exit (status);
3459
    exit (status);
3460
}]
3460
}]
3461
EOF
3461
EOF
3462
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3462
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3463
    (./conftest; exit; ) 2>/dev/null
3463
    (./conftest; exit; ) 2>/dev/null
3464
    lt_status=$?
3464
    lt_status=$?
3465
    case x$lt_status in
3465
    case x$lt_status in
3466
      x$lt_dlno_uscore) $1 ;;
3466
      x$lt_dlno_uscore) $1 ;;
3467
      x$lt_dlneed_uscore) $2 ;;
3467
      x$lt_dlneed_uscore) $2 ;;
3468
      x$lt_unknown|x*) $3 ;;
3468
      x$lt_unknown|x*) $3 ;;
3469
    esac
3469
    esac
3470
  else :
3470
  else :
3471
    # compilation failed
3471
    # compilation failed
3472
    $3
3472
    $3
3473
  fi
3473
  fi
3474
fi
3474
fi
3475
rm -fr conftest*
3475
rm -fr conftest*
3476
])# _LT_AC_TRY_DLOPEN_SELF
3476
])# _LT_AC_TRY_DLOPEN_SELF
3477
 
3477
 
3478
 
3478
 
3479
# AC_LIBTOOL_DLOPEN_SELF
3479
# AC_LIBTOOL_DLOPEN_SELF
3480
# -------------------
3480
# -------------------
3481
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
3481
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
3482
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3482
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3483
if test "x$enable_dlopen" != xyes; then
3483
if test "x$enable_dlopen" != xyes; then
3484
  enable_dlopen=unknown
3484
  enable_dlopen=unknown
3485
  enable_dlopen_self=unknown
3485
  enable_dlopen_self=unknown
3486
  enable_dlopen_self_static=unknown
3486
  enable_dlopen_self_static=unknown
3487
else
3487
else
3488
  lt_cv_dlopen=no
3488
  lt_cv_dlopen=no
3489
  lt_cv_dlopen_libs=
3489
  lt_cv_dlopen_libs=
3490
 
3490
 
3491
  case $host_os in
3491
  case $host_os in
3492
  beos*)
3492
  beos*)
3493
    lt_cv_dlopen="load_add_on"
3493
    lt_cv_dlopen="load_add_on"
3494
    lt_cv_dlopen_libs=
3494
    lt_cv_dlopen_libs=
3495
    lt_cv_dlopen_self=yes
3495
    lt_cv_dlopen_self=yes
3496
    ;;
3496
    ;;
3497
 
3497
 
3498
  mingw* | pw32*)
3498
  mingw* | pw32*)
3499
    lt_cv_dlopen="LoadLibrary"
3499
    lt_cv_dlopen="LoadLibrary"
3500
    lt_cv_dlopen_libs=
3500
    lt_cv_dlopen_libs=
3501
   ;;
3501
   ;;
3502
 
3502
 
3503
  cygwin*)
3503
  cygwin*)
3504
    lt_cv_dlopen="dlopen"
3504
    lt_cv_dlopen="dlopen"
3505
    lt_cv_dlopen_libs=
3505
    lt_cv_dlopen_libs=
3506
   ;;
3506
   ;;
3507
 
3507
 
3508
  darwin*)
3508
  darwin*)
3509
  # if libdl is installed we need to link against it
3509
  # if libdl is installed we need to link against it
3510
    AC_CHECK_LIB([dl], [dlopen],
3510
    AC_CHECK_LIB([dl], [dlopen],
3511
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3511
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3512
    lt_cv_dlopen="dyld"
3512
    lt_cv_dlopen="dyld"
3513
    lt_cv_dlopen_libs=
3513
    lt_cv_dlopen_libs=
3514
    lt_cv_dlopen_self=yes
3514
    lt_cv_dlopen_self=yes
3515
    ])
3515
    ])
3516
   ;;
3516
   ;;
3517
    
3517
    
3518
  *)
3518
  *)
3519
    AC_CHECK_FUNC([shl_load],
3519
    AC_CHECK_FUNC([shl_load],
3520
	  [lt_cv_dlopen="shl_load"],
3520
	  [lt_cv_dlopen="shl_load"],
3521
      [AC_CHECK_LIB([dld], [shl_load],
3521
      [AC_CHECK_LIB([dld], [shl_load],
3522
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
3522
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
3523
	[AC_CHECK_FUNC([dlopen],
3523
	[AC_CHECK_FUNC([dlopen],
3524
	      [lt_cv_dlopen="dlopen"],
3524
	      [lt_cv_dlopen="dlopen"],
3525
	  [AC_CHECK_LIB([dl], [dlopen],
3525
	  [AC_CHECK_LIB([dl], [dlopen],
3526
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3526
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3527
	    [AC_CHECK_LIB([svld], [dlopen],
3527
	    [AC_CHECK_LIB([svld], [dlopen],
3528
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3528
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3529
	      [AC_CHECK_LIB([dld], [dld_link],
3529
	      [AC_CHECK_LIB([dld], [dld_link],
3530
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
3530
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
3531
	      ])
3531
	      ])
3532
	    ])
3532
	    ])
3533
	  ])
3533
	  ])
3534
	])
3534
	])
3535
      ])
3535
      ])
3536
    ;;
3536
    ;;
3537
  esac
3537
  esac
3538
 
3538
 
3539
  if test "x$lt_cv_dlopen" != xno; then
3539
  if test "x$lt_cv_dlopen" != xno; then
3540
    enable_dlopen=yes
3540
    enable_dlopen=yes
3541
  else
3541
  else
3542
    enable_dlopen=no
3542
    enable_dlopen=no
3543
  fi
3543
  fi
3544
 
3544
 
3545
  case $lt_cv_dlopen in
3545
  case $lt_cv_dlopen in
3546
  dlopen)
3546
  dlopen)
3547
    save_CPPFLAGS="$CPPFLAGS"
3547
    save_CPPFLAGS="$CPPFLAGS"
3548
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3548
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3549
 
3549
 
3550
    save_LDFLAGS="$LDFLAGS"
3550
    save_LDFLAGS="$LDFLAGS"
3551
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3551
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3552
 
3552
 
3553
    save_LIBS="$LIBS"
3553
    save_LIBS="$LIBS"
3554
    LIBS="$lt_cv_dlopen_libs $LIBS"
3554
    LIBS="$lt_cv_dlopen_libs $LIBS"
3555
 
3555
 
3556
    AC_CACHE_CHECK([whether a program can dlopen itself],
3556
    AC_CACHE_CHECK([whether a program can dlopen itself],
3557
	  lt_cv_dlopen_self, [dnl
3557
	  lt_cv_dlopen_self, [dnl
3558
	  _LT_AC_TRY_DLOPEN_SELF(
3558
	  _LT_AC_TRY_DLOPEN_SELF(
3559
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3559
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3560
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3560
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3561
    ])
3561
    ])
3562
 
3562
 
3563
    if test "x$lt_cv_dlopen_self" = xyes; then
3563
    if test "x$lt_cv_dlopen_self" = xyes; then
3564
      LDFLAGS="$LDFLAGS $link_static_flag"
3564
      LDFLAGS="$LDFLAGS $link_static_flag"
3565
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3565
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3566
    	  lt_cv_dlopen_self_static, [dnl
3566
    	  lt_cv_dlopen_self_static, [dnl
3567
	  _LT_AC_TRY_DLOPEN_SELF(
3567
	  _LT_AC_TRY_DLOPEN_SELF(
3568
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3568
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3569
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3569
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3570
      ])
3570
      ])
3571
    fi
3571
    fi
3572
 
3572
 
3573
    CPPFLAGS="$save_CPPFLAGS"
3573
    CPPFLAGS="$save_CPPFLAGS"
3574
    LDFLAGS="$save_LDFLAGS"
3574
    LDFLAGS="$save_LDFLAGS"
3575
    LIBS="$save_LIBS"
3575
    LIBS="$save_LIBS"
3576
    ;;
3576
    ;;
3577
  esac
3577
  esac
3578
 
3578
 
3579
  case $lt_cv_dlopen_self in
3579
  case $lt_cv_dlopen_self in
3580
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3580
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3581
  *) enable_dlopen_self=unknown ;;
3581
  *) enable_dlopen_self=unknown ;;
3582
  esac
3582
  esac
3583
 
3583
 
3584
  case $lt_cv_dlopen_self_static in
3584
  case $lt_cv_dlopen_self_static in
3585
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3585
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3586
  *) enable_dlopen_self_static=unknown ;;
3586
  *) enable_dlopen_self_static=unknown ;;
3587
  esac
3587
  esac
3588
fi
3588
fi
3589
])# AC_LIBTOOL_DLOPEN_SELF
3589
])# AC_LIBTOOL_DLOPEN_SELF
3590
 
3590
 
3591
 
3591
 
3592
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
3592
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
3593
# ---------------------------------
3593
# ---------------------------------
3594
# Check to see if options -c and -o are simultaneously supported by compiler
3594
# Check to see if options -c and -o are simultaneously supported by compiler
3595
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
3595
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
3596
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3596
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3597
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3597
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3598
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3598
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3599
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3599
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3600
   $rm -r conftest 2>/dev/null
3600
   $rm -r conftest 2>/dev/null
3601
   mkdir conftest
3601
   mkdir conftest
3602
   cd conftest
3602
   cd conftest
3603
   mkdir out
3603
   mkdir out
3604
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3604
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3605
 
3605
 
3606
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
3606
   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
3607
   # that will create temporary files in the current directory regardless of
3607
   # that will create temporary files in the current directory regardless of
3608
   # the output directory.  Thus, making CWD read-only will cause this test
3608
   # the output directory.  Thus, making CWD read-only will cause this test
3609
   # to fail, enabling locking or at least warning the user not to do parallel
3609
   # to fail, enabling locking or at least warning the user not to do parallel
3610
   # builds.
3610
   # builds.
3611
   chmod -w .
3611
   chmod -w .
3612
 
3612
 
3613
   lt_compiler_flag="-o out/conftest2.$ac_objext"
3613
   lt_compiler_flag="-o out/conftest2.$ac_objext"
3614
   # Insert the option either (1) after the last *FLAGS variable, or
3614
   # Insert the option either (1) after the last *FLAGS variable, or
3615
   # (2) before a word containing "conftest.", or (3) at the end.
3615
   # (2) before a word containing "conftest.", or (3) at the end.
3616
   # Note that $ac_compile itself does not contain backslashes and begins
3616
   # Note that $ac_compile itself does not contain backslashes and begins
3617
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3617
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3618
   lt_compile=`echo "$ac_compile" | $SED \
3618
   lt_compile=`echo "$ac_compile" | $SED \
3619
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
3619
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
3620
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3620
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3621
   -e 's:$: $lt_compiler_flag:'`
3621
   -e 's:$: $lt_compiler_flag:'`
3622
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3622
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3623
   (eval "$lt_compile" 2>out/conftest.err)
3623
   (eval "$lt_compile" 2>out/conftest.err)
3624
   ac_status=$?
3624
   ac_status=$?
3625
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3625
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3626
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3626
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3627
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3627
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3628
   then
3628
   then
3629
     # The compiler can only warn and ignore the option if not recognized
3629
     # The compiler can only warn and ignore the option if not recognized
3630
     # So say no if there are warnings
3630
     # So say no if there are warnings
3631
     if test ! -s out/conftest.err; then
3631
     if test ! -s out/conftest.err; then
3632
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3632
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3633
     fi
3633
     fi
3634
   fi
3634
   fi
3635
   chmod u+w .
3635
   chmod u+w .
3636
   $rm conftest* out/*
3636
   $rm conftest* out/*
3637
   rmdir out
3637
   rmdir out
3638
   cd ..
3638
   cd ..
3639
   rmdir conftest
3639
   rmdir conftest
3640
   $rm conftest*
3640
   $rm conftest*
3641
])
3641
])
3642
])# AC_LIBTOOL_PROG_CC_C_O
3642
])# AC_LIBTOOL_PROG_CC_C_O
3643
 
3643
 
3644
 
3644
 
3645
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
3645
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
3646
# -----------------------------------------
3646
# -----------------------------------------
3647
# Check to see if we can do hard links to lock some files if needed
3647
# Check to see if we can do hard links to lock some files if needed
3648
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
3648
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
3649
[AC_REQUIRE([_LT_AC_LOCK])dnl
3649
[AC_REQUIRE([_LT_AC_LOCK])dnl
3650
 
3650
 
3651
hard_links="nottested"
3651
hard_links="nottested"
3652
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3652
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3653
  # do not overwrite the value of need_locks provided by the user
3653
  # do not overwrite the value of need_locks provided by the user
3654
  AC_MSG_CHECKING([if we can lock with hard links])
3654
  AC_MSG_CHECKING([if we can lock with hard links])
3655
  hard_links=yes
3655
  hard_links=yes
3656
  $rm conftest*
3656
  $rm conftest*
3657
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3657
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3658
  touch conftest.a
3658
  touch conftest.a
3659
  ln conftest.a conftest.b 2>&5 || hard_links=no
3659
  ln conftest.a conftest.b 2>&5 || hard_links=no
3660
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3660
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3661
  AC_MSG_RESULT([$hard_links])
3661
  AC_MSG_RESULT([$hard_links])
3662
  if test "$hard_links" = no; then
3662
  if test "$hard_links" = no; then
3663
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3663
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3664
    need_locks=warn
3664
    need_locks=warn
3665
  fi
3665
  fi
3666
else
3666
else
3667
  need_locks=no
3667
  need_locks=no
3668
fi
3668
fi
3669
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
3669
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
3670
 
3670
 
3671
 
3671
 
3672
# AC_LIBTOOL_OBJDIR
3672
# AC_LIBTOOL_OBJDIR
3673
# -----------------
3673
# -----------------
3674
AC_DEFUN([AC_LIBTOOL_OBJDIR],
3674
AC_DEFUN([AC_LIBTOOL_OBJDIR],
3675
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3675
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3676
[rm -f .libs 2>/dev/null
3676
[rm -f .libs 2>/dev/null
3677
mkdir .libs 2>/dev/null
3677
mkdir .libs 2>/dev/null
3678
if test -d .libs; then
3678
if test -d .libs; then
3679
  lt_cv_objdir=.libs
3679
  lt_cv_objdir=.libs
3680
else
3680
else
3681
  # MS-DOS does not allow filenames that begin with a dot.
3681
  # MS-DOS does not allow filenames that begin with a dot.
3682
  lt_cv_objdir=_libs
3682
  lt_cv_objdir=_libs
3683
fi
3683
fi
3684
rmdir .libs 2>/dev/null])
3684
rmdir .libs 2>/dev/null])
3685
objdir=$lt_cv_objdir
3685
objdir=$lt_cv_objdir
3686
])# AC_LIBTOOL_OBJDIR
3686
])# AC_LIBTOOL_OBJDIR
3687
 
3687
 
3688
 
3688
 
3689
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
3689
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
3690
# ----------------------------------------------
3690
# ----------------------------------------------
3691
# Check hardcoding attributes.
3691
# Check hardcoding attributes.
3692
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
3692
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
3693
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3693
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3694
_LT_AC_TAGVAR(hardcode_action, $1)=
3694
_LT_AC_TAGVAR(hardcode_action, $1)=
3695
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
3695
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
3696
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
3696
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
3697
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
3697
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
3698
 
3698
 
3699
  # We can hardcode non-existant directories.
3699
  # We can hardcode non-existant directories.
3700
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
3700
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
3701
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3701
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3702
     # have to relink, otherwise we might link with an installed library
3702
     # have to relink, otherwise we might link with an installed library
3703
     # when we should be linking with a yet-to-be-installed one
3703
     # when we should be linking with a yet-to-be-installed one
3704
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3704
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3705
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
3705
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
3706
    # Linking always hardcodes the temporary library directory.
3706
    # Linking always hardcodes the temporary library directory.
3707
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
3707
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
3708
  else
3708
  else
3709
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3709
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3710
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
3710
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
3711
  fi
3711
  fi
3712
else
3712
else
3713
  # We cannot hardcode anything, or else we can only hardcode existing
3713
  # We cannot hardcode anything, or else we can only hardcode existing
3714
  # directories.
3714
  # directories.
3715
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
3715
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
3716
fi
3716
fi
3717
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
3717
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
3718
 
3718
 
3719
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
3719
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
3720
  # Fast installation is not supported
3720
  # Fast installation is not supported
3721
  enable_fast_install=no
3721
  enable_fast_install=no
3722
elif test "$shlibpath_overrides_runpath" = yes ||
3722
elif test "$shlibpath_overrides_runpath" = yes ||
3723
     test "$enable_shared" = no; then
3723
     test "$enable_shared" = no; then
3724
  # Fast installation is not necessary
3724
  # Fast installation is not necessary
3725
  enable_fast_install=needless
3725
  enable_fast_install=needless
3726
fi
3726
fi
3727
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
3727
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
3728
 
3728
 
3729
 
3729
 
3730
# AC_LIBTOOL_SYS_LIB_STRIP
3730
# AC_LIBTOOL_SYS_LIB_STRIP
3731
# ------------------------
3731
# ------------------------
3732
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
3732
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
3733
[striplib=
3733
[striplib=
3734
old_striplib=
3734
old_striplib=
3735
AC_MSG_CHECKING([whether stripping libraries is possible])
3735
AC_MSG_CHECKING([whether stripping libraries is possible])
3736
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3736
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
3737
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3737
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3738
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3738
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3739
  AC_MSG_RESULT([yes])
3739
  AC_MSG_RESULT([yes])
3740
else
3740
else
3741
# FIXME - insert some real tests, host_os isn't really good enough
3741
# FIXME - insert some real tests, host_os isn't really good enough
3742
  case $host_os in
3742
  case $host_os in
3743
   darwin*)
3743
   darwin*)
3744
       if test -n "$STRIP" ; then
3744
       if test -n "$STRIP" ; then
3745
         striplib="$STRIP -x"
3745
         striplib="$STRIP -x"
3746
         AC_MSG_RESULT([yes])
3746
         AC_MSG_RESULT([yes])
3747
       else
3747
       else
3748
  AC_MSG_RESULT([no])
3748
  AC_MSG_RESULT([no])
3749
fi
3749
fi
3750
       ;;
3750
       ;;
3751
   *)
3751
   *)
3752
  AC_MSG_RESULT([no])
3752
  AC_MSG_RESULT([no])
3753
    ;;
3753
    ;;
3754
  esac  
3754
  esac  
3755
fi
3755
fi
3756
])# AC_LIBTOOL_SYS_LIB_STRIP
3756
])# AC_LIBTOOL_SYS_LIB_STRIP
3757
 
3757
 
3758
 
3758
 
3759
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3759
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3760
# -----------------------------
3760
# -----------------------------
3761
# PORTME Fill in your ld.so characteristics
3761
# PORTME Fill in your ld.so characteristics
3762
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
3762
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
3763
[AC_MSG_CHECKING([dynamic linker characteristics])
3763
[AC_MSG_CHECKING([dynamic linker characteristics])
3764
library_names_spec=
3764
library_names_spec=
3765
libname_spec='lib$name'
3765
libname_spec='lib$name'
3766
soname_spec=
3766
soname_spec=
3767
shrext=".so"
3767
shrext=".so"
3768
postinstall_cmds=
3768
postinstall_cmds=
3769
postuninstall_cmds=
3769
postuninstall_cmds=
3770
finish_cmds=
3770
finish_cmds=
3771
finish_eval=
3771
finish_eval=
3772
shlibpath_var=
3772
shlibpath_var=
3773
shlibpath_overrides_runpath=unknown
3773
shlibpath_overrides_runpath=unknown
3774
version_type=none
3774
version_type=none
3775
dynamic_linker="$host_os ld.so"
3775
dynamic_linker="$host_os ld.so"
3776
sys_lib_dlsearch_path_spec="/lib /usr/lib"
3776
sys_lib_dlsearch_path_spec="/lib /usr/lib"
3777
if test "$GCC" = yes; then
3777
if test "$GCC" = yes; then
3778
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3778
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3779
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
3779
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
3780
    # if the path contains ";" then we assume it to be the separator
3780
    # if the path contains ";" then we assume it to be the separator
3781
    # otherwise default to the standard path separator (i.e. ":") - it is
3781
    # otherwise default to the standard path separator (i.e. ":") - it is
3782
    # assumed that no part of a normal pathname contains ";" but that should
3782
    # assumed that no part of a normal pathname contains ";" but that should
3783
    # okay in the real world where ";" in dirpaths is itself problematic.
3783
    # okay in the real world where ";" in dirpaths is itself problematic.
3784
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3784
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3785
  else
3785
  else
3786
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3786
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3787
  fi
3787
  fi
3788
else
3788
else
3789
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3789
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3790
fi
3790
fi
3791
need_lib_prefix=unknown
3791
need_lib_prefix=unknown
3792
hardcode_into_libs=no
3792
hardcode_into_libs=no
3793
 
3793
 
3794
# when you set need_version to no, make sure it does not cause -set_version
3794
# when you set need_version to no, make sure it does not cause -set_version
3795
# flags to be left without arguments
3795
# flags to be left without arguments
3796
need_version=unknown
3796
need_version=unknown
3797
 
3797
 
3798
case $host_os in
3798
case $host_os in
3799
aix3*)
3799
aix3*)
3800
  version_type=linux
3800
  version_type=linux
3801
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3801
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3802
  shlibpath_var=LIBPATH
3802
  shlibpath_var=LIBPATH
3803
 
3803
 
3804
  # AIX 3 has no versioning support, so we append a major version to the name.
3804
  # AIX 3 has no versioning support, so we append a major version to the name.
3805
  soname_spec='${libname}${release}${shared_ext}$major'
3805
  soname_spec='${libname}${release}${shared_ext}$major'
3806
  ;;
3806
  ;;
3807
 
3807
 
3808
aix4* | aix5*)
3808
aix4* | aix5*)
3809
  version_type=linux
3809
  version_type=linux
3810
  need_lib_prefix=no
3810
  need_lib_prefix=no
3811
  need_version=no
3811
  need_version=no
3812
  hardcode_into_libs=yes
3812
  hardcode_into_libs=yes
3813
  if test "$host_cpu" = ia64; then
3813
  if test "$host_cpu" = ia64; then
3814
    # AIX 5 supports IA64
3814
    # AIX 5 supports IA64
3815
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3815
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3816
    shlibpath_var=LD_LIBRARY_PATH
3816
    shlibpath_var=LD_LIBRARY_PATH
3817
  else
3817
  else
3818
    # With GCC up to 2.95.x, collect2 would create an import file
3818
    # With GCC up to 2.95.x, collect2 would create an import file
3819
    # for dependence libraries.  The import file would start with
3819
    # for dependence libraries.  The import file would start with
3820
    # the line `#! .'.  This would cause the generated library to
3820
    # the line `#! .'.  This would cause the generated library to
3821
    # depend on `.', always an invalid library.  This was fixed in
3821
    # depend on `.', always an invalid library.  This was fixed in
3822
    # development snapshots of GCC prior to 3.0.
3822
    # development snapshots of GCC prior to 3.0.
3823
    case $host_os in
3823
    case $host_os in
3824
      aix4 | aix4.[[01]] | aix4.[[01]].*)
3824
      aix4 | aix4.[[01]] | aix4.[[01]].*)
3825
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3825
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3826
	   echo ' yes '
3826
	   echo ' yes '
3827
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3827
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3828
	:
3828
	:
3829
      else
3829
      else
3830
	can_build_shared=no
3830
	can_build_shared=no
3831
      fi
3831
      fi
3832
      ;;
3832
      ;;
3833
    esac
3833
    esac
3834
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3834
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3835
    # soname into executable. Probably we can add versioning support to
3835
    # soname into executable. Probably we can add versioning support to
3836
    # collect2, so additional links can be useful in future.
3836
    # collect2, so additional links can be useful in future.
3837
    if test "$aix_use_runtimelinking" = yes; then
3837
    if test "$aix_use_runtimelinking" = yes; then
3838
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3838
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3839
      # instead of lib<name>.a to let people know that these are not
3839
      # instead of lib<name>.a to let people know that these are not
3840
      # typical AIX shared libraries.
3840
      # typical AIX shared libraries.
3841
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3841
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3842
    else
3842
    else
3843
      # We preserve .a as extension for shared libraries through AIX4.2
3843
      # We preserve .a as extension for shared libraries through AIX4.2
3844
      # and later when we are not doing run time linking.
3844
      # and later when we are not doing run time linking.
3845
      library_names_spec='${libname}${release}.a $libname.a'
3845
      library_names_spec='${libname}${release}.a $libname.a'
3846
      soname_spec='${libname}${release}${shared_ext}$major'
3846
      soname_spec='${libname}${release}${shared_ext}$major'
3847
    fi
3847
    fi
3848
    shlibpath_var=LIBPATH
3848
    shlibpath_var=LIBPATH
3849
  fi
3849
  fi
3850
  ;;
3850
  ;;
3851
 
3851
 
3852
amigaos*)
3852
amigaos*)
3853
  library_names_spec='$libname.ixlibrary $libname.a'
3853
  library_names_spec='$libname.ixlibrary $libname.a'
3854
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3854
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3855
  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'
3855
  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'
3856
  ;;
3856
  ;;
3857
 
3857
 
3858
beos*)
3858
beos*)
3859
  library_names_spec='${libname}${shared_ext}'
3859
  library_names_spec='${libname}${shared_ext}'
3860
  dynamic_linker="$host_os ld.so"
3860
  dynamic_linker="$host_os ld.so"
3861
  shlibpath_var=LIBRARY_PATH
3861
  shlibpath_var=LIBRARY_PATH
3862
  ;;
3862
  ;;
3863
 
3863
 
3864
bsdi4*)
3864
bsdi4*)
3865
  version_type=linux
3865
  version_type=linux
3866
  need_version=no
3866
  need_version=no
3867
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3867
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3868
  soname_spec='${libname}${release}${shared_ext}$major'
3868
  soname_spec='${libname}${release}${shared_ext}$major'
3869
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3869
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3870
  shlibpath_var=LD_LIBRARY_PATH
3870
  shlibpath_var=LD_LIBRARY_PATH
3871
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3871
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3872
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3872
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3873
  # the default ld.so.conf also contains /usr/contrib/lib and
3873
  # the default ld.so.conf also contains /usr/contrib/lib and
3874
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3874
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3875
  # libtool to hard-code these into programs
3875
  # libtool to hard-code these into programs
3876
  ;;
3876
  ;;
3877
 
3877
 
3878
cygwin* | mingw* | pw32*)
3878
cygwin* | mingw* | pw32*)
3879
  version_type=windows
3879
  version_type=windows
3880
  shrext=".dll"
3880
  shrext=".dll"
3881
  need_version=no
3881
  need_version=no
3882
  need_lib_prefix=no
3882
  need_lib_prefix=no
3883
 
3883
 
3884
  case $GCC,$host_os in
3884
  case $GCC,$host_os in
3885
  yes,cygwin* | yes,mingw* | yes,pw32*)
3885
  yes,cygwin* | yes,mingw* | yes,pw32*)
3886
    library_names_spec='$libname.dll.a'
3886
    library_names_spec='$libname.dll.a'
3887
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3887
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3888
    postinstall_cmds='base_file=`basename \${file}`~
3888
    postinstall_cmds='base_file=`basename \${file}`~
3889
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3889
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3890
      dldir=$destdir/`dirname \$dlpath`~
3890
      dldir=$destdir/`dirname \$dlpath`~
3891
      test -d \$dldir || mkdir -p \$dldir~
3891
      test -d \$dldir || mkdir -p \$dldir~
3892
      $install_prog $dir/$dlname \$dldir/$dlname'
3892
      $install_prog $dir/$dlname \$dldir/$dlname'
3893
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3893
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3894
      dlpath=$dir/\$dldll~
3894
      dlpath=$dir/\$dldll~
3895
       $rm \$dlpath'
3895
       $rm \$dlpath'
3896
    shlibpath_overrides_runpath=yes
3896
    shlibpath_overrides_runpath=yes
3897
 
3897
 
3898
    case $host_os in
3898
    case $host_os in
3899
    cygwin*)
3899
    cygwin*)
3900
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3900
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3901
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3901
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3902
      sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
3902
      sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
3903
      ;;
3903
      ;;
3904
    mingw*)
3904
    mingw*)
3905
      # MinGW DLLs use traditional 'lib' prefix
3905
      # MinGW DLLs use traditional 'lib' prefix
3906
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3906
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3907
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3907
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3908
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3908
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3909
        # It is most probably a Windows format PATH printed by
3909
        # It is most probably a Windows format PATH printed by
3910
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3910
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3911
        # path with ; separators, and with drive letters. We can handle the
3911
        # path with ; separators, and with drive letters. We can handle the
3912
        # drive letters (cygwin fileutils understands them), so leave them,
3912
        # drive letters (cygwin fileutils understands them), so leave them,
3913
        # especially as we might pass files found there to a mingw objdump,
3913
        # especially as we might pass files found there to a mingw objdump,
3914
        # which wouldn't understand a cygwinified path. Ahh.
3914
        # which wouldn't understand a cygwinified path. Ahh.
3915
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3915
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3916
      else
3916
      else
3917
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3917
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3918
      fi
3918
      fi
3919
      ;;
3919
      ;;
3920
    pw32*)
3920
    pw32*)
3921
      # pw32 DLLs use 'pw' prefix rather than 'lib'
3921
      # pw32 DLLs use 'pw' prefix rather than 'lib'
3922
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
3922
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
3923
      ;;
3923
      ;;
3924
    esac
3924
    esac
3925
    ;;
3925
    ;;
3926
 
3926
 
3927
  *)
3927
  *)
3928
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3928
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3929
    ;;
3929
    ;;
3930
  esac
3930
  esac
3931
  dynamic_linker='Win32 ld.exe'
3931
  dynamic_linker='Win32 ld.exe'
3932
  # FIXME: first we should search . and the directory the executable is in
3932
  # FIXME: first we should search . and the directory the executable is in
3933
  shlibpath_var=PATH
3933
  shlibpath_var=PATH
3934
  ;;
3934
  ;;
3935
 
3935
 
3936
darwin* | rhapsody*)
3936
darwin* | rhapsody*)
3937
  dynamic_linker="$host_os dyld"
3937
  dynamic_linker="$host_os dyld"
3938
  version_type=darwin
3938
  version_type=darwin
3939
  need_lib_prefix=no
3939
  need_lib_prefix=no
3940
  need_version=no
3940
  need_version=no
3941
  # FIXME: Relying on posixy $() will cause problems for
3941
  # FIXME: Relying on posixy $() will cause problems for
3942
  #        cross-compilation, but unfortunately the echo tests do not
3942
  #        cross-compilation, but unfortunately the echo tests do not
3943
  #        yet detect zsh echo's removal of \ escapes.
3943
  #        yet detect zsh echo's removal of \ escapes.
3944
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3944
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3945
  soname_spec='${libname}${release}${major}$shared_ext'
3945
  soname_spec='${libname}${release}${major}$shared_ext'
3946
  shlibpath_overrides_runpath=yes
3946
  shlibpath_overrides_runpath=yes
3947
  shlibpath_var=DYLD_LIBRARY_PATH
3947
  shlibpath_var=DYLD_LIBRARY_PATH
3948
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
3948
  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
3949
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
3949
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
3950
  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
3950
  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
3951
  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"`
3951
  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"`
3952
  fi
3952
  fi
3953
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3953
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3954
  ;;
3954
  ;;
3955
 
3955
 
3956
dgux*)
3956
dgux*)
3957
  version_type=linux
3957
  version_type=linux
3958
  need_lib_prefix=no
3958
  need_lib_prefix=no
3959
  need_version=no
3959
  need_version=no
3960
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3960
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3961
  soname_spec='${libname}${release}${shared_ext}$major'
3961
  soname_spec='${libname}${release}${shared_ext}$major'
3962
  shlibpath_var=LD_LIBRARY_PATH
3962
  shlibpath_var=LD_LIBRARY_PATH
3963
  ;;
3963
  ;;
3964
 
3964
 
3965
freebsd1*)
3965
freebsd1*)
3966
  dynamic_linker=no
3966
  dynamic_linker=no
3967
  ;;
3967
  ;;
3968
 
3968
 
3969
freebsd*)
3969
freebsd*)
3970
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3970
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3971
  version_type=freebsd-$objformat
3971
  version_type=freebsd-$objformat
3972
  case $version_type in
3972
  case $version_type in
3973
    freebsd-elf*)
3973
    freebsd-elf*)
3974
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3974
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3975
      need_version=no
3975
      need_version=no
3976
      need_lib_prefix=no
3976
      need_lib_prefix=no
3977
      ;;
3977
      ;;
3978
    freebsd-*)
3978
    freebsd-*)
3979
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3979
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3980
      need_version=yes
3980
      need_version=yes
3981
      ;;
3981
      ;;
3982
  esac
3982
  esac
3983
  shlibpath_var=LD_LIBRARY_PATH
3983
  shlibpath_var=LD_LIBRARY_PATH
3984
  case $host_os in
3984
  case $host_os in
3985
  freebsd2*)
3985
  freebsd2*)
3986
    shlibpath_overrides_runpath=yes
3986
    shlibpath_overrides_runpath=yes
3987
    ;;
3987
    ;;
3988
  freebsd3.[01]* | freebsdelf3.[01]*)
3988
  freebsd3.[01]* | freebsdelf3.[01]*)
3989
    shlibpath_overrides_runpath=yes
3989
    shlibpath_overrides_runpath=yes
3990
    hardcode_into_libs=yes
3990
    hardcode_into_libs=yes
3991
    ;;
3991
    ;;
3992
  *) # from 3.2 on
3992
  *) # from 3.2 on
3993
    shlibpath_overrides_runpath=no
3993
    shlibpath_overrides_runpath=no
3994
    hardcode_into_libs=yes
3994
    hardcode_into_libs=yes
3995
    ;;
3995
    ;;
3996
  esac
3996
  esac
3997
  ;;
3997
  ;;
3998
 
3998
 
3999
gnu*)
3999
gnu*)
4000
  version_type=linux
4000
  version_type=linux
4001
  need_lib_prefix=no
4001
  need_lib_prefix=no
4002
  need_version=no
4002
  need_version=no
4003
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4003
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4004
  soname_spec='${libname}${release}${shared_ext}$major'
4004
  soname_spec='${libname}${release}${shared_ext}$major'
4005
  shlibpath_var=LD_LIBRARY_PATH
4005
  shlibpath_var=LD_LIBRARY_PATH
4006
  hardcode_into_libs=yes
4006
  hardcode_into_libs=yes
4007
  ;;
4007
  ;;
4008
 
4008
 
4009
hpux9* | hpux10* | hpux11*)
4009
hpux9* | hpux10* | hpux11*)
4010
  # Give a soname corresponding to the major version so that dld.sl refuses to
4010
  # Give a soname corresponding to the major version so that dld.sl refuses to
4011
  # link against other versions.
4011
  # link against other versions.
4012
  version_type=sunos
4012
  version_type=sunos
4013
  need_lib_prefix=no
4013
  need_lib_prefix=no
4014
  need_version=no
4014
  need_version=no
4015
  case "$host_cpu" in
4015
  case "$host_cpu" in
4016
  ia64*)
4016
  ia64*)
4017
    shrext='.so'
4017
    shrext='.so'
4018
    hardcode_into_libs=yes
4018
    hardcode_into_libs=yes
4019
    dynamic_linker="$host_os dld.so"
4019
    dynamic_linker="$host_os dld.so"
4020
    shlibpath_var=LD_LIBRARY_PATH
4020
    shlibpath_var=LD_LIBRARY_PATH
4021
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4021
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4022
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4022
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4023
    soname_spec='${libname}${release}${shared_ext}$major'
4023
    soname_spec='${libname}${release}${shared_ext}$major'
4024
    if test "X$HPUX_IA64_MODE" = X32; then
4024
    if test "X$HPUX_IA64_MODE" = X32; then
4025
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4025
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4026
    else
4026
    else
4027
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4027
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4028
    fi
4028
    fi
4029
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4029
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4030
    ;;
4030
    ;;
4031
   hppa*64*)
4031
   hppa*64*)
4032
     shrext='.sl'
4032
     shrext='.sl'
4033
     hardcode_into_libs=yes
4033
     hardcode_into_libs=yes
4034
     dynamic_linker="$host_os dld.sl"
4034
     dynamic_linker="$host_os dld.sl"
4035
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4035
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4036
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4036
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4037
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4037
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4038
     soname_spec='${libname}${release}${shared_ext}$major'
4038
     soname_spec='${libname}${release}${shared_ext}$major'
4039
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4039
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4040
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4040
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4041
     ;;
4041
     ;;
4042
   *)
4042
   *)
4043
    shrext='.sl'
4043
    shrext='.sl'
4044
    dynamic_linker="$host_os dld.sl"
4044
    dynamic_linker="$host_os dld.sl"
4045
    shlibpath_var=SHLIB_PATH
4045
    shlibpath_var=SHLIB_PATH
4046
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4046
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4047
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4047
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4048
    soname_spec='${libname}${release}${shared_ext}$major'
4048
    soname_spec='${libname}${release}${shared_ext}$major'
4049
    ;;
4049
    ;;
4050
  esac
4050
  esac
4051
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
4051
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
4052
  postinstall_cmds='chmod 555 $lib'
4052
  postinstall_cmds='chmod 555 $lib'
4053
  ;;
4053
  ;;
4054
 
4054
 
4055
irix5* | irix6* | nonstopux*)
4055
irix5* | irix6* | nonstopux*)
4056
  case $host_os in
4056
  case $host_os in
4057
    nonstopux*) version_type=nonstopux ;;
4057
    nonstopux*) version_type=nonstopux ;;
4058
    *)
4058
    *)
4059
	if test "$lt_cv_prog_gnu_ld" = yes; then
4059
	if test "$lt_cv_prog_gnu_ld" = yes; then
4060
		version_type=linux
4060
		version_type=linux
4061
	else
4061
	else
4062
		version_type=irix
4062
		version_type=irix
4063
	fi ;;
4063
	fi ;;
4064
  esac
4064
  esac
4065
  need_lib_prefix=no
4065
  need_lib_prefix=no
4066
  need_version=no
4066
  need_version=no
4067
  soname_spec='${libname}${release}${shared_ext}$major'
4067
  soname_spec='${libname}${release}${shared_ext}$major'
4068
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4068
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4069
  case $host_os in
4069
  case $host_os in
4070
  irix5* | nonstopux*)
4070
  irix5* | nonstopux*)
4071
    libsuff= shlibsuff=
4071
    libsuff= shlibsuff=
4072
    ;;
4072
    ;;
4073
  *)
4073
  *)
4074
    case $LD in # libtool.m4 will add one of these switches to LD
4074
    case $LD in # libtool.m4 will add one of these switches to LD
4075
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4075
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4076
      libsuff= shlibsuff= libmagic=32-bit;;
4076
      libsuff= shlibsuff= libmagic=32-bit;;
4077
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4077
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4078
      libsuff=32 shlibsuff=N32 libmagic=N32;;
4078
      libsuff=32 shlibsuff=N32 libmagic=N32;;
4079
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4079
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4080
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4080
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4081
    *) libsuff= shlibsuff= libmagic=never-match;;
4081
    *) libsuff= shlibsuff= libmagic=never-match;;
4082
    esac
4082
    esac
4083
    ;;
4083
    ;;
4084
  esac
4084
  esac
4085
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4085
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4086
  shlibpath_overrides_runpath=no
4086
  shlibpath_overrides_runpath=no
4087
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4087
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4088
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4088
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4089
  hardcode_into_libs=yes
4089
  hardcode_into_libs=yes
4090
  ;;
4090
  ;;
4091
 
4091
 
4092
# No shared lib support for Linux oldld, aout, or coff.
4092
# No shared lib support for Linux oldld, aout, or coff.
4093
linux*oldld* | linux*aout* | linux*coff*)
4093
linux*oldld* | linux*aout* | linux*coff*)
4094
  dynamic_linker=no
4094
  dynamic_linker=no
4095
  ;;
4095
  ;;
4096
 
4096
 
4097
# This must be Linux ELF.
4097
# This must be Linux ELF.
4098
linux*)
4098
linux*)
4099
  version_type=linux
4099
  version_type=linux
4100
  need_lib_prefix=no
4100
  need_lib_prefix=no
4101
  need_version=no
4101
  need_version=no
4102
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4102
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4103
  soname_spec='${libname}${release}${shared_ext}$major'
4103
  soname_spec='${libname}${release}${shared_ext}$major'
4104
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4104
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4105
  shlibpath_var=LD_LIBRARY_PATH
4105
  shlibpath_var=LD_LIBRARY_PATH
4106
  shlibpath_overrides_runpath=no
4106
  shlibpath_overrides_runpath=no
4107
  # This implies no fast_install, which is unacceptable.
4107
  # This implies no fast_install, which is unacceptable.
4108
  # Some rework will be needed to allow for fast_install
4108
  # Some rework will be needed to allow for fast_install
4109
  # before this can be enabled.
4109
  # before this can be enabled.
4110
  hardcode_into_libs=yes
4110
  hardcode_into_libs=yes
4111
 
4111
 
4112
  # We used to test for /lib/ld.so.1 and disable shared libraries on
4112
  # We used to test for /lib/ld.so.1 and disable shared libraries on
4113
  # powerpc, because MkLinux only supported shared libraries with the
4113
  # powerpc, because MkLinux only supported shared libraries with the
4114
  # GNU dynamic linker.  Since this was broken with cross compilers,
4114
  # GNU dynamic linker.  Since this was broken with cross compilers,
4115
  # most powerpc-linux boxes support dynamic linking these days and
4115
  # most powerpc-linux boxes support dynamic linking these days and
4116
  # people can always --disable-shared, the test was removed, and we
4116
  # people can always --disable-shared, the test was removed, and we
4117
  # assume the GNU/Linux dynamic linker is in use.
4117
  # assume the GNU/Linux dynamic linker is in use.
4118
  dynamic_linker='GNU/Linux ld.so'
4118
  dynamic_linker='GNU/Linux ld.so'
4119
  ;;
4119
  ;;
4120
 
4120
 
4121
netbsd*)
4121
netbsd*)
4122
  version_type=sunos
4122
  version_type=sunos
4123
  need_lib_prefix=no
4123
  need_lib_prefix=no
4124
  need_version=no
4124
  need_version=no
4125
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4125
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4126
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4126
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4127
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4127
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4128
    dynamic_linker='NetBSD (a.out) ld.so'
4128
    dynamic_linker='NetBSD (a.out) ld.so'
4129
  else
4129
  else
4130
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
4130
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
4131
    soname_spec='${libname}${release}${shared_ext}$major'
4131
    soname_spec='${libname}${release}${shared_ext}$major'
4132
    dynamic_linker='NetBSD ld.elf_so'
4132
    dynamic_linker='NetBSD ld.elf_so'
4133
  fi
4133
  fi
4134
  shlibpath_var=LD_LIBRARY_PATH
4134
  shlibpath_var=LD_LIBRARY_PATH
4135
  shlibpath_overrides_runpath=yes
4135
  shlibpath_overrides_runpath=yes
4136
  hardcode_into_libs=yes
4136
  hardcode_into_libs=yes
4137
  ;;
4137
  ;;
4138
 
4138
 
4139
newsos6)
4139
newsos6)
4140
  version_type=linux
4140
  version_type=linux
4141
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4141
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4142
  shlibpath_var=LD_LIBRARY_PATH
4142
  shlibpath_var=LD_LIBRARY_PATH
4143
  shlibpath_overrides_runpath=yes
4143
  shlibpath_overrides_runpath=yes
4144
  ;;
4144
  ;;
4145
 
4145
 
4146
nto-qnx)
4146
nto-qnx)
4147
  version_type=linux
4147
  version_type=linux
4148
  need_lib_prefix=no
4148
  need_lib_prefix=no
4149
  need_version=no
4149
  need_version=no
4150
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4150
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4151
  soname_spec='${libname}${release}${shared_ext}$major'
4151
  soname_spec='${libname}${release}${shared_ext}$major'
4152
  shlibpath_var=LD_LIBRARY_PATH
4152
  shlibpath_var=LD_LIBRARY_PATH
4153
  shlibpath_overrides_runpath=yes
4153
  shlibpath_overrides_runpath=yes
4154
  ;;
4154
  ;;
4155
 
4155
 
4156
openbsd*)
4156
openbsd*)
4157
  version_type=sunos
4157
  version_type=sunos
4158
  need_lib_prefix=no
4158
  need_lib_prefix=no
4159
  need_version=no
4159
  need_version=no
4160
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4160
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4161
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4161
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4162
  shlibpath_var=LD_LIBRARY_PATH
4162
  shlibpath_var=LD_LIBRARY_PATH
4163
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4163
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4164
    case $host_os in
4164
    case $host_os in
4165
      openbsd2.[[89]] | openbsd2.[[89]].*)
4165
      openbsd2.[[89]] | openbsd2.[[89]].*)
4166
	shlibpath_overrides_runpath=no
4166
	shlibpath_overrides_runpath=no
4167
	;;
4167
	;;
4168
      *)
4168
      *)
4169
	shlibpath_overrides_runpath=yes
4169
	shlibpath_overrides_runpath=yes
4170
	;;
4170
	;;
4171
      esac
4171
      esac
4172
  else
4172
  else
4173
    shlibpath_overrides_runpath=yes
4173
    shlibpath_overrides_runpath=yes
4174
  fi
4174
  fi
4175
  ;;
4175
  ;;
4176
 
4176
 
4177
os2*)
4177
os2*)
4178
  libname_spec='$name'
4178
  libname_spec='$name'
4179
  shrext=".dll"
4179
  shrext=".dll"
4180
  need_lib_prefix=no
4180
  need_lib_prefix=no
4181
  library_names_spec='$libname${shared_ext} $libname.a'
4181
  library_names_spec='$libname${shared_ext} $libname.a'
4182
  dynamic_linker='OS/2 ld.exe'
4182
  dynamic_linker='OS/2 ld.exe'
4183
  shlibpath_var=LIBPATH
4183
  shlibpath_var=LIBPATH
4184
  ;;
4184
  ;;
4185
 
4185
 
4186
osf3* | osf4* | osf5*)
4186
osf3* | osf4* | osf5*)
4187
  version_type=osf
4187
  version_type=osf
4188
  need_lib_prefix=no
4188
  need_lib_prefix=no
4189
  need_version=no
4189
  need_version=no
4190
  soname_spec='${libname}${release}${shared_ext}$major'
4190
  soname_spec='${libname}${release}${shared_ext}$major'
4191
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4191
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4192
  shlibpath_var=LD_LIBRARY_PATH
4192
  shlibpath_var=LD_LIBRARY_PATH
4193
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4193
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4194
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4194
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4195
  ;;
4195
  ;;
4196
 
4196
 
4197
sco3.2v5*)
4197
sco3.2v5*)
4198
  version_type=osf
4198
  version_type=osf
4199
  soname_spec='${libname}${release}${shared_ext}$major'
4199
  soname_spec='${libname}${release}${shared_ext}$major'
4200
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4200
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4201
  shlibpath_var=LD_LIBRARY_PATH
4201
  shlibpath_var=LD_LIBRARY_PATH
4202
  ;;
4202
  ;;
4203
 
4203
 
4204
solaris*)
4204
solaris*)
4205
  version_type=linux
4205
  version_type=linux
4206
  need_lib_prefix=no
4206
  need_lib_prefix=no
4207
  need_version=no
4207
  need_version=no
4208
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4208
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4209
  soname_spec='${libname}${release}${shared_ext}$major'
4209
  soname_spec='${libname}${release}${shared_ext}$major'
4210
  shlibpath_var=LD_LIBRARY_PATH
4210
  shlibpath_var=LD_LIBRARY_PATH
4211
  shlibpath_overrides_runpath=yes
4211
  shlibpath_overrides_runpath=yes
4212
  hardcode_into_libs=yes
4212
  hardcode_into_libs=yes
4213
  # ldd complains unless libraries are executable
4213
  # ldd complains unless libraries are executable
4214
  postinstall_cmds='chmod +x $lib'
4214
  postinstall_cmds='chmod +x $lib'
4215
  ;;
4215
  ;;
4216
 
4216
 
4217
sunos4*)
4217
sunos4*)
4218
  version_type=sunos
4218
  version_type=sunos
4219
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4219
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4220
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4220
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4221
  shlibpath_var=LD_LIBRARY_PATH
4221
  shlibpath_var=LD_LIBRARY_PATH
4222
  shlibpath_overrides_runpath=yes
4222
  shlibpath_overrides_runpath=yes
4223
  if test "$with_gnu_ld" = yes; then
4223
  if test "$with_gnu_ld" = yes; then
4224
    need_lib_prefix=no
4224
    need_lib_prefix=no
4225
  fi
4225
  fi
4226
  need_version=yes
4226
  need_version=yes
4227
  ;;
4227
  ;;
4228
 
4228
 
4229
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4229
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4230
  version_type=linux
4230
  version_type=linux
4231
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4231
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4232
  soname_spec='${libname}${release}${shared_ext}$major'
4232
  soname_spec='${libname}${release}${shared_ext}$major'
4233
  shlibpath_var=LD_LIBRARY_PATH
4233
  shlibpath_var=LD_LIBRARY_PATH
4234
  case $host_vendor in
4234
  case $host_vendor in
4235
    sni)
4235
    sni)
4236
      shlibpath_overrides_runpath=no
4236
      shlibpath_overrides_runpath=no
4237
      need_lib_prefix=no
4237
      need_lib_prefix=no
4238
      export_dynamic_flag_spec='${wl}-Blargedynsym'
4238
      export_dynamic_flag_spec='${wl}-Blargedynsym'
4239
      runpath_var=LD_RUN_PATH
4239
      runpath_var=LD_RUN_PATH
4240
      ;;
4240
      ;;
4241
    siemens)
4241
    siemens)
4242
      need_lib_prefix=no
4242
      need_lib_prefix=no
4243
      ;;
4243
      ;;
4244
    motorola)
4244
    motorola)
4245
      need_lib_prefix=no
4245
      need_lib_prefix=no
4246
      need_version=no
4246
      need_version=no
4247
      shlibpath_overrides_runpath=no
4247
      shlibpath_overrides_runpath=no
4248
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4248
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4249
      ;;
4249
      ;;
4250
  esac
4250
  esac
4251
  ;;
4251
  ;;
4252
 
4252
 
4253
sysv4*MP*)
4253
sysv4*MP*)
4254
  if test -d /usr/nec ;then
4254
  if test -d /usr/nec ;then
4255
    version_type=linux
4255
    version_type=linux
4256
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4256
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4257
    soname_spec='$libname${shared_ext}.$major'
4257
    soname_spec='$libname${shared_ext}.$major'
4258
    shlibpath_var=LD_LIBRARY_PATH
4258
    shlibpath_var=LD_LIBRARY_PATH
4259
  fi
4259
  fi
4260
  ;;
4260
  ;;
4261
 
4261
 
4262
uts4*)
4262
uts4*)
4263
  version_type=linux
4263
  version_type=linux
4264
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4264
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4265
  soname_spec='${libname}${release}${shared_ext}$major'
4265
  soname_spec='${libname}${release}${shared_ext}$major'
4266
  shlibpath_var=LD_LIBRARY_PATH
4266
  shlibpath_var=LD_LIBRARY_PATH
4267
  ;;
4267
  ;;
4268
 
4268
 
4269
*)
4269
*)
4270
  dynamic_linker=no
4270
  dynamic_linker=no
4271
  ;;
4271
  ;;
4272
esac
4272
esac
4273
AC_MSG_RESULT([$dynamic_linker])
4273
AC_MSG_RESULT([$dynamic_linker])
4274
test "$dynamic_linker" = no && can_build_shared=no
4274
test "$dynamic_linker" = no && can_build_shared=no
4275
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
4275
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
4276
 
4276
 
4277
 
4277
 
4278
# _LT_AC_TAGCONFIG
4278
# _LT_AC_TAGCONFIG
4279
# ----------------
4279
# ----------------
4280
AC_DEFUN([_LT_AC_TAGCONFIG],
4280
AC_DEFUN([_LT_AC_TAGCONFIG],
4281
[AC_ARG_WITH([tags],
4281
[AC_ARG_WITH([tags],
4282
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
4282
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
4283
        [include additional configurations @<:@automatic@:>@])],
4283
        [include additional configurations @<:@automatic@:>@])],
4284
    [tagnames="$withval"])
4284
    [tagnames="$withval"])
4285
 
4285
 
4286
if test -f "$ltmain" && test -n "$tagnames"; then
4286
if test -f "$ltmain" && test -n "$tagnames"; then
4287
  if test ! -f "${ofile}"; then
4287
  if test ! -f "${ofile}"; then
4288
    AC_MSG_WARN([output file `$ofile' does not exist])
4288
    AC_MSG_WARN([output file `$ofile' does not exist])
4289
  fi
4289
  fi
4290
 
4290
 
4291
  if test -z "$LTCC"; then
4291
  if test -z "$LTCC"; then
4292
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
4292
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
4293
    if test -z "$LTCC"; then
4293
    if test -z "$LTCC"; then
4294
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
4294
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
4295
    else
4295
    else
4296
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
4296
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
4297
    fi
4297
    fi
4298
  fi
4298
  fi
4299
 
4299
 
4300
  # Extract list of available tagged configurations in $ofile.
4300
  # Extract list of available tagged configurations in $ofile.
4301
  # Note that this assumes the entire list is on one line.
4301
  # Note that this assumes the entire list is on one line.
4302
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
4302
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
4303
 
4303
 
4304
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4304
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4305
  for tagname in $tagnames; do
4305
  for tagname in $tagnames; do
4306
    IFS="$lt_save_ifs"
4306
    IFS="$lt_save_ifs"
4307
    # Check whether tagname contains only valid characters
4307
    # Check whether tagname contains only valid characters
4308
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
4308
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
4309
    "") ;;
4309
    "") ;;
4310
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
4310
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
4311
	;;
4311
	;;
4312
    esac
4312
    esac
4313
 
4313
 
4314
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
4314
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
4315
    then
4315
    then
4316
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
4316
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
4317
    fi
4317
    fi
4318
 
4318
 
4319
    # Update the list of available tags.
4319
    # Update the list of available tags.
4320
    if test -n "$tagname"; then
4320
    if test -n "$tagname"; then
4321
      echo appending configuration tag \"$tagname\" to $ofile
4321
      echo appending configuration tag \"$tagname\" to $ofile
4322
 
4322
 
4323
      case $tagname in
4323
      case $tagname in
4324
      CXX)
4324
      CXX)
4325
	if test -n "$CXX" && test "X$CXX" != "Xno"; then
4325
	if test -n "$CXX" && test "X$CXX" != "Xno"; then
4326
	  AC_LIBTOOL_LANG_CXX_CONFIG
4326
	  AC_LIBTOOL_LANG_CXX_CONFIG
4327
	else
4327
	else
4328
	  tagname=""
4328
	  tagname=""
4329
	fi
4329
	fi
4330
	;;
4330
	;;
4331
 
4331
 
4332
      F77)
4332
      F77)
4333
	if test -n "$F77" && test "X$F77" != "Xno"; then
4333
	if test -n "$F77" && test "X$F77" != "Xno"; then
4334
	  AC_LIBTOOL_LANG_F77_CONFIG
4334
	  AC_LIBTOOL_LANG_F77_CONFIG
4335
	else
4335
	else
4336
	  tagname=""
4336
	  tagname=""
4337
	fi
4337
	fi
4338
	;;
4338
	;;
4339
 
4339
 
4340
      GCJ)
4340
      GCJ)
4341
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
4341
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
4342
	  AC_LIBTOOL_LANG_GCJ_CONFIG
4342
	  AC_LIBTOOL_LANG_GCJ_CONFIG
4343
	else
4343
	else
4344
	  tagname=""
4344
	  tagname=""
4345
	fi
4345
	fi
4346
	;;
4346
	;;
4347
 
4347
 
4348
      RC)
4348
      RC)
4349
	AC_LIBTOOL_LANG_RC_CONFIG
4349
	AC_LIBTOOL_LANG_RC_CONFIG
4350
	;;
4350
	;;
4351
 
4351
 
4352
      *)
4352
      *)
4353
	AC_MSG_ERROR([Unsupported tag name: $tagname])
4353
	AC_MSG_ERROR([Unsupported tag name: $tagname])
4354
	;;
4354
	;;
4355
      esac
4355
      esac
4356
 
4356
 
4357
      # Append the new tag name to the list of available tags.
4357
      # Append the new tag name to the list of available tags.
4358
      if test -n "$tagname" ; then
4358
      if test -n "$tagname" ; then
4359
      available_tags="$available_tags $tagname"
4359
      available_tags="$available_tags $tagname"
4360
    fi
4360
    fi
4361
    fi
4361
    fi
4362
  done
4362
  done
4363
  IFS="$lt_save_ifs"
4363
  IFS="$lt_save_ifs"
4364
 
4364
 
4365
  # Now substitute the updated list of available tags.
4365
  # Now substitute the updated list of available tags.
4366
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
4366
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
4367
    mv "${ofile}T" "$ofile"
4367
    mv "${ofile}T" "$ofile"
4368
    chmod +x "$ofile"
4368
    chmod +x "$ofile"
4369
  else
4369
  else
4370
    rm -f "${ofile}T"
4370
    rm -f "${ofile}T"
4371
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
4371
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
4372
  fi
4372
  fi
4373
fi
4373
fi
4374
])# _LT_AC_TAGCONFIG
4374
])# _LT_AC_TAGCONFIG
4375
 
4375
 
4376
 
4376
 
4377
# AC_LIBTOOL_DLOPEN
4377
# AC_LIBTOOL_DLOPEN
4378
# -----------------
4378
# -----------------
4379
# enable checks for dlopen support
4379
# enable checks for dlopen support
4380
AC_DEFUN([AC_LIBTOOL_DLOPEN],
4380
AC_DEFUN([AC_LIBTOOL_DLOPEN],
4381
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
4381
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
4382
])# AC_LIBTOOL_DLOPEN
4382
])# AC_LIBTOOL_DLOPEN
4383
 
4383
 
4384
 
4384
 
4385
# AC_LIBTOOL_WIN32_DLL
4385
# AC_LIBTOOL_WIN32_DLL
4386
# --------------------
4386
# --------------------
4387
# declare package support for building win32 dll's
4387
# declare package support for building win32 dll's
4388
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
4388
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
4389
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
4389
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
4390
])# AC_LIBTOOL_WIN32_DLL
4390
])# AC_LIBTOOL_WIN32_DLL
4391
 
4391
 
4392
 
4392
 
4393
# AC_ENABLE_SHARED([DEFAULT])
4393
# AC_ENABLE_SHARED([DEFAULT])
4394
# ---------------------------
4394
# ---------------------------
4395
# implement the --enable-shared flag
4395
# implement the --enable-shared flag
4396
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4396
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4397
AC_DEFUN([AC_ENABLE_SHARED],
4397
AC_DEFUN([AC_ENABLE_SHARED],
4398
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4398
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4399
AC_ARG_ENABLE([shared],
4399
AC_ARG_ENABLE([shared],
4400
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
4400
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
4401
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
4401
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
4402
    [p=${PACKAGE-default}
4402
    [p=${PACKAGE-default}
4403
    case $enableval in
4403
    case $enableval in
4404
    yes) enable_shared=yes ;;
4404
    yes) enable_shared=yes ;;
4405
    no) enable_shared=no ;;
4405
    no) enable_shared=no ;;
4406
    *)
4406
    *)
4407
      enable_shared=no
4407
      enable_shared=no
4408
      # Look at the argument we got.  We use all the common list separators.
4408
      # Look at the argument we got.  We use all the common list separators.
4409
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4409
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4410
      for pkg in $enableval; do
4410
      for pkg in $enableval; do
4411
	IFS="$lt_save_ifs"
4411
	IFS="$lt_save_ifs"
4412
	if test "X$pkg" = "X$p"; then
4412
	if test "X$pkg" = "X$p"; then
4413
	  enable_shared=yes
4413
	  enable_shared=yes
4414
	fi
4414
	fi
4415
      done
4415
      done
4416
      IFS="$lt_save_ifs"
4416
      IFS="$lt_save_ifs"
4417
      ;;
4417
      ;;
4418
    esac],
4418
    esac],
4419
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
4419
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
4420
])# AC_ENABLE_SHARED
4420
])# AC_ENABLE_SHARED
4421
 
4421
 
4422
 
4422
 
4423
# AC_DISABLE_SHARED
4423
# AC_DISABLE_SHARED
4424
# -----------------
4424
# -----------------
4425
#- set the default shared flag to --disable-shared
4425
#- set the default shared flag to --disable-shared
4426
AC_DEFUN([AC_DISABLE_SHARED],
4426
AC_DEFUN([AC_DISABLE_SHARED],
4427
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4427
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4428
AC_ENABLE_SHARED(no)
4428
AC_ENABLE_SHARED(no)
4429
])# AC_DISABLE_SHARED
4429
])# AC_DISABLE_SHARED
4430
 
4430
 
4431
 
4431
 
4432
# AC_ENABLE_STATIC([DEFAULT])
4432
# AC_ENABLE_STATIC([DEFAULT])
4433
# ---------------------------
4433
# ---------------------------
4434
# implement the --enable-static flag
4434
# implement the --enable-static flag
4435
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4435
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4436
AC_DEFUN([AC_ENABLE_STATIC],
4436
AC_DEFUN([AC_ENABLE_STATIC],
4437
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4437
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4438
AC_ARG_ENABLE([static],
4438
AC_ARG_ENABLE([static],
4439
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
4439
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
4440
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
4440
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
4441
    [p=${PACKAGE-default}
4441
    [p=${PACKAGE-default}
4442
    case $enableval in
4442
    case $enableval in
4443
    yes) enable_static=yes ;;
4443
    yes) enable_static=yes ;;
4444
    no) enable_static=no ;;
4444
    no) enable_static=no ;;
4445
    *)
4445
    *)
4446
     enable_static=no
4446
     enable_static=no
4447
      # Look at the argument we got.  We use all the common list separators.
4447
      # Look at the argument we got.  We use all the common list separators.
4448
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4448
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4449
      for pkg in $enableval; do
4449
      for pkg in $enableval; do
4450
	IFS="$lt_save_ifs"
4450
	IFS="$lt_save_ifs"
4451
	if test "X$pkg" = "X$p"; then
4451
	if test "X$pkg" = "X$p"; then
4452
	  enable_static=yes
4452
	  enable_static=yes
4453
	fi
4453
	fi
4454
      done
4454
      done
4455
      IFS="$lt_save_ifs"
4455
      IFS="$lt_save_ifs"
4456
      ;;
4456
      ;;
4457
    esac],
4457
    esac],
4458
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
4458
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
4459
])# AC_ENABLE_STATIC
4459
])# AC_ENABLE_STATIC
4460
 
4460
 
4461
 
4461
 
4462
# AC_DISABLE_STATIC
4462
# AC_DISABLE_STATIC
4463
# -----------------
4463
# -----------------
4464
# set the default static flag to --disable-static
4464
# set the default static flag to --disable-static
4465
AC_DEFUN([AC_DISABLE_STATIC],
4465
AC_DEFUN([AC_DISABLE_STATIC],
4466
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4466
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4467
AC_ENABLE_STATIC(no)
4467
AC_ENABLE_STATIC(no)
4468
])# AC_DISABLE_STATIC
4468
])# AC_DISABLE_STATIC
4469
 
4469
 
4470
 
4470
 
4471
# AC_ENABLE_FAST_INSTALL([DEFAULT])
4471
# AC_ENABLE_FAST_INSTALL([DEFAULT])
4472
# ---------------------------------
4472
# ---------------------------------
4473
# implement the --enable-fast-install flag
4473
# implement the --enable-fast-install flag
4474
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4474
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
4475
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4475
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4476
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4476
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4477
AC_ARG_ENABLE([fast-install],
4477
AC_ARG_ENABLE([fast-install],
4478
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
4478
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
4479
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
4479
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
4480
    [p=${PACKAGE-default}
4480
    [p=${PACKAGE-default}
4481
    case $enableval in
4481
    case $enableval in
4482
    yes) enable_fast_install=yes ;;
4482
    yes) enable_fast_install=yes ;;
4483
    no) enable_fast_install=no ;;
4483
    no) enable_fast_install=no ;;
4484
    *)
4484
    *)
4485
      enable_fast_install=no
4485
      enable_fast_install=no
4486
      # Look at the argument we got.  We use all the common list separators.
4486
      # Look at the argument we got.  We use all the common list separators.
4487
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4487
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4488
      for pkg in $enableval; do
4488
      for pkg in $enableval; do
4489
	IFS="$lt_save_ifs"
4489
	IFS="$lt_save_ifs"
4490
	if test "X$pkg" = "X$p"; then
4490
	if test "X$pkg" = "X$p"; then
4491
	  enable_fast_install=yes
4491
	  enable_fast_install=yes
4492
	fi
4492
	fi
4493
      done
4493
      done
4494
      IFS="$lt_save_ifs"
4494
      IFS="$lt_save_ifs"
4495
      ;;
4495
      ;;
4496
    esac],
4496
    esac],
4497
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
4497
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
4498
])# AC_ENABLE_FAST_INSTALL
4498
])# AC_ENABLE_FAST_INSTALL
4499
 
4499
 
4500
 
4500
 
4501
# AC_DISABLE_FAST_INSTALL
4501
# AC_DISABLE_FAST_INSTALL
4502
# -----------------------
4502
# -----------------------
4503
# set the default to --disable-fast-install
4503
# set the default to --disable-fast-install
4504
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4504
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4505
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4505
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4506
AC_ENABLE_FAST_INSTALL(no)
4506
AC_ENABLE_FAST_INSTALL(no)
4507
])# AC_DISABLE_FAST_INSTALL
4507
])# AC_DISABLE_FAST_INSTALL
4508
 
4508
 
4509
 
4509
 
4510
# AC_LIBTOOL_PICMODE([MODE])
4510
# AC_LIBTOOL_PICMODE([MODE])
4511
# --------------------------
4511
# --------------------------
4512
# implement the --with-pic flag
4512
# implement the --with-pic flag
4513
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
4513
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
4514
AC_DEFUN([AC_LIBTOOL_PICMODE],
4514
AC_DEFUN([AC_LIBTOOL_PICMODE],
4515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4515
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4516
pic_mode=ifelse($#,1,$1,default)
4516
pic_mode=ifelse($#,1,$1,default)
4517
])# AC_LIBTOOL_PICMODE
4517
])# AC_LIBTOOL_PICMODE
4518
 
4518
 
4519
 
4519
 
4520
# AC_PROG_EGREP
4520
# AC_PROG_EGREP
4521
# -------------
4521
# -------------
4522
# This is predefined starting with Autoconf 2.54, so this conditional
4522
# This is predefined starting with Autoconf 2.54, so this conditional
4523
# definition can be removed once we require Autoconf 2.54 or later.
4523
# definition can be removed once we require Autoconf 2.54 or later.
4524
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
4524
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
4525
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
4525
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
4526
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4526
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4527
    then ac_cv_prog_egrep='grep -E'
4527
    then ac_cv_prog_egrep='grep -E'
4528
    else ac_cv_prog_egrep='egrep'
4528
    else ac_cv_prog_egrep='egrep'
4529
    fi])
4529
    fi])
4530
 EGREP=$ac_cv_prog_egrep
4530
 EGREP=$ac_cv_prog_egrep
4531
 AC_SUBST([EGREP])
4531
 AC_SUBST([EGREP])
4532
])])
4532
])])
4533
 
4533
 
4534
 
4534
 
4535
# AC_PATH_TOOL_PREFIX
4535
# AC_PATH_TOOL_PREFIX
4536
# -------------------
4536
# -------------------
4537
# find a file program which can recognise shared library
4537
# find a file program which can recognise shared library
4538
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4538
AC_DEFUN([AC_PATH_TOOL_PREFIX],
4539
[AC_REQUIRE([AC_PROG_EGREP])dnl
4539
[AC_REQUIRE([AC_PROG_EGREP])dnl
4540
AC_MSG_CHECKING([for $1])
4540
AC_MSG_CHECKING([for $1])
4541
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4541
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4542
[case $MAGIC_CMD in
4542
[case $MAGIC_CMD in
4543
[[\\/*] |  ?:[\\/]*])
4543
[[\\/*] |  ?:[\\/]*])
4544
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4544
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4545
  ;;
4545
  ;;
4546
*)
4546
*)
4547
  lt_save_MAGIC_CMD="$MAGIC_CMD"
4547
  lt_save_MAGIC_CMD="$MAGIC_CMD"
4548
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4548
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4549
dnl $ac_dummy forces splitting on constant user-supplied paths.
4549
dnl $ac_dummy forces splitting on constant user-supplied paths.
4550
dnl POSIX.2 word splitting is done only on the output of word expansions,
4550
dnl POSIX.2 word splitting is done only on the output of word expansions,
4551
dnl not every word.  This closes a longstanding sh security hole.
4551
dnl not every word.  This closes a longstanding sh security hole.
4552
  ac_dummy="ifelse([$2], , $PATH, [$2])"
4552
  ac_dummy="ifelse([$2], , $PATH, [$2])"
4553
  for ac_dir in $ac_dummy; do
4553
  for ac_dir in $ac_dummy; do
4554
    IFS="$lt_save_ifs"
4554
    IFS="$lt_save_ifs"
4555
    test -z "$ac_dir" && ac_dir=.
4555
    test -z "$ac_dir" && ac_dir=.
4556
    if test -f $ac_dir/$1; then
4556
    if test -f $ac_dir/$1; then
4557
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4557
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4558
      if test -n "$file_magic_test_file"; then
4558
      if test -n "$file_magic_test_file"; then
4559
	case $deplibs_check_method in
4559
	case $deplibs_check_method in
4560
	"file_magic "*)
4560
	"file_magic "*)
4561
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4561
	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4562
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4562
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4563
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4563
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4564
	    $EGREP "$file_magic_regex" > /dev/null; then
4564
	    $EGREP "$file_magic_regex" > /dev/null; then
4565
	    :
4565
	    :
4566
	  else
4566
	  else
4567
	    cat <<EOF 1>&2
4567
	    cat <<EOF 1>&2
4568
 
4568
 
4569
*** Warning: the command libtool uses to detect shared libraries,
4569
*** Warning: the command libtool uses to detect shared libraries,
4570
*** $file_magic_cmd, produces output that libtool cannot recognize.
4570
*** $file_magic_cmd, produces output that libtool cannot recognize.
4571
*** The result is that libtool may fail to recognize shared libraries
4571
*** The result is that libtool may fail to recognize shared libraries
4572
*** as such.  This will affect the creation of libtool libraries that
4572
*** as such.  This will affect the creation of libtool libraries that
4573
*** depend on shared libraries, but programs linked with such libtool
4573
*** depend on shared libraries, but programs linked with such libtool
4574
*** libraries will work regardless of this problem.  Nevertheless, you
4574
*** libraries will work regardless of this problem.  Nevertheless, you
4575
*** may want to report the problem to your system manager and/or to
4575
*** may want to report the problem to your system manager and/or to
4576
*** bug-libtool@gnu.org
4576
*** bug-libtool@gnu.org
4577
 
4577
 
4578
EOF
4578
EOF
4579
	  fi ;;
4579
	  fi ;;
4580
	esac
4580
	esac
4581
      fi
4581
      fi
4582
      break
4582
      break
4583
    fi
4583
    fi
4584
  done
4584
  done
4585
  IFS="$lt_save_ifs"
4585
  IFS="$lt_save_ifs"
4586
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4586
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4587
  ;;
4587
  ;;
4588
esac])
4588
esac])
4589
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4589
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4590
if test -n "$MAGIC_CMD"; then
4590
if test -n "$MAGIC_CMD"; then
4591
  AC_MSG_RESULT($MAGIC_CMD)
4591
  AC_MSG_RESULT($MAGIC_CMD)
4592
else
4592
else
4593
  AC_MSG_RESULT(no)
4593
  AC_MSG_RESULT(no)
4594
fi
4594
fi
4595
])# AC_PATH_TOOL_PREFIX
4595
])# AC_PATH_TOOL_PREFIX
4596
 
4596
 
4597
 
4597
 
4598
# AC_PATH_MAGIC
4598
# AC_PATH_MAGIC
4599
# -------------
4599
# -------------
4600
# find a file program which can recognise a shared library
4600
# find a file program which can recognise a shared library
4601
AC_DEFUN([AC_PATH_MAGIC],
4601
AC_DEFUN([AC_PATH_MAGIC],
4602
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4602
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4603
if test -z "$lt_cv_path_MAGIC_CMD"; then
4603
if test -z "$lt_cv_path_MAGIC_CMD"; then
4604
  if test -n "$ac_tool_prefix"; then
4604
  if test -n "$ac_tool_prefix"; then
4605
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4605
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4606
  else
4606
  else
4607
    MAGIC_CMD=:
4607
    MAGIC_CMD=:
4608
  fi
4608
  fi
4609
fi
4609
fi
4610
])# AC_PATH_MAGIC
4610
])# AC_PATH_MAGIC
4611
 
4611
 
4612
 
4612
 
4613
# AC_PROG_LD
4613
# AC_PROG_LD
4614
# ----------
4614
# ----------
4615
# find the path to the GNU or non-GNU linker
4615
# find the path to the GNU or non-GNU linker
4616
AC_DEFUN([AC_PROG_LD],
4616
AC_DEFUN([AC_PROG_LD],
4617
[AC_ARG_WITH([gnu-ld],
4617
[AC_ARG_WITH([gnu-ld],
4618
    [AC_HELP_STRING([--with-gnu-ld],
4618
    [AC_HELP_STRING([--with-gnu-ld],
4619
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4619
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4620
    [test "$withval" = no || with_gnu_ld=yes],
4620
    [test "$withval" = no || with_gnu_ld=yes],
4621
    [with_gnu_ld=no])
4621
    [with_gnu_ld=no])
4622
AC_REQUIRE([LT_AC_PROG_SED])dnl
4622
AC_REQUIRE([LT_AC_PROG_SED])dnl
4623
AC_REQUIRE([AC_PROG_CC])dnl
4623
AC_REQUIRE([AC_PROG_CC])dnl
4624
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4624
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4625
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4625
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4626
ac_prog=ld
4626
ac_prog=ld
4627
if test "$GCC" = yes; then
4627
if test "$GCC" = yes; then
4628
  # Check if gcc -print-prog-name=ld gives a path.
4628
  # Check if gcc -print-prog-name=ld gives a path.
4629
  AC_MSG_CHECKING([for ld used by $CC])
4629
  AC_MSG_CHECKING([for ld used by $CC])
4630
  case $host in
4630
  case $host in
4631
  *-*-mingw*)
4631
  *-*-mingw*)
4632
    # gcc leaves a trailing carriage return which upsets mingw
4632
    # gcc leaves a trailing carriage return which upsets mingw
4633
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4633
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4634
  *)
4634
  *)
4635
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4635
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4636
  esac
4636
  esac
4637
  case $ac_prog in
4637
  case $ac_prog in
4638
    # Accept absolute paths.
4638
    # Accept absolute paths.
4639
    [[\\/]]* | ?:[[\\/]]*)
4639
    [[\\/]]* | ?:[[\\/]]*)
4640
      re_direlt='/[[^/]][[^/]]*/\.\./'
4640
      re_direlt='/[[^/]][[^/]]*/\.\./'
4641
      # Canonicalize the path of ld
4641
      # Canonicalize the path of ld
4642
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4642
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4643
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4643
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4644
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4644
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4645
      done
4645
      done
4646
      test -z "$LD" && LD="$ac_prog"
4646
      test -z "$LD" && LD="$ac_prog"
4647
      ;;
4647
      ;;
4648
  "")
4648
  "")
4649
    # If it fails, then pretend we aren't using GCC.
4649
    # If it fails, then pretend we aren't using GCC.
4650
    ac_prog=ld
4650
    ac_prog=ld
4651
    ;;
4651
    ;;
4652
  *)
4652
  *)
4653
    # If it is relative, then search for the first ld in PATH.
4653
    # If it is relative, then search for the first ld in PATH.
4654
    with_gnu_ld=unknown
4654
    with_gnu_ld=unknown
4655
    ;;
4655
    ;;
4656
  esac
4656
  esac
4657
elif test "$with_gnu_ld" = yes; then
4657
elif test "$with_gnu_ld" = yes; then
4658
  AC_MSG_CHECKING([for GNU ld])
4658
  AC_MSG_CHECKING([for GNU ld])
4659
else
4659
else
4660
  AC_MSG_CHECKING([for non-GNU ld])
4660
  AC_MSG_CHECKING([for non-GNU ld])
4661
fi
4661
fi
4662
AC_CACHE_VAL(lt_cv_path_LD,
4662
AC_CACHE_VAL(lt_cv_path_LD,
4663
[if test -z "$LD"; then
4663
[if test -z "$LD"; then
4664
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4664
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4665
  for ac_dir in $PATH; do
4665
  for ac_dir in $PATH; do
4666
    IFS="$lt_save_ifs"
4666
    IFS="$lt_save_ifs"
4667
    test -z "$ac_dir" && ac_dir=.
4667
    test -z "$ac_dir" && ac_dir=.
4668
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4668
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4669
      lt_cv_path_LD="$ac_dir/$ac_prog"
4669
      lt_cv_path_LD="$ac_dir/$ac_prog"
4670
      # Check to see if the program is GNU ld.  I'd rather use --version,
4670
      # Check to see if the program is GNU ld.  I'd rather use --version,
4671
      # but apparently some GNU ld's only accept -v.
4671
      # but apparently some GNU ld's only accept -v.
4672
      # Break only if it was the GNU/non-GNU ld that we prefer.
4672
      # Break only if it was the GNU/non-GNU ld that we prefer.
4673
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4673
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4674
      *GNU* | *'with BFD'*)
4674
      *GNU* | *'with BFD'*)
4675
	test "$with_gnu_ld" != no && break
4675
	test "$with_gnu_ld" != no && break
4676
	;;
4676
	;;
4677
      *)
4677
      *)
4678
	test "$with_gnu_ld" != yes && break
4678
	test "$with_gnu_ld" != yes && break
4679
	;;
4679
	;;
4680
      esac
4680
      esac
4681
    fi
4681
    fi
4682
  done
4682
  done
4683
  IFS="$lt_save_ifs"
4683
  IFS="$lt_save_ifs"
4684
else
4684
else
4685
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4685
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4686
fi])
4686
fi])
4687
LD="$lt_cv_path_LD"
4687
LD="$lt_cv_path_LD"
4688
if test -n "$LD"; then
4688
if test -n "$LD"; then
4689
  AC_MSG_RESULT($LD)
4689
  AC_MSG_RESULT($LD)
4690
else
4690
else
4691
  AC_MSG_RESULT(no)
4691
  AC_MSG_RESULT(no)
4692
fi
4692
fi
4693
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4693
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4694
AC_PROG_LD_GNU
4694
AC_PROG_LD_GNU
4695
])# AC_PROG_LD
4695
])# AC_PROG_LD
4696
 
4696
 
4697
 
4697
 
4698
# AC_PROG_LD_GNU
4698
# AC_PROG_LD_GNU
4699
# --------------
4699
# --------------
4700
AC_DEFUN([AC_PROG_LD_GNU],
4700
AC_DEFUN([AC_PROG_LD_GNU],
4701
[AC_REQUIRE([AC_PROG_EGREP])dnl
4701
[AC_REQUIRE([AC_PROG_EGREP])dnl
4702
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4702
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4703
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4703
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4704
case `"$LD" -v 2>&1 </dev/null` in
4704
case `"$LD" -v 2>&1 </dev/null` in
4705
*GNU* | *'with BFD'*)
4705
*GNU* | *'with BFD'*)
4706
  lt_cv_prog_gnu_ld=yes
4706
  lt_cv_prog_gnu_ld=yes
4707
  ;;
4707
  ;;
4708
*)
4708
*)
4709
  lt_cv_prog_gnu_ld=no
4709
  lt_cv_prog_gnu_ld=no
4710
  ;;
4710
  ;;
4711
esac])
4711
esac])
4712
with_gnu_ld=$lt_cv_prog_gnu_ld
4712
with_gnu_ld=$lt_cv_prog_gnu_ld
4713
])# AC_PROG_LD_GNU
4713
])# AC_PROG_LD_GNU
4714
 
4714
 
4715
 
4715
 
4716
# AC_PROG_LD_RELOAD_FLAG
4716
# AC_PROG_LD_RELOAD_FLAG
4717
# ----------------------
4717
# ----------------------
4718
# find reload flag for linker
4718
# find reload flag for linker
4719
#   -- PORTME Some linkers may need a different reload flag.
4719
#   -- PORTME Some linkers may need a different reload flag.
4720
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4720
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4721
[AC_CACHE_CHECK([for $LD option to reload object files],
4721
[AC_CACHE_CHECK([for $LD option to reload object files],
4722
  lt_cv_ld_reload_flag,
4722
  lt_cv_ld_reload_flag,
4723
  [lt_cv_ld_reload_flag='-r'])
4723
  [lt_cv_ld_reload_flag='-r'])
4724
reload_flag=$lt_cv_ld_reload_flag
4724
reload_flag=$lt_cv_ld_reload_flag
4725
case $reload_flag in
4725
case $reload_flag in
4726
"" | " "*) ;;
4726
"" | " "*) ;;
4727
*) reload_flag=" $reload_flag" ;;
4727
*) reload_flag=" $reload_flag" ;;
4728
esac
4728
esac
4729
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4729
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4730
])# AC_PROG_LD_RELOAD_FLAG
4730
])# AC_PROG_LD_RELOAD_FLAG
4731
 
4731
 
4732
 
4732
 
4733
# AC_DEPLIBS_CHECK_METHOD
4733
# AC_DEPLIBS_CHECK_METHOD
4734
# -----------------------
4734
# -----------------------
4735
# how to check for library dependencies
4735
# how to check for library dependencies
4736
#  -- PORTME fill in with the dynamic library characteristics
4736
#  -- PORTME fill in with the dynamic library characteristics
4737
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4737
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4738
[AC_CACHE_CHECK([how to recognise dependent libraries],
4738
[AC_CACHE_CHECK([how to recognise dependent libraries],
4739
lt_cv_deplibs_check_method,
4739
lt_cv_deplibs_check_method,
4740
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4740
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4741
lt_cv_file_magic_test_file=
4741
lt_cv_file_magic_test_file=
4742
lt_cv_deplibs_check_method='unknown'
4742
lt_cv_deplibs_check_method='unknown'
4743
# Need to set the preceding variable on all platforms that support
4743
# Need to set the preceding variable on all platforms that support
4744
# interlibrary dependencies.
4744
# interlibrary dependencies.
4745
# 'none' -- dependencies not supported.
4745
# 'none' -- dependencies not supported.
4746
# `unknown' -- same as none, but documents that we really don't know.
4746
# `unknown' -- same as none, but documents that we really don't know.
4747
# 'pass_all' -- all dependencies passed with no checks.
4747
# 'pass_all' -- all dependencies passed with no checks.
4748
# 'test_compile' -- check by making test program.
4748
# 'test_compile' -- check by making test program.
4749
# 'file_magic [[regex]]' -- check by looking for files in library path
4749
# 'file_magic [[regex]]' -- check by looking for files in library path
4750
# which responds to the $file_magic_cmd with a given extended regex.
4750
# which responds to the $file_magic_cmd with a given extended regex.
4751
# If you have `file' or equivalent on your system and you're not sure
4751
# If you have `file' or equivalent on your system and you're not sure
4752
# whether `pass_all' will *always* work, you probably want this one.
4752
# whether `pass_all' will *always* work, you probably want this one.
4753
 
4753
 
4754
case $host_os in
4754
case $host_os in
4755
aix4* | aix5*)
4755
aix4* | aix5*)
4756
  lt_cv_deplibs_check_method=pass_all
4756
  lt_cv_deplibs_check_method=pass_all
4757
  ;;
4757
  ;;
4758
 
4758
 
4759
beos*)
4759
beos*)
4760
  lt_cv_deplibs_check_method=pass_all
4760
  lt_cv_deplibs_check_method=pass_all
4761
  ;;
4761
  ;;
4762
 
4762
 
4763
bsdi4*)
4763
bsdi4*)
4764
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4764
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4765
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4765
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4766
  lt_cv_file_magic_test_file=/shlib/libc.so
4766
  lt_cv_file_magic_test_file=/shlib/libc.so
4767
  ;;
4767
  ;;
4768
 
4768
 
4769
cygwin* | mingw* | pw32*)
4769
cygwin* | mingw* | pw32*)
4770
  # win32_libid is a shell function defined in ltmain.sh
4770
  # win32_libid is a shell function defined in ltmain.sh
4771
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4771
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4772
  lt_cv_file_magic_cmd='win32_libid'
4772
  lt_cv_file_magic_cmd='win32_libid'
4773
  ;;
4773
  ;;
4774
 
4774
 
4775
darwin* | rhapsody*)
4775
darwin* | rhapsody*)
4776
  # this will be overwritten by pass_all, but leave it in just in case
4776
  # this will be overwritten by pass_all, but leave it in just in case
4777
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4777
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4778
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4778
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4779
  case "$host_os" in
4779
  case "$host_os" in
4780
  rhapsody* | darwin1.[[012]])
4780
  rhapsody* | darwin1.[[012]])
4781
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
4781
    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
4782
    ;;
4782
    ;;
4783
  *) # Darwin 1.3 on
4783
  *) # Darwin 1.3 on
4784
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4784
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4785
    ;;
4785
    ;;
4786
  esac
4786
  esac
4787
  lt_cv_deplibs_check_method=pass_all
4787
  lt_cv_deplibs_check_method=pass_all
4788
  ;;
4788
  ;;
4789
 
4789
 
4790
freebsd*)
4790
freebsd*)
4791
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4791
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4792
    case $host_cpu in
4792
    case $host_cpu in
4793
    i*86 )
4793
    i*86 )
4794
      # Not sure whether the presence of OpenBSD here was a mistake.
4794
      # Not sure whether the presence of OpenBSD here was a mistake.
4795
      # Let's accept both of them until this is cleared up.
4795
      # Let's accept both of them until this is cleared up.
4796
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4796
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4797
      lt_cv_file_magic_cmd=/usr/bin/file
4797
      lt_cv_file_magic_cmd=/usr/bin/file
4798
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4798
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4799
      ;;
4799
      ;;
4800
    esac
4800
    esac
4801
  else
4801
  else
4802
    lt_cv_deplibs_check_method=pass_all
4802
    lt_cv_deplibs_check_method=pass_all
4803
  fi
4803
  fi
4804
  ;;
4804
  ;;
4805
 
4805
 
4806
gnu*)
4806
gnu*)
4807
  lt_cv_deplibs_check_method=pass_all
4807
  lt_cv_deplibs_check_method=pass_all
4808
  ;;
4808
  ;;
4809
 
4809
 
4810
hpux10.20* | hpux11*)
4810
hpux10.20* | hpux11*)
4811
  lt_cv_file_magic_cmd=/usr/bin/file
4811
  lt_cv_file_magic_cmd=/usr/bin/file
4812
  case "$host_cpu" in
4812
  case "$host_cpu" in
4813
  ia64*)
4813
  ia64*)
4814
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4814
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4815
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4815
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4816
    ;;
4816
    ;;
4817
  hppa*64*)
4817
  hppa*64*)
4818
    [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]']
4818
    [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]']
4819
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4819
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4820
    ;;
4820
    ;;
4821
  *)
4821
  *)
4822
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4822
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4823
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4823
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4824
    ;;
4824
    ;;
4825
  esac
4825
  esac
4826
  ;;
4826
  ;;
4827
 
4827
 
4828
irix5* | irix6* | nonstopux*)
4828
irix5* | irix6* | nonstopux*)
4829
  case $host_os in
4829
  case $host_os in
4830
  irix5* | nonstopux*)
4830
  irix5* | nonstopux*)
4831
    # this will be overridden with pass_all, but let us keep it just in case
4831
    # this will be overridden with pass_all, but let us keep it just in case
4832
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4832
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4833
    ;;
4833
    ;;
4834
  *)
4834
  *)
4835
    case $LD in
4835
    case $LD in
4836
    *-32|*"-32 ") libmagic=32-bit;;
4836
    *-32|*"-32 ") libmagic=32-bit;;
4837
    *-n32|*"-n32 ") libmagic=N32;;
4837
    *-n32|*"-n32 ") libmagic=N32;;
4838
    *-64|*"-64 ") libmagic=64-bit;;
4838
    *-64|*"-64 ") libmagic=64-bit;;
4839
    *) libmagic=never-match;;
4839
    *) libmagic=never-match;;
4840
    esac
4840
    esac
4841
    # this will be overridden with pass_all, but let us keep it just in case
4841
    # this will be overridden with pass_all, but let us keep it just in case
4842
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4842
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4843
    ;;
4843
    ;;
4844
  esac
4844
  esac
4845
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4845
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4846
  lt_cv_deplibs_check_method=pass_all
4846
  lt_cv_deplibs_check_method=pass_all
4847
  ;;
4847
  ;;
4848
 
4848
 
4849
# This must be Linux ELF.
4849
# This must be Linux ELF.
4850
linux*)
4850
linux*)
4851
  case $host_cpu in
4851
  case $host_cpu in
4852
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
4852
  alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
4853
    lt_cv_deplibs_check_method=pass_all ;;
4853
    lt_cv_deplibs_check_method=pass_all ;;
4854
  *)
4854
  *)
4855
    # glibc up to 2.1.1 does not perform some relocations on ARM
4855
    # glibc up to 2.1.1 does not perform some relocations on ARM
4856
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4856
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4857
  esac
4857
  esac
4858
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4858
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4859
  ;;
4859
  ;;
4860
 
4860
 
4861
netbsd*)
4861
netbsd*)
4862
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4862
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4863
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4863
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4864
  else
4864
  else
4865
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4865
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4866
  fi
4866
  fi
4867
  ;;
4867
  ;;
4868
 
4868
 
4869
newos6*)
4869
newos6*)
4870
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4870
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4871
  lt_cv_file_magic_cmd=/usr/bin/file
4871
  lt_cv_file_magic_cmd=/usr/bin/file
4872
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4872
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4873
  ;;
4873
  ;;
4874
 
4874
 
4875
nto-qnx)
4875
nto-qnx)
4876
  lt_cv_deplibs_check_method=unknown
4876
  lt_cv_deplibs_check_method=unknown
4877
  ;;
4877
  ;;
4878
 
4878
 
4879
openbsd*)
4879
openbsd*)
4880
  lt_cv_file_magic_cmd=/usr/bin/file
4880
  lt_cv_file_magic_cmd=/usr/bin/file
4881
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4881
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4882
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4882
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4883
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4883
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4884
  else
4884
  else
4885
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4885
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4886
  fi
4886
  fi
4887
  ;;
4887
  ;;
4888
 
4888
 
4889
osf3* | osf4* | osf5*)
4889
osf3* | osf4* | osf5*)
4890
  # this will be overridden with pass_all, but let us keep it just in case
4890
  # this will be overridden with pass_all, but let us keep it just in case
4891
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4891
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4892
  lt_cv_file_magic_test_file=/shlib/libc.so
4892
  lt_cv_file_magic_test_file=/shlib/libc.so
4893
  lt_cv_deplibs_check_method=pass_all
4893
  lt_cv_deplibs_check_method=pass_all
4894
  ;;
4894
  ;;
4895
 
4895
 
4896
sco3.2v5*)
4896
sco3.2v5*)
4897
  lt_cv_deplibs_check_method=pass_all
4897
  lt_cv_deplibs_check_method=pass_all
4898
  ;;
4898
  ;;
4899
 
4899
 
4900
solaris*)
4900
solaris*)
4901
  lt_cv_deplibs_check_method=pass_all
4901
  lt_cv_deplibs_check_method=pass_all
4902
  lt_cv_file_magic_test_file=/lib/libc.so
4902
  lt_cv_file_magic_test_file=/lib/libc.so
4903
  ;;
4903
  ;;
4904
 
4904
 
4905
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4905
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4906
  case $host_vendor in
4906
  case $host_vendor in
4907
  motorola)
4907
  motorola)
4908
    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]]'
4908
    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]]'
4909
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4909
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4910
    ;;
4910
    ;;
4911
  ncr)
4911
  ncr)
4912
    lt_cv_deplibs_check_method=pass_all
4912
    lt_cv_deplibs_check_method=pass_all
4913
    ;;
4913
    ;;
4914
  sequent)
4914
  sequent)
4915
    lt_cv_file_magic_cmd='/bin/file'
4915
    lt_cv_file_magic_cmd='/bin/file'
4916
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4916
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4917
    ;;
4917
    ;;
4918
  sni)
4918
  sni)
4919
    lt_cv_file_magic_cmd='/bin/file'
4919
    lt_cv_file_magic_cmd='/bin/file'
4920
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4920
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4921
    lt_cv_file_magic_test_file=/lib/libc.so
4921
    lt_cv_file_magic_test_file=/lib/libc.so
4922
    ;;
4922
    ;;
4923
  siemens)
4923
  siemens)
4924
    lt_cv_deplibs_check_method=pass_all
4924
    lt_cv_deplibs_check_method=pass_all
4925
    ;;
4925
    ;;
4926
  esac
4926
  esac
4927
  ;;
4927
  ;;
4928
 
4928
 
4929
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
4929
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
4930
  lt_cv_deplibs_check_method=pass_all
4930
  lt_cv_deplibs_check_method=pass_all
4931
  ;;
4931
  ;;
4932
esac
4932
esac
4933
])
4933
])
4934
file_magic_cmd=$lt_cv_file_magic_cmd
4934
file_magic_cmd=$lt_cv_file_magic_cmd
4935
deplibs_check_method=$lt_cv_deplibs_check_method
4935
deplibs_check_method=$lt_cv_deplibs_check_method
4936
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4936
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4937
])# AC_DEPLIBS_CHECK_METHOD
4937
])# AC_DEPLIBS_CHECK_METHOD
4938
 
4938
 
4939
 
4939
 
4940
# AC_PROG_NM
4940
# AC_PROG_NM
4941
# ----------
4941
# ----------
4942
# find the path to a BSD-compatible name lister
4942
# find the path to a BSD-compatible name lister
4943
AC_DEFUN([AC_PROG_NM],
4943
AC_DEFUN([AC_PROG_NM],
4944
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4944
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4945
[if test -n "$NM"; then
4945
[if test -n "$NM"; then
4946
  # Let the user override the test.
4946
  # Let the user override the test.
4947
  lt_cv_path_NM="$NM"
4947
  lt_cv_path_NM="$NM"
4948
else
4948
else
4949
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4949
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4950
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4950
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4951
    IFS="$lt_save_ifs"
4951
    IFS="$lt_save_ifs"
4952
    test -z "$ac_dir" && ac_dir=.
4952
    test -z "$ac_dir" && ac_dir=.
4953
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4953
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4954
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4954
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4955
      # Check to see if the nm accepts a BSD-compat flag.
4955
      # Check to see if the nm accepts a BSD-compat flag.
4956
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4956
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4957
      #   nm: unknown option "B" ignored
4957
      #   nm: unknown option "B" ignored
4958
      # Tru64's nm complains that /dev/null is an invalid object file
4958
      # Tru64's nm complains that /dev/null is an invalid object file
4959
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4959
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4960
      */dev/null* | *'Invalid file or object type'*)
4960
      */dev/null* | *'Invalid file or object type'*)
4961
	lt_cv_path_NM="$tmp_nm -B"
4961
	lt_cv_path_NM="$tmp_nm -B"
4962
	break
4962
	break
4963
        ;;
4963
        ;;
4964
      *)
4964
      *)
4965
	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4965
	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4966
	*/dev/null*)
4966
	*/dev/null*)
4967
	  lt_cv_path_NM="$tmp_nm -p"
4967
	  lt_cv_path_NM="$tmp_nm -p"
4968
	  break
4968
	  break
4969
	  ;;
4969
	  ;;
4970
	*)
4970
	*)
4971
	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4971
	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4972
	  continue # so that we can try to find one that supports BSD flags
4972
	  continue # so that we can try to find one that supports BSD flags
4973
	  ;;
4973
	  ;;
4974
	esac
4974
	esac
4975
      esac
4975
      esac
4976
    fi
4976
    fi
4977
  done
4977
  done
4978
  IFS="$lt_save_ifs"
4978
  IFS="$lt_save_ifs"
4979
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4979
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4980
fi])
4980
fi])
4981
NM="$lt_cv_path_NM"
4981
NM="$lt_cv_path_NM"
4982
])# AC_PROG_NM
4982
])# AC_PROG_NM
4983
 
4983
 
4984
 
4984
 
4985
# AC_CHECK_LIBM
4985
# AC_CHECK_LIBM
4986
# -------------
4986
# -------------
4987
# check for math library
4987
# check for math library
4988
AC_DEFUN([AC_CHECK_LIBM],
4988
AC_DEFUN([AC_CHECK_LIBM],
4989
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4989
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4990
LIBM=
4990
LIBM=
4991
case $host in
4991
case $host in
4992
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4992
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4993
  # These system don't have libm, or don't need it
4993
  # These system don't have libm, or don't need it
4994
  ;;
4994
  ;;
4995
*-ncr-sysv4.3*)
4995
*-ncr-sysv4.3*)
4996
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4996
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4997
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4997
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4998
  ;;
4998
  ;;
4999
*)
4999
*)
5000
  AC_CHECK_LIB(m, cos, LIBM="-lm")
5000
  AC_CHECK_LIB(m, cos, LIBM="-lm")
5001
  ;;
5001
  ;;
5002
esac
5002
esac
5003
])# AC_CHECK_LIBM
5003
])# AC_CHECK_LIBM
5004
 
5004
 
5005
 
5005
 
5006
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
5006
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
5007
# -----------------------------------
5007
# -----------------------------------
5008
# sets LIBLTDL to the link flags for the libltdl convenience library and
5008
# sets LIBLTDL to the link flags for the libltdl convenience library and
5009
# LTDLINCL to the include flags for the libltdl header and adds
5009
# LTDLINCL to the include flags for the libltdl header and adds
5010
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
5010
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
5011
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
5011
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
5012
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
5012
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
5013
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
5013
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
5014
# '${top_srcdir}/' (note the single quotes!).  If your package is not
5014
# '${top_srcdir}/' (note the single quotes!).  If your package is not
5015
# flat and you're not using automake, define top_builddir and
5015
# flat and you're not using automake, define top_builddir and
5016
# top_srcdir appropriately in the Makefiles.
5016
# top_srcdir appropriately in the Makefiles.
5017
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5017
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5018
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5018
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5019
  case $enable_ltdl_convenience in
5019
  case $enable_ltdl_convenience in
5020
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5020
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5021
  "") enable_ltdl_convenience=yes
5021
  "") enable_ltdl_convenience=yes
5022
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5022
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5023
  esac
5023
  esac
5024
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5024
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5025
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5025
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5026
  # For backwards non-gettext consistent compatibility...
5026
  # For backwards non-gettext consistent compatibility...
5027
  INCLTDL="$LTDLINCL"
5027
  INCLTDL="$LTDLINCL"
5028
])# AC_LIBLTDL_CONVENIENCE
5028
])# AC_LIBLTDL_CONVENIENCE
5029
 
5029
 
5030
 
5030
 
5031
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
5031
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
5032
# -----------------------------------
5032
# -----------------------------------
5033
# sets LIBLTDL to the link flags for the libltdl installable library and
5033
# sets LIBLTDL to the link flags for the libltdl installable library and
5034
# LTDLINCL to the include flags for the libltdl header and adds
5034
# LTDLINCL to the include flags for the libltdl header and adds
5035
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
5035
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
5036
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
5036
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
5037
# DIRECTORY is not provided and an installed libltdl is not found, it is
5037
# DIRECTORY is not provided and an installed libltdl is not found, it is
5038
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
5038
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
5039
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
5039
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
5040
# quotes!).  If your package is not flat and you're not using automake,
5040
# quotes!).  If your package is not flat and you're not using automake,
5041
# define top_builddir and top_srcdir appropriately in the Makefiles.
5041
# define top_builddir and top_srcdir appropriately in the Makefiles.
5042
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5042
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5043
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5043
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5044
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5044
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5045
  AC_CHECK_LIB(ltdl, lt_dlinit,
5045
  AC_CHECK_LIB(ltdl, lt_dlinit,
5046
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5046
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5047
  [if test x"$enable_ltdl_install" = xno; then
5047
  [if test x"$enable_ltdl_install" = xno; then
5048
     AC_MSG_WARN([libltdl not installed, but installation disabled])
5048
     AC_MSG_WARN([libltdl not installed, but installation disabled])
5049
   else
5049
   else
5050
     enable_ltdl_install=yes
5050
     enable_ltdl_install=yes
5051
   fi
5051
   fi
5052
  ])
5052
  ])
5053
  if test x"$enable_ltdl_install" = x"yes"; then
5053
  if test x"$enable_ltdl_install" = x"yes"; then
5054
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
5054
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
5055
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5055
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5056
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5056
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5057
  else
5057
  else
5058
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5058
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5059
    LIBLTDL="-lltdl"
5059
    LIBLTDL="-lltdl"
5060
    LTDLINCL=
5060
    LTDLINCL=
5061
  fi
5061
  fi
5062
  # For backwards non-gettext consistent compatibility...
5062
  # For backwards non-gettext consistent compatibility...
5063
  INCLTDL="$LTDLINCL"
5063
  INCLTDL="$LTDLINCL"
5064
])# AC_LIBLTDL_INSTALLABLE
5064
])# AC_LIBLTDL_INSTALLABLE
5065
 
5065
 
5066
 
5066
 
5067
# AC_LIBTOOL_CXX
5067
# AC_LIBTOOL_CXX
5068
# --------------
5068
# --------------
5069
# enable support for C++ libraries
5069
# enable support for C++ libraries
5070
AC_DEFUN([AC_LIBTOOL_CXX],
5070
AC_DEFUN([AC_LIBTOOL_CXX],
5071
[AC_REQUIRE([_LT_AC_LANG_CXX])
5071
[AC_REQUIRE([_LT_AC_LANG_CXX])
5072
])# AC_LIBTOOL_CXX
5072
])# AC_LIBTOOL_CXX
5073
 
5073
 
5074
 
5074
 
5075
# _LT_AC_LANG_CXX
5075
# _LT_AC_LANG_CXX
5076
# ---------------
5076
# ---------------
5077
AC_DEFUN([_LT_AC_LANG_CXX],
5077
AC_DEFUN([_LT_AC_LANG_CXX],
5078
[AC_REQUIRE([AC_PROG_CXX])
5078
[AC_REQUIRE([AC_PROG_CXX])
5079
AC_REQUIRE([AC_PROG_CXXCPP])
5079
AC_REQUIRE([AC_PROG_CXXCPP])
5080
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
5080
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
5081
])# _LT_AC_LANG_CXX
5081
])# _LT_AC_LANG_CXX
5082
 
5082
 
5083
 
5083
 
5084
# AC_LIBTOOL_F77
5084
# AC_LIBTOOL_F77
5085
# --------------
5085
# --------------
5086
# enable support for Fortran 77 libraries
5086
# enable support for Fortran 77 libraries
5087
AC_DEFUN([AC_LIBTOOL_F77],
5087
AC_DEFUN([AC_LIBTOOL_F77],
5088
[AC_REQUIRE([_LT_AC_LANG_F77])
5088
[AC_REQUIRE([_LT_AC_LANG_F77])
5089
])# AC_LIBTOOL_F77
5089
])# AC_LIBTOOL_F77
5090
 
5090
 
5091
 
5091
 
5092
# _LT_AC_LANG_F77
5092
# _LT_AC_LANG_F77
5093
# ---------------
5093
# ---------------
5094
AC_DEFUN([_LT_AC_LANG_F77],
5094
AC_DEFUN([_LT_AC_LANG_F77],
5095
[AC_REQUIRE([AC_PROG_F77])
5095
[AC_REQUIRE([AC_PROG_F77])
5096
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
5096
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
5097
])# _LT_AC_LANG_F77
5097
])# _LT_AC_LANG_F77
5098
 
5098
 
5099
 
5099
 
5100
# AC_LIBTOOL_GCJ
5100
# AC_LIBTOOL_GCJ
5101
# --------------
5101
# --------------
5102
# enable support for GCJ libraries
5102
# enable support for GCJ libraries
5103
AC_DEFUN([AC_LIBTOOL_GCJ],
5103
AC_DEFUN([AC_LIBTOOL_GCJ],
5104
[AC_REQUIRE([_LT_AC_LANG_GCJ])
5104
[AC_REQUIRE([_LT_AC_LANG_GCJ])
5105
])# AC_LIBTOOL_GCJ
5105
])# AC_LIBTOOL_GCJ
5106
 
5106
 
5107
 
5107
 
5108
# _LT_AC_LANG_GCJ
5108
# _LT_AC_LANG_GCJ
5109
# ---------------
5109
# ---------------
5110
AC_DEFUN([_LT_AC_LANG_GCJ],
5110
AC_DEFUN([_LT_AC_LANG_GCJ],
5111
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
5111
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
5112
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
5112
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
5113
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
5113
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
5114
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
5114
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
5115
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
5115
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
5116
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
5116
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
5117
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
5117
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
5118
])# _LT_AC_LANG_GCJ
5118
])# _LT_AC_LANG_GCJ
5119
 
5119
 
5120
 
5120
 
5121
# AC_LIBTOOL_RC
5121
# AC_LIBTOOL_RC
5122
# --------------
5122
# --------------
5123
# enable support for Windows resource files
5123
# enable support for Windows resource files
5124
AC_DEFUN([AC_LIBTOOL_RC],
5124
AC_DEFUN([AC_LIBTOOL_RC],
5125
[AC_REQUIRE([LT_AC_PROG_RC])
5125
[AC_REQUIRE([LT_AC_PROG_RC])
5126
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
5126
_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
5127
])# AC_LIBTOOL_RC
5127
])# AC_LIBTOOL_RC
5128
 
5128
 
5129
 
5129
 
5130
# AC_LIBTOOL_LANG_C_CONFIG
5130
# AC_LIBTOOL_LANG_C_CONFIG
5131
# ------------------------
5131
# ------------------------
5132
# Ensure that the configuration vars for the C compiler are
5132
# Ensure that the configuration vars for the C compiler are
5133
# suitably defined.  Those variables are subsequently used by
5133
# suitably defined.  Those variables are subsequently used by
5134
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5134
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5135
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
5135
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
5136
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
5136
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
5137
[lt_save_CC="$CC"
5137
[lt_save_CC="$CC"
5138
AC_LANG_PUSH(C)
5138
AC_LANG_PUSH(C)
5139
 
5139
 
5140
# Source file extension for C test sources.
5140
# Source file extension for C test sources.
5141
ac_ext=c
5141
ac_ext=c
5142
 
5142
 
5143
# Object file extension for compiled C test sources.
5143
# Object file extension for compiled C test sources.
5144
objext=o
5144
objext=o
5145
_LT_AC_TAGVAR(objext, $1)=$objext
5145
_LT_AC_TAGVAR(objext, $1)=$objext
5146
 
5146
 
5147
# Code to be used in simple compile tests
5147
# Code to be used in simple compile tests
5148
lt_simple_compile_test_code="int some_variable = 0;\n"
5148
lt_simple_compile_test_code="int some_variable = 0;\n"
5149
 
5149
 
5150
# Code to be used in simple link tests
5150
# Code to be used in simple link tests
5151
lt_simple_link_test_code='int main(){return(0);}\n'
5151
lt_simple_link_test_code='int main(){return(0);}\n'
5152
 
5152
 
5153
_LT_AC_SYS_COMPILER
5153
_LT_AC_SYS_COMPILER
5154
 
5154
 
5155
#
5155
#
5156
# Check for any special shared library compilation flags.
5156
# Check for any special shared library compilation flags.
5157
#
5157
#
5158
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
5158
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
5159
if test "$GCC" = no; then
5159
if test "$GCC" = no; then
5160
  case $host_os in
5160
  case $host_os in
5161
  sco3.2v5*)
5161
  sco3.2v5*)
5162
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
5162
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
5163
    ;;
5163
    ;;
5164
  esac
5164
  esac
5165
fi
5165
fi
5166
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
5166
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
5167
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
5167
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
5168
  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
5168
  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
5169
  else
5169
  else
5170
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
5170
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
5171
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
5171
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
5172
  fi
5172
  fi
5173
fi
5173
fi
5174
 
5174
 
5175
 
5175
 
5176
#
5176
#
5177
# Check to make sure the static flag actually works.
5177
# Check to make sure the static flag actually works.
5178
#
5178
#
5179
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
5179
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
5180
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5180
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5181
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
5181
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
5182
  [],
5182
  [],
5183
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5183
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5184
 
5184
 
5185
 
5185
 
5186
## CAVEAT EMPTOR:
5186
## CAVEAT EMPTOR:
5187
## There is no encapsulation within the following macros, do not change
5187
## There is no encapsulation within the following macros, do not change
5188
## the running order or otherwise move them around unless you know exactly
5188
## the running order or otherwise move them around unless you know exactly
5189
## what you are doing...
5189
## what you are doing...
5190
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5190
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5191
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5191
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5192
AC_LIBTOOL_PROG_CC_C_O($1)
5192
AC_LIBTOOL_PROG_CC_C_O($1)
5193
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5193
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5194
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5194
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5195
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5195
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5196
AC_LIBTOOL_SYS_LIB_STRIP
5196
AC_LIBTOOL_SYS_LIB_STRIP
5197
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5197
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5198
AC_LIBTOOL_DLOPEN_SELF($1)
5198
AC_LIBTOOL_DLOPEN_SELF($1)
5199
 
5199
 
5200
# Report which librarie types wil actually be built
5200
# Report which librarie types wil actually be built
5201
AC_MSG_CHECKING([if libtool supports shared libraries])
5201
AC_MSG_CHECKING([if libtool supports shared libraries])
5202
AC_MSG_RESULT([$can_build_shared])
5202
AC_MSG_RESULT([$can_build_shared])
5203
 
5203
 
5204
AC_MSG_CHECKING([whether to build shared libraries])
5204
AC_MSG_CHECKING([whether to build shared libraries])
5205
test "$can_build_shared" = "no" && enable_shared=no
5205
test "$can_build_shared" = "no" && enable_shared=no
5206
 
5206
 
5207
# On AIX, shared libraries and static libraries use the same namespace, and
5207
# On AIX, shared libraries and static libraries use the same namespace, and
5208
# are all built from PIC.
5208
# are all built from PIC.
5209
case "$host_os" in
5209
case "$host_os" in
5210
aix3*)
5210
aix3*)
5211
  test "$enable_shared" = yes && enable_static=no
5211
  test "$enable_shared" = yes && enable_static=no
5212
  if test -n "$RANLIB"; then
5212
  if test -n "$RANLIB"; then
5213
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5213
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5214
    postinstall_cmds='$RANLIB $lib'
5214
    postinstall_cmds='$RANLIB $lib'
5215
  fi
5215
  fi
5216
  ;;
5216
  ;;
5217
 
5217
 
5218
aix4*)
5218
aix4*)
5219
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5219
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5220
    test "$enable_shared" = yes && enable_static=no
5220
    test "$enable_shared" = yes && enable_static=no
5221
  fi
5221
  fi
5222
  ;;
5222
  ;;
5223
  darwin* | rhapsody*)
5223
  darwin* | rhapsody*)
5224
  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
5224
  if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
5225
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5225
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5226
    case "$host_os" in
5226
    case "$host_os" in
5227
    rhapsody* | darwin1.[[012]])
5227
    rhapsody* | darwin1.[[012]])
5228
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5228
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5229
      ;;
5229
      ;;
5230
    *) # Darwin 1.3 on
5230
    *) # Darwin 1.3 on
5231
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5231
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5232
      ;;
5232
      ;;
5233
    esac
5233
    esac
5234
    # FIXME: Relying on posixy $() will cause problems for
5234
    # FIXME: Relying on posixy $() will cause problems for
5235
    #        cross-compilation, but unfortunately the echo tests do not
5235
    #        cross-compilation, but unfortunately the echo tests do not
5236
    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5236
    #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5237
    #	       `"' quotes if we put them in here... so don't!
5237
    #	       `"' quotes if we put them in here... so don't!
5238
		output_verbose_link_cmd='echo'
5238
		output_verbose_link_cmd='echo'
5239
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
5239
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
5240
    _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5240
    _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5241
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5241
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5242
		  _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}'
5242
		  _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}'
5243
		  _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5243
		  _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5244
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
5244
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
5245
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5245
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5246
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5246
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5247
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5247
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5248
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5248
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5249
    fi
5249
    fi
5250
    ;;  
5250
    ;;  
5251
esac
5251
esac
5252
AC_MSG_RESULT([$enable_shared])
5252
AC_MSG_RESULT([$enable_shared])
5253
 
5253
 
5254
AC_MSG_CHECKING([whether to build static libraries])
5254
AC_MSG_CHECKING([whether to build static libraries])
5255
# Make sure either enable_shared or enable_static is yes.
5255
# Make sure either enable_shared or enable_static is yes.
5256
test "$enable_shared" = yes || enable_static=yes
5256
test "$enable_shared" = yes || enable_static=yes
5257
AC_MSG_RESULT([$enable_static])
5257
AC_MSG_RESULT([$enable_static])
5258
 
5258
 
5259
AC_LIBTOOL_CONFIG($1)
5259
AC_LIBTOOL_CONFIG($1)
5260
 
5260
 
5261
AC_LANG_POP
5261
AC_LANG_POP
5262
CC="$lt_save_CC"
5262
CC="$lt_save_CC"
5263
])# AC_LIBTOOL_LANG_C_CONFIG
5263
])# AC_LIBTOOL_LANG_C_CONFIG
5264
 
5264
 
5265
 
5265
 
5266
# AC_LIBTOOL_LANG_CXX_CONFIG
5266
# AC_LIBTOOL_LANG_CXX_CONFIG
5267
# --------------------------
5267
# --------------------------
5268
# Ensure that the configuration vars for the C compiler are
5268
# Ensure that the configuration vars for the C compiler are
5269
# suitably defined.  Those variables are subsequently used by
5269
# suitably defined.  Those variables are subsequently used by
5270
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5270
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5271
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
5271
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
5272
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
5272
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
5273
[AC_LANG_PUSH(C++)
5273
[AC_LANG_PUSH(C++)
5274
AC_REQUIRE([AC_PROG_CXX])
5274
AC_REQUIRE([AC_PROG_CXX])
5275
AC_REQUIRE([AC_PROG_CXXCPP])
5275
AC_REQUIRE([AC_PROG_CXXCPP])
5276
 
5276
 
5277
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5277
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5278
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5278
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5279
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5279
_LT_AC_TAGVAR(always_export_symbols, $1)=no
5280
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5280
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5281
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5281
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5282
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5282
_LT_AC_TAGVAR(hardcode_direct, $1)=no
5283
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5283
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5284
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5284
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5285
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5285
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5286
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5286
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5287
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5287
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5288
_LT_AC_TAGVAR(module_cmds, $1)=
5288
_LT_AC_TAGVAR(module_cmds, $1)=
5289
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5289
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5290
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5290
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5291
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5291
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5292
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5292
_LT_AC_TAGVAR(no_undefined_flag, $1)=
5293
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5293
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5294
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5294
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5295
 
5295
 
5296
# Dependencies to place before and after the object being linked:
5296
# Dependencies to place before and after the object being linked:
5297
_LT_AC_TAGVAR(predep_objects, $1)=
5297
_LT_AC_TAGVAR(predep_objects, $1)=
5298
_LT_AC_TAGVAR(postdep_objects, $1)=
5298
_LT_AC_TAGVAR(postdep_objects, $1)=
5299
_LT_AC_TAGVAR(predeps, $1)=
5299
_LT_AC_TAGVAR(predeps, $1)=
5300
_LT_AC_TAGVAR(postdeps, $1)=
5300
_LT_AC_TAGVAR(postdeps, $1)=
5301
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5301
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5302
 
5302
 
5303
# Source file extension for C++ test sources.
5303
# Source file extension for C++ test sources.
5304
ac_ext=cc
5304
ac_ext=cc
5305
 
5305
 
5306
# Object file extension for compiled C++ test sources.
5306
# Object file extension for compiled C++ test sources.
5307
objext=o
5307
objext=o
5308
_LT_AC_TAGVAR(objext, $1)=$objext
5308
_LT_AC_TAGVAR(objext, $1)=$objext
5309
 
5309
 
5310
# Code to be used in simple compile tests
5310
# Code to be used in simple compile tests
5311
lt_simple_compile_test_code="int some_variable = 0;\n"
5311
lt_simple_compile_test_code="int some_variable = 0;\n"
5312
 
5312
 
5313
# Code to be used in simple link tests
5313
# Code to be used in simple link tests
5314
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
5314
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
5315
 
5315
 
5316
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5316
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5317
_LT_AC_SYS_COMPILER
5317
_LT_AC_SYS_COMPILER
5318
 
5318
 
5319
# Allow CC to be a program name with arguments.
5319
# Allow CC to be a program name with arguments.
5320
lt_save_CC=$CC
5320
lt_save_CC=$CC
5321
lt_save_LD=$LD
5321
lt_save_LD=$LD
5322
lt_save_GCC=$GCC
5322
lt_save_GCC=$GCC
5323
GCC=$GXX
5323
GCC=$GXX
5324
lt_save_with_gnu_ld=$with_gnu_ld
5324
lt_save_with_gnu_ld=$with_gnu_ld
5325
lt_save_path_LD=$lt_cv_path_LD
5325
lt_save_path_LD=$lt_cv_path_LD
5326
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5326
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5327
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5327
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5328
else
5328
else
5329
  unset lt_cv_prog_gnu_ld
5329
  unset lt_cv_prog_gnu_ld
5330
fi
5330
fi
5331
if test -n "${lt_cv_path_LDCXX+set}"; then
5331
if test -n "${lt_cv_path_LDCXX+set}"; then
5332
  lt_cv_path_LD=$lt_cv_path_LDCXX
5332
  lt_cv_path_LD=$lt_cv_path_LDCXX
5333
else
5333
else
5334
  unset lt_cv_path_LD
5334
  unset lt_cv_path_LD
5335
fi
5335
fi
5336
test -z "${LDCXX+set}" || LD=$LDCXX
5336
test -z "${LDCXX+set}" || LD=$LDCXX
5337
CC=${CXX-"c++"}
5337
CC=${CXX-"c++"}
5338
compiler=$CC
5338
compiler=$CC
5339
_LT_AC_TAGVAR(compiler, $1)=$CC
5339
_LT_AC_TAGVAR(compiler, $1)=$CC
5340
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5340
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5341
 
5341
 
5342
# We don't want -fno-exception wen compiling C++ code, so set the
5342
# We don't want -fno-exception wen compiling C++ code, so set the
5343
# no_builtin_flag separately
5343
# no_builtin_flag separately
5344
if test "$GXX" = yes; then
5344
if test "$GXX" = yes; then
5345
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5345
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5346
else
5346
else
5347
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5347
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5348
fi
5348
fi
5349
 
5349
 
5350
if test "$GXX" = yes; then
5350
if test "$GXX" = yes; then
5351
  # Set up default GNU C++ configuration
5351
  # Set up default GNU C++ configuration
5352
 
5352
 
5353
  AC_PROG_LD
5353
  AC_PROG_LD
5354
 
5354
 
5355
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
5355
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
5356
  # archiving commands below assume that GNU ld is being used.
5356
  # archiving commands below assume that GNU ld is being used.
5357
  if test "$with_gnu_ld" = yes; then
5357
  if test "$with_gnu_ld" = yes; then
5358
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5358
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5359
    _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'
5359
    _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'
5360
 
5360
 
5361
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5361
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5362
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5362
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5363
 
5363
 
5364
    # If archive_cmds runs LD, not CC, wlarc should be empty
5364
    # If archive_cmds runs LD, not CC, wlarc should be empty
5365
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5365
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5366
    #     investigate it a little bit more. (MM)
5366
    #     investigate it a little bit more. (MM)
5367
    wlarc='${wl}'
5367
    wlarc='${wl}'
5368
 
5368
 
5369
    # ancient GNU ld didn't support --whole-archive et. al.
5369
    # ancient GNU ld didn't support --whole-archive et. al.
5370
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
5370
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
5371
	grep 'no-whole-archive' > /dev/null; then
5371
	grep 'no-whole-archive' > /dev/null; then
5372
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5372
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5373
    else
5373
    else
5374
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5374
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5375
    fi
5375
    fi
5376
  else
5376
  else
5377
    with_gnu_ld=no
5377
    with_gnu_ld=no
5378
    wlarc=
5378
    wlarc=
5379
 
5379
 
5380
    # A generic and very simple default shared library creation
5380
    # A generic and very simple default shared library creation
5381
    # command for GNU C++ for the case where it uses the native
5381
    # command for GNU C++ for the case where it uses the native
5382
    # linker, instead of GNU ld.  If possible, this setting should
5382
    # linker, instead of GNU ld.  If possible, this setting should
5383
    # overridden to take advantage of the native linker features on
5383
    # overridden to take advantage of the native linker features on
5384
    # the platform it is being used on.
5384
    # the platform it is being used on.
5385
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5385
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5386
  fi
5386
  fi
5387
 
5387
 
5388
  # Commands to make compiler produce verbose output that lists
5388
  # Commands to make compiler produce verbose output that lists
5389
  # what "hidden" libraries, object files and flags are used when
5389
  # what "hidden" libraries, object files and flags are used when
5390
  # linking a shared library.
5390
  # linking a shared library.
5391
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5391
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5392
 
5392
 
5393
else
5393
else
5394
  GXX=no
5394
  GXX=no
5395
  with_gnu_ld=no
5395
  with_gnu_ld=no
5396
  wlarc=
5396
  wlarc=
5397
fi
5397
fi
5398
 
5398
 
5399
# PORTME: fill in a description of your system's C++ link characteristics
5399
# PORTME: fill in a description of your system's C++ link characteristics
5400
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5400
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5401
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5401
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5402
case $host_os in
5402
case $host_os in
5403
  aix3*)
5403
  aix3*)
5404
    # FIXME: insert proper C++ library support
5404
    # FIXME: insert proper C++ library support
5405
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5405
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5406
    ;;
5406
    ;;
5407
  aix4* | aix5*)
5407
  aix4* | aix5*)
5408
    if test "$host_cpu" = ia64; then
5408
    if test "$host_cpu" = ia64; then
5409
      # On IA64, the linker does run time linking by default, so we don't
5409
      # On IA64, the linker does run time linking by default, so we don't
5410
      # have to do anything special.
5410
      # have to do anything special.
5411
      aix_use_runtimelinking=no
5411
      aix_use_runtimelinking=no
5412
      exp_sym_flag='-Bexport'
5412
      exp_sym_flag='-Bexport'
5413
      no_entry_flag=""
5413
      no_entry_flag=""
5414
    else
5414
    else
5415
      aix_use_runtimelinking=no
5415
      aix_use_runtimelinking=no
5416
 
5416
 
5417
      # Test if we are trying to use run time linking or normal
5417
      # Test if we are trying to use run time linking or normal
5418
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5418
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5419
      # need to do runtime linking.
5419
      # need to do runtime linking.
5420
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5420
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5421
	for ld_flag in $LDFLAGS; do
5421
	for ld_flag in $LDFLAGS; do
5422
	  case $ld_flag in
5422
	  case $ld_flag in
5423
	  *-brtl*)
5423
	  *-brtl*)
5424
	    aix_use_runtimelinking=yes
5424
	    aix_use_runtimelinking=yes
5425
	    break
5425
	    break
5426
	    ;;
5426
	    ;;
5427
	  esac
5427
	  esac
5428
	done
5428
	done
5429
      esac
5429
      esac
5430
 
5430
 
5431
      exp_sym_flag='-bexport'
5431
      exp_sym_flag='-bexport'
5432
      no_entry_flag='-bnoentry'
5432
      no_entry_flag='-bnoentry'
5433
    fi
5433
    fi
5434
 
5434
 
5435
    # When large executables or shared objects are built, AIX ld can
5435
    # When large executables or shared objects are built, AIX ld can
5436
    # have problems creating the table of contents.  If linking a library
5436
    # have problems creating the table of contents.  If linking a library
5437
    # or program results in "error TOC overflow" add -mminimal-toc to
5437
    # or program results in "error TOC overflow" add -mminimal-toc to
5438
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5438
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5439
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5439
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5440
 
5440
 
5441
    _LT_AC_TAGVAR(archive_cmds, $1)=''
5441
    _LT_AC_TAGVAR(archive_cmds, $1)=''
5442
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5442
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5443
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5443
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5444
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5444
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5445
 
5445
 
5446
    if test "$GXX" = yes; then
5446
    if test "$GXX" = yes; then
5447
      case $host_os in aix4.[012]|aix4.[012].*)
5447
      case $host_os in aix4.[012]|aix4.[012].*)
5448
      # We only want to do this on AIX 4.2 and lower, the check
5448
      # We only want to do this on AIX 4.2 and lower, the check
5449
      # below for broken collect2 doesn't work under 4.3+
5449
      # below for broken collect2 doesn't work under 4.3+
5450
	collect2name=`${CC} -print-prog-name=collect2`
5450
	collect2name=`${CC} -print-prog-name=collect2`
5451
	if test -f "$collect2name" && \
5451
	if test -f "$collect2name" && \
5452
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5452
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5453
	then
5453
	then
5454
	  # We have reworked collect2
5454
	  # We have reworked collect2
5455
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5455
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5456
	else
5456
	else
5457
	  # We have old collect2
5457
	  # We have old collect2
5458
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5458
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5459
	  # It fails to find uninstalled libraries when the uninstalled
5459
	  # It fails to find uninstalled libraries when the uninstalled
5460
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5460
	  # path is not listed in the libpath.  Setting hardcode_minus_L
5461
	  # to unsupported forces relinking
5461
	  # to unsupported forces relinking
5462
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5462
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5463
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5463
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5464
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5464
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5465
	fi
5465
	fi
5466
      esac
5466
      esac
5467
      shared_flag='-shared'
5467
      shared_flag='-shared'
5468
    else
5468
    else
5469
      # not using gcc
5469
      # not using gcc
5470
      if test "$host_cpu" = ia64; then
5470
      if test "$host_cpu" = ia64; then
5471
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5471
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5472
	# chokes on -Wl,-G. The following line is correct:
5472
	# chokes on -Wl,-G. The following line is correct:
5473
	shared_flag='-G'
5473
	shared_flag='-G'
5474
      else
5474
      else
5475
	if test "$aix_use_runtimelinking" = yes; then
5475
	if test "$aix_use_runtimelinking" = yes; then
5476
	  shared_flag='${wl}-G'
5476
	  shared_flag='${wl}-G'
5477
	else
5477
	else
5478
	  shared_flag='${wl}-bM:SRE'
5478
	  shared_flag='${wl}-bM:SRE'
5479
	fi
5479
	fi
5480
      fi
5480
      fi
5481
    fi
5481
    fi
5482
 
5482
 
5483
    # It seems that -bexpall does not export symbols beginning with
5483
    # It seems that -bexpall does not export symbols beginning with
5484
    # underscore (_), so it is better to generate a list of symbols to export.
5484
    # underscore (_), so it is better to generate a list of symbols to export.
5485
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5485
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5486
    if test "$aix_use_runtimelinking" = yes; then
5486
    if test "$aix_use_runtimelinking" = yes; then
5487
      # Warning - without using the other runtime loading flags (-brtl),
5487
      # Warning - without using the other runtime loading flags (-brtl),
5488
      # -berok will link without error, but may produce a broken library.
5488
      # -berok will link without error, but may produce a broken library.
5489
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5489
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5490
      # Determine the default libpath from the value encoded in an empty executable.
5490
      # Determine the default libpath from the value encoded in an empty executable.
5491
      _LT_AC_SYS_LIBPATH_AIX
5491
      _LT_AC_SYS_LIBPATH_AIX
5492
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5492
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5493
 
5493
 
5494
      _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"
5494
      _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"
5495
     else
5495
     else
5496
      if test "$host_cpu" = ia64; then
5496
      if test "$host_cpu" = ia64; then
5497
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5497
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5498
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5498
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5499
	_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"
5499
	_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"
5500
      else
5500
      else
5501
	# Determine the default libpath from the value encoded in an empty executable.
5501
	# Determine the default libpath from the value encoded in an empty executable.
5502
	_LT_AC_SYS_LIBPATH_AIX
5502
	_LT_AC_SYS_LIBPATH_AIX
5503
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5503
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5504
	# Warning - without using the other run time loading flags,
5504
	# Warning - without using the other run time loading flags,
5505
	# -berok will link without error, but may produce a broken library.
5505
	# -berok will link without error, but may produce a broken library.
5506
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5506
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5507
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5507
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5508
	# -bexpall does not export symbols beginning with underscore (_)
5508
	# -bexpall does not export symbols beginning with underscore (_)
5509
	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5509
	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
5510
	# Exported symbols can be pulled into shared objects from archives
5510
	# Exported symbols can be pulled into shared objects from archives
5511
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5511
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5512
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5512
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5513
	# This is similar to how AIX traditionally builds it's shared libraries.
5513
	# This is similar to how AIX traditionally builds it's shared libraries.
5514
	_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'
5514
	_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'
5515
      fi
5515
      fi
5516
    fi
5516
    fi
5517
    ;;
5517
    ;;
5518
  chorus*)
5518
  chorus*)
5519
    case $cc_basename in
5519
    case $cc_basename in
5520
      *)
5520
      *)
5521
	# FIXME: insert proper C++ library support
5521
	# FIXME: insert proper C++ library support
5522
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5522
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5523
	;;
5523
	;;
5524
    esac
5524
    esac
5525
    ;;
5525
    ;;
5526
 
5526
 
5527
  cygwin* | mingw* | pw32*)
5527
  cygwin* | mingw* | pw32*)
5528
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5528
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5529
    # as there is no search path for DLLs.
5529
    # as there is no search path for DLLs.
5530
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5530
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5531
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5531
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5532
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
5532
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
5533
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5533
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5534
 
5534
 
5535
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5535
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5536
      _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'
5536
      _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'
5537
      # If the export-symbols file already is a .def file (1st line
5537
      # If the export-symbols file already is a .def file (1st line
5538
      # is EXPORTS), use it as is; otherwise, prepend...
5538
      # is EXPORTS), use it as is; otherwise, prepend...
5539
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5539
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5540
	cp $export_symbols $output_objdir/$soname.def;
5540
	cp $export_symbols $output_objdir/$soname.def;
5541
      else
5541
      else
5542
	echo EXPORTS > $output_objdir/$soname.def;
5542
	echo EXPORTS > $output_objdir/$soname.def;
5543
	cat $export_symbols >> $output_objdir/$soname.def;
5543
	cat $export_symbols >> $output_objdir/$soname.def;
5544
      fi~
5544
      fi~
5545
      $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'
5545
      $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'
5546
    else
5546
    else
5547
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5547
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5548
    fi
5548
    fi
5549
  ;;
5549
  ;;
5550
 
5550
 
5551
  darwin* | rhapsody*)
5551
  darwin* | rhapsody*)
5552
   if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
5552
   if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
5553
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5553
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5554
    case "$host_os" in
5554
    case "$host_os" in
5555
    rhapsody* | darwin1.[[012]])
5555
    rhapsody* | darwin1.[[012]])
5556
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5556
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5557
      ;;
5557
      ;;
5558
    *) # Darwin 1.3 on
5558
    *) # Darwin 1.3 on
5559
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5559
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5560
      ;;
5560
      ;;
5561
    esac
5561
    esac
5562
    	lt_int_apple_cc_single_mod=no
5562
    	lt_int_apple_cc_single_mod=no
5563
    	output_verbose_link_cmd='echo'
5563
    	output_verbose_link_cmd='echo'
5564
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5564
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5565
    	  lt_int_apple_cc_single_mod=yes
5565
    	  lt_int_apple_cc_single_mod=yes
5566
    	fi
5566
    	fi
5567
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5567
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5568
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5568
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5569
    	else
5569
    	else
5570
        _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'
5570
        _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'
5571
      fi
5571
      fi
5572
      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5572
      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5573
 
5573
 
5574
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5574
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5575
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5575
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5576
        _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}'
5576
        _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}'
5577
      else
5577
      else
5578
        _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}'
5578
        _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}'
5579
      fi
5579
      fi
5580
        _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5580
        _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5581
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
5581
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
5582
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5582
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5583
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5583
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5584
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5584
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5585
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5585
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5586
   fi 
5586
   fi 
5587
    ;;
5587
    ;;
5588
 
5588
 
5589
  dgux*)
5589
  dgux*)
5590
    case $cc_basename in
5590
    case $cc_basename in
5591
      ec++)
5591
      ec++)
5592
	# FIXME: insert proper C++ library support
5592
	# FIXME: insert proper C++ library support
5593
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5593
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5594
	;;
5594
	;;
5595
      ghcx)
5595
      ghcx)
5596
	# Green Hills C++ Compiler
5596
	# Green Hills C++ Compiler
5597
	# FIXME: insert proper C++ library support
5597
	# FIXME: insert proper C++ library support
5598
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5598
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5599
	;;
5599
	;;
5600
      *)
5600
      *)
5601
	# FIXME: insert proper C++ library support
5601
	# FIXME: insert proper C++ library support
5602
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5602
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5603
	;;
5603
	;;
5604
    esac
5604
    esac
5605
    ;;
5605
    ;;
5606
  freebsd[12]*)
5606
  freebsd[12]*)
5607
    # C++ shared libraries reported to be fairly broken before switch to ELF
5607
    # C++ shared libraries reported to be fairly broken before switch to ELF
5608
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5608
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5609
    ;;
5609
    ;;
5610
  freebsd-elf*)
5610
  freebsd-elf*)
5611
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5611
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5612
    ;;
5612
    ;;
5613
  freebsd*)
5613
  freebsd*)
5614
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5614
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5615
    # conventions
5615
    # conventions
5616
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5616
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5617
    ;;
5617
    ;;
5618
  gnu*)
5618
  gnu*)
5619
    ;;
5619
    ;;
5620
  hpux9*)
5620
  hpux9*)
5621
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5621
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5622
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5622
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5623
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5623
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5624
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5624
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5625
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5625
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5626
				# but as the default
5626
				# but as the default
5627
				# location of the library.
5627
				# location of the library.
5628
 
5628
 
5629
    case $cc_basename in
5629
    case $cc_basename in
5630
    CC)
5630
    CC)
5631
      # FIXME: insert proper C++ library support
5631
      # FIXME: insert proper C++ library support
5632
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5632
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5633
      ;;
5633
      ;;
5634
    aCC)
5634
    aCC)
5635
      _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'
5635
      _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'
5636
      # Commands to make compiler produce verbose output that lists
5636
      # Commands to make compiler produce verbose output that lists
5637
      # what "hidden" libraries, object files and flags are used when
5637
      # what "hidden" libraries, object files and flags are used when
5638
      # linking a shared library.
5638
      # linking a shared library.
5639
      #
5639
      #
5640
      # There doesn't appear to be a way to prevent this compiler from
5640
      # There doesn't appear to be a way to prevent this compiler from
5641
      # explicitly linking system object files so we need to strip them
5641
      # explicitly linking system object files so we need to strip them
5642
      # from the output so that they don't get included in the library
5642
      # from the output so that they don't get included in the library
5643
      # dependencies.
5643
      # dependencies.
5644
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5644
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5645
      ;;
5645
      ;;
5646
    *)
5646
    *)
5647
      if test "$GXX" = yes; then
5647
      if test "$GXX" = yes; then
5648
        _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'
5648
        _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'
5649
      else
5649
      else
5650
        # FIXME: insert proper C++ library support
5650
        # FIXME: insert proper C++ library support
5651
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5651
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5652
      fi
5652
      fi
5653
      ;;
5653
      ;;
5654
    esac
5654
    esac
5655
    ;;
5655
    ;;
5656
  hpux10*|hpux11*)
5656
  hpux10*|hpux11*)
5657
    if test $with_gnu_ld = no; then
5657
    if test $with_gnu_ld = no; then
5658
      case "$host_cpu" in
5658
      case "$host_cpu" in
5659
      hppa*64*)
5659
      hppa*64*)
5660
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5660
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5661
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5661
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5662
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5662
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5663
        ;;
5663
        ;;
5664
      ia64*)
5664
      ia64*)
5665
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5665
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5666
        ;;
5666
        ;;
5667
      *)
5667
      *)
5668
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5668
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5669
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5669
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5670
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5670
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5671
        ;;
5671
        ;;
5672
      esac
5672
      esac
5673
    fi
5673
    fi
5674
    case "$host_cpu" in
5674
    case "$host_cpu" in
5675
    hppa*64*)
5675
    hppa*64*)
5676
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5676
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5677
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5677
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5678
      ;;
5678
      ;;
5679
    ia64*)
5679
    ia64*)
5680
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5680
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5681
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5681
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5682
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5682
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5683
					      # but as the default
5683
					      # but as the default
5684
					      # location of the library.
5684
					      # location of the library.
5685
      ;;
5685
      ;;
5686
    *)
5686
    *)
5687
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5687
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5688
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5688
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5689
					      # but as the default
5689
					      # but as the default
5690
					      # location of the library.
5690
					      # location of the library.
5691
      ;;
5691
      ;;
5692
    esac
5692
    esac
5693
 
5693
 
5694
    case $cc_basename in
5694
    case $cc_basename in
5695
      CC)
5695
      CC)
5696
	# FIXME: insert proper C++ library support
5696
	# FIXME: insert proper C++ library support
5697
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5697
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5698
	;;
5698
	;;
5699
      aCC)
5699
      aCC)
5700
	case "$host_cpu" in
5700
	case "$host_cpu" in
5701
	hppa*64*|ia64*)
5701
	hppa*64*|ia64*)
5702
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5702
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5703
	  ;;
5703
	  ;;
5704
	*)
5704
	*)
5705
	  _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'
5705
	  _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'
5706
	  ;;
5706
	  ;;
5707
	esac
5707
	esac
5708
	# Commands to make compiler produce verbose output that lists
5708
	# Commands to make compiler produce verbose output that lists
5709
	# what "hidden" libraries, object files and flags are used when
5709
	# what "hidden" libraries, object files and flags are used when
5710
	# linking a shared library.
5710
	# linking a shared library.
5711
	#
5711
	#
5712
	# There doesn't appear to be a way to prevent this compiler from
5712
	# There doesn't appear to be a way to prevent this compiler from
5713
	# explicitly linking system object files so we need to strip them
5713
	# explicitly linking system object files so we need to strip them
5714
	# from the output so that they don't get included in the library
5714
	# from the output so that they don't get included in the library
5715
	# dependencies.
5715
	# dependencies.
5716
	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'
5716
	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'
5717
	;;
5717
	;;
5718
      *)
5718
      *)
5719
	if test "$GXX" = yes; then
5719
	if test "$GXX" = yes; then
5720
	  if test $with_gnu_ld = no; then
5720
	  if test $with_gnu_ld = no; then
5721
	    case "$host_cpu" in
5721
	    case "$host_cpu" in
5722
	    ia64*|hppa*64*)
5722
	    ia64*|hppa*64*)
5723
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5723
	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5724
	      ;;
5724
	      ;;
5725
	    *)
5725
	    *)
5726
	      _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'
5726
	      _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'
5727
	      ;;
5727
	      ;;
5728
	    esac
5728
	    esac
5729
	  fi
5729
	  fi
5730
	else
5730
	else
5731
	  # FIXME: insert proper C++ library support
5731
	  # FIXME: insert proper C++ library support
5732
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5732
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5733
	fi
5733
	fi
5734
	;;
5734
	;;
5735
    esac
5735
    esac
5736
    ;;
5736
    ;;
5737
  irix5* | irix6*)
5737
  irix5* | irix6*)
5738
    case $cc_basename in
5738
    case $cc_basename in
5739
      CC)
5739
      CC)
5740
	# SGI C++
5740
	# SGI C++
5741
	_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'
5741
	_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'
5742
 
5742
 
5743
	# Archives containing C++ object files must be created using
5743
	# Archives containing C++ object files must be created using
5744
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5744
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5745
	# necessary to make sure instantiated templates are included
5745
	# necessary to make sure instantiated templates are included
5746
	# in the archive.
5746
	# in the archive.
5747
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5747
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5748
	;;
5748
	;;
5749
      *)
5749
      *)
5750
	if test "$GXX" = yes; then
5750
	if test "$GXX" = yes; then
5751
	  if test "$with_gnu_ld" = no; then
5751
	  if test "$with_gnu_ld" = no; then
5752
	    _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'
5752
	    _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'
5753
	  else
5753
	  else
5754
	    _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'
5754
	    _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'
5755
	  fi
5755
	  fi
5756
	fi
5756
	fi
5757
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5757
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5758
	;;
5758
	;;
5759
    esac
5759
    esac
5760
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5760
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5761
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5761
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5762
    ;;
5762
    ;;
5763
  linux*)
5763
  linux*)
5764
    case $cc_basename in
5764
    case $cc_basename in
5765
      KCC)
5765
      KCC)
5766
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5766
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5767
 
5767
 
5768
	# KCC will only create a shared library if the output file
5768
	# KCC will only create a shared library if the output file
5769
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5769
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5770
	# to its proper name (with version) after linking.
5770
	# to its proper name (with version) after linking.
5771
	_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'
5771
	_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'
5772
	_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'
5772
	_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'
5773
	# Commands to make compiler produce verbose output that lists
5773
	# Commands to make compiler produce verbose output that lists
5774
	# what "hidden" libraries, object files and flags are used when
5774
	# what "hidden" libraries, object files and flags are used when
5775
	# linking a shared library.
5775
	# linking a shared library.
5776
	#
5776
	#
5777
	# There doesn't appear to be a way to prevent this compiler from
5777
	# There doesn't appear to be a way to prevent this compiler from
5778
	# explicitly linking system object files so we need to strip them
5778
	# explicitly linking system object files so we need to strip them
5779
	# from the output so that they don't get included in the library
5779
	# from the output so that they don't get included in the library
5780
	# dependencies.
5780
	# dependencies.
5781
	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'
5781
	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'
5782
 
5782
 
5783
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5783
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5784
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5784
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5785
 
5785
 
5786
	# Archives containing C++ object files must be created using
5786
	# Archives containing C++ object files must be created using
5787
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5787
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5788
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5788
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5789
	;;
5789
	;;
5790
      icpc)
5790
      icpc)
5791
	# Intel C++
5791
	# Intel C++
5792
	with_gnu_ld=yes
5792
	with_gnu_ld=yes
5793
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5793
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5794
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5794
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5795
	_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'
5795
	_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'
5796
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5796
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5797
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5797
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5798
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5798
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5799
	;;
5799
	;;
5800
      cxx)
5800
      cxx)
5801
	# Compaq C++
5801
	# Compaq C++
5802
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5802
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5803
	_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'
5803
	_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'
5804
 
5804
 
5805
	runpath_var=LD_RUN_PATH
5805
	runpath_var=LD_RUN_PATH
5806
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5806
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5807
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5807
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5808
 
5808
 
5809
	# Commands to make compiler produce verbose output that lists
5809
	# Commands to make compiler produce verbose output that lists
5810
	# what "hidden" libraries, object files and flags are used when
5810
	# what "hidden" libraries, object files and flags are used when
5811
	# linking a shared library.
5811
	# linking a shared library.
5812
	#
5812
	#
5813
	# There doesn't appear to be a way to prevent this compiler from
5813
	# There doesn't appear to be a way to prevent this compiler from
5814
	# explicitly linking system object files so we need to strip them
5814
	# explicitly linking system object files so we need to strip them
5815
	# from the output so that they don't get included in the library
5815
	# from the output so that they don't get included in the library
5816
	# dependencies.
5816
	# dependencies.
5817
	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'
5817
	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'
5818
	;;
5818
	;;
5819
    esac
5819
    esac
5820
    ;;
5820
    ;;
5821
  lynxos*)
5821
  lynxos*)
5822
    # FIXME: insert proper C++ library support
5822
    # FIXME: insert proper C++ library support
5823
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5823
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5824
    ;;
5824
    ;;
5825
  m88k*)
5825
  m88k*)
5826
    # FIXME: insert proper C++ library support
5826
    # FIXME: insert proper C++ library support
5827
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5827
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5828
    ;;
5828
    ;;
5829
  mvs*)
5829
  mvs*)
5830
    case $cc_basename in
5830
    case $cc_basename in
5831
      cxx)
5831
      cxx)
5832
	# FIXME: insert proper C++ library support
5832
	# FIXME: insert proper C++ library support
5833
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5833
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5834
	;;
5834
	;;
5835
      *)
5835
      *)
5836
	# FIXME: insert proper C++ library support
5836
	# FIXME: insert proper C++ library support
5837
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5837
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5838
	;;
5838
	;;
5839
    esac
5839
    esac
5840
    ;;
5840
    ;;
5841
  netbsd*)
5841
  netbsd*)
5842
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5842
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5843
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5843
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5844
      wlarc=
5844
      wlarc=
5845
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5845
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5846
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5846
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5847
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5847
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5848
    fi
5848
    fi
5849
    # Workaround some broken pre-1.5 toolchains
5849
    # Workaround some broken pre-1.5 toolchains
5850
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5850
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5851
    ;;
5851
    ;;
5852
  osf3*)
5852
  osf3*)
5853
    case $cc_basename in
5853
    case $cc_basename in
5854
      KCC)
5854
      KCC)
5855
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5855
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5856
 
5856
 
5857
	# KCC will only create a shared library if the output file
5857
	# KCC will only create a shared library if the output file
5858
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5858
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5859
	# to its proper name (with version) after linking.
5859
	# to its proper name (with version) after linking.
5860
	_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'
5860
	_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'
5861
 
5861
 
5862
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5862
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5863
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5863
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5864
 
5864
 
5865
	# Archives containing C++ object files must be created using
5865
	# Archives containing C++ object files must be created using
5866
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5866
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5867
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5867
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5868
 
5868
 
5869
	;;
5869
	;;
5870
      RCC)
5870
      RCC)
5871
	# Rational C++ 2.4.1
5871
	# Rational C++ 2.4.1
5872
	# FIXME: insert proper C++ library support
5872
	# FIXME: insert proper C++ library support
5873
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5873
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5874
	;;
5874
	;;
5875
      cxx)
5875
      cxx)
5876
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5876
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5877
	_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'
5877
	_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'
5878
 
5878
 
5879
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5879
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5880
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5880
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5881
 
5881
 
5882
	# Commands to make compiler produce verbose output that lists
5882
	# Commands to make compiler produce verbose output that lists
5883
	# what "hidden" libraries, object files and flags are used when
5883
	# what "hidden" libraries, object files and flags are used when
5884
	# linking a shared library.
5884
	# linking a shared library.
5885
	#
5885
	#
5886
	# There doesn't appear to be a way to prevent this compiler from
5886
	# There doesn't appear to be a way to prevent this compiler from
5887
	# explicitly linking system object files so we need to strip them
5887
	# explicitly linking system object files so we need to strip them
5888
	# from the output so that they don't get included in the library
5888
	# from the output so that they don't get included in the library
5889
	# dependencies.
5889
	# dependencies.
5890
	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'
5890
	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'
5891
	;;
5891
	;;
5892
      *)
5892
      *)
5893
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5893
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5894
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5894
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5895
	  _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'
5895
	  _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'
5896
 
5896
 
5897
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5897
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5898
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5898
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5899
 
5899
 
5900
	  # Commands to make compiler produce verbose output that lists
5900
	  # Commands to make compiler produce verbose output that lists
5901
	  # what "hidden" libraries, object files and flags are used when
5901
	  # what "hidden" libraries, object files and flags are used when
5902
	  # linking a shared library.
5902
	  # linking a shared library.
5903
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5903
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5904
 
5904
 
5905
	else
5905
	else
5906
	  # FIXME: insert proper C++ library support
5906
	  # FIXME: insert proper C++ library support
5907
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5907
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5908
	fi
5908
	fi
5909
	;;
5909
	;;
5910
    esac
5910
    esac
5911
    ;;
5911
    ;;
5912
  osf4* | osf5*)
5912
  osf4* | osf5*)
5913
    case $cc_basename in
5913
    case $cc_basename in
5914
      KCC)
5914
      KCC)
5915
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5915
	# Kuck and Associates, Inc. (KAI) C++ Compiler
5916
 
5916
 
5917
	# KCC will only create a shared library if the output file
5917
	# KCC will only create a shared library if the output file
5918
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5918
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5919
	# to its proper name (with version) after linking.
5919
	# to its proper name (with version) after linking.
5920
	_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'
5920
	_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'
5921
 
5921
 
5922
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5922
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5923
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5923
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5924
 
5924
 
5925
	# Archives containing C++ object files must be created using
5925
	# Archives containing C++ object files must be created using
5926
	# the KAI C++ compiler.
5926
	# the KAI C++ compiler.
5927
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5927
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5928
	;;
5928
	;;
5929
      RCC)
5929
      RCC)
5930
	# Rational C++ 2.4.1
5930
	# Rational C++ 2.4.1
5931
	# FIXME: insert proper C++ library support
5931
	# FIXME: insert proper C++ library support
5932
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5932
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5933
	;;
5933
	;;
5934
      cxx)
5934
      cxx)
5935
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5935
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5936
	_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'
5936
	_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'
5937
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5937
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5938
	  echo "-hidden">> $lib.exp~
5938
	  echo "-hidden">> $lib.exp~
5939
	  $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~
5939
	  $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~
5940
	  $rm $lib.exp'
5940
	  $rm $lib.exp'
5941
 
5941
 
5942
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5942
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5943
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5943
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5944
 
5944
 
5945
	# Commands to make compiler produce verbose output that lists
5945
	# Commands to make compiler produce verbose output that lists
5946
	# what "hidden" libraries, object files and flags are used when
5946
	# what "hidden" libraries, object files and flags are used when
5947
	# linking a shared library.
5947
	# linking a shared library.
5948
	#
5948
	#
5949
	# There doesn't appear to be a way to prevent this compiler from
5949
	# There doesn't appear to be a way to prevent this compiler from
5950
	# explicitly linking system object files so we need to strip them
5950
	# explicitly linking system object files so we need to strip them
5951
	# from the output so that they don't get included in the library
5951
	# from the output so that they don't get included in the library
5952
	# dependencies.
5952
	# dependencies.
5953
	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'
5953
	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'
5954
	;;
5954
	;;
5955
      *)
5955
      *)
5956
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5956
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5957
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5957
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5958
	 _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'
5958
	 _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'
5959
 
5959
 
5960
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5960
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5961
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5961
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5962
 
5962
 
5963
	  # Commands to make compiler produce verbose output that lists
5963
	  # Commands to make compiler produce verbose output that lists
5964
	  # what "hidden" libraries, object files and flags are used when
5964
	  # what "hidden" libraries, object files and flags are used when
5965
	  # linking a shared library.
5965
	  # linking a shared library.
5966
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5966
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5967
 
5967
 
5968
	else
5968
	else
5969
	  # FIXME: insert proper C++ library support
5969
	  # FIXME: insert proper C++ library support
5970
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5970
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5971
	fi
5971
	fi
5972
	;;
5972
	;;
5973
    esac
5973
    esac
5974
    ;;
5974
    ;;
5975
  psos*)
5975
  psos*)
5976
    # FIXME: insert proper C++ library support
5976
    # FIXME: insert proper C++ library support
5977
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5977
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5978
    ;;
5978
    ;;
5979
  sco*)
5979
  sco*)
5980
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5980
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5981
    case $cc_basename in
5981
    case $cc_basename in
5982
      CC)
5982
      CC)
5983
	# FIXME: insert proper C++ library support
5983
	# FIXME: insert proper C++ library support
5984
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5984
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5985
	;;
5985
	;;
5986
      *)
5986
      *)
5987
	# FIXME: insert proper C++ library support
5987
	# FIXME: insert proper C++ library support
5988
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5988
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5989
	;;
5989
	;;
5990
    esac
5990
    esac
5991
    ;;
5991
    ;;
5992
  sunos4*)
5992
  sunos4*)
5993
    case $cc_basename in
5993
    case $cc_basename in
5994
      CC)
5994
      CC)
5995
	# Sun C++ 4.x
5995
	# Sun C++ 4.x
5996
	# FIXME: insert proper C++ library support
5996
	# FIXME: insert proper C++ library support
5997
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5997
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5998
	;;
5998
	;;
5999
      lcc)
5999
      lcc)
6000
	# Lucid
6000
	# Lucid
6001
	# FIXME: insert proper C++ library support
6001
	# FIXME: insert proper C++ library support
6002
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6002
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6003
	;;
6003
	;;
6004
      *)
6004
      *)
6005
	# FIXME: insert proper C++ library support
6005
	# FIXME: insert proper C++ library support
6006
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6006
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6007
	;;
6007
	;;
6008
    esac
6008
    esac
6009
    ;;
6009
    ;;
6010
  solaris*)
6010
  solaris*)
6011
    case $cc_basename in
6011
    case $cc_basename in
6012
      CC)
6012
      CC)
6013
	# Sun C++ 4.2, 5.x and Centerline C++
6013
	# Sun C++ 4.2, 5.x and Centerline C++
6014
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6014
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6015
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6015
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6016
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6016
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6017
	$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'
6017
	$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'
6018
 
6018
 
6019
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6019
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6020
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6020
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6021
	case $host_os in
6021
	case $host_os in
6022
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
6022
	  solaris2.[0-5] | solaris2.[0-5].*) ;;
6023
	  *)
6023
	  *)
6024
	    # The C++ compiler is used as linker so we must use $wl
6024
	    # The C++ compiler is used as linker so we must use $wl
6025
	    # flag to pass the commands to the underlying system
6025
	    # flag to pass the commands to the underlying system
6026
	    # linker.
6026
	    # linker.
6027
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
6027
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
6028
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6028
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6029
	    ;;
6029
	    ;;
6030
	esac
6030
	esac
6031
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6031
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6032
 
6032
 
6033
	# Commands to make compiler produce verbose output that lists
6033
	# Commands to make compiler produce verbose output that lists
6034
	# what "hidden" libraries, object files and flags are used when
6034
	# what "hidden" libraries, object files and flags are used when
6035
	# linking a shared library.
6035
	# linking a shared library.
6036
	#
6036
	#
6037
	# There doesn't appear to be a way to prevent this compiler from
6037
	# There doesn't appear to be a way to prevent this compiler from
6038
	# explicitly linking system object files so we need to strip them
6038
	# explicitly linking system object files so we need to strip them
6039
	# from the output so that they don't get included in the library
6039
	# from the output so that they don't get included in the library
6040
	# dependencies.
6040
	# dependencies.
6041
	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'
6041
	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'
6042
 
6042
 
6043
	# Archives containing C++ object files must be created using
6043
	# Archives containing C++ object files must be created using
6044
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
6044
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
6045
	# necessary to make sure instantiated templates are included
6045
	# necessary to make sure instantiated templates are included
6046
	# in the archive.
6046
	# in the archive.
6047
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6047
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6048
	;;
6048
	;;
6049
      gcx)
6049
      gcx)
6050
	# Green Hills C++ Compiler
6050
	# Green Hills C++ Compiler
6051
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6051
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6052
 
6052
 
6053
	# The C++ compiler must be used to create the archive.
6053
	# The C++ compiler must be used to create the archive.
6054
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6054
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6055
	;;
6055
	;;
6056
      *)
6056
      *)
6057
	# GNU C++ compiler with Solaris linker
6057
	# GNU C++ compiler with Solaris linker
6058
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6058
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6059
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6059
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6060
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
6060
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
6061
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6061
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6062
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6062
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6063
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6063
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6064
 
6064
 
6065
	    # Commands to make compiler produce verbose output that lists
6065
	    # Commands to make compiler produce verbose output that lists
6066
	    # what "hidden" libraries, object files and flags are used when
6066
	    # what "hidden" libraries, object files and flags are used when
6067
	    # linking a shared library.
6067
	    # linking a shared library.
6068
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6068
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6069
	  else
6069
	  else
6070
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
6070
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
6071
	    # platform.
6071
	    # platform.
6072
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6072
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6073
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6073
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6074
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6074
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6075
 
6075
 
6076
	    # Commands to make compiler produce verbose output that lists
6076
	    # Commands to make compiler produce verbose output that lists
6077
	    # what "hidden" libraries, object files and flags are used when
6077
	    # what "hidden" libraries, object files and flags are used when
6078
	    # linking a shared library.
6078
	    # linking a shared library.
6079
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6079
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6080
	  fi
6080
	  fi
6081
 
6081
 
6082
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6082
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6083
	fi
6083
	fi
6084
	;;
6084
	;;
6085
    esac
6085
    esac
6086
    ;;
6086
    ;;
6087
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6087
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6088
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6088
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6089
    ;;
6089
    ;;
6090
  tandem*)
6090
  tandem*)
6091
    case $cc_basename in
6091
    case $cc_basename in
6092
      NCC)
6092
      NCC)
6093
	# NonStop-UX NCC 3.20
6093
	# NonStop-UX NCC 3.20
6094
	# FIXME: insert proper C++ library support
6094
	# FIXME: insert proper C++ library support
6095
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6095
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6096
	;;
6096
	;;
6097
      *)
6097
      *)
6098
	# FIXME: insert proper C++ library support
6098
	# FIXME: insert proper C++ library support
6099
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6099
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6100
	;;
6100
	;;
6101
    esac
6101
    esac
6102
    ;;
6102
    ;;
6103
  vxworks*)
6103
  vxworks*)
6104
    # FIXME: insert proper C++ library support
6104
    # FIXME: insert proper C++ library support
6105
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6105
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6106
    ;;
6106
    ;;
6107
  *)
6107
  *)
6108
    # FIXME: insert proper C++ library support
6108
    # FIXME: insert proper C++ library support
6109
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6109
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6110
    ;;
6110
    ;;
6111
esac
6111
esac
6112
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6112
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6113
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6113
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6114
 
6114
 
6115
_LT_AC_TAGVAR(GCC, $1)="$GXX"
6115
_LT_AC_TAGVAR(GCC, $1)="$GXX"
6116
_LT_AC_TAGVAR(LD, $1)="$LD"
6116
_LT_AC_TAGVAR(LD, $1)="$LD"
6117
 
6117
 
6118
## CAVEAT EMPTOR:
6118
## CAVEAT EMPTOR:
6119
## There is no encapsulation within the following macros, do not change
6119
## There is no encapsulation within the following macros, do not change
6120
## the running order or otherwise move them around unless you know exactly
6120
## the running order or otherwise move them around unless you know exactly
6121
## what you are doing...
6121
## what you are doing...
6122
AC_LIBTOOL_POSTDEP_PREDEP($1)
6122
AC_LIBTOOL_POSTDEP_PREDEP($1)
6123
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6123
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6124
AC_LIBTOOL_PROG_CC_C_O($1)
6124
AC_LIBTOOL_PROG_CC_C_O($1)
6125
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6125
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6126
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6126
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6127
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6127
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6128
AC_LIBTOOL_SYS_LIB_STRIP
6128
AC_LIBTOOL_SYS_LIB_STRIP
6129
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6129
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6130
AC_LIBTOOL_DLOPEN_SELF($1)
6130
AC_LIBTOOL_DLOPEN_SELF($1)
6131
 
6131
 
6132
AC_LIBTOOL_CONFIG($1)
6132
AC_LIBTOOL_CONFIG($1)
6133
 
6133
 
6134
AC_LANG_POP
6134
AC_LANG_POP
6135
CC=$lt_save_CC
6135
CC=$lt_save_CC
6136
LDCXX=$LD
6136
LDCXX=$LD
6137
LD=$lt_save_LD
6137
LD=$lt_save_LD
6138
GCC=$lt_save_GCC
6138
GCC=$lt_save_GCC
6139
with_gnu_ldcxx=$with_gnu_ld
6139
with_gnu_ldcxx=$with_gnu_ld
6140
with_gnu_ld=$lt_save_with_gnu_ld
6140
with_gnu_ld=$lt_save_with_gnu_ld
6141
lt_cv_path_LDCXX=$lt_cv_path_LD
6141
lt_cv_path_LDCXX=$lt_cv_path_LD
6142
lt_cv_path_LD=$lt_save_path_LD
6142
lt_cv_path_LD=$lt_save_path_LD
6143
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6143
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6144
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6144
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6145
])# AC_LIBTOOL_LANG_CXX_CONFIG
6145
])# AC_LIBTOOL_LANG_CXX_CONFIG
6146
 
6146
 
6147
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6147
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6148
# ------------------------
6148
# ------------------------
6149
# Figure out "hidden" library dependencies from verbose
6149
# Figure out "hidden" library dependencies from verbose
6150
# compiler output when linking a shared library.
6150
# compiler output when linking a shared library.
6151
# Parse the compiler output and extract the necessary
6151
# Parse the compiler output and extract the necessary
6152
# objects, libraries and library flags.
6152
# objects, libraries and library flags.
6153
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
6153
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
6154
dnl we can't use the lt_simple_compile_test_code here,
6154
dnl we can't use the lt_simple_compile_test_code here,
6155
dnl because it contains code intended for an executable,
6155
dnl because it contains code intended for an executable,
6156
dnl not a library.  It's possible we should let each
6156
dnl not a library.  It's possible we should let each
6157
dnl tag define a new lt_????_link_test_code variable,
6157
dnl tag define a new lt_????_link_test_code variable,
6158
dnl but it's only used here...
6158
dnl but it's only used here...
6159
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6159
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6160
int a;
6160
int a;
6161
void foo (void) { a = 0; }
6161
void foo (void) { a = 0; }
6162
EOF
6162
EOF
6163
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6163
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6164
class Foo
6164
class Foo
6165
{
6165
{
6166
public:
6166
public:
6167
  Foo (void) { a = 0; }
6167
  Foo (void) { a = 0; }
6168
private:
6168
private:
6169
  int a;
6169
  int a;
6170
};
6170
};
6171
EOF
6171
EOF
6172
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6172
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6173
      subroutine foo
6173
      subroutine foo
6174
      implicit none
6174
      implicit none
6175
      integer*4 a
6175
      integer*4 a
6176
      a=0
6176
      a=0
6177
      return
6177
      return
6178
      end
6178
      end
6179
EOF
6179
EOF
6180
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6180
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6181
public class foo {
6181
public class foo {
6182
  private int a;
6182
  private int a;
6183
  public void bar (void) {
6183
  public void bar (void) {
6184
    a = 0;
6184
    a = 0;
6185
  }
6185
  }
6186
};
6186
};
6187
EOF
6187
EOF
6188
])
6188
])
6189
dnl Parse the compiler output and extract the necessary
6189
dnl Parse the compiler output and extract the necessary
6190
dnl objects, libraries and library flags.
6190
dnl objects, libraries and library flags.
6191
if AC_TRY_EVAL(ac_compile); then
6191
if AC_TRY_EVAL(ac_compile); then
6192
  # Parse the compiler output and extract the necessary
6192
  # Parse the compiler output and extract the necessary
6193
  # objects, libraries and library flags.
6193
  # objects, libraries and library flags.
6194
 
6194
 
6195
  # Sentinel used to keep track of whether or not we are before
6195
  # Sentinel used to keep track of whether or not we are before
6196
  # the conftest object file.
6196
  # the conftest object file.
6197
  pre_test_object_deps_done=no
6197
  pre_test_object_deps_done=no
6198
 
6198
 
6199
  # The `*' in the case matches for architectures that use `case' in
6199
  # The `*' in the case matches for architectures that use `case' in
6200
  # $output_verbose_cmd can trigger glob expansion during the loop
6200
  # $output_verbose_cmd can trigger glob expansion during the loop
6201
  # eval without this substitution.
6201
  # eval without this substitution.
6202
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
6202
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
6203
 
6203
 
6204
  for p in `eval $output_verbose_link_cmd`; do
6204
  for p in `eval $output_verbose_link_cmd`; do
6205
    case $p in
6205
    case $p in
6206
 
6206
 
6207
    -L* | -R* | -l*)
6207
    -L* | -R* | -l*)
6208
       # Some compilers place space between "-{L,R}" and the path.
6208
       # Some compilers place space between "-{L,R}" and the path.
6209
       # Remove the space.
6209
       # Remove the space.
6210
       if test $p = "-L" \
6210
       if test $p = "-L" \
6211
	  || test $p = "-R"; then
6211
	  || test $p = "-R"; then
6212
	 prev=$p
6212
	 prev=$p
6213
	 continue
6213
	 continue
6214
       else
6214
       else
6215
	 prev=
6215
	 prev=
6216
       fi
6216
       fi
6217
 
6217
 
6218
       if test "$pre_test_object_deps_done" = no; then
6218
       if test "$pre_test_object_deps_done" = no; then
6219
	 case $p in
6219
	 case $p in
6220
	 -L* | -R*)
6220
	 -L* | -R*)
6221
	   # Internal compiler library paths should come after those
6221
	   # Internal compiler library paths should come after those
6222
	   # provided the user.  The postdeps already come after the
6222
	   # provided the user.  The postdeps already come after the
6223
	   # user supplied libs so there is no need to process them.
6223
	   # user supplied libs so there is no need to process them.
6224
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6224
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6225
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6225
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6226
	   else
6226
	   else
6227
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6227
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6228
	   fi
6228
	   fi
6229
	   ;;
6229
	   ;;
6230
	 # The "-l" case would never come before the object being
6230
	 # The "-l" case would never come before the object being
6231
	 # linked, so don't bother handling this case.
6231
	 # linked, so don't bother handling this case.
6232
	 esac
6232
	 esac
6233
       else
6233
       else
6234
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6234
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6235
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6235
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6236
	 else
6236
	 else
6237
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6237
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6238
	 fi
6238
	 fi
6239
       fi
6239
       fi
6240
       ;;
6240
       ;;
6241
 
6241
 
6242
    *.$objext)
6242
    *.$objext)
6243
       # This assumes that the test object file only shows up
6243
       # This assumes that the test object file only shows up
6244
       # once in the compiler output.
6244
       # once in the compiler output.
6245
       if test "$p" = "conftest.$objext"; then
6245
       if test "$p" = "conftest.$objext"; then
6246
	 pre_test_object_deps_done=yes
6246
	 pre_test_object_deps_done=yes
6247
	 continue
6247
	 continue
6248
       fi
6248
       fi
6249
 
6249
 
6250
       if test "$pre_test_object_deps_done" = no; then
6250
       if test "$pre_test_object_deps_done" = no; then
6251
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6251
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6252
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
6252
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
6253
	 else
6253
	 else
6254
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6254
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6255
	 fi
6255
	 fi
6256
       else
6256
       else
6257
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6257
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6258
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6258
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6259
	 else
6259
	 else
6260
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6260
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6261
	 fi
6261
	 fi
6262
       fi
6262
       fi
6263
       ;;
6263
       ;;
6264
 
6264
 
6265
    *) ;; # Ignore the rest.
6265
    *) ;; # Ignore the rest.
6266
 
6266
 
6267
    esac
6267
    esac
6268
  done
6268
  done
6269
 
6269
 
6270
  # Clean up.
6270
  # Clean up.
6271
  rm -f a.out a.exe
6271
  rm -f a.out a.exe
6272
else
6272
else
6273
  echo "libtool.m4: error: problem compiling $1 test program"
6273
  echo "libtool.m4: error: problem compiling $1 test program"
6274
fi
6274
fi
6275
 
6275
 
6276
$rm -f confest.$objext
6276
$rm -f confest.$objext
6277
 
6277
 
6278
case " $_LT_AC_TAGVAR(postdeps, $1) " in
6278
case " $_LT_AC_TAGVAR(postdeps, $1) " in
6279
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6279
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6280
esac
6280
esac
6281
])# AC_LIBTOOL_POSTDEP_PREDEP
6281
])# AC_LIBTOOL_POSTDEP_PREDEP
6282
 
6282
 
6283
# AC_LIBTOOL_LANG_F77_CONFIG
6283
# AC_LIBTOOL_LANG_F77_CONFIG
6284
# ------------------------
6284
# ------------------------
6285
# Ensure that the configuration vars for the C compiler are
6285
# Ensure that the configuration vars for the C compiler are
6286
# suitably defined.  Those variables are subsequently used by
6286
# suitably defined.  Those variables are subsequently used by
6287
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6287
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6288
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
6288
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
6289
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
6289
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
6290
[AC_REQUIRE([AC_PROG_F77])
6290
[AC_REQUIRE([AC_PROG_F77])
6291
AC_LANG_PUSH(Fortran 77)
6291
AC_LANG_PUSH(Fortran 77)
6292
 
6292
 
6293
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6293
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6294
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6294
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6295
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6295
_LT_AC_TAGVAR(always_export_symbols, $1)=no
6296
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6296
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6297
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6297
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6298
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6298
_LT_AC_TAGVAR(hardcode_direct, $1)=no
6299
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6299
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6300
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6300
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6301
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6301
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6302
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6302
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6303
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6303
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6304
_LT_AC_TAGVAR(module_cmds, $1)=
6304
_LT_AC_TAGVAR(module_cmds, $1)=
6305
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6305
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6306
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6306
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6307
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6307
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6308
_LT_AC_TAGVAR(no_undefined_flag, $1)=
6308
_LT_AC_TAGVAR(no_undefined_flag, $1)=
6309
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6309
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6310
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6310
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6311
 
6311
 
6312
# Source file extension for f77 test sources.
6312
# Source file extension for f77 test sources.
6313
ac_ext=f
6313
ac_ext=f
6314
 
6314
 
6315
# Object file extension for compiled f77 test sources.
6315
# Object file extension for compiled f77 test sources.
6316
objext=o
6316
objext=o
6317
_LT_AC_TAGVAR(objext, $1)=$objext
6317
_LT_AC_TAGVAR(objext, $1)=$objext
6318
 
6318
 
6319
# Code to be used in simple compile tests
6319
# Code to be used in simple compile tests
6320
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
6320
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
6321
 
6321
 
6322
# Code to be used in simple link tests
6322
# Code to be used in simple link tests
6323
lt_simple_link_test_code="      program t\n      end\n"
6323
lt_simple_link_test_code="      program t\n      end\n"
6324
 
6324
 
6325
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6325
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6326
_LT_AC_SYS_COMPILER
6326
_LT_AC_SYS_COMPILER
6327
 
6327
 
6328
# Allow CC to be a program name with arguments.
6328
# Allow CC to be a program name with arguments.
6329
lt_save_CC="$CC"
6329
lt_save_CC="$CC"
6330
CC=${F77-"f77"}
6330
CC=${F77-"f77"}
6331
compiler=$CC
6331
compiler=$CC
6332
_LT_AC_TAGVAR(compiler, $1)=$CC
6332
_LT_AC_TAGVAR(compiler, $1)=$CC
6333
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
6333
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
6334
 
6334
 
6335
AC_MSG_CHECKING([if libtool supports shared libraries])
6335
AC_MSG_CHECKING([if libtool supports shared libraries])
6336
AC_MSG_RESULT([$can_build_shared])
6336
AC_MSG_RESULT([$can_build_shared])
6337
 
6337
 
6338
AC_MSG_CHECKING([whether to build shared libraries])
6338
AC_MSG_CHECKING([whether to build shared libraries])
6339
test "$can_build_shared" = "no" && enable_shared=no
6339
test "$can_build_shared" = "no" && enable_shared=no
6340
 
6340
 
6341
# On AIX, shared libraries and static libraries use the same namespace, and
6341
# On AIX, shared libraries and static libraries use the same namespace, and
6342
# are all built from PIC.
6342
# are all built from PIC.
6343
case "$host_os" in
6343
case "$host_os" in
6344
aix3*)
6344
aix3*)
6345
  test "$enable_shared" = yes && enable_static=no
6345
  test "$enable_shared" = yes && enable_static=no
6346
  if test -n "$RANLIB"; then
6346
  if test -n "$RANLIB"; then
6347
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
6347
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
6348
    postinstall_cmds='$RANLIB $lib'
6348
    postinstall_cmds='$RANLIB $lib'
6349
  fi
6349
  fi
6350
  ;;
6350
  ;;
6351
aix4*)
6351
aix4*)
6352
  test "$enable_shared" = yes && enable_static=no
6352
  test "$enable_shared" = yes && enable_static=no
6353
  ;;
6353
  ;;
6354
esac
6354
esac
6355
AC_MSG_RESULT([$enable_shared])
6355
AC_MSG_RESULT([$enable_shared])
6356
 
6356
 
6357
AC_MSG_CHECKING([whether to build static libraries])
6357
AC_MSG_CHECKING([whether to build static libraries])
6358
# Make sure either enable_shared or enable_static is yes.
6358
# Make sure either enable_shared or enable_static is yes.
6359
test "$enable_shared" = yes || enable_static=yes
6359
test "$enable_shared" = yes || enable_static=yes
6360
AC_MSG_RESULT([$enable_static])
6360
AC_MSG_RESULT([$enable_static])
6361
 
6361
 
6362
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6362
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6363
 
6363
 
6364
_LT_AC_TAGVAR(GCC, $1)="$G77"
6364
_LT_AC_TAGVAR(GCC, $1)="$G77"
6365
_LT_AC_TAGVAR(LD, $1)="$LD"
6365
_LT_AC_TAGVAR(LD, $1)="$LD"
6366
 
6366
 
6367
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6367
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6368
AC_LIBTOOL_PROG_CC_C_O($1)
6368
AC_LIBTOOL_PROG_CC_C_O($1)
6369
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6369
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6370
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6370
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6371
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6371
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6372
AC_LIBTOOL_SYS_LIB_STRIP
6372
AC_LIBTOOL_SYS_LIB_STRIP
6373
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6373
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6374
 
6374
 
6375
AC_LIBTOOL_CONFIG($1)
6375
AC_LIBTOOL_CONFIG($1)
6376
 
6376
 
6377
AC_LANG_POP
6377
AC_LANG_POP
6378
CC="$lt_save_CC"
6378
CC="$lt_save_CC"
6379
])# AC_LIBTOOL_LANG_F77_CONFIG
6379
])# AC_LIBTOOL_LANG_F77_CONFIG
6380
 
6380
 
6381
 
6381
 
6382
# AC_LIBTOOL_LANG_GCJ_CONFIG
6382
# AC_LIBTOOL_LANG_GCJ_CONFIG
6383
# --------------------------
6383
# --------------------------
6384
# Ensure that the configuration vars for the C compiler are
6384
# Ensure that the configuration vars for the C compiler are
6385
# suitably defined.  Those variables are subsequently used by
6385
# suitably defined.  Those variables are subsequently used by
6386
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6386
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6387
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
6387
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
6388
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
6388
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
6389
[AC_LANG_SAVE
6389
[AC_LANG_SAVE
6390
 
6390
 
6391
# Source file extension for Java test sources.
6391
# Source file extension for Java test sources.
6392
ac_ext=java
6392
ac_ext=java
6393
 
6393
 
6394
# Object file extension for compiled Java test sources.
6394
# Object file extension for compiled Java test sources.
6395
objext=o
6395
objext=o
6396
_LT_AC_TAGVAR(objext, $1)=$objext
6396
_LT_AC_TAGVAR(objext, $1)=$objext
6397
 
6397
 
6398
# Code to be used in simple compile tests
6398
# Code to be used in simple compile tests
6399
lt_simple_compile_test_code="class foo {}\n"
6399
lt_simple_compile_test_code="class foo {}\n"
6400
 
6400
 
6401
# Code to be used in simple link tests
6401
# Code to be used in simple link tests
6402
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
6402
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
6403
 
6403
 
6404
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6404
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6405
_LT_AC_SYS_COMPILER
6405
_LT_AC_SYS_COMPILER
6406
 
6406
 
6407
# Allow CC to be a program name with arguments.
6407
# Allow CC to be a program name with arguments.
6408
lt_save_CC="$CC"
6408
lt_save_CC="$CC"
6409
CC=${GCJ-"gcj"}
6409
CC=${GCJ-"gcj"}
6410
compiler=$CC
6410
compiler=$CC
6411
_LT_AC_TAGVAR(compiler, $1)=$CC
6411
_LT_AC_TAGVAR(compiler, $1)=$CC
6412
 
6412
 
6413
# GCJ did not exist at the time GCC didn't implicitly link libc in.
6413
# GCJ did not exist at the time GCC didn't implicitly link libc in.
6414
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6414
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6415
 
6415
 
6416
## CAVEAT EMPTOR:
6416
## CAVEAT EMPTOR:
6417
## There is no encapsulation within the following macros, do not change
6417
## There is no encapsulation within the following macros, do not change
6418
## the running order or otherwise move them around unless you know exactly
6418
## the running order or otherwise move them around unless you know exactly
6419
## what you are doing...
6419
## what you are doing...
6420
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
6420
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
6421
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6421
AC_LIBTOOL_PROG_COMPILER_PIC($1)
6422
AC_LIBTOOL_PROG_CC_C_O($1)
6422
AC_LIBTOOL_PROG_CC_C_O($1)
6423
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6423
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6424
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6424
AC_LIBTOOL_PROG_LD_SHLIBS($1)
6425
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6425
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6426
AC_LIBTOOL_SYS_LIB_STRIP
6426
AC_LIBTOOL_SYS_LIB_STRIP
6427
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6427
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6428
AC_LIBTOOL_DLOPEN_SELF($1)
6428
AC_LIBTOOL_DLOPEN_SELF($1)
6429
 
6429
 
6430
AC_LIBTOOL_CONFIG($1)
6430
AC_LIBTOOL_CONFIG($1)
6431
 
6431
 
6432
AC_LANG_RESTORE
6432
AC_LANG_RESTORE
6433
CC="$lt_save_CC"
6433
CC="$lt_save_CC"
6434
])# AC_LIBTOOL_LANG_GCJ_CONFIG
6434
])# AC_LIBTOOL_LANG_GCJ_CONFIG
6435
 
6435
 
6436
 
6436
 
6437
# AC_LIBTOOL_LANG_RC_CONFIG
6437
# AC_LIBTOOL_LANG_RC_CONFIG
6438
# --------------------------
6438
# --------------------------
6439
# Ensure that the configuration vars for the Windows resource compiler are
6439
# Ensure that the configuration vars for the Windows resource compiler are
6440
# suitably defined.  Those variables are subsequently used by
6440
# suitably defined.  Those variables are subsequently used by
6441
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6441
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6442
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
6442
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
6443
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
6443
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
6444
[AC_LANG_SAVE
6444
[AC_LANG_SAVE
6445
 
6445
 
6446
# Source file extension for RC test sources.
6446
# Source file extension for RC test sources.
6447
ac_ext=rc
6447
ac_ext=rc
6448
 
6448
 
6449
# Object file extension for compiled RC test sources.
6449
# Object file extension for compiled RC test sources.
6450
objext=o
6450
objext=o
6451
_LT_AC_TAGVAR(objext, $1)=$objext
6451
_LT_AC_TAGVAR(objext, $1)=$objext
6452
 
6452
 
6453
# Code to be used in simple compile tests
6453
# Code to be used in simple compile tests
6454
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
6454
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
6455
 
6455
 
6456
# Code to be used in simple link tests
6456
# Code to be used in simple link tests
6457
lt_simple_link_test_code="$lt_simple_compile_test_code"
6457
lt_simple_link_test_code="$lt_simple_compile_test_code"
6458
 
6458
 
6459
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6459
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6460
_LT_AC_SYS_COMPILER
6460
_LT_AC_SYS_COMPILER
6461
 
6461
 
6462
# Allow CC to be a program name with arguments.
6462
# Allow CC to be a program name with arguments.
6463
lt_save_CC="$CC"
6463
lt_save_CC="$CC"
6464
CC=${RC-"windres"}
6464
CC=${RC-"windres"}
6465
compiler=$CC
6465
compiler=$CC
6466
_LT_AC_TAGVAR(compiler, $1)=$CC
6466
_LT_AC_TAGVAR(compiler, $1)=$CC
6467
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6467
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6468
 
6468
 
6469
AC_LIBTOOL_CONFIG($1)
6469
AC_LIBTOOL_CONFIG($1)
6470
 
6470
 
6471
AC_LANG_RESTORE
6471
AC_LANG_RESTORE
6472
CC="$lt_save_CC"
6472
CC="$lt_save_CC"
6473
])# AC_LIBTOOL_LANG_RC_CONFIG
6473
])# AC_LIBTOOL_LANG_RC_CONFIG
6474
 
6474
 
6475
 
6475
 
6476
# AC_LIBTOOL_CONFIG([TAGNAME])
6476
# AC_LIBTOOL_CONFIG([TAGNAME])
6477
# ----------------------------
6477
# ----------------------------
6478
# If TAGNAME is not passed, then create an initial libtool script
6478
# If TAGNAME is not passed, then create an initial libtool script
6479
# with a default configuration from the untagged config vars.  Otherwise
6479
# with a default configuration from the untagged config vars.  Otherwise
6480
# add code to config.status for appending the configuration named by
6480
# add code to config.status for appending the configuration named by
6481
# TAGNAME from the matching tagged config vars.
6481
# TAGNAME from the matching tagged config vars.
6482
AC_DEFUN([AC_LIBTOOL_CONFIG],
6482
AC_DEFUN([AC_LIBTOOL_CONFIG],
6483
[# The else clause should only fire when bootstrapping the
6483
[# The else clause should only fire when bootstrapping the
6484
# libtool distribution, otherwise you forgot to ship ltmain.sh
6484
# libtool distribution, otherwise you forgot to ship ltmain.sh
6485
# with your package, and you will get complaints that there are
6485
# with your package, and you will get complaints that there are
6486
# no rules to generate ltmain.sh.
6486
# no rules to generate ltmain.sh.
6487
if test -f "$ltmain"; then
6487
if test -f "$ltmain"; then
6488
  # See if we are running on zsh, and set the options which allow our commands through
6488
  # See if we are running on zsh, and set the options which allow our commands through
6489
  # without removal of \ escapes.
6489
  # without removal of \ escapes.
6490
  if test -n "${ZSH_VERSION+set}" ; then
6490
  if test -n "${ZSH_VERSION+set}" ; then
6491
    setopt NO_GLOB_SUBST
6491
    setopt NO_GLOB_SUBST
6492
  fi  
6492
  fi  
6493
  # Now quote all the things that may contain metacharacters while being
6493
  # Now quote all the things that may contain metacharacters while being
6494
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
6494
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
6495
  # variables and quote the copies for generation of the libtool script.
6495
  # variables and quote the copies for generation of the libtool script.
6496
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
6496
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
6497
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
6497
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
6498
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
6498
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
6499
    deplibs_check_method reload_flag reload_cmds need_locks \
6499
    deplibs_check_method reload_flag reload_cmds need_locks \
6500
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
6500
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
6501
    lt_cv_sys_global_symbol_to_c_name_address \
6501
    lt_cv_sys_global_symbol_to_c_name_address \
6502
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6502
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6503
    old_postinstall_cmds old_postuninstall_cmds \
6503
    old_postinstall_cmds old_postuninstall_cmds \
6504
    _LT_AC_TAGVAR(compiler, $1) \
6504
    _LT_AC_TAGVAR(compiler, $1) \
6505
    _LT_AC_TAGVAR(CC, $1) \
6505
    _LT_AC_TAGVAR(CC, $1) \
6506
    _LT_AC_TAGVAR(LD, $1) \
6506
    _LT_AC_TAGVAR(LD, $1) \
6507
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
6507
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
6508
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
6508
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
6509
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
6509
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
6510
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
6510
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
6511
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
6511
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
6512
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
6512
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
6513
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
6513
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
6514
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
6514
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
6515
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
6515
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
6516
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
6516
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
6517
    _LT_AC_TAGVAR(predep_objects, $1) \
6517
    _LT_AC_TAGVAR(predep_objects, $1) \
6518
    _LT_AC_TAGVAR(postdep_objects, $1) \
6518
    _LT_AC_TAGVAR(postdep_objects, $1) \
6519
    _LT_AC_TAGVAR(predeps, $1) \
6519
    _LT_AC_TAGVAR(predeps, $1) \
6520
    _LT_AC_TAGVAR(postdeps, $1) \
6520
    _LT_AC_TAGVAR(postdeps, $1) \
6521
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
6521
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
6522
    _LT_AC_TAGVAR(archive_cmds, $1) \
6522
    _LT_AC_TAGVAR(archive_cmds, $1) \
6523
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
6523
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
6524
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
6524
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
6525
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
6525
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
6526
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
6526
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
6527
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
6527
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
6528
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
6528
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
6529
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
6529
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
6530
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
6530
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
6531
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
6531
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
6532
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
6532
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
6533
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
6533
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
6534
    _LT_AC_TAGVAR(module_cmds, $1) \
6534
    _LT_AC_TAGVAR(module_cmds, $1) \
6535
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
6535
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
6536
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
6536
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
6537
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
6537
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
6538
    _LT_AC_TAGVAR(include_expsyms, $1); do
6538
    _LT_AC_TAGVAR(include_expsyms, $1); do
6539
 
6539
 
6540
    case $var in
6540
    case $var in
6541
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
6541
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
6542
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
6542
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
6543
    _LT_AC_TAGVAR(archive_cmds, $1) | \
6543
    _LT_AC_TAGVAR(archive_cmds, $1) | \
6544
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
6544
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
6545
    _LT_AC_TAGVAR(module_cmds, $1) | \
6545
    _LT_AC_TAGVAR(module_cmds, $1) | \
6546
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
6546
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
6547
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
6547
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
6548
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
6548
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
6549
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
6549
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
6550
    postinstall_cmds | postuninstall_cmds | \
6550
    postinstall_cmds | postuninstall_cmds | \
6551
    old_postinstall_cmds | old_postuninstall_cmds | \
6551
    old_postinstall_cmds | old_postuninstall_cmds | \
6552
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6552
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6553
      # Double-quote double-evaled strings.
6553
      # Double-quote double-evaled strings.
6554
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6554
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6555
      ;;
6555
      ;;
6556
    *)
6556
    *)
6557
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6557
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6558
      ;;
6558
      ;;
6559
    esac
6559
    esac
6560
  done
6560
  done
6561
 
6561
 
6562
  case $lt_echo in
6562
  case $lt_echo in
6563
  *'\[$]0 --fallback-echo"')
6563
  *'\[$]0 --fallback-echo"')
6564
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
6564
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
6565
    ;;
6565
    ;;
6566
  esac
6566
  esac
6567
 
6567
 
6568
ifelse([$1], [],
6568
ifelse([$1], [],
6569
  [cfgfile="${ofile}T"
6569
  [cfgfile="${ofile}T"
6570
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
6570
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
6571
  $rm -f "$cfgfile"
6571
  $rm -f "$cfgfile"
6572
  AC_MSG_NOTICE([creating $ofile])],
6572
  AC_MSG_NOTICE([creating $ofile])],
6573
  [cfgfile="$ofile"])
6573
  [cfgfile="$ofile"])
6574
 
6574
 
6575
  cat <<__EOF__ >> "$cfgfile"
6575
  cat <<__EOF__ >> "$cfgfile"
6576
ifelse([$1], [],
6576
ifelse([$1], [],
6577
[#! $SHELL
6577
[#! $SHELL
6578
 
6578
 
6579
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6579
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6580
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6580
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6581
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6581
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6582
#
6582
#
6583
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
6583
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
6584
# Free Software Foundation, Inc.
6584
# Free Software Foundation, Inc.
6585
#
6585
#
6586
# This file is part of GNU Libtool:
6586
# This file is part of GNU Libtool:
6587
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6587
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6588
#
6588
#
6589
# This program is free software; you can redistribute it and/or modify
6589
# This program is free software; you can redistribute it and/or modify
6590
# it under the terms of the GNU General Public License as published by
6590
# it under the terms of the GNU General Public License as published by
6591
# the Free Software Foundation; either version 2 of the License, or
6591
# the Free Software Foundation; either version 2 of the License, or
6592
# (at your option) any later version.
6592
# (at your option) any later version.
6593
#
6593
#
6594
# This program is distributed in the hope that it will be useful, but
6594
# This program is distributed in the hope that it will be useful, but
6595
# WITHOUT ANY WARRANTY; without even the implied warranty of
6595
# WITHOUT ANY WARRANTY; without even the implied warranty of
6596
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6596
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6597
# General Public License for more details.
6597
# General Public License for more details.
6598
#
6598
#
6599
# You should have received a copy of the GNU General Public License
6599
# You should have received a copy of the GNU General Public License
6600
# along with this program; if not, write to the Free Software
6600
# along with this program; if not, write to the Free Software
6601
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6601
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6602
#
6602
#
6603
# As a special exception to the GNU General Public License, if you
6603
# As a special exception to the GNU General Public License, if you
6604
# distribute this file as part of a program that contains a
6604
# distribute this file as part of a program that contains a
6605
# configuration script generated by Autoconf, you may include it under
6605
# configuration script generated by Autoconf, you may include it under
6606
# the same distribution terms that you use for the rest of that program.
6606
# the same distribution terms that you use for the rest of that program.
6607
 
6607
 
6608
# A sed program that does not truncate output.
6608
# A sed program that does not truncate output.
6609
SED=$lt_SED
6609
SED=$lt_SED
6610
 
6610
 
6611
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6611
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6612
Xsed="$SED -e s/^X//"
6612
Xsed="$SED -e s/^X//"
6613
 
6613
 
6614
# The HP-UX ksh and POSIX shell print the target directory to stdout
6614
# The HP-UX ksh and POSIX shell print the target directory to stdout
6615
# if CDPATH is set.
6615
# if CDPATH is set.
6616
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6616
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6617
 
6617
 
6618
# The names of the tagged configurations supported by this script.
6618
# The names of the tagged configurations supported by this script.
6619
available_tags=
6619
available_tags=
6620
 
6620
 
6621
# ### BEGIN LIBTOOL CONFIG],
6621
# ### BEGIN LIBTOOL CONFIG],
6622
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6622
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6623
 
6623
 
6624
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6624
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6625
 
6625
 
6626
# Shell to use when invoking shell scripts.
6626
# Shell to use when invoking shell scripts.
6627
SHELL=$lt_SHELL
6627
SHELL=$lt_SHELL
6628
 
6628
 
6629
# Whether or not to build shared libraries.
6629
# Whether or not to build shared libraries.
6630
build_libtool_libs=$enable_shared
6630
build_libtool_libs=$enable_shared
6631
 
6631
 
6632
# Whether or not to build static libraries.
6632
# Whether or not to build static libraries.
6633
build_old_libs=$enable_static
6633
build_old_libs=$enable_static
6634
 
6634
 
6635
# Whether or not to add -lc for building shared libraries.
6635
# Whether or not to add -lc for building shared libraries.
6636
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6636
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6637
 
6637
 
6638
# Whether or not to disallow shared libs when runtime libs are static
6638
# Whether or not to disallow shared libs when runtime libs are static
6639
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6639
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6640
 
6640
 
6641
# Whether or not to optimize for fast installation.
6641
# Whether or not to optimize for fast installation.
6642
fast_install=$enable_fast_install
6642
fast_install=$enable_fast_install
6643
 
6643
 
6644
# The host system.
6644
# The host system.
6645
host_alias=$host_alias
6645
host_alias=$host_alias
6646
host=$host
6646
host=$host
6647
 
6647
 
6648
# An echo program that does not interpret backslashes.
6648
# An echo program that does not interpret backslashes.
6649
echo=$lt_echo
6649
echo=$lt_echo
6650
 
6650
 
6651
# The archiver.
6651
# The archiver.
6652
AR=$lt_AR
6652
AR=$lt_AR
6653
AR_FLAGS=$lt_AR_FLAGS
6653
AR_FLAGS=$lt_AR_FLAGS
6654
 
6654
 
6655
# A C compiler.
6655
# A C compiler.
6656
LTCC=$lt_LTCC
6656
LTCC=$lt_LTCC
6657
 
6657
 
6658
# A language-specific compiler.
6658
# A language-specific compiler.
6659
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6659
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6660
 
6660
 
6661
# Is the compiler the GNU C compiler?
6661
# Is the compiler the GNU C compiler?
6662
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6662
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6663
 
6663
 
6664
# An ERE matcher.
6664
# An ERE matcher.
6665
EGREP=$lt_EGREP
6665
EGREP=$lt_EGREP
6666
 
6666
 
6667
# The linker used to build libraries.
6667
# The linker used to build libraries.
6668
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6668
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6669
 
6669
 
6670
# Whether we need hard or soft links.
6670
# Whether we need hard or soft links.
6671
LN_S=$lt_LN_S
6671
LN_S=$lt_LN_S
6672
 
6672
 
6673
# A BSD-compatible nm program.
6673
# A BSD-compatible nm program.
6674
NM=$lt_NM
6674
NM=$lt_NM
6675
 
6675
 
6676
# A symbol stripping program
6676
# A symbol stripping program
6677
STRIP=$STRIP
6677
STRIP=$STRIP
6678
 
6678
 
6679
# Used to examine libraries when file_magic_cmd begins "file"
6679
# Used to examine libraries when file_magic_cmd begins "file"
6680
MAGIC_CMD=$MAGIC_CMD
6680
MAGIC_CMD=$MAGIC_CMD
6681
 
6681
 
6682
# Used on cygwin: DLL creation program.
6682
# Used on cygwin: DLL creation program.
6683
DLLTOOL="$DLLTOOL"
6683
DLLTOOL="$DLLTOOL"
6684
 
6684
 
6685
# Used on cygwin: object dumper.
6685
# Used on cygwin: object dumper.
6686
OBJDUMP="$OBJDUMP"
6686
OBJDUMP="$OBJDUMP"
6687
 
6687
 
6688
# Used on cygwin: assembler.
6688
# Used on cygwin: assembler.
6689
AS="$AS"
6689
AS="$AS"
6690
 
6690
 
6691
# The name of the directory that contains temporary libtool files.
6691
# The name of the directory that contains temporary libtool files.
6692
objdir=$objdir
6692
objdir=$objdir
6693
 
6693
 
6694
# How to create reloadable object files.
6694
# How to create reloadable object files.
6695
reload_flag=$lt_reload_flag
6695
reload_flag=$lt_reload_flag
6696
reload_cmds=$lt_reload_cmds
6696
reload_cmds=$lt_reload_cmds
6697
 
6697
 
6698
# How to pass a linker flag through the compiler.
6698
# How to pass a linker flag through the compiler.
6699
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6699
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6700
 
6700
 
6701
# Object file suffix (normally "o").
6701
# Object file suffix (normally "o").
6702
objext="$ac_objext"
6702
objext="$ac_objext"
6703
 
6703
 
6704
# Old archive suffix (normally "a").
6704
# Old archive suffix (normally "a").
6705
libext="$libext"
6705
libext="$libext"
6706
 
6706
 
6707
# Shared library suffix (normally ".so").
6707
# Shared library suffix (normally ".so").
6708
shrext='$shrext'
6708
shrext='$shrext'
6709
 
6709
 
6710
# Executable file suffix (normally "").
6710
# Executable file suffix (normally "").
6711
exeext="$exeext"
6711
exeext="$exeext"
6712
 
6712
 
6713
# Additional compiler flags for building library objects.
6713
# Additional compiler flags for building library objects.
6714
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6714
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6715
pic_mode=$pic_mode
6715
pic_mode=$pic_mode
6716
 
6716
 
6717
# What is the maximum length of a command?
6717
# What is the maximum length of a command?
6718
max_cmd_len=$lt_cv_sys_max_cmd_len
6718
max_cmd_len=$lt_cv_sys_max_cmd_len
6719
 
6719
 
6720
# Does compiler simultaneously support -c and -o options?
6720
# Does compiler simultaneously support -c and -o options?
6721
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6721
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6722
 
6722
 
6723
# Must we lock files when doing compilation ?
6723
# Must we lock files when doing compilation ?
6724
need_locks=$lt_need_locks
6724
need_locks=$lt_need_locks
6725
 
6725
 
6726
# Do we need the lib prefix for modules?
6726
# Do we need the lib prefix for modules?
6727
need_lib_prefix=$need_lib_prefix
6727
need_lib_prefix=$need_lib_prefix
6728
 
6728
 
6729
# Do we need a version for libraries?
6729
# Do we need a version for libraries?
6730
need_version=$need_version
6730
need_version=$need_version
6731
 
6731
 
6732
# Whether dlopen is supported.
6732
# Whether dlopen is supported.
6733
dlopen_support=$enable_dlopen
6733
dlopen_support=$enable_dlopen
6734
 
6734
 
6735
# Whether dlopen of programs is supported.
6735
# Whether dlopen of programs is supported.
6736
dlopen_self=$enable_dlopen_self
6736
dlopen_self=$enable_dlopen_self
6737
 
6737
 
6738
# Whether dlopen of statically linked programs is supported.
6738
# Whether dlopen of statically linked programs is supported.
6739
dlopen_self_static=$enable_dlopen_self_static
6739
dlopen_self_static=$enable_dlopen_self_static
6740
 
6740
 
6741
# Compiler flag to prevent dynamic linking.
6741
# Compiler flag to prevent dynamic linking.
6742
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6742
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6743
 
6743
 
6744
# Compiler flag to turn off builtin functions.
6744
# Compiler flag to turn off builtin functions.
6745
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6745
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6746
 
6746
 
6747
# Compiler flag to allow reflexive dlopens.
6747
# Compiler flag to allow reflexive dlopens.
6748
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6748
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6749
 
6749
 
6750
# Compiler flag to generate shared objects directly from archives.
6750
# Compiler flag to generate shared objects directly from archives.
6751
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6751
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6752
 
6752
 
6753
# Compiler flag to generate thread-safe objects.
6753
# Compiler flag to generate thread-safe objects.
6754
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6754
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6755
 
6755
 
6756
# Library versioning type.
6756
# Library versioning type.
6757
version_type=$version_type
6757
version_type=$version_type
6758
 
6758
 
6759
# Format of library name prefix.
6759
# Format of library name prefix.
6760
libname_spec=$lt_libname_spec
6760
libname_spec=$lt_libname_spec
6761
 
6761
 
6762
# List of archive names.  First name is the real one, the rest are links.
6762
# List of archive names.  First name is the real one, the rest are links.
6763
# The last name is the one that the linker finds with -lNAME.
6763
# The last name is the one that the linker finds with -lNAME.
6764
library_names_spec=$lt_library_names_spec
6764
library_names_spec=$lt_library_names_spec
6765
 
6765
 
6766
# The coded name of the library, if different from the real name.
6766
# The coded name of the library, if different from the real name.
6767
soname_spec=$lt_soname_spec
6767
soname_spec=$lt_soname_spec
6768
 
6768
 
6769
# Commands used to build and install an old-style archive.
6769
# Commands used to build and install an old-style archive.
6770
RANLIB=$lt_RANLIB
6770
RANLIB=$lt_RANLIB
6771
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6771
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6772
old_postinstall_cmds=$lt_old_postinstall_cmds
6772
old_postinstall_cmds=$lt_old_postinstall_cmds
6773
old_postuninstall_cmds=$lt_old_postuninstall_cmds
6773
old_postuninstall_cmds=$lt_old_postuninstall_cmds
6774
 
6774
 
6775
# Create an old-style archive from a shared archive.
6775
# Create an old-style archive from a shared archive.
6776
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6776
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6777
 
6777
 
6778
# Create a temporary old-style archive to link instead of a shared archive.
6778
# Create a temporary old-style archive to link instead of a shared archive.
6779
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6779
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6780
 
6780
 
6781
# Commands used to build and install a shared archive.
6781
# Commands used to build and install a shared archive.
6782
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6782
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6783
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6783
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6784
postinstall_cmds=$lt_postinstall_cmds
6784
postinstall_cmds=$lt_postinstall_cmds
6785
postuninstall_cmds=$lt_postuninstall_cmds
6785
postuninstall_cmds=$lt_postuninstall_cmds
6786
 
6786
 
6787
# Commands used to build a loadable module (assumed same as above if empty)
6787
# Commands used to build a loadable module (assumed same as above if empty)
6788
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6788
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6789
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6789
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6790
 
6790
 
6791
# Commands to strip libraries.
6791
# Commands to strip libraries.
6792
old_striplib=$lt_old_striplib
6792
old_striplib=$lt_old_striplib
6793
striplib=$lt_striplib
6793
striplib=$lt_striplib
6794
 
6794
 
6795
# Dependencies to place before the objects being linked to create a
6795
# Dependencies to place before the objects being linked to create a
6796
# shared library.
6796
# shared library.
6797
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6797
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6798
 
6798
 
6799
# Dependencies to place after the objects being linked to create a
6799
# Dependencies to place after the objects being linked to create a
6800
# shared library.
6800
# shared library.
6801
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6801
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6802
 
6802
 
6803
# Dependencies to place before the objects being linked to create a
6803
# Dependencies to place before the objects being linked to create a
6804
# shared library.
6804
# shared library.
6805
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6805
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6806
 
6806
 
6807
# Dependencies to place after the objects being linked to create a
6807
# Dependencies to place after the objects being linked to create a
6808
# shared library.
6808
# shared library.
6809
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6809
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6810
 
6810
 
6811
# The library search path used internally by the compiler when linking
6811
# The library search path used internally by the compiler when linking
6812
# a shared library.
6812
# a shared library.
6813
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6813
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6814
 
6814
 
6815
# Method to check whether dependent libraries are shared objects.
6815
# Method to check whether dependent libraries are shared objects.
6816
deplibs_check_method=$lt_deplibs_check_method
6816
deplibs_check_method=$lt_deplibs_check_method
6817
 
6817
 
6818
# Command to use when deplibs_check_method == file_magic.
6818
# Command to use when deplibs_check_method == file_magic.
6819
file_magic_cmd=$lt_file_magic_cmd
6819
file_magic_cmd=$lt_file_magic_cmd
6820
 
6820
 
6821
# Flag that allows shared libraries with undefined symbols to be built.
6821
# Flag that allows shared libraries with undefined symbols to be built.
6822
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6822
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6823
 
6823
 
6824
# Flag that forces no undefined symbols.
6824
# Flag that forces no undefined symbols.
6825
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6825
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6826
 
6826
 
6827
# Commands used to finish a libtool library installation in a directory.
6827
# Commands used to finish a libtool library installation in a directory.
6828
finish_cmds=$lt_finish_cmds
6828
finish_cmds=$lt_finish_cmds
6829
 
6829
 
6830
# Same as above, but a single script fragment to be evaled but not shown.
6830
# Same as above, but a single script fragment to be evaled but not shown.
6831
finish_eval=$lt_finish_eval
6831
finish_eval=$lt_finish_eval
6832
 
6832
 
6833
# Take the output of nm and produce a listing of raw symbols and C names.
6833
# Take the output of nm and produce a listing of raw symbols and C names.
6834
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6834
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6835
 
6835
 
6836
# Transform the output of nm in a proper C declaration
6836
# Transform the output of nm in a proper C declaration
6837
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6837
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6838
 
6838
 
6839
# Transform the output of nm in a C name address pair
6839
# Transform the output of nm in a C name address pair
6840
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6840
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6841
 
6841
 
6842
# This is the shared library runtime path variable.
6842
# This is the shared library runtime path variable.
6843
runpath_var=$runpath_var
6843
runpath_var=$runpath_var
6844
 
6844
 
6845
# This is the shared library path variable.
6845
# This is the shared library path variable.
6846
shlibpath_var=$shlibpath_var
6846
shlibpath_var=$shlibpath_var
6847
 
6847
 
6848
# Is shlibpath searched before the hard-coded library search path?
6848
# Is shlibpath searched before the hard-coded library search path?
6849
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6849
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6850
 
6850
 
6851
# How to hardcode a shared library path into an executable.
6851
# How to hardcode a shared library path into an executable.
6852
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6852
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6853
 
6853
 
6854
# Whether we should hardcode library paths into libraries.
6854
# Whether we should hardcode library paths into libraries.
6855
hardcode_into_libs=$hardcode_into_libs
6855
hardcode_into_libs=$hardcode_into_libs
6856
 
6856
 
6857
# Flag to hardcode \$libdir into a binary during linking.
6857
# Flag to hardcode \$libdir into a binary during linking.
6858
# This must work even if \$libdir does not exist.
6858
# This must work even if \$libdir does not exist.
6859
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6859
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6860
 
6860
 
6861
# If ld is used when linking, flag to hardcode \$libdir into
6861
# If ld is used when linking, flag to hardcode \$libdir into
6862
# a binary during linking. This must work even if \$libdir does
6862
# a binary during linking. This must work even if \$libdir does
6863
# not exist.
6863
# not exist.
6864
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6864
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6865
 
6865
 
6866
# Whether we need a single -rpath flag with a separated argument.
6866
# Whether we need a single -rpath flag with a separated argument.
6867
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6867
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6868
 
6868
 
6869
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6869
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6870
# resulting binary.
6870
# resulting binary.
6871
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6871
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6872
 
6872
 
6873
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6873
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6874
# resulting binary.
6874
# resulting binary.
6875
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6875
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6876
 
6876
 
6877
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6877
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6878
# the resulting binary.
6878
# the resulting binary.
6879
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6879
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6880
 
6880
 
6881
# Set to yes if building a shared library automatically hardcodes DIR into the library
6881
# Set to yes if building a shared library automatically hardcodes DIR into the library
6882
# and all subsequent libraries and executables linked against it.
6882
# and all subsequent libraries and executables linked against it.
6883
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6883
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6884
 
6884
 
6885
# Variables whose values should be saved in libtool wrapper scripts and
6885
# Variables whose values should be saved in libtool wrapper scripts and
6886
# restored at relink time.
6886
# restored at relink time.
6887
variables_saved_for_relink="$variables_saved_for_relink"
6887
variables_saved_for_relink="$variables_saved_for_relink"
6888
 
6888
 
6889
# Whether libtool must link a program against all its dependency libraries.
6889
# Whether libtool must link a program against all its dependency libraries.
6890
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6890
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6891
 
6891
 
6892
# Compile-time system search path for libraries
6892
# Compile-time system search path for libraries
6893
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6893
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6894
 
6894
 
6895
# Run-time system search path for libraries
6895
# Run-time system search path for libraries
6896
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6896
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6897
 
6897
 
6898
# Fix the shell variable \$srcfile for the compiler.
6898
# Fix the shell variable \$srcfile for the compiler.
6899
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6899
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6900
 
6900
 
6901
# Set to yes if exported symbols are required.
6901
# Set to yes if exported symbols are required.
6902
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6902
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6903
 
6903
 
6904
# The commands to list exported symbols.
6904
# The commands to list exported symbols.
6905
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6905
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6906
 
6906
 
6907
# The commands to extract the exported symbol list from a shared archive.
6907
# The commands to extract the exported symbol list from a shared archive.
6908
extract_expsyms_cmds=$lt_extract_expsyms_cmds
6908
extract_expsyms_cmds=$lt_extract_expsyms_cmds
6909
 
6909
 
6910
# Symbols that should not be listed in the preloaded symbols.
6910
# Symbols that should not be listed in the preloaded symbols.
6911
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6911
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6912
 
6912
 
6913
# Symbols that must always be exported.
6913
# Symbols that must always be exported.
6914
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6914
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6915
 
6915
 
6916
ifelse([$1],[],
6916
ifelse([$1],[],
6917
[# ### END LIBTOOL CONFIG],
6917
[# ### END LIBTOOL CONFIG],
6918
[# ### END LIBTOOL TAG CONFIG: $tagname])
6918
[# ### END LIBTOOL TAG CONFIG: $tagname])
6919
 
6919
 
6920
__EOF__
6920
__EOF__
6921
 
6921
 
6922
ifelse([$1],[], [
6922
ifelse([$1],[], [
6923
  case $host_os in
6923
  case $host_os in
6924
  aix3*)
6924
  aix3*)
6925
    cat <<\EOF >> "$cfgfile"
6925
    cat <<\EOF >> "$cfgfile"
6926
 
6926
 
6927
# AIX sometimes has problems with the GCC collect2 program.  For some
6927
# AIX sometimes has problems with the GCC collect2 program.  For some
6928
# reason, if we set the COLLECT_NAMES environment variable, the problems
6928
# reason, if we set the COLLECT_NAMES environment variable, the problems
6929
# vanish in a puff of smoke.
6929
# vanish in a puff of smoke.
6930
if test "X${COLLECT_NAMES+set}" != Xset; then
6930
if test "X${COLLECT_NAMES+set}" != Xset; then
6931
  COLLECT_NAMES=
6931
  COLLECT_NAMES=
6932
  export COLLECT_NAMES
6932
  export COLLECT_NAMES
6933
fi
6933
fi
6934
EOF
6934
EOF
6935
    ;;
6935
    ;;
6936
  esac
6936
  esac
6937
 
6937
 
6938
  # We use sed instead of cat because bash on DJGPP gets confused if
6938
  # We use sed instead of cat because bash on DJGPP gets confused if
6939
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6939
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6940
  # text mode, it properly converts lines to CR/LF.  This bash problem
6940
  # text mode, it properly converts lines to CR/LF.  This bash problem
6941
  # is reportedly fixed, but why not run on old versions too?
6941
  # is reportedly fixed, but why not run on old versions too?
6942
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6942
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6943
 
6943
 
6944
  mv -f "$cfgfile" "$ofile" || \
6944
  mv -f "$cfgfile" "$ofile" || \
6945
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6945
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6946
  chmod +x "$ofile"
6946
  chmod +x "$ofile"
6947
])
6947
])
6948
else
6948
else
6949
  # If there is no Makefile yet, we rely on a make rule to execute
6949
  # If there is no Makefile yet, we rely on a make rule to execute
6950
  # `config.status --recheck' to rerun these tests and create the
6950
  # `config.status --recheck' to rerun these tests and create the
6951
  # libtool script then.
6951
  # libtool script then.
6952
  test -f Makefile && make "$ltmain"
6952
  test -f Makefile && make "$ltmain"
6953
fi
6953
fi
6954
])# AC_LIBTOOL_CONFIG
6954
])# AC_LIBTOOL_CONFIG
6955
 
6955
 
6956
 
6956
 
6957
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6957
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6958
# -------------------------------------------
6958
# -------------------------------------------
6959
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6959
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6960
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6960
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6961
 
6961
 
6962
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6962
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6963
 
6963
 
6964
if test "$GCC" = yes; then
6964
if test "$GCC" = yes; then
6965
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6965
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6966
 
6966
 
6967
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6967
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6968
    lt_cv_prog_compiler_rtti_exceptions,
6968
    lt_cv_prog_compiler_rtti_exceptions,
6969
    [-fno-rtti -fno-exceptions], [],
6969
    [-fno-rtti -fno-exceptions], [],
6970
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6970
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6971
fi
6971
fi
6972
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6972
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6973
 
6973
 
6974
 
6974
 
6975
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6975
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6976
# ---------------------------------
6976
# ---------------------------------
6977
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6977
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6978
[AC_REQUIRE([AC_CANONICAL_HOST])
6978
[AC_REQUIRE([AC_CANONICAL_HOST])
6979
AC_REQUIRE([AC_PROG_NM])
6979
AC_REQUIRE([AC_PROG_NM])
6980
AC_REQUIRE([AC_OBJEXT])
6980
AC_REQUIRE([AC_OBJEXT])
6981
# Check for command to grab the raw symbol name followed by C symbol from nm.
6981
# Check for command to grab the raw symbol name followed by C symbol from nm.
6982
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6982
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6983
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6983
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6984
[
6984
[
6985
# These are sane defaults that work on at least a few old systems.
6985
# These are sane defaults that work on at least a few old systems.
6986
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6986
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6987
 
6987
 
6988
# Character class describing NM global symbol codes.
6988
# Character class describing NM global symbol codes.
6989
symcode='[[BCDEGRST]]'
6989
symcode='[[BCDEGRST]]'
6990
 
6990
 
6991
# Regexp to match symbols that can be accessed directly from C.
6991
# Regexp to match symbols that can be accessed directly from C.
6992
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6992
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6993
 
6993
 
6994
# Transform the above into a raw symbol and a C symbol.
6994
# Transform the above into a raw symbol and a C symbol.
6995
symxfrm='\1 \2\3 \3'
6995
symxfrm='\1 \2\3 \3'
6996
 
6996
 
6997
# Transform an extracted symbol line into a proper C declaration
6997
# Transform an extracted symbol line into a proper C declaration
6998
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6998
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6999
 
6999
 
7000
# Transform an extracted symbol line into symbol name and symbol address
7000
# Transform an extracted symbol line into symbol name and symbol address
7001
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'"
7001
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'"
7002
 
7002
 
7003
# Define system-specific variables.
7003
# Define system-specific variables.
7004
case $host_os in
7004
case $host_os in
7005
aix*)
7005
aix*)
7006
  symcode='[[BCDT]]'
7006
  symcode='[[BCDT]]'
7007
  ;;
7007
  ;;
7008
cygwin* | mingw* | pw32*)
7008
cygwin* | mingw* | pw32*)
7009
  symcode='[[ABCDGISTW]]'
7009
  symcode='[[ABCDGISTW]]'
7010
  ;;
7010
  ;;
7011
hpux*) # Its linker distinguishes data from code symbols
7011
hpux*) # Its linker distinguishes data from code symbols
7012
  if test "$host_cpu" = ia64; then
7012
  if test "$host_cpu" = ia64; then
7013
    symcode='[[ABCDEGRST]]'
7013
    symcode='[[ABCDEGRST]]'
7014
  fi
7014
  fi
7015
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7015
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7016
  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'"
7016
  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'"
7017
  ;;
7017
  ;;
7018
irix* | nonstopux*)
7018
irix* | nonstopux*)
7019
  symcode='[[BCDEGRST]]'
7019
  symcode='[[BCDEGRST]]'
7020
  ;;
7020
  ;;
7021
osf*)
7021
osf*)
7022
  symcode='[[BCDEGQRST]]'
7022
  symcode='[[BCDEGQRST]]'
7023
  ;;
7023
  ;;
7024
solaris* | sysv5*)
7024
solaris* | sysv5*)
7025
  symcode='[[BDT]]'
7025
  symcode='[[BDT]]'
7026
  ;;
7026
  ;;
7027
sysv4)
7027
sysv4)
7028
  symcode='[[DFNSTU]]'
7028
  symcode='[[DFNSTU]]'
7029
  ;;
7029
  ;;
7030
esac
7030
esac
7031
 
7031
 
7032
# Handle CRLF in mingw tool chain
7032
# Handle CRLF in mingw tool chain
7033
opt_cr=
7033
opt_cr=
7034
case $build_os in
7034
case $build_os in
7035
mingw*)
7035
mingw*)
7036
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7036
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7037
  ;;
7037
  ;;
7038
esac
7038
esac
7039
 
7039
 
7040
# If we're using GNU nm, then use its standard symbol codes.
7040
# If we're using GNU nm, then use its standard symbol codes.
7041
case `$NM -V 2>&1` in
7041
case `$NM -V 2>&1` in
7042
*GNU* | *'with BFD'*)
7042
*GNU* | *'with BFD'*)
7043
  symcode='[[ABCDGISTW]]' ;;
7043
  symcode='[[ABCDGISTW]]' ;;
7044
esac
7044
esac
7045
 
7045
 
7046
# Try without a prefix undercore, then with it.
7046
# Try without a prefix undercore, then with it.
7047
for ac_symprfx in "" "_"; do
7047
for ac_symprfx in "" "_"; do
7048
 
7048
 
7049
  # Write the raw and C identifiers.
7049
  # Write the raw and C identifiers.
7050
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
7050
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
7051
 
7051
 
7052
  # Check to see that the pipe works correctly.
7052
  # Check to see that the pipe works correctly.
7053
  pipe_works=no
7053
  pipe_works=no
7054
 
7054
 
7055
  rm -f conftest*
7055
  rm -f conftest*
7056
  cat > conftest.$ac_ext <<EOF
7056
  cat > conftest.$ac_ext <<EOF
7057
#ifdef __cplusplus
7057
#ifdef __cplusplus
7058
extern "C" {
7058
extern "C" {
7059
#endif
7059
#endif
7060
char nm_test_var;
7060
char nm_test_var;
7061
void nm_test_func(){}
7061
void nm_test_func(){}
7062
#ifdef __cplusplus
7062
#ifdef __cplusplus
7063
}
7063
}
7064
#endif
7064
#endif
7065
int main(){nm_test_var='a';nm_test_func();return(0);}
7065
int main(){nm_test_var='a';nm_test_func();return(0);}
7066
EOF
7066
EOF
7067
 
7067
 
7068
  if AC_TRY_EVAL(ac_compile); then
7068
  if AC_TRY_EVAL(ac_compile); then
7069
    # Now try to grab the symbols.
7069
    # Now try to grab the symbols.
7070
    nlist=conftest.nm
7070
    nlist=conftest.nm
7071
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
7071
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
7072
      # Try sorting and uniquifying the output.
7072
      # Try sorting and uniquifying the output.
7073
      if sort "$nlist" | uniq > "$nlist"T; then
7073
      if sort "$nlist" | uniq > "$nlist"T; then
7074
	mv -f "$nlist"T "$nlist"
7074
	mv -f "$nlist"T "$nlist"
7075
      else
7075
      else
7076
	rm -f "$nlist"T
7076
	rm -f "$nlist"T
7077
      fi
7077
      fi
7078
 
7078
 
7079
      # Make sure that we snagged all the symbols we need.
7079
      # Make sure that we snagged all the symbols we need.
7080
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
7080
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
7081
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
7081
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
7082
	  cat <<EOF > conftest.$ac_ext
7082
	  cat <<EOF > conftest.$ac_ext
7083
#ifdef __cplusplus
7083
#ifdef __cplusplus
7084
extern "C" {
7084
extern "C" {
7085
#endif
7085
#endif
7086
 
7086
 
7087
EOF
7087
EOF
7088
	  # Now generate the symbol file.
7088
	  # Now generate the symbol file.
7089
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7089
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7090
 
7090
 
7091
	  cat <<EOF >> conftest.$ac_ext
7091
	  cat <<EOF >> conftest.$ac_ext
7092
#if defined (__STDC__) && __STDC__
7092
#if defined (__STDC__) && __STDC__
7093
# define lt_ptr_t void *
7093
# define lt_ptr_t void *
7094
#else
7094
#else
7095
# define lt_ptr_t char *
7095
# define lt_ptr_t char *
7096
# define const
7096
# define const
7097
#endif
7097
#endif
7098
 
7098
 
7099
/* The mapping between symbol names and symbols. */
7099
/* The mapping between symbol names and symbols. */
7100
const struct {
7100
const struct {
7101
  const char *name;
7101
  const char *name;
7102
  lt_ptr_t address;
7102
  lt_ptr_t address;
7103
}
7103
}
7104
lt_preloaded_symbols[[]] =
7104
lt_preloaded_symbols[[]] =
7105
{
7105
{
7106
EOF
7106
EOF
7107
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7107
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7108
	  cat <<\EOF >> conftest.$ac_ext
7108
	  cat <<\EOF >> conftest.$ac_ext
7109
  {0, (lt_ptr_t) 0}
7109
  {0, (lt_ptr_t) 0}
7110
};
7110
};
7111
 
7111
 
7112
#ifdef __cplusplus
7112
#ifdef __cplusplus
7113
}
7113
}
7114
#endif
7114
#endif
7115
EOF
7115
EOF
7116
	  # Now try linking the two files.
7116
	  # Now try linking the two files.
7117
	  mv conftest.$ac_objext conftstm.$ac_objext
7117
	  mv conftest.$ac_objext conftstm.$ac_objext
7118
	  lt_save_LIBS="$LIBS"
7118
	  lt_save_LIBS="$LIBS"
7119
	  lt_save_CFLAGS="$CFLAGS"
7119
	  lt_save_CFLAGS="$CFLAGS"
7120
	  LIBS="conftstm.$ac_objext"
7120
	  LIBS="conftstm.$ac_objext"
7121
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7121
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7122
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
7122
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
7123
	    pipe_works=yes
7123
	    pipe_works=yes
7124
	  fi
7124
	  fi
7125
	  LIBS="$lt_save_LIBS"
7125
	  LIBS="$lt_save_LIBS"
7126
	  CFLAGS="$lt_save_CFLAGS"
7126
	  CFLAGS="$lt_save_CFLAGS"
7127
	else
7127
	else
7128
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
7128
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
7129
	fi
7129
	fi
7130
      else
7130
      else
7131
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
7131
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
7132
      fi
7132
      fi
7133
    else
7133
    else
7134
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
7134
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
7135
    fi
7135
    fi
7136
  else
7136
  else
7137
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
7137
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
7138
    cat conftest.$ac_ext >&5
7138
    cat conftest.$ac_ext >&5
7139
  fi
7139
  fi
7140
  rm -f conftest* conftst*
7140
  rm -f conftest* conftst*
7141
 
7141
 
7142
  # Do not use the global_symbol_pipe unless it works.
7142
  # Do not use the global_symbol_pipe unless it works.
7143
  if test "$pipe_works" = yes; then
7143
  if test "$pipe_works" = yes; then
7144
    break
7144
    break
7145
  else
7145
  else
7146
    lt_cv_sys_global_symbol_pipe=
7146
    lt_cv_sys_global_symbol_pipe=
7147
  fi
7147
  fi
7148
done
7148
done
7149
])
7149
])
7150
if test -z "$lt_cv_sys_global_symbol_pipe"; then
7150
if test -z "$lt_cv_sys_global_symbol_pipe"; then
7151
  lt_cv_sys_global_symbol_to_cdecl=
7151
  lt_cv_sys_global_symbol_to_cdecl=
7152
fi
7152
fi
7153
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7153
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7154
  AC_MSG_RESULT(failed)
7154
  AC_MSG_RESULT(failed)
7155
else
7155
else
7156
  AC_MSG_RESULT(ok)
7156
  AC_MSG_RESULT(ok)
7157
fi
7157
fi
7158
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7158
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7159
 
7159
 
7160
 
7160
 
7161
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
7161
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
7162
# ---------------------------------------
7162
# ---------------------------------------
7163
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
7163
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
7164
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
7164
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
7165
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7165
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7166
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
7166
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
7167
 
7167
 
7168
AC_MSG_CHECKING([for $compiler option to produce PIC])
7168
AC_MSG_CHECKING([for $compiler option to produce PIC])
7169
 ifelse([$1],[CXX],[
7169
 ifelse([$1],[CXX],[
7170
  # C++ specific cases for pic, static, wl, etc.
7170
  # C++ specific cases for pic, static, wl, etc.
7171
  if test "$GXX" = yes; then
7171
  if test "$GXX" = yes; then
7172
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7172
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7173
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7173
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7174
 
7174
 
7175
    case $host_os in
7175
    case $host_os in
7176
    aix*)
7176
    aix*)
7177
      # All AIX code is PIC.
7177
      # All AIX code is PIC.
7178
      if test "$host_cpu" = ia64; then
7178
      if test "$host_cpu" = ia64; then
7179
	# AIX 5 now supports IA64 processor
7179
	# AIX 5 now supports IA64 processor
7180
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7180
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7181
      fi
7181
      fi
7182
      ;;
7182
      ;;
7183
    amigaos*)
7183
    amigaos*)
7184
      # FIXME: we need at least 68020 code to build shared libraries, but
7184
      # FIXME: we need at least 68020 code to build shared libraries, but
7185
      # adding the `-m68020' flag to GCC prevents building anything better,
7185
      # adding the `-m68020' flag to GCC prevents building anything better,
7186
      # like `-m68040'.
7186
      # like `-m68040'.
7187
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7187
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7188
      ;;
7188
      ;;
7189
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7189
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7190
      # PIC is the default for these OSes.
7190
      # PIC is the default for these OSes.
7191
      ;;
7191
      ;;
7192
    mingw* | os2* | pw32*)
7192
    mingw* | os2* | pw32*)
7193
      # This hack is so that the source file can tell whether it is being
7193
      # This hack is so that the source file can tell whether it is being
7194
      # built for inclusion in a dll (and should export symbols for example).
7194
      # built for inclusion in a dll (and should export symbols for example).
7195
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7195
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7196
      ;;
7196
      ;;
7197
    darwin* | rhapsody*)
7197
    darwin* | rhapsody*)
7198
      # PIC is the default on this platform
7198
      # PIC is the default on this platform
7199
      # Common symbols not allowed in MH_DYLIB files
7199
      # Common symbols not allowed in MH_DYLIB files
7200
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7200
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7201
      ;;
7201
      ;;
7202
    *djgpp*)
7202
    *djgpp*)
7203
      # DJGPP does not support shared libraries at all
7203
      # DJGPP does not support shared libraries at all
7204
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7204
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7205
      ;;
7205
      ;;
7206
    sysv4*MP*)
7206
    sysv4*MP*)
7207
      if test -d /usr/nec; then
7207
      if test -d /usr/nec; then
7208
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7208
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7209
      fi
7209
      fi
7210
      ;;
7210
      ;;
7211
    hpux*)
7211
    hpux*)
7212
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7212
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7213
      # not for PA HP-UX.
7213
      # not for PA HP-UX.
7214
      case "$host_cpu" in
7214
      case "$host_cpu" in
7215
      hppa*64*|ia64*)
7215
      hppa*64*|ia64*)
7216
	;;
7216
	;;
7217
      *)
7217
      *)
7218
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7218
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7219
	;;
7219
	;;
7220
      esac
7220
      esac
7221
      ;;
7221
      ;;
7222
    *)
7222
    *)
7223
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7223
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7224
      ;;
7224
      ;;
7225
    esac
7225
    esac
7226
  else
7226
  else
7227
    case $host_os in
7227
    case $host_os in
7228
      aix4* | aix5*)
7228
      aix4* | aix5*)
7229
	# All AIX code is PIC.
7229
	# All AIX code is PIC.
7230
	if test "$host_cpu" = ia64; then
7230
	if test "$host_cpu" = ia64; then
7231
	  # AIX 5 now supports IA64 processor
7231
	  # AIX 5 now supports IA64 processor
7232
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7232
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7233
	else
7233
	else
7234
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7234
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7235
	fi
7235
	fi
7236
	;;
7236
	;;
7237
      chorus*)
7237
      chorus*)
7238
	case $cc_basename in
7238
	case $cc_basename in
7239
	cxch68)
7239
	cxch68)
7240
	  # Green Hills C++ Compiler
7240
	  # Green Hills C++ Compiler
7241
	  # _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"
7241
	  # _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"
7242
	  ;;
7242
	  ;;
7243
	esac
7243
	esac
7244
	;;
7244
	;;
7245
      dgux*)
7245
      dgux*)
7246
	case $cc_basename in
7246
	case $cc_basename in
7247
	  ec++)
7247
	  ec++)
7248
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7248
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7249
	    ;;
7249
	    ;;
7250
	  ghcx)
7250
	  ghcx)
7251
	    # Green Hills C++ Compiler
7251
	    # Green Hills C++ Compiler
7252
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7252
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7253
	    ;;
7253
	    ;;
7254
	  *)
7254
	  *)
7255
	    ;;
7255
	    ;;
7256
	esac
7256
	esac
7257
	;;
7257
	;;
7258
      freebsd*)
7258
      freebsd*)
7259
	# FreeBSD uses GNU C++
7259
	# FreeBSD uses GNU C++
7260
	;;
7260
	;;
7261
      hpux9* | hpux10* | hpux11*)
7261
      hpux9* | hpux10* | hpux11*)
7262
	case $cc_basename in
7262
	case $cc_basename in
7263
	  CC)
7263
	  CC)
7264
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7264
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7265
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7265
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7266
	    if test "$host_cpu" != ia64; then
7266
	    if test "$host_cpu" != ia64; then
7267
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7267
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7268
	    fi
7268
	    fi
7269
	    ;;
7269
	    ;;
7270
	  aCC)
7270
	  aCC)
7271
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7271
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7272
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7272
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7273
	    case "$host_cpu" in
7273
	    case "$host_cpu" in
7274
	    hppa*64*|ia64*)
7274
	    hppa*64*|ia64*)
7275
	      # +Z the default
7275
	      # +Z the default
7276
	      ;;
7276
	      ;;
7277
	    *)
7277
	    *)
7278
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7278
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7279
	      ;;
7279
	      ;;
7280
	    esac
7280
	    esac
7281
	    ;;
7281
	    ;;
7282
	  *)
7282
	  *)
7283
	    ;;
7283
	    ;;
7284
	esac
7284
	esac
7285
	;;
7285
	;;
7286
      irix5* | irix6* | nonstopux*)
7286
      irix5* | irix6* | nonstopux*)
7287
	case $cc_basename in
7287
	case $cc_basename in
7288
	  CC)
7288
	  CC)
7289
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7289
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7290
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7290
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7291
	    # CC pic flag -KPIC is the default.
7291
	    # CC pic flag -KPIC is the default.
7292
	    ;;
7292
	    ;;
7293
	  *)
7293
	  *)
7294
	    ;;
7294
	    ;;
7295
	esac
7295
	esac
7296
	;;
7296
	;;
7297
      linux*)
7297
      linux*)
7298
	case $cc_basename in
7298
	case $cc_basename in
7299
	  KCC)
7299
	  KCC)
7300
	    # KAI C++ Compiler
7300
	    # KAI C++ Compiler
7301
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7301
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7302
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7302
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7303
	    ;;
7303
	    ;;
7304
	  icpc)
7304
	  icpc)
7305
	    # Intel C++
7305
	    # Intel C++
7306
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7306
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7307
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7307
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7308
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7308
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7309
	    ;; 
7309
	    ;; 
7310
	  cxx)
7310
	  cxx)
7311
	    # Compaq C++
7311
	    # Compaq C++
7312
	    # Make sure the PIC flag is empty.  It appears that all Alpha
7312
	    # Make sure the PIC flag is empty.  It appears that all Alpha
7313
	    # Linux and Compaq Tru64 Unix objects are PIC.
7313
	    # Linux and Compaq Tru64 Unix objects are PIC.
7314
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7314
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7315
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7315
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7316
	    ;;
7316
	    ;;
7317
	  *)
7317
	  *)
7318
	    ;;
7318
	    ;;
7319
	esac
7319
	esac
7320
	;;
7320
	;;
7321
      lynxos*)
7321
      lynxos*)
7322
	;;
7322
	;;
7323
      m88k*)
7323
      m88k*)
7324
	;;
7324
	;;
7325
      mvs*)
7325
      mvs*)
7326
	case $cc_basename in
7326
	case $cc_basename in
7327
	  cxx)
7327
	  cxx)
7328
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7328
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7329
	    ;;
7329
	    ;;
7330
	  *)
7330
	  *)
7331
	    ;;
7331
	    ;;
7332
	esac
7332
	esac
7333
	;;
7333
	;;
7334
      netbsd*)
7334
      netbsd*)
7335
	;;
7335
	;;
7336
      osf3* | osf4* | osf5*)
7336
      osf3* | osf4* | osf5*)
7337
	case $cc_basename in
7337
	case $cc_basename in
7338
	  KCC)
7338
	  KCC)
7339
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7339
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7340
	    ;;
7340
	    ;;
7341
	  RCC)
7341
	  RCC)
7342
	    # Rational C++ 2.4.1
7342
	    # Rational C++ 2.4.1
7343
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7343
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7344
	    ;;
7344
	    ;;
7345
	  cxx)
7345
	  cxx)
7346
	    # Digital/Compaq C++
7346
	    # Digital/Compaq C++
7347
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7347
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7348
	    # Make sure the PIC flag is empty.  It appears that all Alpha
7348
	    # Make sure the PIC flag is empty.  It appears that all Alpha
7349
	    # Linux and Compaq Tru64 Unix objects are PIC.
7349
	    # Linux and Compaq Tru64 Unix objects are PIC.
7350
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7350
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7351
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7351
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7352
	    ;;
7352
	    ;;
7353
	  *)
7353
	  *)
7354
	    ;;
7354
	    ;;
7355
	esac
7355
	esac
7356
	;;
7356
	;;
7357
      psos*)
7357
      psos*)
7358
	;;
7358
	;;
7359
      sco*)
7359
      sco*)
7360
	case $cc_basename in
7360
	case $cc_basename in
7361
	  CC)
7361
	  CC)
7362
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7362
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7363
	    ;;
7363
	    ;;
7364
	  *)
7364
	  *)
7365
	    ;;
7365
	    ;;
7366
	esac
7366
	esac
7367
	;;
7367
	;;
7368
      solaris*)
7368
      solaris*)
7369
	case $cc_basename in
7369
	case $cc_basename in
7370
	  CC)
7370
	  CC)
7371
	    # Sun C++ 4.2, 5.x and Centerline C++
7371
	    # Sun C++ 4.2, 5.x and Centerline C++
7372
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7372
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7373
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7373
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7374
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7374
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7375
	    ;;
7375
	    ;;
7376
	  gcx)
7376
	  gcx)
7377
	    # Green Hills C++ Compiler
7377
	    # Green Hills C++ Compiler
7378
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7378
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7379
	    ;;
7379
	    ;;
7380
	  *)
7380
	  *)
7381
	    ;;
7381
	    ;;
7382
	esac
7382
	esac
7383
	;;
7383
	;;
7384
      sunos4*)
7384
      sunos4*)
7385
	case $cc_basename in
7385
	case $cc_basename in
7386
	  CC)
7386
	  CC)
7387
	    # Sun C++ 4.x
7387
	    # Sun C++ 4.x
7388
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7388
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7389
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7389
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7390
	    ;;
7390
	    ;;
7391
	  lcc)
7391
	  lcc)
7392
	    # Lucid
7392
	    # Lucid
7393
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7393
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7394
	    ;;
7394
	    ;;
7395
	  *)
7395
	  *)
7396
	    ;;
7396
	    ;;
7397
	esac
7397
	esac
7398
	;;
7398
	;;
7399
      tandem*)
7399
      tandem*)
7400
	case $cc_basename in
7400
	case $cc_basename in
7401
	  NCC)
7401
	  NCC)
7402
	    # NonStop-UX NCC 3.20
7402
	    # NonStop-UX NCC 3.20
7403
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7403
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7404
	    ;;
7404
	    ;;
7405
	  *)
7405
	  *)
7406
	    ;;
7406
	    ;;
7407
	esac
7407
	esac
7408
	;;
7408
	;;
7409
      unixware*)
7409
      unixware*)
7410
	;;
7410
	;;
7411
      vxworks*)
7411
      vxworks*)
7412
	;;
7412
	;;
7413
      *)
7413
      *)
7414
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7414
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7415
	;;
7415
	;;
7416
    esac
7416
    esac
7417
  fi
7417
  fi
7418
],
7418
],
7419
[
7419
[
7420
  if test "$GCC" = yes; then
7420
  if test "$GCC" = yes; then
7421
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7421
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7422
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7422
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7423
 
7423
 
7424
    case $host_os in
7424
    case $host_os in
7425
      aix*)
7425
      aix*)
7426
      # All AIX code is PIC.
7426
      # All AIX code is PIC.
7427
      if test "$host_cpu" = ia64; then
7427
      if test "$host_cpu" = ia64; then
7428
	# AIX 5 now supports IA64 processor
7428
	# AIX 5 now supports IA64 processor
7429
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7429
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7430
      fi
7430
      fi
7431
      ;;
7431
      ;;
7432
 
7432
 
7433
    amigaos*)
7433
    amigaos*)
7434
      # FIXME: we need at least 68020 code to build shared libraries, but
7434
      # FIXME: we need at least 68020 code to build shared libraries, but
7435
      # adding the `-m68020' flag to GCC prevents building anything better,
7435
      # adding the `-m68020' flag to GCC prevents building anything better,
7436
      # like `-m68040'.
7436
      # like `-m68040'.
7437
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7437
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7438
      ;;
7438
      ;;
7439
 
7439
 
7440
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7440
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7441
      # PIC is the default for these OSes.
7441
      # PIC is the default for these OSes.
7442
      ;;
7442
      ;;
7443
 
7443
 
7444
    mingw* | pw32* | os2*)
7444
    mingw* | pw32* | os2*)
7445
      # This hack is so that the source file can tell whether it is being
7445
      # This hack is so that the source file can tell whether it is being
7446
      # built for inclusion in a dll (and should export symbols for example).
7446
      # built for inclusion in a dll (and should export symbols for example).
7447
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7447
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7448
      ;;
7448
      ;;
7449
 
7449
 
7450
    darwin* | rhapsody*)
7450
    darwin* | rhapsody*)
7451
      # PIC is the default on this platform
7451
      # PIC is the default on this platform
7452
      # Common symbols not allowed in MH_DYLIB files
7452
      # Common symbols not allowed in MH_DYLIB files
7453
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7453
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7454
      ;;
7454
      ;;
7455
 
7455
 
7456
    msdosdjgpp*)
7456
    msdosdjgpp*)
7457
      # Just because we use GCC doesn't mean we suddenly get shared libraries
7457
      # Just because we use GCC doesn't mean we suddenly get shared libraries
7458
      # on systems that don't support them.
7458
      # on systems that don't support them.
7459
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7459
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7460
      enable_shared=no
7460
      enable_shared=no
7461
      ;;
7461
      ;;
7462
 
7462
 
7463
    sysv4*MP*)
7463
    sysv4*MP*)
7464
      if test -d /usr/nec; then
7464
      if test -d /usr/nec; then
7465
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7465
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7466
      fi
7466
      fi
7467
      ;;
7467
      ;;
7468
 
7468
 
7469
    hpux*)
7469
    hpux*)
7470
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7470
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7471
      # not for PA HP-UX.
7471
      # not for PA HP-UX.
7472
      case "$host_cpu" in
7472
      case "$host_cpu" in
7473
      hppa*64*|ia64*)
7473
      hppa*64*|ia64*)
7474
	# +Z the default
7474
	# +Z the default
7475
	;;
7475
	;;
7476
      *)
7476
      *)
7477
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7477
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7478
	;;
7478
	;;
7479
      esac
7479
      esac
7480
      ;;
7480
      ;;
7481
 
7481
 
7482
    *)
7482
    *)
7483
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7483
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7484
      ;;
7484
      ;;
7485
    esac
7485
    esac
7486
  else
7486
  else
7487
    # PORTME Check for flag to pass linker flags through the system compiler.
7487
    # PORTME Check for flag to pass linker flags through the system compiler.
7488
    case $host_os in
7488
    case $host_os in
7489
    aix*)
7489
    aix*)
7490
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7490
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7491
      if test "$host_cpu" = ia64; then
7491
      if test "$host_cpu" = ia64; then
7492
	# AIX 5 now supports IA64 processor
7492
	# AIX 5 now supports IA64 processor
7493
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7493
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7494
      else
7494
      else
7495
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7495
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7496
      fi
7496
      fi
7497
      ;;
7497
      ;;
7498
 
7498
 
7499
    mingw* | pw32* | os2*)
7499
    mingw* | pw32* | os2*)
7500
      # This hack is so that the source file can tell whether it is being
7500
      # This hack is so that the source file can tell whether it is being
7501
      # built for inclusion in a dll (and should export symbols for example).
7501
      # built for inclusion in a dll (and should export symbols for example).
7502
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7502
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7503
      ;;
7503
      ;;
7504
 
7504
 
7505
    hpux9* | hpux10* | hpux11*)
7505
    hpux9* | hpux10* | hpux11*)
7506
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7506
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7507
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7507
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7508
      # not for PA HP-UX.
7508
      # not for PA HP-UX.
7509
      case "$host_cpu" in
7509
      case "$host_cpu" in
7510
      hppa*64*|ia64*)
7510
      hppa*64*|ia64*)
7511
	# +Z the default
7511
	# +Z the default
7512
	;;
7512
	;;
7513
      *)
7513
      *)
7514
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7514
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7515
	;;
7515
	;;
7516
      esac
7516
      esac
7517
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
7517
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
7518
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7518
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7519
      ;;
7519
      ;;
7520
 
7520
 
7521
    irix5* | irix6* | nonstopux*)
7521
    irix5* | irix6* | nonstopux*)
7522
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7522
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7523
      # PIC (with -KPIC) is the default.
7523
      # PIC (with -KPIC) is the default.
7524
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7524
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7525
      ;;
7525
      ;;
7526
 
7526
 
7527
    newsos6)
7527
    newsos6)
7528
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7528
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7529
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7529
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7530
      ;;
7530
      ;;
7531
 
7531
 
7532
    linux*)
7532
    linux*)
7533
      case $CC in
7533
      case $CC in
7534
      icc|ecc)
7534
      icc|ecc)
7535
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7535
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7536
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7536
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7537
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7537
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7538
        ;;
7538
        ;;
7539
      ccc)
7539
      ccc)
7540
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7540
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7541
        # All Alpha code is PIC.
7541
        # All Alpha code is PIC.
7542
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7542
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7543
        ;;
7543
        ;;
7544
      esac
7544
      esac
7545
      ;;
7545
      ;;
7546
 
7546
 
7547
    osf3* | osf4* | osf5*)
7547
    osf3* | osf4* | osf5*)
7548
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7548
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7549
      # All OSF/1 code is PIC.
7549
      # All OSF/1 code is PIC.
7550
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7550
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7551
      ;;
7551
      ;;
7552
 
7552
 
7553
    sco3.2v5*)
7553
    sco3.2v5*)
7554
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
7554
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
7555
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
7555
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
7556
      ;;
7556
      ;;
7557
 
7557
 
7558
    solaris*)
7558
    solaris*)
7559
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7559
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7560
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7560
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7561
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7561
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7562
      ;;
7562
      ;;
7563
 
7563
 
7564
    sunos4*)
7564
    sunos4*)
7565
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7565
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7566
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7566
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7567
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7567
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7568
      ;;
7568
      ;;
7569
 
7569
 
7570
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7570
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7571
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7571
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7572
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7572
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7573
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7573
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7574
      ;;
7574
      ;;
7575
 
7575
 
7576
    sysv4*MP*)
7576
    sysv4*MP*)
7577
      if test -d /usr/nec ;then
7577
      if test -d /usr/nec ;then
7578
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7578
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7579
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7579
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7580
      fi
7580
      fi
7581
      ;;
7581
      ;;
7582
 
7582
 
7583
    uts4*)
7583
    uts4*)
7584
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7584
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7585
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7585
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7586
      ;;
7586
      ;;
7587
 
7587
 
7588
    *)
7588
    *)
7589
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7589
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7590
      ;;
7590
      ;;
7591
    esac
7591
    esac
7592
  fi
7592
  fi
7593
])
7593
])
7594
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
7594
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
7595
 
7595
 
7596
#
7596
#
7597
# Check to make sure the PIC flag actually works.
7597
# Check to make sure the PIC flag actually works.
7598
#
7598
#
7599
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
7599
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
7600
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
7600
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
7601
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
7601
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
7602
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
7602
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
7603
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
7603
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
7604
     "" | " "*) ;;
7604
     "" | " "*) ;;
7605
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7605
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7606
     esac],
7606
     esac],
7607
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7607
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7608
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7608
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7609
fi
7609
fi
7610
case "$host_os" in
7610
case "$host_os" in
7611
  # For platforms which do not support PIC, -DPIC is meaningless:
7611
  # For platforms which do not support PIC, -DPIC is meaningless:
7612
  *djgpp*)
7612
  *djgpp*)
7613
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7613
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7614
    ;;
7614
    ;;
7615
  *)
7615
  *)
7616
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
7616
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
7617
    ;;
7617
    ;;
7618
esac
7618
esac
7619
])
7619
])
7620
 
7620
 
7621
 
7621
 
7622
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
7622
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
7623
# ------------------------------------
7623
# ------------------------------------
7624
# See if the linker supports building shared libraries.
7624
# See if the linker supports building shared libraries.
7625
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
7625
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
7626
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7626
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7627
ifelse([$1],[CXX],[
7627
ifelse([$1],[CXX],[
7628
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7628
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7629
  case $host_os in
7629
  case $host_os in
7630
  aix4* | aix5*)
7630
  aix4* | aix5*)
7631
    # If we're using GNU nm, then we don't want the "-C" option.
7631
    # If we're using GNU nm, then we don't want the "-C" option.
7632
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
7632
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
7633
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7633
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7634
      _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'
7634
      _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'
7635
    else
7635
    else
7636
      _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'
7636
      _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'
7637
    fi
7637
    fi
7638
    ;;
7638
    ;;
7639
  pw32*)
7639
  pw32*)
7640
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7640
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7641
  ;;
7641
  ;;
7642
  cygwin* | mingw*)
7642
  cygwin* | mingw*)
7643
    _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'
7643
    _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'
7644
  ;;
7644
  ;;
7645
  *)
7645
  *)
7646
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7646
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7647
  ;;
7647
  ;;
7648
  esac
7648
  esac
7649
],[
7649
],[
7650
  runpath_var=
7650
  runpath_var=
7651
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7651
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7652
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7652
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7653
  _LT_AC_TAGVAR(archive_cmds, $1)=
7653
  _LT_AC_TAGVAR(archive_cmds, $1)=
7654
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7654
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7655
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
7655
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
7656
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7656
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7657
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7657
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7658
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7658
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7659
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7659
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7660
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7660
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7661
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7661
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7662
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7662
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7663
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7663
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7664
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7664
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7665
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7665
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7666
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7666
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7667
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7667
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7668
  _LT_AC_TAGVAR(module_cmds, $1)=
7668
  _LT_AC_TAGVAR(module_cmds, $1)=
7669
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
7669
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
7670
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
7670
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
7671
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7671
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7672
  # include_expsyms should be a list of space-separated symbols to be *always*
7672
  # include_expsyms should be a list of space-separated symbols to be *always*
7673
  # included in the symbol list
7673
  # included in the symbol list
7674
  _LT_AC_TAGVAR(include_expsyms, $1)=
7674
  _LT_AC_TAGVAR(include_expsyms, $1)=
7675
  # exclude_expsyms can be an extended regexp of symbols to exclude
7675
  # exclude_expsyms can be an extended regexp of symbols to exclude
7676
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
7676
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
7677
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7677
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7678
  # as well as any symbol that contains `d'.
7678
  # as well as any symbol that contains `d'.
7679
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
7679
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
7680
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7680
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7681
  # platforms (ab)use it in PIC code, but their linkers get confused if
7681
  # platforms (ab)use it in PIC code, but their linkers get confused if
7682
  # the symbol is explicitly referenced.  Since portable code cannot
7682
  # the symbol is explicitly referenced.  Since portable code cannot
7683
  # rely on this symbol name, it's probably fine to never include it in
7683
  # rely on this symbol name, it's probably fine to never include it in
7684
  # preloaded symbol tables.
7684
  # preloaded symbol tables.
7685
  extract_expsyms_cmds=
7685
  extract_expsyms_cmds=
7686
 
7686
 
7687
  case $host_os in
7687
  case $host_os in
7688
  cygwin* | mingw* | pw32*)
7688
  cygwin* | mingw* | pw32*)
7689
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7689
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7690
    # When not using gcc, we currently assume that we are using
7690
    # When not using gcc, we currently assume that we are using
7691
    # Microsoft Visual C++.
7691
    # Microsoft Visual C++.
7692
    if test "$GCC" != yes; then
7692
    if test "$GCC" != yes; then
7693
      with_gnu_ld=no
7693
      with_gnu_ld=no
7694
    fi
7694
    fi
7695
    ;;
7695
    ;;
7696
  openbsd*)
7696
  openbsd*)
7697
    with_gnu_ld=no
7697
    with_gnu_ld=no
7698
    ;;
7698
    ;;
7699
  esac
7699
  esac
7700
 
7700
 
7701
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7701
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7702
  if test "$with_gnu_ld" = yes; then
7702
  if test "$with_gnu_ld" = yes; then
7703
    # If archive_cmds runs LD, not CC, wlarc should be empty
7703
    # If archive_cmds runs LD, not CC, wlarc should be empty
7704
    wlarc='${wl}'
7704
    wlarc='${wl}'
7705
 
7705
 
7706
    # See if GNU ld supports shared libraries.
7706
    # See if GNU ld supports shared libraries.
7707
    case $host_os in
7707
    case $host_os in
7708
    aix3* | aix4* | aix5*)
7708
    aix3* | aix4* | aix5*)
7709
      # On AIX/PPC, the GNU linker is very broken
7709
      # On AIX/PPC, the GNU linker is very broken
7710
      if test "$host_cpu" != ia64; then
7710
      if test "$host_cpu" != ia64; then
7711
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7711
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7712
	cat <<EOF 1>&2
7712
	cat <<EOF 1>&2
7713
 
7713
 
7714
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7714
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7715
*** to be unable to reliably create shared libraries on AIX.
7715
*** to be unable to reliably create shared libraries on AIX.
7716
*** Therefore, libtool is disabling shared libraries support.  If you
7716
*** Therefore, libtool is disabling shared libraries support.  If you
7717
*** really care for shared libraries, you may want to modify your PATH
7717
*** really care for shared libraries, you may want to modify your PATH
7718
*** so that a non-GNU linker is found, and then restart.
7718
*** so that a non-GNU linker is found, and then restart.
7719
 
7719
 
7720
EOF
7720
EOF
7721
      fi
7721
      fi
7722
      ;;
7722
      ;;
7723
 
7723
 
7724
    amigaos*)
7724
    amigaos*)
7725
      _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)'
7725
      _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)'
7726
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7726
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7727
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7727
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7728
 
7728
 
7729
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7729
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7730
      # that the semantics of dynamic libraries on AmigaOS, at least up
7730
      # that the semantics of dynamic libraries on AmigaOS, at least up
7731
      # to version 4, is to share data among multiple programs linked
7731
      # to version 4, is to share data among multiple programs linked
7732
      # with the same dynamic library.  Since this doesn't match the
7732
      # with the same dynamic library.  Since this doesn't match the
7733
      # behavior of shared libraries on other platforms, we can't use
7733
      # behavior of shared libraries on other platforms, we can't use
7734
      # them.
7734
      # them.
7735
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7735
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7736
      ;;
7736
      ;;
7737
 
7737
 
7738
    beos*)
7738
    beos*)
7739
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7739
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7740
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7740
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7741
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7741
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7742
	# support --undefined.  This deserves some investigation.  FIXME
7742
	# support --undefined.  This deserves some investigation.  FIXME
7743
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7743
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7744
      else
7744
      else
7745
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7745
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7746
      fi
7746
      fi
7747
      ;;
7747
      ;;
7748
 
7748
 
7749
    cygwin* | mingw* | pw32*)
7749
    cygwin* | mingw* | pw32*)
7750
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7750
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7751
      # as there is no search path for DLLs.
7751
      # as there is no search path for DLLs.
7752
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7752
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7753
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7753
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7754
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7754
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7755
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7755
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7756
      _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'
7756
      _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'
7757
 
7757
 
7758
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7758
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7759
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7759
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7760
	# If the export-symbols file already is a .def file (1st line
7760
	# If the export-symbols file already is a .def file (1st line
7761
	# is EXPORTS), use it as is; otherwise, prepend...
7761
	# is EXPORTS), use it as is; otherwise, prepend...
7762
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7762
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7763
	  cp $export_symbols $output_objdir/$soname.def;
7763
	  cp $export_symbols $output_objdir/$soname.def;
7764
	else
7764
	else
7765
	  echo EXPORTS > $output_objdir/$soname.def;
7765
	  echo EXPORTS > $output_objdir/$soname.def;
7766
	  cat $export_symbols >> $output_objdir/$soname.def;
7766
	  cat $export_symbols >> $output_objdir/$soname.def;
7767
	fi~
7767
	fi~
7768
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
7768
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
7769
      else
7769
      else
7770
	ld_shlibs=no
7770
	ld_shlibs=no
7771
      fi
7771
      fi
7772
      ;;
7772
      ;;
7773
 
7773
 
7774
    netbsd*)
7774
    netbsd*)
7775
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7775
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7776
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7776
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7777
	wlarc=
7777
	wlarc=
7778
      else
7778
      else
7779
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7779
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7780
	_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'
7780
	_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'
7781
      fi
7781
      fi
7782
      ;;
7782
      ;;
7783
 
7783
 
7784
    solaris* | sysv5*)
7784
    solaris* | sysv5*)
7785
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7785
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7786
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7786
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7787
	cat <<EOF 1>&2
7787
	cat <<EOF 1>&2
7788
 
7788
 
7789
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7789
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7790
*** create shared libraries on Solaris systems.  Therefore, libtool
7790
*** create shared libraries on Solaris systems.  Therefore, libtool
7791
*** is disabling shared libraries support.  We urge you to upgrade GNU
7791
*** is disabling shared libraries support.  We urge you to upgrade GNU
7792
*** binutils to release 2.9.1 or newer.  Another option is to modify
7792
*** binutils to release 2.9.1 or newer.  Another option is to modify
7793
*** your PATH or compiler configuration so that the native linker is
7793
*** your PATH or compiler configuration so that the native linker is
7794
*** used, and then restart.
7794
*** used, and then restart.
7795
 
7795
 
7796
EOF
7796
EOF
7797
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7797
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7798
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7798
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7799
	_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'
7799
	_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'
7800
      else
7800
      else
7801
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7801
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7802
      fi
7802
      fi
7803
      ;;
7803
      ;;
7804
 
7804
 
7805
    sunos4*)
7805
    sunos4*)
7806
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7806
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7807
      wlarc=
7807
      wlarc=
7808
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7808
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7809
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7809
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7810
      ;;
7810
      ;;
7811
 
7811
 
7812
    *)
7812
    *)
7813
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7813
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7814
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7814
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7815
	_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'
7815
	_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'
7816
      else
7816
      else
7817
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7817
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7818
      fi
7818
      fi
7819
      ;;
7819
      ;;
7820
    esac
7820
    esac
7821
 
7821
 
7822
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
7822
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
7823
      runpath_var=LD_RUN_PATH
7823
      runpath_var=LD_RUN_PATH
7824
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7824
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7825
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7825
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7826
      # ancient GNU ld didn't support --whole-archive et. al.
7826
      # ancient GNU ld didn't support --whole-archive et. al.
7827
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7827
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7828
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7828
 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7829
      else
7829
      else
7830
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7830
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7831
      fi
7831
      fi
7832
    fi
7832
    fi
7833
  else
7833
  else
7834
    # PORTME fill in a description of your system's linker (not GNU ld)
7834
    # PORTME fill in a description of your system's linker (not GNU ld)
7835
    case $host_os in
7835
    case $host_os in
7836
    aix3*)
7836
    aix3*)
7837
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7837
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7838
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7838
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7839
      _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'
7839
      _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'
7840
      # Note: this linker hardcodes the directories in LIBPATH if there
7840
      # Note: this linker hardcodes the directories in LIBPATH if there
7841
      # are no directories specified by -L.
7841
      # are no directories specified by -L.
7842
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7842
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7843
      if test "$GCC" = yes && test -z "$link_static_flag"; then
7843
      if test "$GCC" = yes && test -z "$link_static_flag"; then
7844
	# Neither direct hardcoding nor static linking is supported with a
7844
	# Neither direct hardcoding nor static linking is supported with a
7845
	# broken collect2.
7845
	# broken collect2.
7846
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7846
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7847
      fi
7847
      fi
7848
      ;;
7848
      ;;
7849
 
7849
 
7850
    aix4* | aix5*)
7850
    aix4* | aix5*)
7851
      if test "$host_cpu" = ia64; then
7851
      if test "$host_cpu" = ia64; then
7852
	# On IA64, the linker does run time linking by default, so we don't
7852
	# On IA64, the linker does run time linking by default, so we don't
7853
	# have to do anything special.
7853
	# have to do anything special.
7854
	aix_use_runtimelinking=no
7854
	aix_use_runtimelinking=no
7855
	exp_sym_flag='-Bexport'
7855
	exp_sym_flag='-Bexport'
7856
	no_entry_flag=""
7856
	no_entry_flag=""
7857
      else
7857
      else
7858
	# If we're using GNU nm, then we don't want the "-C" option.
7858
	# If we're using GNU nm, then we don't want the "-C" option.
7859
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7859
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7860
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7860
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7861
	  _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'
7861
	  _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'
7862
	else
7862
	else
7863
	  _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'
7863
	  _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'
7864
	fi
7864
	fi
7865
	aix_use_runtimelinking=no
7865
	aix_use_runtimelinking=no
7866
 
7866
 
7867
	# Test if we are trying to use run time linking or normal
7867
	# Test if we are trying to use run time linking or normal
7868
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7868
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7869
	# need to do runtime linking.
7869
	# need to do runtime linking.
7870
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7870
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7871
	  for ld_flag in $LDFLAGS; do
7871
	  for ld_flag in $LDFLAGS; do
7872
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7872
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7873
  	    aix_use_runtimelinking=yes
7873
  	    aix_use_runtimelinking=yes
7874
  	    break
7874
  	    break
7875
  	  fi
7875
  	  fi
7876
	  done
7876
	  done
7877
	esac
7877
	esac
7878
 
7878
 
7879
	exp_sym_flag='-bexport'
7879
	exp_sym_flag='-bexport'
7880
	no_entry_flag='-bnoentry'
7880
	no_entry_flag='-bnoentry'
7881
      fi
7881
      fi
7882
 
7882
 
7883
      # When large executables or shared objects are built, AIX ld can
7883
      # When large executables or shared objects are built, AIX ld can
7884
      # have problems creating the table of contents.  If linking a library
7884
      # have problems creating the table of contents.  If linking a library
7885
      # or program results in "error TOC overflow" add -mminimal-toc to
7885
      # or program results in "error TOC overflow" add -mminimal-toc to
7886
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7886
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7887
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7887
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7888
 
7888
 
7889
      _LT_AC_TAGVAR(archive_cmds, $1)=''
7889
      _LT_AC_TAGVAR(archive_cmds, $1)=''
7890
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7890
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7891
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7891
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7892
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7892
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7893
 
7893
 
7894
      if test "$GCC" = yes; then
7894
      if test "$GCC" = yes; then
7895
	case $host_os in aix4.[012]|aix4.[012].*)
7895
	case $host_os in aix4.[012]|aix4.[012].*)
7896
	# We only want to do this on AIX 4.2 and lower, the check
7896
	# We only want to do this on AIX 4.2 and lower, the check
7897
	# below for broken collect2 doesn't work under 4.3+
7897
	# below for broken collect2 doesn't work under 4.3+
7898
	  collect2name=`${CC} -print-prog-name=collect2`
7898
	  collect2name=`${CC} -print-prog-name=collect2`
7899
	  if test -f "$collect2name" && \
7899
	  if test -f "$collect2name" && \
7900
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7900
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7901
	  then
7901
	  then
7902
  	  # We have reworked collect2
7902
  	  # We have reworked collect2
7903
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7903
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7904
	  else
7904
	  else
7905
  	  # We have old collect2
7905
  	  # We have old collect2
7906
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7906
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7907
  	  # It fails to find uninstalled libraries when the uninstalled
7907
  	  # It fails to find uninstalled libraries when the uninstalled
7908
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7908
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7909
  	  # to unsupported forces relinking
7909
  	  # to unsupported forces relinking
7910
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7910
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7911
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7911
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7912
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7912
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7913
	  fi
7913
	  fi
7914
	esac
7914
	esac
7915
	shared_flag='-shared'
7915
	shared_flag='-shared'
7916
      else
7916
      else
7917
	# not using gcc
7917
	# not using gcc
7918
	if test "$host_cpu" = ia64; then
7918
	if test "$host_cpu" = ia64; then
7919
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7919
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7920
  	# chokes on -Wl,-G. The following line is correct:
7920
  	# chokes on -Wl,-G. The following line is correct:
7921
	  shared_flag='-G'
7921
	  shared_flag='-G'
7922
	else
7922
	else
7923
  	if test "$aix_use_runtimelinking" = yes; then
7923
  	if test "$aix_use_runtimelinking" = yes; then
7924
	    shared_flag='${wl}-G'
7924
	    shared_flag='${wl}-G'
7925
	  else
7925
	  else
7926
	    shared_flag='${wl}-bM:SRE'
7926
	    shared_flag='${wl}-bM:SRE'
7927
  	fi
7927
  	fi
7928
	fi
7928
	fi
7929
      fi
7929
      fi
7930
 
7930
 
7931
      # It seems that -bexpall does not export symbols beginning with
7931
      # It seems that -bexpall does not export symbols beginning with
7932
      # underscore (_), so it is better to generate a list of symbols to export.
7932
      # underscore (_), so it is better to generate a list of symbols to export.
7933
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7933
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7934
      if test "$aix_use_runtimelinking" = yes; then
7934
      if test "$aix_use_runtimelinking" = yes; then
7935
	# Warning - without using the other runtime loading flags (-brtl),
7935
	# Warning - without using the other runtime loading flags (-brtl),
7936
	# -berok will link without error, but may produce a broken library.
7936
	# -berok will link without error, but may produce a broken library.
7937
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7937
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7938
       # Determine the default libpath from the value encoded in an empty executable.
7938
       # Determine the default libpath from the value encoded in an empty executable.
7939
       _LT_AC_SYS_LIBPATH_AIX
7939
       _LT_AC_SYS_LIBPATH_AIX
7940
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7940
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7941
	_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"
7941
	_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"
7942
       else
7942
       else
7943
	if test "$host_cpu" = ia64; then
7943
	if test "$host_cpu" = ia64; then
7944
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7944
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7945
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7945
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7946
	  _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"
7946
	  _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"
7947
	else
7947
	else
7948
	 # Determine the default libpath from the value encoded in an empty executable.
7948
	 # Determine the default libpath from the value encoded in an empty executable.
7949
	 _LT_AC_SYS_LIBPATH_AIX
7949
	 _LT_AC_SYS_LIBPATH_AIX
7950
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7950
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7951
	  # Warning - without using the other run time loading flags,
7951
	  # Warning - without using the other run time loading flags,
7952
	  # -berok will link without error, but may produce a broken library.
7952
	  # -berok will link without error, but may produce a broken library.
7953
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7953
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7954
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7954
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7955
	  # -bexpall does not export symbols beginning with underscore (_)
7955
	  # -bexpall does not export symbols beginning with underscore (_)
7956
	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7956
	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7957
	  # Exported symbols can be pulled into shared objects from archives
7957
	  # Exported symbols can be pulled into shared objects from archives
7958
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7958
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7959
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7959
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7960
	  # This is similar to how AIX traditionally builds it's shared libraries.
7960
	  # This is similar to how AIX traditionally builds it's shared libraries.
7961
	  _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'
7961
	  _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'
7962
	fi
7962
	fi
7963
      fi
7963
      fi
7964
      ;;
7964
      ;;
7965
 
7965
 
7966
    amigaos*)
7966
    amigaos*)
7967
      _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)'
7967
      _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)'
7968
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7968
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7969
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7969
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7970
      # see comment about different semantics on the GNU ld section
7970
      # see comment about different semantics on the GNU ld section
7971
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7971
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7972
      ;;
7972
      ;;
7973
 
7973
 
7974
    bsdi4*)
7974
    bsdi4*)
7975
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7975
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7976
      ;;
7976
      ;;
7977
 
7977
 
7978
    cygwin* | mingw* | pw32*)
7978
    cygwin* | mingw* | pw32*)
7979
      # When not using gcc, we currently assume that we are using
7979
      # When not using gcc, we currently assume that we are using
7980
      # Microsoft Visual C++.
7980
      # Microsoft Visual C++.
7981
      # hardcode_libdir_flag_spec is actually meaningless, as there is
7981
      # hardcode_libdir_flag_spec is actually meaningless, as there is
7982
      # no search path for DLLs.
7982
      # no search path for DLLs.
7983
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7983
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7984
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7984
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7985
      # Tell ltmain to make .lib files, not .a files.
7985
      # Tell ltmain to make .lib files, not .a files.
7986
      libext=lib
7986
      libext=lib
7987
      # Tell ltmain to make .dll files, not .so files.
7987
      # Tell ltmain to make .dll files, not .so files.
7988
      shrext=".dll"
7988
      shrext=".dll"
7989
      # FIXME: Setting linknames here is a bad hack.
7989
      # FIXME: Setting linknames here is a bad hack.
7990
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7990
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7991
      # The linker will automatically build a .lib file if we build a DLL.
7991
      # The linker will automatically build a .lib file if we build a DLL.
7992
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7992
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7993
      # FIXME: Should let the user specify the lib program.
7993
      # FIXME: Should let the user specify the lib program.
7994
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7994
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7995
      fix_srcfile_path='`cygpath -w "$srcfile"`'
7995
      fix_srcfile_path='`cygpath -w "$srcfile"`'
7996
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7996
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7997
      ;;
7997
      ;;
7998
 
7998
 
7999
    darwin* | rhapsody*)
7999
    darwin* | rhapsody*)
8000
    if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
8000
    if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
8001
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8001
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8002
      case "$host_os" in
8002
      case "$host_os" in
8003
      rhapsody* | darwin1.[[012]])
8003
      rhapsody* | darwin1.[[012]])
8004
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8004
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
8005
	;;
8005
	;;
8006
      *) # Darwin 1.3 on
8006
      *) # Darwin 1.3 on
8007
	test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8007
	test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
8008
	;;
8008
	;;
8009
      esac
8009
      esac
8010
      # FIXME: Relying on posixy $() will cause problems for
8010
      # FIXME: Relying on posixy $() will cause problems for
8011
      #        cross-compilation, but unfortunately the echo tests do not
8011
      #        cross-compilation, but unfortunately the echo tests do not
8012
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
8012
      #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
8013
      #	       `"' quotes if we put them in here... so don't!
8013
      #	       `"' quotes if we put them in here... so don't!
8014
    	lt_int_apple_cc_single_mod=no
8014
    	lt_int_apple_cc_single_mod=no
8015
    	output_verbose_link_cmd='echo'
8015
    	output_verbose_link_cmd='echo'
8016
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8016
    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
8017
    	  lt_int_apple_cc_single_mod=yes
8017
    	  lt_int_apple_cc_single_mod=yes
8018
    	fi
8018
    	fi
8019
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8019
    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8020
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8020
    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8021
    	else
8021
    	else
8022
        _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'
8022
        _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'
8023
      fi
8023
      fi
8024
      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
8024
      _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
8025
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8025
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8026
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8026
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8027
          _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}'
8027
          _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}'
8028
        else
8028
        else
8029
          _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}'
8029
          _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}'
8030
        fi
8030
        fi
8031
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8031
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8032
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8032
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
8033
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8033
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8034
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8034
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8035
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8035
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
8036
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8036
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8037
    fi  
8037
    fi  
8038
      ;;
8038
      ;;
8039
 
8039
 
8040
    dgux*)
8040
    dgux*)
8041
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8041
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8042
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8042
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8043
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8043
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8044
      ;;
8044
      ;;
8045
 
8045
 
8046
    freebsd1*)
8046
    freebsd1*)
8047
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8047
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8048
      ;;
8048
      ;;
8049
 
8049
 
8050
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8050
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8051
    # support.  Future versions do this automatically, but an explicit c++rt0.o
8051
    # support.  Future versions do this automatically, but an explicit c++rt0.o
8052
    # does not break anything, and helps significantly (at the cost of a little
8052
    # does not break anything, and helps significantly (at the cost of a little
8053
    # extra space).
8053
    # extra space).
8054
    freebsd2.2*)
8054
    freebsd2.2*)
8055
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8055
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8056
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8056
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8057
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8057
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8058
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8058
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8059
      ;;
8059
      ;;
8060
 
8060
 
8061
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8061
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8062
    freebsd2*)
8062
    freebsd2*)
8063
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8063
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8064
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8064
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8065
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8065
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8066
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8066
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8067
      ;;
8067
      ;;
8068
 
8068
 
8069
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8069
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8070
    freebsd*)
8070
    freebsd*)
8071
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8071
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8072
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8072
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8073
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8073
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8074
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8074
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8075
      ;;
8075
      ;;
8076
 
8076
 
8077
    hpux9*)
8077
    hpux9*)
8078
      if test "$GCC" = yes; then
8078
      if test "$GCC" = yes; then
8079
	_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'
8079
	_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'
8080
      else
8080
      else
8081
	_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'
8081
	_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'
8082
      fi
8082
      fi
8083
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8083
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8084
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8084
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8085
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8085
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8086
 
8086
 
8087
      # hardcode_minus_L: Not really in the search PATH,
8087
      # hardcode_minus_L: Not really in the search PATH,
8088
      # but as the default location of the library.
8088
      # but as the default location of the library.
8089
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8089
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8090
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8090
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8091
      ;;
8091
      ;;
8092
 
8092
 
8093
    hpux10* | hpux11*)
8093
    hpux10* | hpux11*)
8094
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8094
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8095
	case "$host_cpu" in
8095
	case "$host_cpu" in
8096
	hppa*64*|ia64*)
8096
	hppa*64*|ia64*)
8097
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8097
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8098
	  ;;
8098
	  ;;
8099
	*)
8099
	*)
8100
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8100
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8101
	  ;;
8101
	  ;;
8102
	esac
8102
	esac
8103
      else
8103
      else
8104
	case "$host_cpu" in
8104
	case "$host_cpu" in
8105
	hppa*64*|ia64*)
8105
	hppa*64*|ia64*)
8106
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8106
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8107
	  ;;
8107
	  ;;
8108
	*)
8108
	*)
8109
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8109
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8110
	  ;;
8110
	  ;;
8111
	esac
8111
	esac
8112
      fi
8112
      fi
8113
      if test "$with_gnu_ld" = no; then
8113
      if test "$with_gnu_ld" = no; then
8114
	case "$host_cpu" in
8114
	case "$host_cpu" in
8115
	hppa*64*)
8115
	hppa*64*)
8116
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8116
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8117
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8117
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8118
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8118
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8119
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8119
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8120
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8120
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8121
	  ;;
8121
	  ;;
8122
	ia64*)
8122
	ia64*)
8123
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8123
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8124
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8124
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8125
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8125
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8126
 
8126
 
8127
	  # hardcode_minus_L: Not really in the search PATH,
8127
	  # hardcode_minus_L: Not really in the search PATH,
8128
	  # but as the default location of the library.
8128
	  # but as the default location of the library.
8129
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8129
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8130
	  ;;
8130
	  ;;
8131
	*)
8131
	*)
8132
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8132
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8133
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8133
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8134
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8134
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8135
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8135
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8136
 
8136
 
8137
	  # hardcode_minus_L: Not really in the search PATH,
8137
	  # hardcode_minus_L: Not really in the search PATH,
8138
	  # but as the default location of the library.
8138
	  # but as the default location of the library.
8139
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8139
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8140
	  ;;
8140
	  ;;
8141
	esac
8141
	esac
8142
      fi
8142
      fi
8143
      ;;
8143
      ;;
8144
 
8144
 
8145
    irix5* | irix6* | nonstopux*)
8145
    irix5* | irix6* | nonstopux*)
8146
      if test "$GCC" = yes; then
8146
      if test "$GCC" = yes; then
8147
	_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'
8147
	_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'
8148
      else
8148
      else
8149
	_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'
8149
	_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'
8150
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
8150
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
8151
      fi
8151
      fi
8152
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8152
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8153
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8153
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8154
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8154
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8155
      ;;
8155
      ;;
8156
 
8156
 
8157
    netbsd*)
8157
    netbsd*)
8158
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8158
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8159
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8159
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8160
      else
8160
      else
8161
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8161
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8162
      fi
8162
      fi
8163
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8163
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8164
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8164
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8165
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8165
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8166
      ;;
8166
      ;;
8167
 
8167
 
8168
    newsos6)
8168
    newsos6)
8169
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8169
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8170
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8170
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8171
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8171
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8172
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8172
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8173
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8173
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8174
      ;;
8174
      ;;
8175
 
8175
 
8176
    openbsd*)
8176
    openbsd*)
8177
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8177
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8178
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8178
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8179
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8179
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8180
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8180
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8181
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8181
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8182
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8182
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8183
      else
8183
      else
8184
       case $host_os in
8184
       case $host_os in
8185
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8185
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8186
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8186
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8187
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8187
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8188
	   ;;
8188
	   ;;
8189
	 *)
8189
	 *)
8190
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8190
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8191
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8191
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8192
	   ;;
8192
	   ;;
8193
       esac
8193
       esac
8194
      fi
8194
      fi
8195
      ;;
8195
      ;;
8196
 
8196
 
8197
    os2*)
8197
    os2*)
8198
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8198
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8199
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8199
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8200
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8200
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8201
      _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'
8201
      _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'
8202
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8202
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8203
      ;;
8203
      ;;
8204
 
8204
 
8205
    osf3*)
8205
    osf3*)
8206
      if test "$GCC" = yes; then
8206
      if test "$GCC" = yes; then
8207
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8207
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8208
	_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'
8208
	_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'
8209
      else
8209
      else
8210
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8210
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8211
	_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'
8211
	_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'
8212
      fi
8212
      fi
8213
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8213
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8214
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8214
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8215
      ;;
8215
      ;;
8216
 
8216
 
8217
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
8217
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
8218
      if test "$GCC" = yes; then
8218
      if test "$GCC" = yes; then
8219
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8219
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8220
	_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'
8220
	_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'
8221
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8221
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8222
      else
8222
      else
8223
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8223
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8224
	_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'
8224
	_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'
8225
	_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~
8225
	_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~
8226
	$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'
8226
	$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'
8227
 
8227
 
8228
	# Both c and cxx compiler support -rpath directly
8228
	# Both c and cxx compiler support -rpath directly
8229
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8229
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8230
      fi
8230
      fi
8231
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8231
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8232
      ;;
8232
      ;;
8233
 
8233
 
8234
    sco3.2v5*)
8234
    sco3.2v5*)
8235
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8235
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8236
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8236
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8237
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8237
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8238
      runpath_var=LD_RUN_PATH
8238
      runpath_var=LD_RUN_PATH
8239
      hardcode_runpath_var=yes
8239
      hardcode_runpath_var=yes
8240
      ;;
8240
      ;;
8241
 
8241
 
8242
    solaris*)
8242
    solaris*)
8243
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8243
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8244
      if test "$GCC" = yes; then
8244
      if test "$GCC" = yes; then
8245
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8245
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8246
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8246
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8247
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8247
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8248
      else
8248
      else
8249
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8249
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8250
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8250
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8251
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8251
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8252
      fi
8252
      fi
8253
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8253
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8254
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8254
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8255
      case $host_os in
8255
      case $host_os in
8256
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8256
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8257
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
8257
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
8258
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
8258
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
8259
      esac
8259
      esac
8260
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8260
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8261
      ;;
8261
      ;;
8262
 
8262
 
8263
    sunos4*)
8263
    sunos4*)
8264
      if test "x$host_vendor" = xsequent; then
8264
      if test "x$host_vendor" = xsequent; then
8265
	# Use $CC to link under sequent, because it throws in some extra .o
8265
	# Use $CC to link under sequent, because it throws in some extra .o
8266
	# files that make .init and .fini sections work.
8266
	# files that make .init and .fini sections work.
8267
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8267
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8268
      else
8268
      else
8269
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8269
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8270
      fi
8270
      fi
8271
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8271
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8272
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8272
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8273
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8273
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8274
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8274
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8275
      ;;
8275
      ;;
8276
 
8276
 
8277
    sysv4)
8277
    sysv4)
8278
      case $host_vendor in
8278
      case $host_vendor in
8279
	sni)
8279
	sni)
8280
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8280
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8281
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8281
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8282
	;;
8282
	;;
8283
	siemens)
8283
	siemens)
8284
	  ## LD is ld it makes a PLAMLIB
8284
	  ## LD is ld it makes a PLAMLIB
8285
	  ## CC just makes a GrossModule.
8285
	  ## CC just makes a GrossModule.
8286
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8286
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8287
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8287
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8288
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8288
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
8289
        ;;
8289
        ;;
8290
	motorola)
8290
	motorola)
8291
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8291
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8292
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8292
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8293
	;;
8293
	;;
8294
      esac
8294
      esac
8295
      runpath_var='LD_RUN_PATH'
8295
      runpath_var='LD_RUN_PATH'
8296
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8296
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8297
      ;;
8297
      ;;
8298
 
8298
 
8299
    sysv4.3*)
8299
    sysv4.3*)
8300
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8300
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8301
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8301
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8302
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8302
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8303
      ;;
8303
      ;;
8304
 
8304
 
8305
    sysv4*MP*)
8305
    sysv4*MP*)
8306
      if test -d /usr/nec; then
8306
      if test -d /usr/nec; then
8307
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8307
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8308
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8308
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8309
	runpath_var=LD_RUN_PATH
8309
	runpath_var=LD_RUN_PATH
8310
	hardcode_runpath_var=yes
8310
	hardcode_runpath_var=yes
8311
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8311
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8312
      fi
8312
      fi
8313
      ;;
8313
      ;;
8314
 
8314
 
8315
    sysv4.2uw2*)
8315
    sysv4.2uw2*)
8316
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8316
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8317
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8317
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8318
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8318
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8319
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8319
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8320
      hardcode_runpath_var=yes
8320
      hardcode_runpath_var=yes
8321
      runpath_var=LD_RUN_PATH
8321
      runpath_var=LD_RUN_PATH
8322
      ;;
8322
      ;;
8323
 
8323
 
8324
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
8324
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
8325
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
8325
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
8326
      if test "$GCC" = yes; then
8326
      if test "$GCC" = yes; then
8327
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8327
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8328
      else
8328
      else
8329
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8329
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8330
      fi
8330
      fi
8331
      runpath_var='LD_RUN_PATH'
8331
      runpath_var='LD_RUN_PATH'
8332
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8332
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8333
      ;;
8333
      ;;
8334
 
8334
 
8335
    sysv5*)
8335
    sysv5*)
8336
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8336
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8337
      # $CC -shared without GNU ld will not create a library from C++
8337
      # $CC -shared without GNU ld will not create a library from C++
8338
      # object files and a static libstdc++, better avoid it by now
8338
      # object files and a static libstdc++, better avoid it by now
8339
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8339
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8340
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8340
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8341
  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8341
  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8342
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8342
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8343
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8343
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8344
      runpath_var='LD_RUN_PATH'
8344
      runpath_var='LD_RUN_PATH'
8345
      ;;
8345
      ;;
8346
 
8346
 
8347
    uts4*)
8347
    uts4*)
8348
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8348
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8349
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8349
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8350
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8350
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8351
      ;;
8351
      ;;
8352
 
8352
 
8353
    *)
8353
    *)
8354
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8354
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8355
      ;;
8355
      ;;
8356
    esac
8356
    esac
8357
  fi
8357
  fi
8358
])
8358
])
8359
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8359
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8360
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8360
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8361
 
8361
 
8362
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8362
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8363
if test "$GCC" = yes; then
8363
if test "$GCC" = yes; then
8364
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8364
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8365
fi
8365
fi
8366
 
8366
 
8367
#
8367
#
8368
# Do we need to explicitly link libc?
8368
# Do we need to explicitly link libc?
8369
#
8369
#
8370
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8370
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8371
x|xyes)
8371
x|xyes)
8372
  # Assume -lc should be added
8372
  # Assume -lc should be added
8373
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8373
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8374
 
8374
 
8375
  if test "$enable_shared" = yes && test "$GCC" = yes; then
8375
  if test "$enable_shared" = yes && test "$GCC" = yes; then
8376
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
8376
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
8377
    *'~'*)
8377
    *'~'*)
8378
      # FIXME: we may have to deal with multi-command sequences.
8378
      # FIXME: we may have to deal with multi-command sequences.
8379
      ;;
8379
      ;;
8380
    '$CC '*)
8380
    '$CC '*)
8381
      # Test whether the compiler implicitly links with -lc since on some
8381
      # Test whether the compiler implicitly links with -lc since on some
8382
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8382
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8383
      # to ld, don't add -lc before -lgcc.
8383
      # to ld, don't add -lc before -lgcc.
8384
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8384
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8385
      $rm conftest*
8385
      $rm conftest*
8386
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8386
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8387
  
8387
  
8388
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8388
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8389
        soname=conftest
8389
        soname=conftest
8390
        lib=conftest
8390
        lib=conftest
8391
        libobjs=conftest.$ac_objext
8391
        libobjs=conftest.$ac_objext
8392
        deplibs=
8392
        deplibs=
8393
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8393
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8394
        compiler_flags=-v
8394
        compiler_flags=-v
8395
        linker_flags=-v
8395
        linker_flags=-v
8396
        verstring=
8396
        verstring=
8397
        output_objdir=.
8397
        output_objdir=.
8398
        libname=conftest
8398
        libname=conftest
8399
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8399
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8400
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8400
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8401
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8401
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8402
        then
8402
        then
8403
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8403
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8404
        else
8404
        else
8405
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8405
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8406
        fi
8406
        fi
8407
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8407
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8408
      else
8408
      else
8409
        cat conftest.err 1>&5
8409
        cat conftest.err 1>&5
8410
      fi
8410
      fi
8411
      $rm conftest*
8411
      $rm conftest*
8412
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8412
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8413
      ;;
8413
      ;;
8414
    esac
8414
    esac
8415
  fi
8415
  fi
8416
  ;;
8416
  ;;
8417
esac
8417
esac
8418
])# AC_LIBTOOL_PROG_LD_SHLIBS
8418
])# AC_LIBTOOL_PROG_LD_SHLIBS
8419
 
8419
 
8420
 
8420
 
8421
# _LT_AC_FILE_LTDLL_C
8421
# _LT_AC_FILE_LTDLL_C
8422
# -------------------
8422
# -------------------
8423
# Be careful that the start marker always follows a newline.
8423
# Be careful that the start marker always follows a newline.
8424
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8424
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8425
# /* ltdll.c starts here */
8425
# /* ltdll.c starts here */
8426
# #define WIN32_LEAN_AND_MEAN
8426
# #define WIN32_LEAN_AND_MEAN
8427
# #include <windows.h>
8427
# #include <windows.h>
8428
# #undef WIN32_LEAN_AND_MEAN
8428
# #undef WIN32_LEAN_AND_MEAN
8429
# #include <stdio.h>
8429
# #include <stdio.h>
8430
#
8430
#
8431
# #ifndef __CYGWIN__
8431
# #ifndef __CYGWIN__
8432
# #  ifdef __CYGWIN32__
8432
# #  ifdef __CYGWIN32__
8433
# #    define __CYGWIN__ __CYGWIN32__
8433
# #    define __CYGWIN__ __CYGWIN32__
8434
# #  endif
8434
# #  endif
8435
# #endif
8435
# #endif
8436
#
8436
#
8437
# #ifdef __cplusplus
8437
# #ifdef __cplusplus
8438
# extern "C" {
8438
# extern "C" {
8439
# #endif
8439
# #endif
8440
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8440
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8441
# #ifdef __cplusplus
8441
# #ifdef __cplusplus
8442
# }
8442
# }
8443
# #endif
8443
# #endif
8444
#
8444
#
8445
# #ifdef __CYGWIN__
8445
# #ifdef __CYGWIN__
8446
# #include <cygwin/cygwin_dll.h>
8446
# #include <cygwin/cygwin_dll.h>
8447
# DECLARE_CYGWIN_DLL( DllMain );
8447
# DECLARE_CYGWIN_DLL( DllMain );
8448
# #endif
8448
# #endif
8449
# HINSTANCE __hDllInstance_base;
8449
# HINSTANCE __hDllInstance_base;
8450
#
8450
#
8451
# BOOL APIENTRY
8451
# BOOL APIENTRY
8452
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8452
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8453
# {
8453
# {
8454
#   __hDllInstance_base = hInst;
8454
#   __hDllInstance_base = hInst;
8455
#   return TRUE;
8455
#   return TRUE;
8456
# }
8456
# }
8457
# /* ltdll.c ends here */
8457
# /* ltdll.c ends here */
8458
])# _LT_AC_FILE_LTDLL_C
8458
])# _LT_AC_FILE_LTDLL_C
8459
 
8459
 
8460
 
8460
 
8461
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
8461
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
8462
# ---------------------------------
8462
# ---------------------------------
8463
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
8463
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
8464
 
8464
 
8465
 
8465
 
8466
# old names
8466
# old names
8467
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
8467
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
8468
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
8468
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
8469
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
8469
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
8470
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8470
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8471
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8471
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8472
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
8472
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
8473
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
8473
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
8474
 
8474
 
8475
# This is just to silence aclocal about the macro not being used
8475
# This is just to silence aclocal about the macro not being used
8476
ifelse([AC_DISABLE_FAST_INSTALL])
8476
ifelse([AC_DISABLE_FAST_INSTALL])
8477
 
8477
 
8478
AC_DEFUN([LT_AC_PROG_GCJ],
8478
AC_DEFUN([LT_AC_PROG_GCJ],
8479
[AC_CHECK_TOOL(GCJ, gcj, no)
8479
[AC_CHECK_TOOL(GCJ, gcj, no)
8480
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8480
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8481
  AC_SUBST(GCJFLAGS)
8481
  AC_SUBST(GCJFLAGS)
8482
])
8482
])
8483
 
8483
 
8484
AC_DEFUN([LT_AC_PROG_RC],
8484
AC_DEFUN([LT_AC_PROG_RC],
8485
[AC_CHECK_TOOL(RC, windres, no)
8485
[AC_CHECK_TOOL(RC, windres, no)
8486
])
8486
])
8487
 
8487
 
8488
############################################################
8488
############################################################
8489
# NOTE: This macro has been submitted for inclusion into   #
8489
# NOTE: This macro has been submitted for inclusion into   #
8490
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8490
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8491
#  a released version of Autoconf we should remove this    #
8491
#  a released version of Autoconf we should remove this    #
8492
#  macro and use it instead.                               #
8492
#  macro and use it instead.                               #
8493
############################################################
8493
############################################################
8494
# LT_AC_PROG_SED
8494
# LT_AC_PROG_SED
8495
# --------------
8495
# --------------
8496
# Check for a fully-functional sed program, that truncates
8496
# Check for a fully-functional sed program, that truncates
8497
# as few characters as possible.  Prefer GNU sed if found.
8497
# as few characters as possible.  Prefer GNU sed if found.
8498
AC_DEFUN([LT_AC_PROG_SED],
8498
AC_DEFUN([LT_AC_PROG_SED],
8499
[AC_MSG_CHECKING([for a sed that does not truncate output])
8499
[AC_MSG_CHECKING([for a sed that does not truncate output])
8500
AC_CACHE_VAL(lt_cv_path_SED,
8500
AC_CACHE_VAL(lt_cv_path_SED,
8501
[# Loop through the user's path and test for sed and gsed.
8501
[# Loop through the user's path and test for sed and gsed.
8502
# Then use that list of sed's as ones to test for truncation.
8502
# Then use that list of sed's as ones to test for truncation.
8503
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8503
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8504
for as_dir in $PATH
8504
for as_dir in $PATH
8505
do
8505
do
8506
  IFS=$as_save_IFS
8506
  IFS=$as_save_IFS
8507
  test -z "$as_dir" && as_dir=.
8507
  test -z "$as_dir" && as_dir=.
8508
  for lt_ac_prog in sed gsed; do
8508
  for lt_ac_prog in sed gsed; do
8509
    for ac_exec_ext in '' $ac_executable_extensions; do
8509
    for ac_exec_ext in '' $ac_executable_extensions; do
8510
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8510
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8511
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8511
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8512
      fi
8512
      fi
8513
    done
8513
    done
8514
  done
8514
  done
8515
done
8515
done
8516
lt_ac_max=0
8516
lt_ac_max=0
8517
lt_ac_count=0
8517
lt_ac_count=0
8518
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8518
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8519
# along with /bin/sed that truncates output.
8519
# along with /bin/sed that truncates output.
8520
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8520
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8521
  test ! -f $lt_ac_sed && break
8521
  test ! -f $lt_ac_sed && break
8522
  cat /dev/null > conftest.in
8522
  cat /dev/null > conftest.in
8523
  lt_ac_count=0
8523
  lt_ac_count=0
8524
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8524
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8525
  # Check for GNU sed and select it if it is found.
8525
  # Check for GNU sed and select it if it is found.
8526
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8526
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8527
    lt_cv_path_SED=$lt_ac_sed
8527
    lt_cv_path_SED=$lt_ac_sed
8528
    break
8528
    break
8529
  fi
8529
  fi
8530
  while true; do
8530
  while true; do
8531
    cat conftest.in conftest.in >conftest.tmp
8531
    cat conftest.in conftest.in >conftest.tmp
8532
    mv conftest.tmp conftest.in
8532
    mv conftest.tmp conftest.in
8533
    cp conftest.in conftest.nl
8533
    cp conftest.in conftest.nl
8534
    echo >>conftest.nl
8534
    echo >>conftest.nl
8535
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8535
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8536
    cmp -s conftest.out conftest.nl || break
8536
    cmp -s conftest.out conftest.nl || break
8537
    # 10000 chars as input seems more than enough
8537
    # 10000 chars as input seems more than enough
8538
    test $lt_ac_count -gt 10 && break
8538
    test $lt_ac_count -gt 10 && break
8539
    lt_ac_count=`expr $lt_ac_count + 1`
8539
    lt_ac_count=`expr $lt_ac_count + 1`
8540
    if test $lt_ac_count -gt $lt_ac_max; then
8540
    if test $lt_ac_count -gt $lt_ac_max; then
8541
      lt_ac_max=$lt_ac_count
8541
      lt_ac_max=$lt_ac_count
8542
      lt_cv_path_SED=$lt_ac_sed
8542
      lt_cv_path_SED=$lt_ac_sed
8543
    fi
8543
    fi
8544
  done
8544
  done
8545
done
8545
done
8546
SED=$lt_cv_path_SED
8546
SED=$lt_cv_path_SED
8547
])
8547
])
8548
AC_MSG_RESULT([$SED])
8548
AC_MSG_RESULT([$SED])
8549
])
8549
])