~ubuntu-branches/ubuntu/trusty/gcompris/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-04-21 16:16:27 UTC
  • Revision ID: james.westby@ubuntu.com-20020421161627-s07yahahm817qxs6
Tags: upstream-1.0.3
ImportĀ upstreamĀ versionĀ 1.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
 
2
 
 
3
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 
4
dnl This file is free software; the Free Software Foundation
 
5
dnl gives unlimited permission to copy and/or distribute it,
 
6
dnl with or without modifications, as long as this notice is preserved.
 
7
 
 
8
dnl This program is distributed in the hope that it will be useful,
 
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 
11
dnl PARTICULAR PURPOSE.
 
12
 
 
13
# Do all the work for Automake.  This macro actually does too much --
 
14
# some checks are only needed if your package does certain things.
 
15
# But this isn't really a big deal.
 
16
 
 
17
# serial 1
 
18
 
 
19
dnl Usage:
 
20
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 
21
 
 
22
AC_DEFUN([AM_INIT_AUTOMAKE],
 
23
[AC_REQUIRE([AC_PROG_INSTALL])
 
24
PACKAGE=[$1]
 
25
AC_SUBST(PACKAGE)
 
26
VERSION=[$2]
 
27
AC_SUBST(VERSION)
 
28
dnl test to see if srcdir already configured
 
29
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 
30
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 
31
fi
 
32
ifelse([$3],,
 
33
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
34
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 
35
AC_REQUIRE([AM_SANITY_CHECK])
 
36
AC_REQUIRE([AC_ARG_PROGRAM])
 
37
dnl FIXME This is truly gross.
 
38
missing_dir=`cd $ac_aux_dir && pwd`
 
39
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
 
40
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 
41
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
 
42
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 
43
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 
44
AC_REQUIRE([AC_PROG_MAKE_SET])])
 
45
 
 
46
#
 
47
# Check to make sure that the build environment is sane.
 
48
#
 
49
 
 
50
AC_DEFUN([AM_SANITY_CHECK],
 
51
[AC_MSG_CHECKING([whether build environment is sane])
 
52
# Just in case
 
53
sleep 1
 
54
echo timestamp > conftestfile
 
55
# Do `set' in a subshell so we don't clobber the current shell's
 
56
# arguments.  Must try -L first in case configure is actually a
 
57
# symlink; some systems play weird games with the mod time of symlinks
 
58
# (eg FreeBSD returns the mod time of the symlink's containing
 
59
# directory).
 
60
if (
 
61
   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
 
62
   if test "[$]*" = "X"; then
 
63
      # -L didn't work.
 
64
      set X `ls -t $srcdir/configure conftestfile`
 
65
   fi
 
66
   if test "[$]*" != "X $srcdir/configure conftestfile" \
 
67
      && test "[$]*" != "X conftestfile $srcdir/configure"; then
 
68
 
 
69
      # If neither matched, then we have a broken ls.  This can happen
 
70
      # if, for instance, CONFIG_SHELL is bash and it inherits a
 
71
      # broken ls alias from the environment.  This has actually
 
72
      # happened.  Such a system could not be considered "sane".
 
73
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 
74
alias in your environment])
 
75
   fi
 
76
 
 
77
   test "[$]2" = conftestfile
 
78
   )
 
79
then
 
80
   # Ok.
 
81
   :
 
82
else
 
83
   AC_MSG_ERROR([newly created file is older than distributed files!
 
84
Check your system clock])
 
85
fi
 
86
rm -f conftest*
 
87
AC_MSG_RESULT(yes)])
 
88
 
 
89
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 
90
dnl The program must properly implement --version.
 
91
AC_DEFUN([AM_MISSING_PROG],
 
92
[AC_MSG_CHECKING(for working $2)
 
93
# Run test in a subshell; some versions of sh will print an error if
 
94
# an executable is not found, even if stderr is redirected.
 
95
# Redirect stdin to placate older versions of autoconf.  Sigh.
 
96
if ($2 --version) < /dev/null > /dev/null 2>&1; then
 
97
   $1=$2
 
98
   AC_MSG_RESULT(found)
 
99
else
 
100
   $1="$3/missing $2"
 
101
   AC_MSG_RESULT(missing)
 
102
fi
 
103
AC_SUBST($1)])
 
104
 
 
105
# Like AC_CONFIG_HEADER, but automatically create stamp file.
 
106
 
 
107
AC_DEFUN([AM_CONFIG_HEADER],
 
108
[AC_PREREQ([2.12])
 
109
AC_CONFIG_HEADER([$1])
 
110
dnl When config.status generates a header, we must update the stamp-h file.
 
111
dnl This file resides in the same directory as the config header
 
112
dnl that is generated.  We must strip everything past the first ":",
 
113
dnl and everything past the last "/".
 
114
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
 
115
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
 
116
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
 
117
<<am_indx=1
 
118
for am_file in <<$1>>; do
 
119
  case " <<$>>CONFIG_HEADERS " in
 
120
  *" <<$>>am_file "*<<)>>
 
121
    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
 
122
    ;;
 
123
  esac
 
124
  am_indx=`expr "<<$>>am_indx" + 1`
 
125
done<<>>dnl>>)
 
126
changequote([,]))])
 
127
 
 
128
 
 
129
# serial 1
 
130
 
 
131
# @defmac AC_PROG_CC_STDC
 
132
# @maindex PROG_CC_STDC
 
133
# @ovindex CC
 
134
# If the C compiler in not in ANSI C mode by default, try to add an option
 
135
# to output variable @code{CC} to make it so.  This macro tries various
 
136
# options that select ANSI C on some system or another.  It considers the
 
137
# compiler to be in ANSI C mode if it handles function prototypes correctly.
 
138
#
 
139
# If you use this macro, you should check after calling it whether the C
 
140
# compiler has been set to accept ANSI C; if not, the shell variable
 
141
# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
 
142
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
 
143
# program @code{ansi2knr}, which comes with Ghostscript.
 
144
# @end defmac
 
145
 
 
146
AC_DEFUN([AM_PROG_CC_STDC],
 
147
[AC_REQUIRE([AC_PROG_CC])
 
148
AC_BEFORE([$0], [AC_C_INLINE])
 
149
AC_BEFORE([$0], [AC_C_CONST])
 
150
dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
 
151
dnl a magic option to avoid problems with ANSI preprocessor commands
 
152
dnl like #elif.
 
153
dnl FIXME: can't do this because then AC_AIX won't work due to a
 
154
dnl circular dependency.
 
155
dnl AC_BEFORE([$0], [AC_PROG_CPP])
 
156
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
 
157
AC_CACHE_VAL(am_cv_prog_cc_stdc,
 
158
[am_cv_prog_cc_stdc=no
 
159
ac_save_CC="$CC"
 
160
# Don't try gcc -ansi; that turns off useful extensions and
 
161
# breaks some systems' header files.
 
162
# AIX                   -qlanglvl=ansi
 
163
# Ultrix and OSF/1      -std1
 
164
# HP-UX                 -Aa -D_HPUX_SOURCE
 
165
# SVR4                  -Xc -D__EXTENSIONS__
 
166
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 
167
do
 
168
  CC="$ac_save_CC $ac_arg"
 
169
  AC_TRY_COMPILE(
 
170
[#include <stdarg.h>
 
171
#include <stdio.h>
 
172
#include <sys/types.h>
 
173
#include <sys/stat.h>
 
174
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 
175
struct buf { int x; };
 
176
FILE * (*rcsopen) (struct buf *, struct stat *, int);
 
177
static char *e (p, i)
 
178
     char **p;
 
179
     int i;
 
180
{
 
181
  return p[i];
 
182
}
 
183
static char *f (char * (*g) (char **, int), char **p, ...)
 
184
{
 
185
  char *s;
 
186
  va_list v;
 
187
  va_start (v,p);
 
188
  s = g (p, va_arg (v,int));
 
189
  va_end (v);
 
190
  return s;
 
191
}
 
192
int test (int i, double x);
 
193
struct s1 {int (*f) (int a);};
 
194
struct s2 {int (*f) (double a);};
 
195
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
 
196
int argc;
 
197
char **argv;
 
198
], [
 
199
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
200
],
 
201
[am_cv_prog_cc_stdc="$ac_arg"; break])
 
202
done
 
203
CC="$ac_save_CC"
 
204
])
 
205
if test -z "$am_cv_prog_cc_stdc"; then
 
206
  AC_MSG_RESULT([none needed])
 
207
else
 
208
  AC_MSG_RESULT($am_cv_prog_cc_stdc)
 
209
fi
 
210
case "x$am_cv_prog_cc_stdc" in
 
211
  x|xno) ;;
 
212
  *) CC="$CC $am_cv_prog_cc_stdc" ;;
 
213
esac
 
214
])
 
215
 
 
216
 
 
217
dnl AC_PROG_INTLTOOL([MINIMUM-VERSION])
 
218
# serial 1 AC_PROG_INTLTOOL
 
219
AC_DEFUN(AC_PROG_INTLTOOL,
 
220
[
 
221
 
 
222
if test -n "$1"; then
 
223
    AC_MSG_CHECKING(for intltool >= $1)
 
224
 
 
225
    INTLTOOL_REQUIRED_VERSION_AS_INT=$(echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }')
 
226
    INTLTOOL_APPLIED_VERSION=$(awk -F\" '/\$VERSION / { printf $[2]; }'  < intltool-update.in)
 
227
    changequote({{,}})
 
228
    INTLTOOL_APPLIED_VERSION_AS_INT=$(awk -F\" '/\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in)
 
229
    changequote([,])
 
230
 
 
231
    if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
 
232
        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
 
233
    else
 
234
        AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
 
235
        exit 1
 
236
    fi
 
237
fi
 
238
 
 
239
  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
 
240
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
 
241
     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache'
 
242
      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p'
 
243
     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
 
244
   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache'
 
245
    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
 
246
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
 
247
       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
 
248
      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache'
 
249
    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache'
 
250
 
 
251
AC_SUBST(INTLTOOL_DESKTOP_RULE)
 
252
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
 
253
AC_SUBST(INTLTOOL_KEYS_RULE)
 
254
AC_SUBST(INTLTOOL_OAF_RULE)
 
255
AC_SUBST(INTLTOOL_PONG_RULE)
 
256
AC_SUBST(INTLTOOL_SERVER_RULE)
 
257
AC_SUBST(INTLTOOL_SHEET_RULE)
 
258
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
 
259
AC_SUBST(INTLTOOL_UI_RULE)
 
260
AC_SUBST(INTLTOOL_XML_RULE)
 
261
AC_SUBST(INTLTOOL_CAVES_RULE)
 
262
 
 
263
# Use the tools built into the package, not the ones that are installed.
 
264
 
 
265
INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
 
266
INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
 
267
INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
 
268
 
 
269
AC_SUBST(INTLTOOL_EXTRACT)
 
270
AC_SUBST(INTLTOOL_MERGE)
 
271
AC_SUBST(INTLTOOL_UPDATE)
 
272
 
 
273
AC_PATH_PROG(INTLTOOL_PERL, perl)
 
274
if test -z "$INTLTOOL_PERL"; then
 
275
   AC_MSG_ERROR([perl not found; required for intltool])
 
276
fi
 
277
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
 
278
   AC_MSG_ERROR([perl 5.x required for intltool])
 
279
fi
 
280
 
 
281
# Remove file type tags (using []) from po/POTFILES.
 
282
 
 
283
ifdef([AC_DIVERSION_ICMDS],[
 
284
  AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
 
285
      changequote(,)
 
286
      mv -f po/POTFILES po/POTFILES.tmp
 
287
      sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
 
288
      rm -f po/POTFILES.tmp
 
289
      changequote([,])
 
290
  AC_DIVERT_POP()
 
291
],[
 
292
  ifdef([AC_CONFIG_COMMANDS_PRE],[
 
293
    AC_CONFIG_COMMANDS_PRE([
 
294
        changequote(,)
 
295
        mv -f po/POTFILES po/POTFILES.tmp
 
296
        sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
 
297
        rm -f po/POTFILES.tmp
 
298
        changequote([,])
 
299
    ])
 
300
  ])
 
301
])
 
302
 
 
303
# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
 
304
 
 
305
AC_OUTPUT_COMMANDS([
 
306
 
 
307
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out
 
308
if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
 
309
  rm -f intltool-extract.out
 
310
else
 
311
  mv -f intltool-extract.out intltool-extract
 
312
fi
 
313
chmod ugo+x intltool-extract
 
314
chmod u+w intltool-extract
 
315
 
 
316
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out
 
317
if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
 
318
  rm -f intltool-merge.out
 
319
else
 
320
  mv -f intltool-merge.out intltool-merge
 
321
fi
 
322
chmod ugo+x intltool-merge
 
323
chmod u+w intltool-merge
 
324
 
 
325
sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out
 
326
if cmp -s intltool-update intltool-update.out 2>/dev/null; then
 
327
  rm -f intltool-update.out
 
328
else
 
329
  mv -f intltool-update.out intltool-update
 
330
fi
 
331
chmod ugo+x intltool-update
 
332
chmod u+w intltool-update
 
333
 
 
334
], INTLTOOL_PERL=${INTLTOOL_PERL})
 
335
 
 
336
])
 
337
 
 
338
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
 
339
 
 
340
# serial 46 AC_PROG_LIBTOOL
 
341
 
 
342
AC_DEFUN([AC_PROG_LIBTOOL],
 
343
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
 
344
 
 
345
# This can be used to rebuild libtool when needed
 
346
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
347
 
 
348
# Always use our own libtool.
 
349
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
350
AC_SUBST(LIBTOOL)dnl
 
351
 
 
352
# Prevent multiple expansion
 
353
define([AC_PROG_LIBTOOL], [])
 
354
])
 
355
 
 
356
AC_DEFUN([AC_LIBTOOL_SETUP],
 
357
[AC_PREREQ(2.13)dnl
 
358
AC_REQUIRE([AC_ENABLE_SHARED])dnl
 
359
AC_REQUIRE([AC_ENABLE_STATIC])dnl
 
360
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
 
361
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
362
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
363
AC_REQUIRE([AC_PROG_CC])dnl
 
364
AC_REQUIRE([AC_PROG_LD])dnl
 
365
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
366
AC_REQUIRE([AC_PROG_NM])dnl
 
367
AC_REQUIRE([AC_PROG_LN_S])dnl
 
368
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
369
AC_REQUIRE([AC_OBJEXT])dnl
 
370
AC_REQUIRE([AC_EXEEXT])dnl
 
371
dnl
 
372
 
 
373
_LT_AC_PROG_ECHO_BACKSLASH
 
374
# Only perform the check for file, if the check method requires it
 
375
case $deplibs_check_method in
 
376
file_magic*)
 
377
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
378
    AC_PATH_MAGIC
 
379
  fi
 
380
  ;;
 
381
esac
 
382
 
 
383
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
384
AC_CHECK_TOOL(STRIP, strip, :)
 
385
 
 
386
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
 
387
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
388
enable_win32_dll=yes, enable_win32_dll=no)
 
389
 
 
390
AC_ARG_ENABLE(libtool-lock,
 
391
  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
 
392
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
393
 
 
394
# Some flags need to be propagated to the compiler or linker for good
 
395
# libtool support.
 
396
case $host in
 
397
*-*-irix6*)
 
398
  # Find out which ABI we are using.
 
399
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
400
  if AC_TRY_EVAL(ac_compile); then
 
401
    case `/usr/bin/file conftest.$ac_objext` in
 
402
    *32-bit*)
 
403
      LD="${LD-ld} -32"
 
404
      ;;
 
405
    *N32*)
 
406
      LD="${LD-ld} -n32"
 
407
      ;;
 
408
    *64-bit*)
 
409
      LD="${LD-ld} -64"
 
410
      ;;
 
411
    esac
 
412
  fi
 
413
  rm -rf conftest*
 
414
  ;;
 
415
 
 
416
*-*-sco3.2v5*)
 
417
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
418
  SAVE_CFLAGS="$CFLAGS"
 
419
  CFLAGS="$CFLAGS -belf"
 
420
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
421
    [AC_LANG_SAVE
 
422
     AC_LANG_C
 
423
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
424
     AC_LANG_RESTORE])
 
425
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
426
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
427
    CFLAGS="$SAVE_CFLAGS"
 
428
  fi
 
429
  ;;
 
430
 
 
431
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
 
432
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
 
433
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
 
434
  AC_CHECK_TOOL(AS, as, false)
 
435
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
 
436
 
 
437
  # recent cygwin and mingw systems supply a stub DllMain which the user
 
438
  # can override, but on older systems we have to supply one
 
439
  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
 
440
    [AC_TRY_LINK([],
 
441
      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
 
442
      DllMain (0, 0, 0);],
 
443
      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
 
444
 
 
445
  case $host/$CC in
 
446
  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
 
447
    # old mingw systems require "-dll" to link a DLL, while more recent ones
 
448
    # require "-mdll"
 
449
    SAVE_CFLAGS="$CFLAGS"
 
450
    CFLAGS="$CFLAGS -mdll"
 
451
    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
 
452
      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
 
453
    CFLAGS="$SAVE_CFLAGS" ;;
 
454
  *-*-cygwin* | *-*-pw32*)
 
455
    # cygwin systems need to pass --dll to the linker, and not link
 
456
    # crt.o which will require a WinMain@16 definition.
 
457
    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
 
458
  esac
 
459
  ;;
 
460
  ])
 
461
esac
 
462
 
 
463
_LT_AC_LTCONFIG_HACK
 
464
 
 
465
])
 
466
 
 
467
# AC_LIBTOOL_HEADER_ASSERT
 
468
# ------------------------
 
469
AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
 
470
[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
 
471
    [lt_cv_func_assert_works],
 
472
    [case $host in
 
473
    *-*-solaris*)
 
474
      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
 
475
        case `$CC --version 2>/dev/null` in
 
476
        [[12]].*) lt_cv_func_assert_works=no ;;
 
477
        *)        lt_cv_func_assert_works=yes ;;
 
478
        esac
 
479
      fi
 
480
      ;;
 
481
    esac])
 
482
 
 
483
if test "x$lt_cv_func_assert_works" = xyes; then
 
484
  AC_CHECK_HEADERS(assert.h)
 
485
fi
 
486
])# AC_LIBTOOL_HEADER_ASSERT
 
487
 
 
488
# _LT_AC_CHECK_DLFCN
 
489
# --------------------
 
490
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
491
[AC_CHECK_HEADERS(dlfcn.h)
 
492
])# _LT_AC_CHECK_DLFCN
 
493
 
 
494
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
495
# ---------------------------------
 
496
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
497
[AC_REQUIRE([AC_CANONICAL_HOST])
 
498
AC_REQUIRE([AC_PROG_NM])
 
499
AC_REQUIRE([AC_OBJEXT])
 
500
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
501
AC_MSG_CHECKING([command to parse $NM output])
 
502
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
 
503
 
 
504
# These are sane defaults that work on at least a few old systems.
 
505
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
506
 
 
507
# Character class describing NM global symbol codes.
 
508
symcode='[[BCDEGRST]]'
 
509
 
 
510
# Regexp to match symbols that can be accessed directly from C.
 
511
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
512
 
 
513
# Transform the above into a raw symbol and a C symbol.
 
514
symxfrm='\1 \2\3 \3'
 
515
 
 
516
# Transform an extracted symbol line into a proper C declaration
 
517
lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
 
518
 
 
519
# Transform an extracted symbol line into symbol name and symbol address
 
520
lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
521
 
 
522
# Define system-specific variables.
 
523
case $host_os in
 
524
aix*)
 
525
  symcode='[[BCDT]]'
 
526
  ;;
 
527
cygwin* | mingw* | pw32*)
 
528
  symcode='[[ABCDGISTW]]'
 
529
  ;;
 
530
hpux*) # Its linker distinguishes data from code symbols
 
531
  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
532
  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
 
533
  ;;
 
534
irix*)
 
535
  symcode='[[BCDEGRST]]'
 
536
  ;;
 
537
solaris* | sysv5*)
 
538
  symcode='[[BDT]]'
 
539
  ;;
 
540
sysv4)
 
541
  symcode='[[DFNSTU]]'
 
542
  ;;
 
543
esac
 
544
 
 
545
# Handle CRLF in mingw tool chain
 
546
opt_cr=
 
547
case $host_os in
 
548
mingw*)
 
549
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
550
  ;;
 
551
esac
 
552
 
 
553
# If we're using GNU nm, then use its standard symbol codes.
 
554
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
 
555
  symcode='[[ABCDGISTW]]'
 
556
fi
 
557
 
 
558
# Try without a prefix undercore, then with it.
 
559
for ac_symprfx in "" "_"; do
 
560
 
 
561
  # Write the raw and C identifiers.
 
562
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
563
 
 
564
  # Check to see that the pipe works correctly.
 
565
  pipe_works=no
 
566
  rm -f conftest*
 
567
  cat > conftest.$ac_ext <<EOF
 
568
#ifdef __cplusplus
 
569
extern "C" {
 
570
#endif
 
571
char nm_test_var;
 
572
void nm_test_func(){}
 
573
#ifdef __cplusplus
 
574
}
 
575
#endif
 
576
int main(){nm_test_var='a';nm_test_func();return(0);}
 
577
EOF
 
578
 
 
579
  if AC_TRY_EVAL(ac_compile); then
 
580
    # Now try to grab the symbols.
 
581
    nlist=conftest.nm
 
582
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
583
      # Try sorting and uniquifying the output.
 
584
      if sort "$nlist" | uniq > "$nlist"T; then
 
585
        mv -f "$nlist"T "$nlist"
 
586
      else
 
587
        rm -f "$nlist"T
 
588
      fi
 
589
 
 
590
      # Make sure that we snagged all the symbols we need.
 
591
      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
 
592
        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
 
593
          cat <<EOF > conftest.$ac_ext
 
594
#ifdef __cplusplus
 
595
extern "C" {
 
596
#endif
 
597
 
 
598
EOF
 
599
          # Now generate the symbol file.
 
600
          eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
 
601
 
 
602
          cat <<EOF >> conftest.$ac_ext
 
603
#if defined (__STDC__) && __STDC__
 
604
# define lt_ptr void *
 
605
#else
 
606
# define lt_ptr char *
 
607
# define const
 
608
#endif
 
609
 
 
610
/* The mapping between symbol names and symbols. */
 
611
const struct {
 
612
  const char *name;
 
613
  lt_ptr address;
 
614
}
 
615
lt_preloaded_symbols[[]] =
 
616
{
 
617
EOF
 
618
          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
 
619
          cat <<\EOF >> conftest.$ac_ext
 
620
  {0, (lt_ptr) 0}
 
621
};
 
622
 
 
623
#ifdef __cplusplus
 
624
}
 
625
#endif
 
626
EOF
 
627
          # Now try linking the two files.
 
628
          mv conftest.$ac_objext conftstm.$ac_objext
 
629
          save_LIBS="$LIBS"
 
630
          save_CFLAGS="$CFLAGS"
 
631
          LIBS="conftstm.$ac_objext"
 
632
          CFLAGS="$CFLAGS$no_builtin_flag"
 
633
          if AC_TRY_EVAL(ac_link) && test -s conftest; then
 
634
            pipe_works=yes
 
635
          fi
 
636
          LIBS="$save_LIBS"
 
637
          CFLAGS="$save_CFLAGS"
 
638
        else
 
639
          echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
 
640
        fi
 
641
      else
 
642
        echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
 
643
      fi
 
644
    else
 
645
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
 
646
    fi
 
647
  else
 
648
    echo "$progname: failed program was:" >&AC_FD_CC
 
649
    cat conftest.$ac_ext >&5
 
650
  fi
 
651
  rm -f conftest* conftst*
 
652
 
 
653
  # Do not use the global_symbol_pipe unless it works.
 
654
  if test "$pipe_works" = yes; then
 
655
    break
 
656
  else
 
657
    lt_cv_sys_global_symbol_pipe=
 
658
  fi
 
659
done
 
660
])
 
661
global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
 
662
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
663
  global_symbol_to_cdecl=
 
664
  global_symbol_to_c_name_address=
 
665
else
 
666
  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
 
667
  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
 
668
fi
 
669
if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
 
670
then
 
671
  AC_MSG_RESULT(failed)
 
672
else
 
673
  AC_MSG_RESULT(ok)
 
674
fi
 
675
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
676
 
 
677
# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
678
# ---------------------------------
 
679
AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
 
680
[# Find the correct PATH separator.  Usually this is `:', but
 
681
# DJGPP uses `;' like DOS.
 
682
if test "X${PATH_SEPARATOR+set}" != Xset; then
 
683
  UNAME=${UNAME-`uname 2>/dev/null`}
 
684
  case X$UNAME in
 
685
    *-DOS) lt_cv_sys_path_separator=';' ;;
 
686
    *)     lt_cv_sys_path_separator=':' ;;
 
687
  esac
 
688
  PATH_SEPARATOR=$lt_cv_sys_path_separator
 
689
fi
 
690
])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
691
 
 
692
# _LT_AC_PROG_ECHO_BACKSLASH
 
693
# --------------------------
 
694
# Add some code to the start of the generated configure script which
 
695
# will find an echo command which doesn't interpret backslashes.
 
696
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
 
697
[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
698
                              [AC_DIVERT_PUSH(NOTICE)])
 
699
_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
 
700
 
 
701
# Check that we are running under the correct shell.
 
702
SHELL=${CONFIG_SHELL-/bin/sh}
 
703
 
 
704
case X$ECHO in
 
705
X*--fallback-echo)
 
706
  # Remove one level of quotation (which was required for Make).
 
707
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
708
  ;;
 
709
esac
 
710
 
 
711
echo=${ECHO-echo}
 
712
if test "X[$]1" = X--no-reexec; then
 
713
  # Discard the --no-reexec flag, and continue.
 
714
  shift
 
715
elif test "X[$]1" = X--fallback-echo; then
 
716
  # Avoid inline document here, it may be left over
 
717
  :
 
718
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
 
719
  # Yippee, $echo works!
 
720
  :
 
721
else
 
722
  # Restart under the correct shell.
 
723
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
724
fi
 
725
 
 
726
if test "X[$]1" = X--fallback-echo; then
 
727
  # used as fallback echo
 
728
  shift
 
729
  cat <<EOF
 
730
$*
 
731
EOF
 
732
  exit 0
 
733
fi
 
734
 
 
735
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
736
# if CDPATH is set.
 
737
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
738
 
 
739
if test -z "$ECHO"; then
 
740
if test "X${echo_test_string+set}" != Xset; then
 
741
# find a string as large as possible, as long as the shell can cope with it
 
742
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
743
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
744
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
745
       echo_test_string="`eval $cmd`" &&
 
746
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
747
    then
 
748
      break
 
749
    fi
 
750
  done
 
751
fi
 
752
 
 
753
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
754
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
755
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
756
  :
 
757
else
 
758
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
759
  # backslashes.  This makes it impossible to quote backslashes using
 
760
  #   echo "$something" | sed 's/\\/\\\\/g'
 
761
  #
 
762
  # So, first we look for a working echo in the user's PATH.
 
763
 
 
764
  IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
765
  for dir in $PATH /usr/ucb; do
 
766
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
767
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
768
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
769
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
770
      echo="$dir/echo"
 
771
      break
 
772
    fi
 
773
  done
 
774
  IFS="$save_ifs"
 
775
 
 
776
  if test "X$echo" = Xecho; then
 
777
    # We didn't find a better echo, so look for alternatives.
 
778
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
779
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
780
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
781
      # This shell has a builtin print -r that does the trick.
 
782
      echo='print -r'
 
783
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
784
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
785
      # If we have ksh, try running configure again with it.
 
786
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
787
      export ORIGINAL_CONFIG_SHELL
 
788
      CONFIG_SHELL=/bin/ksh
 
789
      export CONFIG_SHELL
 
790
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
791
    else
 
792
      # Try using printf.
 
793
      echo='printf %s\n'
 
794
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
795
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
796
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
797
        # Cool, printf works
 
798
        :
 
799
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
800
           test "X$echo_testing_string" = 'X\t' &&
 
801
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
802
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
803
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
804
        export CONFIG_SHELL
 
805
        SHELL="$CONFIG_SHELL"
 
806
        export SHELL
 
807
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
808
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
809
           test "X$echo_testing_string" = 'X\t' &&
 
810
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
811
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
812
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
813
      else
 
814
        # maybe with a smaller string...
 
815
        prev=:
 
816
 
 
817
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
818
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
819
          then
 
820
            break
 
821
          fi
 
822
          prev="$cmd"
 
823
        done
 
824
 
 
825
        if test "$prev" != 'sed 50q "[$]0"'; then
 
826
          echo_test_string=`eval $prev`
 
827
          export echo_test_string
 
828
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
829
        else
 
830
          # Oops.  We lost completely, so just stick with echo.
 
831
          echo=echo
 
832
        fi
 
833
      fi
 
834
    fi
 
835
  fi
 
836
fi
 
837
fi
 
838
 
 
839
# Copy echo and quote the copy suitably for passing to libtool from
 
840
# the Makefile, instead of quoting the original, which is used later.
 
841
ECHO=$echo
 
842
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
843
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
844
fi
 
845
 
 
846
AC_SUBST(ECHO)
 
847
AC_DIVERT_POP
 
848
])# _LT_AC_PROG_ECHO_BACKSLASH
 
849
 
 
850
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
851
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
852
# ------------------------------------------------------------------
 
853
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
854
[if test "$cross_compiling" = yes; then :
 
855
  [$4]
 
856
else
 
857
  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
858
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
859
  lt_status=$lt_dlunknown
 
860
  cat > conftest.$ac_ext <<EOF
 
861
[#line __oline__ "configure"
 
862
#include "confdefs.h"
 
863
 
 
864
#if HAVE_DLFCN_H
 
865
#include <dlfcn.h>
 
866
#endif
 
867
 
 
868
#include <stdio.h>
 
869
 
 
870
#ifdef RTLD_GLOBAL
 
871
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
872
#else
 
873
#  ifdef DL_GLOBAL
 
874
#    define LT_DLGLOBAL         DL_GLOBAL
 
875
#  else
 
876
#    define LT_DLGLOBAL         0
 
877
#  endif
 
878
#endif
 
879
 
 
880
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
881
   find out it does not work in some platform. */
 
882
#ifndef LT_DLLAZY_OR_NOW
 
883
#  ifdef RTLD_LAZY
 
884
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
885
#  else
 
886
#    ifdef DL_LAZY
 
887
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
888
#    else
 
889
#      ifdef RTLD_NOW
 
890
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
891
#      else
 
892
#        ifdef DL_NOW
 
893
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
894
#        else
 
895
#          define LT_DLLAZY_OR_NOW      0
 
896
#        endif
 
897
#      endif
 
898
#    endif
 
899
#  endif
 
900
#endif
 
901
 
 
902
#ifdef __cplusplus
 
903
extern "C" void exit (int);
 
904
#endif
 
905
 
 
906
void fnord() { int i=42;}
 
907
int main ()
 
908
{
 
909
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
910
  int status = $lt_dlunknown;
 
911
 
 
912
  if (self)
 
913
    {
 
914
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
915
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
916
      /* dlclose (self); */
 
917
    }
 
918
 
 
919
    exit (status);
 
920
}]
 
921
EOF
 
922
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
923
    (./conftest; exit; ) 2>/dev/null
 
924
    lt_status=$?
 
925
    case x$lt_status in
 
926
      x$lt_dlno_uscore) $1 ;;
 
927
      x$lt_dlneed_uscore) $2 ;;
 
928
      x$lt_unknown|x*) $3 ;;
 
929
    esac
 
930
  else :
 
931
    # compilation failed
 
932
    $3
 
933
  fi
 
934
fi
 
935
rm -fr conftest*
 
936
])# _LT_AC_TRY_DLOPEN_SELF
 
937
 
 
938
# AC_LIBTOOL_DLOPEN_SELF
 
939
# -------------------
 
940
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
941
[if test "x$enable_dlopen" != xyes; then
 
942
  enable_dlopen=unknown
 
943
  enable_dlopen_self=unknown
 
944
  enable_dlopen_self_static=unknown
 
945
else
 
946
  lt_cv_dlopen=no
 
947
  lt_cv_dlopen_libs=
 
948
 
 
949
  case $host_os in
 
950
  beos*)
 
951
    lt_cv_dlopen="load_add_on"
 
952
    lt_cv_dlopen_libs=
 
953
    lt_cv_dlopen_self=yes
 
954
    ;;
 
955
 
 
956
  cygwin* | mingw* | pw32*)
 
957
    lt_cv_dlopen="LoadLibrary"
 
958
    lt_cv_dlopen_libs=
 
959
   ;;
 
960
 
 
961
  *)
 
962
    AC_CHECK_FUNC([shl_load],
 
963
          [lt_cv_dlopen="shl_load"],
 
964
      [AC_CHECK_LIB([dld], [shl_load],
 
965
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
966
        [AC_CHECK_FUNC([dlopen],
 
967
              [lt_cv_dlopen="dlopen"],
 
968
          [AC_CHECK_LIB([dl], [dlopen],
 
969
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
970
            [AC_CHECK_LIB([svld], [dlopen],
 
971
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
972
              [AC_CHECK_LIB([dld], [dld_link],
 
973
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
974
              ])
 
975
            ])
 
976
          ])
 
977
        ])
 
978
      ])
 
979
    ;;
 
980
  esac
 
981
 
 
982
  if test "x$lt_cv_dlopen" != xno; then
 
983
    enable_dlopen=yes
 
984
  else
 
985
    enable_dlopen=no
 
986
  fi
 
987
 
 
988
  case $lt_cv_dlopen in
 
989
  dlopen)
 
990
    save_CPPFLAGS="$CPPFLAGS"
 
991
    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
992
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
993
 
 
994
    save_LDFLAGS="$LDFLAGS"
 
995
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
996
 
 
997
    save_LIBS="$LIBS"
 
998
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
999
 
 
1000
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
1001
          lt_cv_dlopen_self, [dnl
 
1002
          _LT_AC_TRY_DLOPEN_SELF(
 
1003
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
1004
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
1005
    ])
 
1006
 
 
1007
    if test "x$lt_cv_dlopen_self" = xyes; then
 
1008
      LDFLAGS="$LDFLAGS $link_static_flag"
 
1009
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
1010
          lt_cv_dlopen_self_static, [dnl
 
1011
          _LT_AC_TRY_DLOPEN_SELF(
 
1012
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
1013
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
1014
      ])
 
1015
    fi
 
1016
 
 
1017
    CPPFLAGS="$save_CPPFLAGS"
 
1018
    LDFLAGS="$save_LDFLAGS"
 
1019
    LIBS="$save_LIBS"
 
1020
    ;;
 
1021
  esac
 
1022
 
 
1023
  case $lt_cv_dlopen_self in
 
1024
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
1025
  *) enable_dlopen_self=unknown ;;
 
1026
  esac
 
1027
 
 
1028
  case $lt_cv_dlopen_self_static in
 
1029
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
1030
  *) enable_dlopen_self_static=unknown ;;
 
1031
  esac
 
1032
fi
 
1033
])# AC_LIBTOOL_DLOPEN_SELF
 
1034
 
 
1035
AC_DEFUN([_LT_AC_LTCONFIG_HACK],
 
1036
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
 
1037
# Sed substitution that helps us do robust quoting.  It backslashifies
 
1038
# metacharacters that are still active within double-quoted strings.
 
1039
Xsed='sed -e s/^X//'
 
1040
sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
 
1041
 
 
1042
# Same as above, but do not quote variable references.
 
1043
double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
 
1044
 
 
1045
# Sed substitution to delay expansion of an escaped shell variable in a
 
1046
# double_quote_subst'ed string.
 
1047
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
1048
 
 
1049
# Constants:
 
1050
rm="rm -f"
 
1051
 
 
1052
# Global variables:
 
1053
default_ofile=libtool
 
1054
can_build_shared=yes
 
1055
 
 
1056
# All known linkers require a `.a' archive for static linking (except M$VC,
 
1057
# which needs '.lib').
 
1058
libext=a
 
1059
ltmain="$ac_aux_dir/ltmain.sh"
 
1060
ofile="$default_ofile"
 
1061
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
1062
need_locks="$enable_libtool_lock"
 
1063
 
 
1064
old_CC="$CC"
 
1065
old_CFLAGS="$CFLAGS"
 
1066
 
 
1067
# Set sane defaults for various variables
 
1068
test -z "$AR" && AR=ar
 
1069
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
1070
test -z "$AS" && AS=as
 
1071
test -z "$CC" && CC=cc
 
1072
test -z "$DLLTOOL" && DLLTOOL=dlltool
 
1073
test -z "$LD" && LD=ld
 
1074
test -z "$LN_S" && LN_S="ln -s"
 
1075
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
1076
test -z "$NM" && NM=nm
 
1077
test -z "$OBJDUMP" && OBJDUMP=objdump
 
1078
test -z "$RANLIB" && RANLIB=:
 
1079
test -z "$STRIP" && STRIP=:
 
1080
test -z "$ac_objext" && ac_objext=o
 
1081
 
 
1082
if test x"$host" != x"$build"; then
 
1083
  ac_tool_prefix=${host_alias}-
 
1084
else
 
1085
  ac_tool_prefix=
 
1086
fi
 
1087
 
 
1088
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 
1089
case $host_os in
 
1090
linux-gnu*) ;;
 
1091
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 
1092
esac
 
1093
 
 
1094
case $host_os in
 
1095
aix3*)
 
1096
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
1097
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
1098
  # vanish in a puff of smoke.
 
1099
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
1100
    COLLECT_NAMES=
 
1101
    export COLLECT_NAMES
 
1102
  fi
 
1103
  ;;
 
1104
esac
 
1105
 
 
1106
# Determine commands to create old-style static archives.
 
1107
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
1108
old_postinstall_cmds='chmod 644 $oldlib'
 
1109
old_postuninstall_cmds=
 
1110
 
 
1111
if test -n "$RANLIB"; then
 
1112
  case $host_os in
 
1113
  openbsd*)
 
1114
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
1115
    ;;
 
1116
  *)
 
1117
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
1118
    ;;
 
1119
  esac
 
1120
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
1121
fi
 
1122
 
 
1123
# Allow CC to be a program name with arguments.
 
1124
set dummy $CC
 
1125
compiler="[$]2"
 
1126
 
 
1127
AC_MSG_CHECKING([for objdir])
 
1128
rm -f .libs 2>/dev/null
 
1129
mkdir .libs 2>/dev/null
 
1130
if test -d .libs; then
 
1131
  objdir=.libs
 
1132
else
 
1133
  # MS-DOS does not allow filenames that begin with a dot.
 
1134
  objdir=_libs
 
1135
fi
 
1136
rmdir .libs 2>/dev/null
 
1137
AC_MSG_RESULT($objdir)
 
1138
 
 
1139
 
 
1140
AC_ARG_WITH(pic,
 
1141
[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
 
1142
pic_mode="$withval", pic_mode=default)
 
1143
test -z "$pic_mode" && pic_mode=default
 
1144
 
 
1145
# We assume here that the value for lt_cv_prog_cc_pic will not be cached
 
1146
# in isolation, and that seeing it set (from the cache) indicates that
 
1147
# the associated values are set (in the cache) correctly too.
 
1148
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
1149
AC_CACHE_VAL(lt_cv_prog_cc_pic,
 
1150
[ lt_cv_prog_cc_pic=
 
1151
  lt_cv_prog_cc_shlib=
 
1152
  lt_cv_prog_cc_wl=
 
1153
  lt_cv_prog_cc_static=
 
1154
  lt_cv_prog_cc_no_builtin=
 
1155
  lt_cv_prog_cc_can_build_shared=$can_build_shared
 
1156
 
 
1157
  if test "$GCC" = yes; then
 
1158
    lt_cv_prog_cc_wl='-Wl,'
 
1159
    lt_cv_prog_cc_static='-static'
 
1160
 
 
1161
    case $host_os in
 
1162
    aix*)
 
1163
      # Below there is a dirty hack to force normal static linking with -ldl
 
1164
      # The problem is because libdl dynamically linked with both libc and
 
1165
      # libC (AIX C++ library), which obviously doesn't included in libraries
 
1166
      # list by gcc. This cause undefined symbols with -static flags.
 
1167
      # This hack allows C programs to be linked with "-static -ldl", but
 
1168
      # not sure about C++ programs.
 
1169
      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
 
1170
      ;;
 
1171
    amigaos*)
 
1172
      # FIXME: we need at least 68020 code to build shared libraries, but
 
1173
      # adding the `-m68020' flag to GCC prevents building anything better,
 
1174
      # like `-m68040'.
 
1175
      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
 
1176
      ;;
 
1177
    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
 
1178
      # PIC is the default for these OSes.
 
1179
      ;;
 
1180
    darwin* | rhapsody*)
 
1181
      # PIC is the default on this platform
 
1182
      # Common symbols not allowed in MH_DYLIB files
 
1183
      lt_cv_prog_cc_pic='-fno-common'
 
1184
      ;;
 
1185
    cygwin* | mingw* | pw32* | os2*)
 
1186
      # This hack is so that the source file can tell whether it is being
 
1187
      # built for inclusion in a dll (and should export symbols for example).
 
1188
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
 
1189
      ;;
 
1190
    sysv4*MP*)
 
1191
      if test -d /usr/nec; then
 
1192
         lt_cv_prog_cc_pic=-Kconform_pic
 
1193
      fi
 
1194
      ;;
 
1195
    *)
 
1196
      lt_cv_prog_cc_pic='-fPIC'
 
1197
      ;;
 
1198
    esac
 
1199
  else
 
1200
    # PORTME Check for PIC flags for the system compiler.
 
1201
    case $host_os in
 
1202
    aix3* | aix4* | aix5*)
 
1203
      lt_cv_prog_cc_wl='-Wl,'
 
1204
      # All AIX code is PIC.
 
1205
      if test "$host_cpu" = ia64; then
 
1206
        # AIX 5 now supports IA64 processor
 
1207
        lt_cv_prog_cc_static='-Bstatic'
 
1208
      else
 
1209
        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
 
1210
      fi
 
1211
      ;;
 
1212
 
 
1213
    hpux9* | hpux10* | hpux11*)
 
1214
      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
 
1215
      lt_cv_prog_cc_wl='-Wl,'
 
1216
      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
 
1217
      lt_cv_prog_cc_pic='+Z'
 
1218
      ;;
 
1219
 
 
1220
    irix5* | irix6*)
 
1221
      lt_cv_prog_cc_wl='-Wl,'
 
1222
      lt_cv_prog_cc_static='-non_shared'
 
1223
      # PIC (with -KPIC) is the default.
 
1224
      ;;
 
1225
 
 
1226
    cygwin* | mingw* | pw32* | os2*)
 
1227
      # This hack is so that the source file can tell whether it is being
 
1228
      # built for inclusion in a dll (and should export symbols for example).
 
1229
      lt_cv_prog_cc_pic='-DDLL_EXPORT'
 
1230
      ;;
 
1231
 
 
1232
    newsos6)
 
1233
      lt_cv_prog_cc_pic='-KPIC'
 
1234
      lt_cv_prog_cc_static='-Bstatic'
 
1235
      ;;
 
1236
 
 
1237
    osf3* | osf4* | osf5*)
 
1238
      # All OSF/1 code is PIC.
 
1239
      lt_cv_prog_cc_wl='-Wl,'
 
1240
      lt_cv_prog_cc_static='-non_shared'
 
1241
      ;;
 
1242
 
 
1243
    sco3.2v5*)
 
1244
      lt_cv_prog_cc_pic='-Kpic'
 
1245
      lt_cv_prog_cc_static='-dn'
 
1246
      lt_cv_prog_cc_shlib='-belf'
 
1247
      ;;
 
1248
 
 
1249
    solaris*)
 
1250
      lt_cv_prog_cc_pic='-KPIC'
 
1251
      lt_cv_prog_cc_static='-Bstatic'
 
1252
      lt_cv_prog_cc_wl='-Wl,'
 
1253
      ;;
 
1254
 
 
1255
    sunos4*)
 
1256
      lt_cv_prog_cc_pic='-PIC'
 
1257
      lt_cv_prog_cc_static='-Bstatic'
 
1258
      lt_cv_prog_cc_wl='-Qoption ld '
 
1259
      ;;
 
1260
 
 
1261
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
1262
      lt_cv_prog_cc_pic='-KPIC'
 
1263
      lt_cv_prog_cc_static='-Bstatic'
 
1264
      if test "x$host_vendor" = xsni; then
 
1265
        lt_cv_prog_cc_wl='-LD'
 
1266
      else
 
1267
        lt_cv_prog_cc_wl='-Wl,'
 
1268
      fi
 
1269
      ;;
 
1270
 
 
1271
    uts4*)
 
1272
      lt_cv_prog_cc_pic='-pic'
 
1273
      lt_cv_prog_cc_static='-Bstatic'
 
1274
      ;;
 
1275
 
 
1276
    sysv4*MP*)
 
1277
      if test -d /usr/nec ;then
 
1278
        lt_cv_prog_cc_pic='-Kconform_pic'
 
1279
        lt_cv_prog_cc_static='-Bstatic'
 
1280
      fi
 
1281
      ;;
 
1282
 
 
1283
    *)
 
1284
      lt_cv_prog_cc_can_build_shared=no
 
1285
      ;;
 
1286
    esac
 
1287
  fi
 
1288
])
 
1289
if test -z "$lt_cv_prog_cc_pic"; then
 
1290
  AC_MSG_RESULT([none])
 
1291
else
 
1292
  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
 
1293
 
 
1294
  # Check to make sure the pic_flag actually works.
 
1295
  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
 
1296
  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
 
1297
    save_CFLAGS="$CFLAGS"
 
1298
    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
 
1299
    AC_TRY_COMPILE([], [], [dnl
 
1300
      case $host_os in
 
1301
      hpux9* | hpux10* | hpux11*)
 
1302
        # On HP-UX, both CC and GCC only warn that PIC is supported... then
 
1303
        # they create non-PIC objects.  So, if there were any warnings, we
 
1304
        # assume that PIC is not supported.
 
1305
        if test -s conftest.err; then
 
1306
          lt_cv_prog_cc_pic_works=no
 
1307
        else
 
1308
          lt_cv_prog_cc_pic_works=yes
 
1309
        fi
 
1310
        ;;
 
1311
      *)
 
1312
        lt_cv_prog_cc_pic_works=yes
 
1313
        ;;
 
1314
      esac
 
1315
    ], [dnl
 
1316
      lt_cv_prog_cc_pic_works=no
 
1317
    ])
 
1318
    CFLAGS="$save_CFLAGS"
 
1319
  ])
 
1320
 
 
1321
  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
 
1322
    lt_cv_prog_cc_pic=
 
1323
    lt_cv_prog_cc_can_build_shared=no
 
1324
  else
 
1325
    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
 
1326
  fi
 
1327
 
 
1328
  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
 
1329
fi
 
1330
 
 
1331
# Check for any special shared library compilation flags.
 
1332
if test -n "$lt_cv_prog_cc_shlib"; then
 
1333
  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
 
1334
  if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
 
1335
  else
 
1336
   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
 
1337
    lt_cv_prog_cc_can_build_shared=no
 
1338
  fi
 
1339
fi
 
1340
 
 
1341
AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
 
1342
AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
 
1343
  lt_cv_prog_cc_static_works=no
 
1344
  save_LDFLAGS="$LDFLAGS"
 
1345
  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
 
1346
  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
 
1347
  LDFLAGS="$save_LDFLAGS"
 
1348
])
 
1349
 
 
1350
# Belt *and* braces to stop my trousers falling down:
 
1351
test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
 
1352
AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
 
1353
 
 
1354
pic_flag="$lt_cv_prog_cc_pic"
 
1355
special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
 
1356
wl="$lt_cv_prog_cc_wl"
 
1357
link_static_flag="$lt_cv_prog_cc_static"
 
1358
no_builtin_flag="$lt_cv_prog_cc_no_builtin"
 
1359
can_build_shared="$lt_cv_prog_cc_can_build_shared"
 
1360
 
 
1361
 
 
1362
# Check to see if options -o and -c are simultaneously supported by compiler
 
1363
AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
 
1364
AC_CACHE_VAL([lt_cv_compiler_c_o], [
 
1365
$rm -r conftest 2>/dev/null
 
1366
mkdir conftest
 
1367
cd conftest
 
1368
echo "int some_variable = 0;" > conftest.$ac_ext
 
1369
mkdir out
 
1370
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 
1371
# that will create temporary files in the current directory regardless of
 
1372
# the output directory.  Thus, making CWD read-only will cause this test
 
1373
# to fail, enabling locking or at least warning the user not to do parallel
 
1374
# builds.
 
1375
chmod -w .
 
1376
save_CFLAGS="$CFLAGS"
 
1377
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 
1378
compiler_c_o=no
 
1379
if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
 
1380
  # The compiler can only warn and ignore the option if not recognized
 
1381
  # So say no if there are warnings
 
1382
  if test -s out/conftest.err; then
 
1383
    lt_cv_compiler_c_o=no
 
1384
  else
 
1385
    lt_cv_compiler_c_o=yes
 
1386
  fi
 
1387
else
 
1388
  # Append any errors to the config.log.
 
1389
  cat out/conftest.err 1>&AC_FD_CC
 
1390
  lt_cv_compiler_c_o=no
 
1391
fi
 
1392
CFLAGS="$save_CFLAGS"
 
1393
chmod u+w .
 
1394
$rm conftest* out/*
 
1395
rmdir out
 
1396
cd ..
 
1397
rmdir conftest
 
1398
$rm -r conftest 2>/dev/null
 
1399
])
 
1400
compiler_c_o=$lt_cv_compiler_c_o
 
1401
AC_MSG_RESULT([$compiler_c_o])
 
1402
 
 
1403
if test x"$compiler_c_o" = x"yes"; then
 
1404
  # Check to see if we can write to a .lo
 
1405
  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
 
1406
  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
 
1407
  lt_cv_compiler_o_lo=no
 
1408
  save_CFLAGS="$CFLAGS"
 
1409
  CFLAGS="$CFLAGS -c -o conftest.lo"
 
1410
  save_objext="$ac_objext"
 
1411
  ac_objext=lo
 
1412
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
 
1413
    # The compiler can only warn and ignore the option if not recognized
 
1414
    # So say no if there are warnings
 
1415
    if test -s conftest.err; then
 
1416
      lt_cv_compiler_o_lo=no
 
1417
    else
 
1418
      lt_cv_compiler_o_lo=yes
 
1419
    fi
 
1420
  ])
 
1421
  ac_objext="$save_objext"
 
1422
  CFLAGS="$save_CFLAGS"
 
1423
  ])
 
1424
  compiler_o_lo=$lt_cv_compiler_o_lo
 
1425
  AC_MSG_RESULT([$compiler_o_lo])
 
1426
else
 
1427
  compiler_o_lo=no
 
1428
fi
 
1429
 
 
1430
# Check to see if we can do hard links to lock some files if needed
 
1431
hard_links="nottested"
 
1432
if test "$compiler_c_o" = no && test "$need_locks" != no; then
 
1433
  # do not overwrite the value of need_locks provided by the user
 
1434
  AC_MSG_CHECKING([if we can lock with hard links])
 
1435
  hard_links=yes
 
1436
  $rm conftest*
 
1437
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1438
  touch conftest.a
 
1439
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
1440
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1441
  AC_MSG_RESULT([$hard_links])
 
1442
  if test "$hard_links" = no; then
 
1443
    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
 
1444
    need_locks=warn
 
1445
  fi
 
1446
else
 
1447
  need_locks=no
 
1448
fi
 
1449
 
 
1450
if test "$GCC" = yes; then
 
1451
  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
 
1452
  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
 
1453
  echo "int some_variable = 0;" > conftest.$ac_ext
 
1454
  save_CFLAGS="$CFLAGS"
 
1455
  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
 
1456
  compiler_rtti_exceptions=no
 
1457
  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
 
1458
    # The compiler can only warn and ignore the option if not recognized
 
1459
    # So say no if there are warnings
 
1460
    if test -s conftest.err; then
 
1461
      compiler_rtti_exceptions=no
 
1462
    else
 
1463
      compiler_rtti_exceptions=yes
 
1464
    fi
 
1465
  ])
 
1466
  CFLAGS="$save_CFLAGS"
 
1467
  AC_MSG_RESULT([$compiler_rtti_exceptions])
 
1468
 
 
1469
  if test "$compiler_rtti_exceptions" = "yes"; then
 
1470
    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
 
1471
  else
 
1472
    no_builtin_flag=' -fno-builtin'
 
1473
  fi
 
1474
fi
 
1475
 
 
1476
# See if the linker supports building shared libraries.
 
1477
AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
 
1478
 
 
1479
allow_undefined_flag=
 
1480
no_undefined_flag=
 
1481
need_lib_prefix=unknown
 
1482
need_version=unknown
 
1483
# when you set need_version to no, make sure it does not cause -set_version
 
1484
# flags to be left without arguments
 
1485
archive_cmds=
 
1486
archive_expsym_cmds=
 
1487
old_archive_from_new_cmds=
 
1488
old_archive_from_expsyms_cmds=
 
1489
export_dynamic_flag_spec=
 
1490
whole_archive_flag_spec=
 
1491
thread_safe_flag_spec=
 
1492
hardcode_into_libs=no
 
1493
hardcode_libdir_flag_spec=
 
1494
hardcode_libdir_separator=
 
1495
hardcode_direct=no
 
1496
hardcode_minus_L=no
 
1497
hardcode_shlibpath_var=unsupported
 
1498
runpath_var=
 
1499
link_all_deplibs=unknown
 
1500
always_export_symbols=no
 
1501
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
1502
# include_expsyms should be a list of space-separated symbols to be *always*
 
1503
# included in the symbol list
 
1504
include_expsyms=
 
1505
# exclude_expsyms can be an egrep regular expression of symbols to exclude
 
1506
# it will be wrapped by ` (' and `)$', so one must not match beginning or
 
1507
# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
1508
# as well as any symbol that contains `d'.
 
1509
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
 
1510
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
1511
# platforms (ab)use it in PIC code, but their linkers get confused if
 
1512
# the symbol is explicitly referenced.  Since portable code cannot
 
1513
# rely on this symbol name, it's probably fine to never include it in
 
1514
# preloaded symbol tables.
 
1515
extract_expsyms_cmds=
 
1516
 
 
1517
case $host_os in
 
1518
cygwin* | mingw* | pw32*)
 
1519
  # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
1520
  # When not using gcc, we currently assume that we are using
 
1521
  # Microsoft Visual C++.
 
1522
  if test "$GCC" != yes; then
 
1523
    with_gnu_ld=no
 
1524
  fi
 
1525
  ;;
 
1526
openbsd*)
 
1527
  with_gnu_ld=no
 
1528
  ;;
 
1529
esac
 
1530
 
 
1531
ld_shlibs=yes
 
1532
if test "$with_gnu_ld" = yes; then
 
1533
  # If archive_cmds runs LD, not CC, wlarc should be empty
 
1534
  wlarc='${wl}'
 
1535
 
 
1536
  # See if GNU ld supports shared libraries.
 
1537
  case $host_os in
 
1538
  aix3* | aix4* | aix5*)
 
1539
    # On AIX, the GNU linker is very broken
 
1540
    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
 
1541
    ld_shlibs=no
 
1542
    cat <<EOF 1>&2
 
1543
 
 
1544
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
1545
*** to be unable to reliably create shared libraries on AIX.
 
1546
*** Therefore, libtool is disabling shared libraries support.  If you
 
1547
*** really care for shared libraries, you may want to modify your PATH
 
1548
*** so that a non-GNU linker is found, and then restart.
 
1549
 
 
1550
EOF
 
1551
    ;;
 
1552
 
 
1553
  amigaos*)
 
1554
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
1555
    hardcode_libdir_flag_spec='-L$libdir'
 
1556
    hardcode_minus_L=yes
 
1557
 
 
1558
    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
1559
    # that the semantics of dynamic libraries on AmigaOS, at least up
 
1560
    # to version 4, is to share data among multiple programs linked
 
1561
    # with the same dynamic library.  Since this doesn't match the
 
1562
    # behavior of shared libraries on other platforms, we can use
 
1563
    # them.
 
1564
    ld_shlibs=no
 
1565
    ;;
 
1566
 
 
1567
  beos*)
 
1568
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
1569
      allow_undefined_flag=unsupported
 
1570
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
1571
      # support --undefined.  This deserves some investigation.  FIXME
 
1572
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
1573
    else
 
1574
      ld_shlibs=no
 
1575
    fi
 
1576
    ;;
 
1577
 
 
1578
  cygwin* | mingw* | pw32*)
 
1579
    # hardcode_libdir_flag_spec is actually meaningless, as there is
 
1580
    # no search path for DLLs.
 
1581
    hardcode_libdir_flag_spec='-L$libdir'
 
1582
    allow_undefined_flag=unsupported
 
1583
    always_export_symbols=yes
 
1584
 
 
1585
    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
 
1586
      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
 
1587
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
 
1588
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
 
1589
      else $CC -o impgen impgen.c ; fi)~
 
1590
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
 
1591
 
 
1592
    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
 
1593
 
 
1594
    # cygwin and mingw dlls have different entry points and sets of symbols
 
1595
    # to exclude.
 
1596
    # FIXME: what about values for MSVC?
 
1597
    dll_entry=__cygwin_dll_entry@12
 
1598
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
 
1599
    case $host_os in
 
1600
    mingw*)
 
1601
      # mingw values
 
1602
      dll_entry=_DllMainCRTStartup@12
 
1603
      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
 
1604
      ;;
 
1605
    esac
 
1606
 
 
1607
    # mingw and cygwin differ, and it's simplest to just exclude the union
 
1608
    # of the two symbol sets.
 
1609
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
 
1610
 
 
1611
    # recent cygwin and mingw systems supply a stub DllMain which the user
 
1612
    # can override, but on older systems we have to supply one (in ltdll.c)
 
1613
    if test "x$lt_cv_need_dllmain" = "xyes"; then
 
1614
      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
 
1615
      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
 
1616
        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
 
1617
    else
 
1618
      ltdll_obj=
 
1619
      ltdll_cmds=
 
1620
    fi
 
1621
 
 
1622
    # Extract the symbol export list from an `--export-all' def file,
 
1623
    # then regenerate the def file from the symbol export list, so that
 
1624
    # the compiled dll only exports the symbol export list.
 
1625
    # Be careful not to strip the DATA tag left be newer dlltools.
 
1626
    export_symbols_cmds="$ltdll_cmds"'
 
1627
      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
 
1628
      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
 
1629
 
 
1630
    # If the export-symbols file already is a .def file (1st line
 
1631
    # is EXPORTS), use it as is.
 
1632
    # If DATA tags from a recent dlltool are present, honour them!
 
1633
    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
 
1634
        cp $export_symbols $output_objdir/$soname-def;
 
1635
      else
 
1636
        echo EXPORTS > $output_objdir/$soname-def;
 
1637
        _lt_hint=1;
 
1638
        cat $export_symbols | while read symbol; do
 
1639
         set dummy \$symbol;
 
1640
         case \[$]# in
 
1641
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
 
1642
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
 
1643
         esac;
 
1644
         _lt_hint=`expr 1 + \$_lt_hint`;
 
1645
        done;
 
1646
      fi~
 
1647
      '"$ltdll_cmds"'
 
1648
      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
1649
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
 
1650
      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
 
1651
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
 
1652
      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
 
1653
    ;;
 
1654
 
 
1655
  netbsd*)
 
1656
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
1657
      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
1658
      wlarc=
 
1659
    else
 
1660
      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
1661
      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
1662
    fi
 
1663
    ;;
 
1664
 
 
1665
  solaris* | sysv5*)
 
1666
    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
 
1667
      ld_shlibs=no
 
1668
      cat <<EOF 1>&2
 
1669
 
 
1670
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
1671
*** create shared libraries on Solaris systems.  Therefore, libtool
 
1672
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
1673
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
1674
*** your PATH or compiler configuration so that the native linker is
 
1675
*** used, and then restart.
 
1676
 
 
1677
EOF
 
1678
    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
1679
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
1680
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
1681
    else
 
1682
      ld_shlibs=no
 
1683
    fi
 
1684
    ;;
 
1685
 
 
1686
  sunos4*)
 
1687
    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
1688
    wlarc=
 
1689
    hardcode_direct=yes
 
1690
    hardcode_shlibpath_var=no
 
1691
    ;;
 
1692
 
 
1693
  *)
 
1694
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 
1695
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
1696
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
1697
    else
 
1698
      ld_shlibs=no
 
1699
    fi
 
1700
    ;;
 
1701
  esac
 
1702
 
 
1703
  if test "$ld_shlibs" = yes; then
 
1704
    runpath_var=LD_RUN_PATH
 
1705
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
 
1706
    export_dynamic_flag_spec='${wl}--export-dynamic'
 
1707
    case $host_os in
 
1708
    cygwin* | mingw* | pw32*)
 
1709
      # dlltool doesn't understand --whole-archive et. al.
 
1710
      whole_archive_flag_spec=
 
1711
      ;;
 
1712
    *)
 
1713
      # ancient GNU ld didn't support --whole-archive et. al.
 
1714
      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
 
1715
        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
1716
      else
 
1717
        whole_archive_flag_spec=
 
1718
      fi
 
1719
      ;;
 
1720
    esac
 
1721
  fi
 
1722
else
 
1723
  # PORTME fill in a description of your system's linker (not GNU ld)
 
1724
  case $host_os in
 
1725
  aix3*)
 
1726
    allow_undefined_flag=unsupported
 
1727
    always_export_symbols=yes
 
1728
    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
1729
    # Note: this linker hardcodes the directories in LIBPATH if there
 
1730
    # are no directories specified by -L.
 
1731
    hardcode_minus_L=yes
 
1732
    if test "$GCC" = yes && test -z "$link_static_flag"; then
 
1733
      # Neither direct hardcoding nor static linking is supported with a
 
1734
      # broken collect2.
 
1735
      hardcode_direct=unsupported
 
1736
    fi
 
1737
    ;;
 
1738
 
 
1739
  aix4* | aix5*)
 
1740
    if test "$host_cpu" = ia64; then
 
1741
      # On IA64, the linker does run time linking by default, so we don't
 
1742
      # have to do anything special.
 
1743
      aix_use_runtimelinking=no
 
1744
      exp_sym_flag='-Bexport'
 
1745
      no_entry_flag=""
 
1746
    else
 
1747
      aix_use_runtimelinking=no
 
1748
 
 
1749
      # Test if we are trying to use run time linking or normal
 
1750
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
1751
      # need to do runtime linking.
 
1752
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
1753
        for ld_flag in $LDFLAGS; do
 
1754
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
1755
            aix_use_runtimelinking=yes
 
1756
            break
 
1757
          fi
 
1758
        done
 
1759
      esac
 
1760
 
 
1761
      exp_sym_flag='-bexport'
 
1762
      no_entry_flag='-bnoentry'
 
1763
    fi
 
1764
 
 
1765
    # When large executables or shared objects are built, AIX ld can
 
1766
    # have problems creating the table of contents.  If linking a library
 
1767
    # or program results in "error TOC overflow" add -mminimal-toc to
 
1768
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
1769
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
1770
 
 
1771
    hardcode_direct=yes
 
1772
    archive_cmds=''
 
1773
    hardcode_libdir_separator=':'
 
1774
    if test "$GCC" = yes; then
 
1775
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
 
1776
        collect2name=`${CC} -print-prog-name=collect2`
 
1777
        if test -f "$collect2name" && \
 
1778
          strings "$collect2name" | grep resolve_lib_name >/dev/null
 
1779
        then
 
1780
          # We have reworked collect2
 
1781
          hardcode_direct=yes
 
1782
        else
 
1783
          # We have old collect2
 
1784
          hardcode_direct=unsupported
 
1785
          # It fails to find uninstalled libraries when the uninstalled
 
1786
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
1787
          # to unsupported forces relinking
 
1788
          hardcode_minus_L=yes
 
1789
          hardcode_libdir_flag_spec='-L$libdir'
 
1790
          hardcode_libdir_separator=
 
1791
        fi
 
1792
      esac
 
1793
 
 
1794
      shared_flag='-shared'
 
1795
    else
 
1796
      # not using gcc
 
1797
      if test "$host_cpu" = ia64; then
 
1798
        shared_flag='${wl}-G'
 
1799
      else
 
1800
        if test "$aix_use_runtimelinking" = yes; then
 
1801
          shared_flag='${wl}-G'
 
1802
        else
 
1803
          shared_flag='${wl}-bM:SRE'
 
1804
        fi
 
1805
      fi
 
1806
    fi
 
1807
 
 
1808
    # It seems that -bexpall can do strange things, so it is better to
 
1809
    # generate a list of symbols to export.
 
1810
    always_export_symbols=yes
 
1811
    if test "$aix_use_runtimelinking" = yes; then
 
1812
      # Warning - without using the other runtime loading flags (-brtl),
 
1813
      # -berok will link without error, but may produce a broken library.
 
1814
      allow_undefined_flag='-berok'
 
1815
      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
 
1816
      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
1817
    else
 
1818
      if test "$host_cpu" = ia64; then
 
1819
        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
 
1820
        allow_undefined_flag="-z nodefs"
 
1821
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
1822
      else
 
1823
        hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
 
1824
        # Warning - without using the other run time loading flags,
 
1825
        # -berok will link without error, but may produce a broken library.
 
1826
        allow_undefined_flag='${wl}-berok'
 
1827
        # This is a bit strange, but is similar to how AIX traditionally builds
 
1828
        # it's shared libraries.
 
1829
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
 
1830
      fi
 
1831
    fi
 
1832
    ;;
 
1833
 
 
1834
  amigaos*)
 
1835
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
1836
    hardcode_libdir_flag_spec='-L$libdir'
 
1837
    hardcode_minus_L=yes
 
1838
    # see comment about different semantics on the GNU ld section
 
1839
    ld_shlibs=no
 
1840
    ;;
 
1841
 
 
1842
  cygwin* | mingw* | pw32*)
 
1843
    # When not using gcc, we currently assume that we are using
 
1844
    # Microsoft Visual C++.
 
1845
    # hardcode_libdir_flag_spec is actually meaningless, as there is
 
1846
    # no search path for DLLs.
 
1847
    hardcode_libdir_flag_spec=' '
 
1848
    allow_undefined_flag=unsupported
 
1849
    # Tell ltmain to make .lib files, not .a files.
 
1850
    libext=lib
 
1851
    # FIXME: Setting linknames here is a bad hack.
 
1852
    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
1853
    # The linker will automatically build a .lib file if we build a DLL.
 
1854
    old_archive_from_new_cmds='true'
 
1855
    # FIXME: Should let the user specify the lib program.
 
1856
    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
1857
    fix_srcfile_path='`cygpath -w "$srcfile"`'
 
1858
    ;;
 
1859
 
 
1860
  darwin* | rhapsody*)
 
1861
    case "$host_os" in
 
1862
    rhapsody* | darwin1.[[012]])
 
1863
      allow_undefined_flag='-undefined suppress'
 
1864
      ;;
 
1865
    *) # Darwin 1.3 on
 
1866
      allow_undefined_flag='-flat_namespace -undefined suppress'
 
1867
      ;;
 
1868
    esac
 
1869
    # FIXME: Relying on posixy $() will cause problems for
 
1870
    #        cross-compilation, but unfortunately the echo tests do not
 
1871
    #        yet detect zsh echo's removal of \ escapes.
 
1872
    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
 
1873
    # We need to add '_' to the symbols in $export_symbols first
 
1874
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
 
1875
    hardcode_direct=yes
 
1876
    hardcode_shlibpath_var=no
 
1877
    whole_archive_flag_spec='-all_load $convenience'
 
1878
    ;;
 
1879
 
 
1880
  freebsd1*)
 
1881
    ld_shlibs=no
 
1882
    ;;
 
1883
 
 
1884
  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
1885
  # support.  Future versions do this automatically, but an explicit c++rt0.o
 
1886
  # does not break anything, and helps significantly (at the cost of a little
 
1887
  # extra space).
 
1888
  freebsd2.2*)
 
1889
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
1890
    hardcode_libdir_flag_spec='-R$libdir'
 
1891
    hardcode_direct=yes
 
1892
    hardcode_shlibpath_var=no
 
1893
    ;;
 
1894
 
 
1895
  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
1896
  freebsd2*)
 
1897
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
1898
    hardcode_direct=yes
 
1899
    hardcode_minus_L=yes
 
1900
    hardcode_shlibpath_var=no
 
1901
    ;;
 
1902
 
 
1903
  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
1904
  freebsd*)
 
1905
    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
1906
    hardcode_libdir_flag_spec='-R$libdir'
 
1907
    hardcode_direct=yes
 
1908
    hardcode_shlibpath_var=no
 
1909
    ;;
 
1910
 
 
1911
  hpux9* | hpux10* | hpux11*)
 
1912
    case $host_os in
 
1913
    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
 
1914
    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
 
1915
    esac
 
1916
    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 
1917
    hardcode_libdir_separator=:
 
1918
    hardcode_direct=yes
 
1919
    hardcode_minus_L=yes # Not in the search PATH, but as the default
 
1920
                         # location of the library.
 
1921
    export_dynamic_flag_spec='${wl}-E'
 
1922
    ;;
 
1923
 
 
1924
  irix5* | irix6*)
 
1925
    if test "$GCC" = yes; then
 
1926
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
1927
    else
 
1928
      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
1929
    fi
 
1930
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 
1931
    hardcode_libdir_separator=:
 
1932
    link_all_deplibs=yes
 
1933
    ;;
 
1934
 
 
1935
  netbsd*)
 
1936
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
1937
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
1938
    else
 
1939
      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
1940
    fi
 
1941
    hardcode_libdir_flag_spec='-R$libdir'
 
1942
    hardcode_direct=yes
 
1943
    hardcode_shlibpath_var=no
 
1944
    ;;
 
1945
 
 
1946
  newsos6)
 
1947
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
1948
    hardcode_direct=yes
 
1949
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 
1950
    hardcode_libdir_separator=:
 
1951
    hardcode_shlibpath_var=no
 
1952
    ;;
 
1953
 
 
1954
  openbsd*)
 
1955
    hardcode_direct=yes
 
1956
    hardcode_shlibpath_var=no
 
1957
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
1958
      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
1959
      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 
1960
      export_dynamic_flag_spec='${wl}-E'
 
1961
    else
 
1962
      case "$host_os" in
 
1963
      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
1964
        archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
1965
        hardcode_libdir_flag_spec='-R$libdir'
 
1966
        ;;
 
1967
      *)
 
1968
        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
 
1969
        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 
1970
        ;;
 
1971
      esac
 
1972
    fi
 
1973
    ;;
 
1974
 
 
1975
  os2*)
 
1976
    hardcode_libdir_flag_spec='-L$libdir'
 
1977
    hardcode_minus_L=yes
 
1978
    allow_undefined_flag=unsupported
 
1979
    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
1980
    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
1981
    ;;
 
1982
 
 
1983
  osf3*)
 
1984
    if test "$GCC" = yes; then
 
1985
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 
1986
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
1987
    else
 
1988
      allow_undefined_flag=' -expect_unresolved \*'
 
1989
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
1990
    fi
 
1991
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 
1992
    hardcode_libdir_separator=:
 
1993
    ;;
 
1994
 
 
1995
  osf4* | osf5*)        # as osf3* with the addition of -msym flag
 
1996
    if test "$GCC" = yes; then
 
1997
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 
1998
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
1999
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 
2000
    else
 
2001
      allow_undefined_flag=' -expect_unresolved \*'
 
2002
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
2003
      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
2004
      $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'
 
2005
 
 
2006
      #Both c and cxx compiler support -rpath directly
 
2007
      hardcode_libdir_flag_spec='-rpath $libdir'
 
2008
    fi
 
2009
    hardcode_libdir_separator=:
 
2010
    ;;
 
2011
 
 
2012
  sco3.2v5*)
 
2013
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2014
    hardcode_shlibpath_var=no
 
2015
    runpath_var=LD_RUN_PATH
 
2016
    hardcode_runpath_var=yes
 
2017
    export_dynamic_flag_spec='${wl}-Bexport'
 
2018
    ;;
 
2019
 
 
2020
  solaris*)
 
2021
    # gcc --version < 3.0 without binutils cannot create self contained
 
2022
    # shared libraries reliably, requiring libgcc.a to resolve some of
 
2023
    # the object symbols generated in some cases.  Libraries that use
 
2024
    # assert need libgcc.a to resolve __eprintf, for example.  Linking
 
2025
    # a copy of libgcc.a into every shared library to guarantee resolving
 
2026
    # such symbols causes other problems:  According to Tim Van Holder
 
2027
    # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
 
2028
    # (to the application) exception stack for one thing.
 
2029
    no_undefined_flag=' -z defs'
 
2030
    if test "$GCC" = yes; then
 
2031
      case `$CC --version 2>/dev/null` in
 
2032
      [[12]].*)
 
2033
        cat <<EOF 1>&2
 
2034
 
 
2035
*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
 
2036
*** create self contained shared libraries on Solaris systems, without
 
2037
*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
 
2038
*** -no-undefined support, which will at least allow you to build shared
 
2039
*** libraries.  However, you may find that when you link such libraries
 
2040
*** into an application without using GCC, you have to manually add
 
2041
*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
 
2042
*** upgrade to a newer version of GCC.  Another option is to rebuild your
 
2043
*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
 
2044
 
 
2045
EOF
 
2046
        no_undefined_flag=
 
2047
        ;;
 
2048
      esac
 
2049
    fi
 
2050
    # $CC -shared without GNU ld will not create a library from C++
 
2051
    # object files and a static libstdc++, better avoid it by now
 
2052
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2053
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
2054
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
2055
    hardcode_libdir_flag_spec='-R$libdir'
 
2056
    hardcode_shlibpath_var=no
 
2057
    case $host_os in
 
2058
    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
2059
    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
2060
      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
 
2061
    esac
 
2062
    link_all_deplibs=yes
 
2063
    ;;
 
2064
 
 
2065
  sunos4*)
 
2066
    if test "x$host_vendor" = xsequent; then
 
2067
      # Use $CC to link under sequent, because it throws in some extra .o
 
2068
      # files that make .init and .fini sections work.
 
2069
      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
2070
    else
 
2071
      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
2072
    fi
 
2073
    hardcode_libdir_flag_spec='-L$libdir'
 
2074
    hardcode_direct=yes
 
2075
    hardcode_minus_L=yes
 
2076
    hardcode_shlibpath_var=no
 
2077
    ;;
 
2078
 
 
2079
  sysv4)
 
2080
    if test "x$host_vendor" = xsno; then
 
2081
      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2082
      hardcode_direct=yes # is this really true???
 
2083
    else
 
2084
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2085
      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
 
2086
    fi
 
2087
    runpath_var='LD_RUN_PATH'
 
2088
    hardcode_shlibpath_var=no
 
2089
    ;;
 
2090
 
 
2091
  sysv4.3*)
 
2092
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2093
    hardcode_shlibpath_var=no
 
2094
    export_dynamic_flag_spec='-Bexport'
 
2095
    ;;
 
2096
 
 
2097
  sysv5*)
 
2098
    no_undefined_flag=' -z text'
 
2099
    # $CC -shared without GNU ld will not create a library from C++
 
2100
    # object files and a static libstdc++, better avoid it by now
 
2101
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2102
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
2103
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
2104
    hardcode_libdir_flag_spec=
 
2105
    hardcode_shlibpath_var=no
 
2106
    runpath_var='LD_RUN_PATH'
 
2107
    ;;
 
2108
 
 
2109
  uts4*)
 
2110
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2111
    hardcode_libdir_flag_spec='-L$libdir'
 
2112
    hardcode_shlibpath_var=no
 
2113
    ;;
 
2114
 
 
2115
  dgux*)
 
2116
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2117
    hardcode_libdir_flag_spec='-L$libdir'
 
2118
    hardcode_shlibpath_var=no
 
2119
    ;;
 
2120
 
 
2121
  sysv4*MP*)
 
2122
    if test -d /usr/nec; then
 
2123
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
2124
      hardcode_shlibpath_var=no
 
2125
      runpath_var=LD_RUN_PATH
 
2126
      hardcode_runpath_var=yes
 
2127
      ld_shlibs=yes
 
2128
    fi
 
2129
    ;;
 
2130
 
 
2131
  sysv4.2uw2*)
 
2132
    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
2133
    hardcode_direct=yes
 
2134
    hardcode_minus_L=no
 
2135
    hardcode_shlibpath_var=no
 
2136
    hardcode_runpath_var=yes
 
2137
    runpath_var=LD_RUN_PATH
 
2138
    ;;
 
2139
 
 
2140
  sysv5uw7* | unixware7*)
 
2141
    no_undefined_flag='${wl}-z ${wl}text'
 
2142
    if test "$GCC" = yes; then
 
2143
      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
2144
    else
 
2145
      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
2146
    fi
 
2147
    runpath_var='LD_RUN_PATH'
 
2148
    hardcode_shlibpath_var=no
 
2149
    ;;
 
2150
 
 
2151
  *)
 
2152
    ld_shlibs=no
 
2153
    ;;
 
2154
  esac
 
2155
fi
 
2156
AC_MSG_RESULT([$ld_shlibs])
 
2157
test "$ld_shlibs" = no && can_build_shared=no
 
2158
 
 
2159
# Check hardcoding attributes.
 
2160
AC_MSG_CHECKING([how to hardcode library paths into programs])
 
2161
hardcode_action=
 
2162
if test -n "$hardcode_libdir_flag_spec" || \
 
2163
   test -n "$runpath_var"; then
 
2164
 
 
2165
  # We can hardcode non-existant directories.
 
2166
  if test "$hardcode_direct" != no &&
 
2167
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
2168
     # have to relink, otherwise we might link with an installed library
 
2169
     # when we should be linking with a yet-to-be-installed one
 
2170
     ## test "$hardcode_shlibpath_var" != no &&
 
2171
     test "$hardcode_minus_L" != no; then
 
2172
    # Linking always hardcodes the temporary library directory.
 
2173
    hardcode_action=relink
 
2174
  else
 
2175
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
2176
    hardcode_action=immediate
 
2177
  fi
 
2178
else
 
2179
  # We cannot hardcode anything, or else we can only hardcode existing
 
2180
  # directories.
 
2181
  hardcode_action=unsupported
 
2182
fi
 
2183
AC_MSG_RESULT([$hardcode_action])
 
2184
 
 
2185
striplib=
 
2186
old_striplib=
 
2187
AC_MSG_CHECKING([whether stripping libraries is possible])
 
2188
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 
2189
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
2190
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
2191
  AC_MSG_RESULT([yes])
 
2192
else
 
2193
  AC_MSG_RESULT([no])
 
2194
fi
 
2195
 
 
2196
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2197
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
2198
 
 
2199
# PORTME Fill in your ld.so characteristics
 
2200
AC_MSG_CHECKING([dynamic linker characteristics])
 
2201
library_names_spec=
 
2202
libname_spec='lib$name'
 
2203
soname_spec=
 
2204
postinstall_cmds=
 
2205
postuninstall_cmds=
 
2206
finish_cmds=
 
2207
finish_eval=
 
2208
shlibpath_var=
 
2209
shlibpath_overrides_runpath=unknown
 
2210
version_type=none
 
2211
dynamic_linker="$host_os ld.so"
 
2212
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
 
2213
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
 
2214
 
 
2215
case $host_os in
 
2216
aix3*)
 
2217
  version_type=linux
 
2218
  library_names_spec='${libname}${release}.so$versuffix $libname.a'
 
2219
  shlibpath_var=LIBPATH
 
2220
 
 
2221
  # AIX has no versioning support, so we append a major version to the name.
 
2222
  soname_spec='${libname}${release}.so$major'
 
2223
  ;;
 
2224
 
 
2225
aix4* | aix5*)
 
2226
  version_type=linux
 
2227
  if test "$host_cpu" = ia64; then
 
2228
    # AIX 5 supports IA64
 
2229
    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 
2230
    shlibpath_var=LD_LIBRARY_PATH
 
2231
  else
 
2232
    # With GCC up to 2.95.x, collect2 would create an import file
 
2233
    # for dependence libraries.  The import file would start with
 
2234
    # the line `#! .'.  This would cause the generated library to
 
2235
    # depend on `.', always an invalid library.  This was fixed in
 
2236
    # development snapshots of GCC prior to 3.0.
 
2237
    case $host_os in
 
2238
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
2239
        if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
2240
             echo ' yes '
 
2241
             echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 
2242
          :
 
2243
        else
 
2244
          can_build_shared=no
 
2245
        fi
 
2246
        ;;
 
2247
    esac
 
2248
    # AIX (on Power*) has no versioning support, so currently we can
 
2249
    # not hardcode correct soname into executable. Probably we can
 
2250
    # add versioning support to collect2, so additional links can
 
2251
    # be useful in future.
 
2252
    if test "$aix_use_runtimelinking" = yes; then
 
2253
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
2254
      # instead of lib<name>.a to let people know that these are not
 
2255
      # typical AIX shared libraries.
 
2256
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2257
    else
 
2258
      # We preserve .a as extension for shared libraries through AIX4.2
 
2259
      # and later when we are not doing run time linking.
 
2260
      library_names_spec='${libname}${release}.a $libname.a'
 
2261
      soname_spec='${libname}${release}.so$major'
 
2262
    fi
 
2263
    shlibpath_var=LIBPATH
 
2264
  fi
 
2265
  ;;
 
2266
 
 
2267
amigaos*)
 
2268
  library_names_spec='$libname.ixlibrary $libname.a'
 
2269
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
2270
  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'
 
2271
  ;;
 
2272
 
 
2273
beos*)
 
2274
  library_names_spec='${libname}.so'
 
2275
  dynamic_linker="$host_os ld.so"
 
2276
  shlibpath_var=LIBRARY_PATH
 
2277
  ;;
 
2278
 
 
2279
bsdi4*)
 
2280
  version_type=linux
 
2281
  need_version=no
 
2282
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2283
  soname_spec='${libname}${release}.so$major'
 
2284
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
2285
  shlibpath_var=LD_LIBRARY_PATH
 
2286
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
2287
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
2288
  export_dynamic_flag_spec=-rdynamic
 
2289
  # the default ld.so.conf also contains /usr/contrib/lib and
 
2290
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
2291
  # libtool to hard-code these into programs
 
2292
  ;;
 
2293
 
 
2294
cygwin* | mingw* | pw32*)
 
2295
  version_type=windows
 
2296
  need_version=no
 
2297
  need_lib_prefix=no
 
2298
  case $GCC,$host_os in
 
2299
  yes,cygwin*)
 
2300
    library_names_spec='$libname.dll.a'
 
2301
    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
2302
    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 
2303
      dldir=$destdir/`dirname \$dlpath`~
 
2304
      test -d \$dldir || mkdir -p \$dldir~
 
2305
      $install_prog .libs/$dlname \$dldir/$dlname'
 
2306
    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
2307
      dlpath=$dir/\$dldll~
 
2308
       $rm \$dlpath'
 
2309
    ;;
 
2310
  yes,mingw*)
 
2311
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 
2312
    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
 
2313
    ;;
 
2314
  yes,pw32*)
 
2315
    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
 
2316
    ;;
 
2317
  *)
 
2318
    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 
2319
    ;;
 
2320
  esac
 
2321
  dynamic_linker='Win32 ld.exe'
 
2322
  # FIXME: first we should search . and the directory the executable is in
 
2323
  shlibpath_var=PATH
 
2324
  ;;
 
2325
 
 
2326
darwin* | rhapsody*)
 
2327
  dynamic_linker="$host_os dyld"
 
2328
  version_type=darwin
 
2329
  need_lib_prefix=no
 
2330
  need_version=no
 
2331
  # FIXME: Relying on posixy $() will cause problems for
 
2332
  #        cross-compilation, but unfortunately the echo tests do not
 
2333
  #        yet detect zsh echo's removal of \ escapes.
 
2334
  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
 
2335
  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 
2336
  shlibpath_overrides_runpath=yes
 
2337
  shlibpath_var=DYLD_LIBRARY_PATH
 
2338
  ;;
 
2339
 
 
2340
freebsd1*)
 
2341
  dynamic_linker=no
 
2342
  ;;
 
2343
 
 
2344
freebsd*)
 
2345
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
2346
  version_type=freebsd-$objformat
 
2347
  case $version_type in
 
2348
    freebsd-elf*)
 
2349
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
2350
      need_version=no
 
2351
      need_lib_prefix=no
 
2352
      ;;
 
2353
    freebsd-*)
 
2354
      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 
2355
      need_version=yes
 
2356
      ;;
 
2357
  esac
 
2358
  shlibpath_var=LD_LIBRARY_PATH
 
2359
  case $host_os in
 
2360
  freebsd2*)
 
2361
    shlibpath_overrides_runpath=yes
 
2362
    ;;
 
2363
  *)
 
2364
    shlibpath_overrides_runpath=no
 
2365
    hardcode_into_libs=yes
 
2366
    ;;
 
2367
  esac
 
2368
  ;;
 
2369
 
 
2370
gnu*)
 
2371
  version_type=linux
 
2372
  need_lib_prefix=no
 
2373
  need_version=no
 
2374
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
 
2375
  soname_spec='${libname}${release}.so$major'
 
2376
  shlibpath_var=LD_LIBRARY_PATH
 
2377
  hardcode_into_libs=yes
 
2378
  ;;
 
2379
 
 
2380
hpux9* | hpux10* | hpux11*)
 
2381
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
2382
  # link against other versions.
 
2383
  dynamic_linker="$host_os dld.sl"
 
2384
  version_type=sunos
 
2385
  need_lib_prefix=no
 
2386
  need_version=no
 
2387
  shlibpath_var=SHLIB_PATH
 
2388
  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
2389
  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
 
2390
  soname_spec='${libname}${release}.sl$major'
 
2391
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
2392
  postinstall_cmds='chmod 555 $lib'
 
2393
  ;;
 
2394
 
 
2395
irix5* | irix6*)
 
2396
  version_type=irix
 
2397
  need_lib_prefix=no
 
2398
  need_version=no
 
2399
  soname_spec='${libname}${release}.so$major'
 
2400
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 
2401
  case $host_os in
 
2402
  irix5*)
 
2403
    libsuff= shlibsuff=
 
2404
    ;;
 
2405
  *)
 
2406
    case $LD in # libtool.m4 will add one of these switches to LD
 
2407
    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
 
2408
    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
 
2409
    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
2410
    *) libsuff= shlibsuff= libmagic=never-match;;
 
2411
    esac
 
2412
    ;;
 
2413
  esac
 
2414
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
2415
  shlibpath_overrides_runpath=no
 
2416
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
2417
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
2418
  ;;
 
2419
 
 
2420
# No shared lib support for Linux oldld, aout, or coff.
 
2421
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
 
2422
  dynamic_linker=no
 
2423
  ;;
 
2424
 
 
2425
# This must be Linux ELF.
 
2426
linux-gnu*)
 
2427
  version_type=linux
 
2428
  need_lib_prefix=no
 
2429
  need_version=no
 
2430
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2431
  soname_spec='${libname}${release}.so$major'
 
2432
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
2433
  shlibpath_var=LD_LIBRARY_PATH
 
2434
  shlibpath_overrides_runpath=no
 
2435
  # This implies no fast_install, which is unacceptable.
 
2436
  # Some rework will be needed to allow for fast_install
 
2437
  # before this can be enabled.
 
2438
  hardcode_into_libs=yes
 
2439
 
 
2440
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
2441
  # powerpc, because MkLinux only supported shared libraries with the
 
2442
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
2443
  # most powerpc-linux boxes support dynamic linking these days and
 
2444
  # people can always --disable-shared, the test was removed, and we
 
2445
  # assume the GNU/Linux dynamic linker is in use.
 
2446
  dynamic_linker='GNU/Linux ld.so'
 
2447
  ;;
 
2448
 
 
2449
netbsd*)
 
2450
  version_type=sunos
 
2451
  need_lib_prefix=no
 
2452
  need_version=no
 
2453
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 
2454
    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2455
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
2456
    dynamic_linker='NetBSD (a.out) ld.so'
 
2457
  else
 
2458
    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
 
2459
    soname_spec='${libname}${release}.so$major'
 
2460
    dynamic_linker='NetBSD ld.elf_so'
 
2461
  fi
 
2462
  shlibpath_var=LD_LIBRARY_PATH
 
2463
  shlibpath_overrides_runpath=yes
 
2464
  hardcode_into_libs=yes
 
2465
  ;;
 
2466
 
 
2467
newsos6)
 
2468
  version_type=linux
 
2469
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2470
  shlibpath_var=LD_LIBRARY_PATH
 
2471
  shlibpath_overrides_runpath=yes
 
2472
  ;;
 
2473
 
 
2474
openbsd*)
 
2475
  version_type=sunos
 
2476
  need_lib_prefix=no
 
2477
  need_version=no
 
2478
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2479
    case "$host_os" in
 
2480
    openbsd2.[[89]] | openbsd2.[[89]].*)
 
2481
      shlibpath_overrides_runpath=no
 
2482
      ;;
 
2483
    *)
 
2484
      shlibpath_overrides_runpath=yes
 
2485
      ;;
 
2486
    esac
 
2487
  else
 
2488
    shlibpath_overrides_runpath=yes
 
2489
  fi
 
2490
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2491
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
2492
  shlibpath_var=LD_LIBRARY_PATH
 
2493
  ;;
 
2494
 
 
2495
os2*)
 
2496
  libname_spec='$name'
 
2497
  need_lib_prefix=no
 
2498
  library_names_spec='$libname.dll $libname.a'
 
2499
  dynamic_linker='OS/2 ld.exe'
 
2500
  shlibpath_var=LIBPATH
 
2501
  ;;
 
2502
 
 
2503
osf3* | osf4* | osf5*)
 
2504
  version_type=osf
 
2505
  need_version=no
 
2506
  soname_spec='${libname}${release}.so'
 
2507
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 
2508
  shlibpath_var=LD_LIBRARY_PATH
 
2509
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
2510
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
2511
  ;;
 
2512
 
 
2513
sco3.2v5*)
 
2514
  version_type=osf
 
2515
  soname_spec='${libname}${release}.so$major'
 
2516
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2517
  shlibpath_var=LD_LIBRARY_PATH
 
2518
  ;;
 
2519
 
 
2520
solaris*)
 
2521
  version_type=linux
 
2522
  need_lib_prefix=no
 
2523
  need_version=no
 
2524
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2525
  soname_spec='${libname}${release}.so$major'
 
2526
  shlibpath_var=LD_LIBRARY_PATH
 
2527
  shlibpath_overrides_runpath=yes
 
2528
  hardcode_into_libs=yes
 
2529
  # ldd complains unless libraries are executable
 
2530
  postinstall_cmds='chmod +x $lib'
 
2531
  ;;
 
2532
 
 
2533
sunos4*)
 
2534
  version_type=sunos
 
2535
  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 
2536
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
2537
  shlibpath_var=LD_LIBRARY_PATH
 
2538
  shlibpath_overrides_runpath=yes
 
2539
  if test "$with_gnu_ld" = yes; then
 
2540
    need_lib_prefix=no
 
2541
  fi
 
2542
  need_version=yes
 
2543
  ;;
 
2544
 
 
2545
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2546
  version_type=linux
 
2547
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2548
  soname_spec='${libname}${release}.so$major'
 
2549
  shlibpath_var=LD_LIBRARY_PATH
 
2550
  case $host_vendor in
 
2551
    sni)
 
2552
      shlibpath_overrides_runpath=no
 
2553
      ;;
 
2554
    motorola)
 
2555
      need_lib_prefix=no
 
2556
      need_version=no
 
2557
      shlibpath_overrides_runpath=no
 
2558
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
2559
      ;;
 
2560
  esac
 
2561
  ;;
 
2562
 
 
2563
uts4*)
 
2564
  version_type=linux
 
2565
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2566
  soname_spec='${libname}${release}.so$major'
 
2567
  shlibpath_var=LD_LIBRARY_PATH
 
2568
  ;;
 
2569
 
 
2570
dgux*)
 
2571
  version_type=linux
 
2572
  need_lib_prefix=no
 
2573
  need_version=no
 
2574
  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 
2575
  soname_spec='${libname}${release}.so$major'
 
2576
  shlibpath_var=LD_LIBRARY_PATH
 
2577
  ;;
 
2578
 
 
2579
sysv4*MP*)
 
2580
  if test -d /usr/nec ;then
 
2581
    version_type=linux
 
2582
    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
 
2583
    soname_spec='$libname.so.$major'
 
2584
    shlibpath_var=LD_LIBRARY_PATH
 
2585
  fi
 
2586
  ;;
 
2587
 
 
2588
*)
 
2589
  dynamic_linker=no
 
2590
  ;;
 
2591
esac
 
2592
AC_MSG_RESULT([$dynamic_linker])
 
2593
test "$dynamic_linker" = no && can_build_shared=no
 
2594
 
 
2595
# Report the final consequences.
 
2596
AC_MSG_CHECKING([if libtool supports shared libraries])
 
2597
AC_MSG_RESULT([$can_build_shared])
 
2598
 
 
2599
AC_MSG_CHECKING([whether to build shared libraries])
 
2600
test "$can_build_shared" = "no" && enable_shared=no
 
2601
 
 
2602
# On AIX, shared libraries and static libraries use the same namespace, and
 
2603
# are all built from PIC.
 
2604
case "$host_os" in
 
2605
aix3*)
 
2606
  test "$enable_shared" = yes && enable_static=no
 
2607
  if test -n "$RANLIB"; then
 
2608
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
2609
    postinstall_cmds='$RANLIB $lib'
 
2610
  fi
 
2611
  ;;
 
2612
 
 
2613
aix4*)
 
2614
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
2615
    test "$enable_shared" = yes && enable_static=no
 
2616
  fi
 
2617
  ;;
 
2618
esac
 
2619
AC_MSG_RESULT([$enable_shared])
 
2620
 
 
2621
AC_MSG_CHECKING([whether to build static libraries])
 
2622
# Make sure either enable_shared or enable_static is yes.
 
2623
test "$enable_shared" = yes || enable_static=yes
 
2624
AC_MSG_RESULT([$enable_static])
 
2625
 
 
2626
if test "$hardcode_action" = relink; then
 
2627
  # Fast installation is not supported
 
2628
  enable_fast_install=no
 
2629
elif test "$shlibpath_overrides_runpath" = yes ||
 
2630
     test "$enable_shared" = no; then
 
2631
  # Fast installation is not necessary
 
2632
  enable_fast_install=needless
 
2633
fi
 
2634
 
 
2635
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
2636
if test "$GCC" = yes; then
 
2637
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
2638
fi
 
2639
 
 
2640
AC_LIBTOOL_DLOPEN_SELF
 
2641
 
 
2642
if test "$enable_shared" = yes && test "$GCC" = yes; then
 
2643
  case $archive_cmds in
 
2644
  *'~'*)
 
2645
    # FIXME: we may have to deal with multi-command sequences.
 
2646
    ;;
 
2647
  '$CC '*)
 
2648
    # Test whether the compiler implicitly links with -lc since on some
 
2649
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
2650
    # to ld, don't add -lc before -lgcc.
 
2651
    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
2652
    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
 
2653
    [$rm conftest*
 
2654
    echo 'static int dummy;' > conftest.$ac_ext
 
2655
 
 
2656
    if AC_TRY_EVAL(ac_compile); then
 
2657
      soname=conftest
 
2658
      lib=conftest
 
2659
      libobjs=conftest.$ac_objext
 
2660
      deplibs=
 
2661
      wl=$lt_cv_prog_cc_wl
 
2662
      compiler_flags=-v
 
2663
      linker_flags=-v
 
2664
      verstring=
 
2665
      output_objdir=.
 
2666
      libname=conftest
 
2667
      save_allow_undefined_flag=$allow_undefined_flag
 
2668
      allow_undefined_flag=
 
2669
      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 
2670
      then
 
2671
        lt_cv_archive_cmds_need_lc=no
 
2672
      else
 
2673
        lt_cv_archive_cmds_need_lc=yes
 
2674
      fi
 
2675
      allow_undefined_flag=$save_allow_undefined_flag
 
2676
    else
 
2677
      cat conftest.err 1>&5
 
2678
    fi])
 
2679
    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
 
2680
    ;;
 
2681
  esac
 
2682
fi
 
2683
need_lc=${lt_cv_archive_cmds_need_lc-yes}
 
2684
 
 
2685
# The second clause should only fire when bootstrapping the
 
2686
# libtool distribution, otherwise you forgot to ship ltmain.sh
 
2687
# with your package, and you will get complaints that there are
 
2688
# no rules to generate ltmain.sh.
 
2689
if test -f "$ltmain"; then
 
2690
  :
 
2691
else
 
2692
  # If there is no Makefile yet, we rely on a make rule to execute
 
2693
  # `config.status --recheck' to rerun these tests and create the
 
2694
  # libtool script then.
 
2695
  test -f Makefile && make "$ltmain"
 
2696
fi
 
2697
 
 
2698
if test -f "$ltmain"; then
 
2699
  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
 
2700
  $rm -f "${ofile}T"
 
2701
 
 
2702
  echo creating $ofile
 
2703
 
 
2704
  # Now quote all the things that may contain metacharacters while being
 
2705
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
 
2706
  # variables and quote the copies for generation of the libtool script.
 
2707
  for var in echo old_CC old_CFLAGS \
 
2708
    AR AR_FLAGS CC LD LN_S NM SHELL \
 
2709
    reload_flag reload_cmds wl \
 
2710
    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
 
2711
    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
 
2712
    library_names_spec soname_spec \
 
2713
    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
 
2714
    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
 
2715
    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
 
2716
    old_striplib striplib file_magic_cmd export_symbols_cmds \
 
2717
    deplibs_check_method allow_undefined_flag no_undefined_flag \
 
2718
    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
 
2719
    global_symbol_to_c_name_address \
 
2720
    hardcode_libdir_flag_spec hardcode_libdir_separator  \
 
2721
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 
2722
    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 
2723
 
 
2724
    case $var in
 
2725
    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
 
2726
    old_postinstall_cmds | old_postuninstall_cmds | \
 
2727
    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
 
2728
    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
 
2729
    postinstall_cmds | postuninstall_cmds | \
 
2730
    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 
2731
      # Double-quote double-evaled strings.
 
2732
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 
2733
      ;;
 
2734
    *)
 
2735
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 
2736
      ;;
 
2737
    esac
 
2738
  done
 
2739
 
 
2740
  cat <<__EOF__ > "${ofile}T"
 
2741
#! $SHELL
 
2742
 
 
2743
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
2744
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 
2745
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
2746
#
 
2747
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
2748
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
2749
#
 
2750
# This program is free software; you can redistribute it and/or modify
 
2751
# it under the terms of the GNU General Public License as published by
 
2752
# the Free Software Foundation; either version 2 of the License, or
 
2753
# (at your option) any later version.
 
2754
#
 
2755
# This program is distributed in the hope that it will be useful, but
 
2756
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
2757
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
2758
# General Public License for more details.
 
2759
#
 
2760
# You should have received a copy of the GNU General Public License
 
2761
# along with this program; if not, write to the Free Software
 
2762
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
2763
#
 
2764
# As a special exception to the GNU General Public License, if you
 
2765
# distribute this file as part of a program that contains a
 
2766
# configuration script generated by Autoconf, you may include it under
 
2767
# the same distribution terms that you use for the rest of that program.
 
2768
 
 
2769
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
 
2770
Xsed="sed -e s/^X//"
 
2771
 
 
2772
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
2773
# if CDPATH is set.
 
2774
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
2775
 
 
2776
# ### BEGIN LIBTOOL CONFIG
 
2777
 
 
2778
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
2779
 
 
2780
# Shell to use when invoking shell scripts.
 
2781
SHELL=$lt_SHELL
 
2782
 
 
2783
# Whether or not to build shared libraries.
 
2784
build_libtool_libs=$enable_shared
 
2785
 
 
2786
# Whether or not to build static libraries.
 
2787
build_old_libs=$enable_static
 
2788
 
 
2789
# Whether or not to add -lc for building shared libraries.
 
2790
build_libtool_need_lc=$need_lc
 
2791
 
 
2792
# Whether or not to optimize for fast installation.
 
2793
fast_install=$enable_fast_install
 
2794
 
 
2795
# The host system.
 
2796
host_alias=$host_alias
 
2797
host=$host
 
2798
 
 
2799
# An echo program that does not interpret backslashes.
 
2800
echo=$lt_echo
 
2801
 
 
2802
# The archiver.
 
2803
AR=$lt_AR
 
2804
AR_FLAGS=$lt_AR_FLAGS
 
2805
 
 
2806
# The default C compiler.
 
2807
CC=$lt_CC
 
2808
 
 
2809
# Is the compiler the GNU C compiler?
 
2810
with_gcc=$GCC
 
2811
 
 
2812
# The linker used to build libraries.
 
2813
LD=$lt_LD
 
2814
 
 
2815
# Whether we need hard or soft links.
 
2816
LN_S=$lt_LN_S
 
2817
 
 
2818
# A BSD-compatible nm program.
 
2819
NM=$lt_NM
 
2820
 
 
2821
# A symbol stripping program
 
2822
STRIP=$STRIP
 
2823
 
 
2824
# Used to examine libraries when file_magic_cmd begins "file"
 
2825
MAGIC_CMD=$MAGIC_CMD
 
2826
 
 
2827
# Used on cygwin: DLL creation program.
 
2828
DLLTOOL="$DLLTOOL"
 
2829
 
 
2830
# Used on cygwin: object dumper.
 
2831
OBJDUMP="$OBJDUMP"
 
2832
 
 
2833
# Used on cygwin: assembler.
 
2834
AS="$AS"
 
2835
 
 
2836
# The name of the directory that contains temporary libtool files.
 
2837
objdir=$objdir
 
2838
 
 
2839
# How to create reloadable object files.
 
2840
reload_flag=$lt_reload_flag
 
2841
reload_cmds=$lt_reload_cmds
 
2842
 
 
2843
# How to pass a linker flag through the compiler.
 
2844
wl=$lt_wl
 
2845
 
 
2846
# Object file suffix (normally "o").
 
2847
objext="$ac_objext"
 
2848
 
 
2849
# Old archive suffix (normally "a").
 
2850
libext="$libext"
 
2851
 
 
2852
# Executable file suffix (normally "").
 
2853
exeext="$exeext"
 
2854
 
 
2855
# Additional compiler flags for building library objects.
 
2856
pic_flag=$lt_pic_flag
 
2857
pic_mode=$pic_mode
 
2858
 
 
2859
# Does compiler simultaneously support -c and -o options?
 
2860
compiler_c_o=$lt_compiler_c_o
 
2861
 
 
2862
# Can we write directly to a .lo ?
 
2863
compiler_o_lo=$lt_compiler_o_lo
 
2864
 
 
2865
# Must we lock files when doing compilation ?
 
2866
need_locks=$lt_need_locks
 
2867
 
 
2868
# Do we need the lib prefix for modules?
 
2869
need_lib_prefix=$need_lib_prefix
 
2870
 
 
2871
# Do we need a version for libraries?
 
2872
need_version=$need_version
 
2873
 
 
2874
# Whether dlopen is supported.
 
2875
dlopen_support=$enable_dlopen
 
2876
 
 
2877
# Whether dlopen of programs is supported.
 
2878
dlopen_self=$enable_dlopen_self
 
2879
 
 
2880
# Whether dlopen of statically linked programs is supported.
 
2881
dlopen_self_static=$enable_dlopen_self_static
 
2882
 
 
2883
# Compiler flag to prevent dynamic linking.
 
2884
link_static_flag=$lt_link_static_flag
 
2885
 
 
2886
# Compiler flag to turn off builtin functions.
 
2887
no_builtin_flag=$lt_no_builtin_flag
 
2888
 
 
2889
# Compiler flag to allow reflexive dlopens.
 
2890
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 
2891
 
 
2892
# Compiler flag to generate shared objects directly from archives.
 
2893
whole_archive_flag_spec=$lt_whole_archive_flag_spec
 
2894
 
 
2895
# Compiler flag to generate thread-safe objects.
 
2896
thread_safe_flag_spec=$lt_thread_safe_flag_spec
 
2897
 
 
2898
# Library versioning type.
 
2899
version_type=$version_type
 
2900
 
 
2901
# Format of library name prefix.
 
2902
libname_spec=$lt_libname_spec
 
2903
 
 
2904
# List of archive names.  First name is the real one, the rest are links.
 
2905
# The last name is the one that the linker finds with -lNAME.
 
2906
library_names_spec=$lt_library_names_spec
 
2907
 
 
2908
# The coded name of the library, if different from the real name.
 
2909
soname_spec=$lt_soname_spec
 
2910
 
 
2911
# Commands used to build and install an old-style archive.
 
2912
RANLIB=$lt_RANLIB
 
2913
old_archive_cmds=$lt_old_archive_cmds
 
2914
old_postinstall_cmds=$lt_old_postinstall_cmds
 
2915
old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
2916
 
 
2917
# Create an old-style archive from a shared archive.
 
2918
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 
2919
 
 
2920
# Create a temporary old-style archive to link instead of a shared archive.
 
2921
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 
2922
 
 
2923
# Commands used to build and install a shared archive.
 
2924
archive_cmds=$lt_archive_cmds
 
2925
archive_expsym_cmds=$lt_archive_expsym_cmds
 
2926
postinstall_cmds=$lt_postinstall_cmds
 
2927
postuninstall_cmds=$lt_postuninstall_cmds
 
2928
 
 
2929
# Commands to strip libraries.
 
2930
old_striplib=$lt_old_striplib
 
2931
striplib=$lt_striplib
 
2932
 
 
2933
# Method to check whether dependent libraries are shared objects.
 
2934
deplibs_check_method=$lt_deplibs_check_method
 
2935
 
 
2936
# Command to use when deplibs_check_method == file_magic.
 
2937
file_magic_cmd=$lt_file_magic_cmd
 
2938
 
 
2939
# Flag that allows shared libraries with undefined symbols to be built.
 
2940
allow_undefined_flag=$lt_allow_undefined_flag
 
2941
 
 
2942
# Flag that forces no undefined symbols.
 
2943
no_undefined_flag=$lt_no_undefined_flag
 
2944
 
 
2945
# Commands used to finish a libtool library installation in a directory.
 
2946
finish_cmds=$lt_finish_cmds
 
2947
 
 
2948
# Same as above, but a single script fragment to be evaled but not shown.
 
2949
finish_eval=$lt_finish_eval
 
2950
 
 
2951
# Take the output of nm and produce a listing of raw symbols and C names.
 
2952
global_symbol_pipe=$lt_global_symbol_pipe
 
2953
 
 
2954
# Transform the output of nm in a proper C declaration
 
2955
global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
 
2956
 
 
2957
# Transform the output of nm in a C name address pair
 
2958
global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
 
2959
 
 
2960
# This is the shared library runtime path variable.
 
2961
runpath_var=$runpath_var
 
2962
 
 
2963
# This is the shared library path variable.
 
2964
shlibpath_var=$shlibpath_var
 
2965
 
 
2966
# Is shlibpath searched before the hard-coded library search path?
 
2967
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
2968
 
 
2969
# How to hardcode a shared library path into an executable.
 
2970
hardcode_action=$hardcode_action
 
2971
 
 
2972
# Whether we should hardcode library paths into libraries.
 
2973
hardcode_into_libs=$hardcode_into_libs
 
2974
 
 
2975
# Flag to hardcode \$libdir into a binary during linking.
 
2976
# This must work even if \$libdir does not exist.
 
2977
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
2978
 
 
2979
# Whether we need a single -rpath flag with a separated argument.
 
2980
hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
2981
 
 
2982
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 
2983
# resulting binary.
 
2984
hardcode_direct=$hardcode_direct
 
2985
 
 
2986
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
2987
# resulting binary.
 
2988
hardcode_minus_L=$hardcode_minus_L
 
2989
 
 
2990
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
2991
# the resulting binary.
 
2992
hardcode_shlibpath_var=$hardcode_shlibpath_var
 
2993
 
 
2994
# Variables whose values should be saved in libtool wrapper scripts and
 
2995
# restored at relink time.
 
2996
variables_saved_for_relink="$variables_saved_for_relink"
 
2997
 
 
2998
# Whether libtool must link a program against all its dependency libraries.
 
2999
link_all_deplibs=$link_all_deplibs
 
3000
 
 
3001
# Compile-time system search path for libraries
 
3002
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
3003
 
 
3004
# Run-time system search path for libraries
 
3005
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
3006
 
 
3007
# Fix the shell variable \$srcfile for the compiler.
 
3008
fix_srcfile_path="$fix_srcfile_path"
 
3009
 
 
3010
# Set to yes if exported symbols are required.
 
3011
always_export_symbols=$always_export_symbols
 
3012
 
 
3013
# The commands to list exported symbols.
 
3014
export_symbols_cmds=$lt_export_symbols_cmds
 
3015
 
 
3016
# The commands to extract the exported symbol list from a shared archive.
 
3017
extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
3018
 
 
3019
# Symbols that should not be listed in the preloaded symbols.
 
3020
exclude_expsyms=$lt_exclude_expsyms
 
3021
 
 
3022
# Symbols that must always be exported.
 
3023
include_expsyms=$lt_include_expsyms
 
3024
 
 
3025
# ### END LIBTOOL CONFIG
 
3026
 
 
3027
__EOF__
 
3028
 
 
3029
  case $host_os in
 
3030
  aix3*)
 
3031
    cat <<\EOF >> "${ofile}T"
 
3032
 
 
3033
# AIX sometimes has problems with the GCC collect2 program.  For some
 
3034
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
3035
# vanish in a puff of smoke.
 
3036
if test "X${COLLECT_NAMES+set}" != Xset; then
 
3037
  COLLECT_NAMES=
 
3038
  export COLLECT_NAMES
 
3039
fi
 
3040
EOF
 
3041
    ;;
 
3042
  esac
 
3043
 
 
3044
  case $host_os in
 
3045
  cygwin* | mingw* | pw32* | os2*)
 
3046
    cat <<'EOF' >> "${ofile}T"
 
3047
      # This is a source program that is used to create dlls on Windows
 
3048
      # Don't remove nor modify the starting and closing comments
 
3049
# /* ltdll.c starts here */
 
3050
# #define WIN32_LEAN_AND_MEAN
 
3051
# #include <windows.h>
 
3052
# #undef WIN32_LEAN_AND_MEAN
 
3053
# #include <stdio.h>
 
3054
#
 
3055
# #ifndef __CYGWIN__
 
3056
# #  ifdef __CYGWIN32__
 
3057
# #    define __CYGWIN__ __CYGWIN32__
 
3058
# #  endif
 
3059
# #endif
 
3060
#
 
3061
# #ifdef __cplusplus
 
3062
# extern "C" {
 
3063
# #endif
 
3064
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 
3065
# #ifdef __cplusplus
 
3066
# }
 
3067
# #endif
 
3068
#
 
3069
# #ifdef __CYGWIN__
 
3070
# #include <cygwin/cygwin_dll.h>
 
3071
# DECLARE_CYGWIN_DLL( DllMain );
 
3072
# #endif
 
3073
# HINSTANCE __hDllInstance_base;
 
3074
#
 
3075
# BOOL APIENTRY
 
3076
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 
3077
# {
 
3078
#   __hDllInstance_base = hInst;
 
3079
#   return TRUE;
 
3080
# }
 
3081
# /* ltdll.c ends here */
 
3082
        # This is a source program that is used to create import libraries
 
3083
        # on Windows for dlls which lack them. Don't remove nor modify the
 
3084
        # starting and closing comments
 
3085
# /* impgen.c starts here */
 
3086
# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
 
3087
#
 
3088
#  This file is part of GNU libtool.
 
3089
#
 
3090
#  This program is free software; you can redistribute it and/or modify
 
3091
#  it under the terms of the GNU General Public License as published by
 
3092
#  the Free Software Foundation; either version 2 of the License, or
 
3093
#  (at your option) any later version.
 
3094
#
 
3095
#  This program is distributed in the hope that it will be useful,
 
3096
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
3097
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
3098
#  GNU General Public License for more details.
 
3099
#
 
3100
#  You should have received a copy of the GNU General Public License
 
3101
#  along with this program; if not, write to the Free Software
 
3102
#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
3103
#  */
 
3104
#
 
3105
# #include <stdio.h>            /* for printf() */
 
3106
# #include <unistd.h>           /* for open(), lseek(), read() */
 
3107
# #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
 
3108
# #include <string.h>           /* for strdup() */
 
3109
#
 
3110
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
 
3111
# #ifndef O_BINARY
 
3112
# #define O_BINARY 0
 
3113
# #endif
 
3114
#
 
3115
# static unsigned int
 
3116
# pe_get16 (fd, offset)
 
3117
#      int fd;
 
3118
#      int offset;
 
3119
# {
 
3120
#   unsigned char b[2];
 
3121
#   lseek (fd, offset, SEEK_SET);
 
3122
#   read (fd, b, 2);
 
3123
#   return b[0] + (b[1]<<8);
 
3124
# }
 
3125
#
 
3126
# static unsigned int
 
3127
# pe_get32 (fd, offset)
 
3128
#     int fd;
 
3129
#     int offset;
 
3130
# {
 
3131
#   unsigned char b[4];
 
3132
#   lseek (fd, offset, SEEK_SET);
 
3133
#   read (fd, b, 4);
 
3134
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
3135
# }
 
3136
#
 
3137
# static unsigned int
 
3138
# pe_as32 (ptr)
 
3139
#      void *ptr;
 
3140
# {
 
3141
#   unsigned char *b = ptr;
 
3142
#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 
3143
# }
 
3144
#
 
3145
# int
 
3146
# main (argc, argv)
 
3147
#     int argc;
 
3148
#     char *argv[];
 
3149
# {
 
3150
#     int dll;
 
3151
#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
 
3152
#     unsigned long export_rva, export_size, nsections, secptr, expptr;
 
3153
#     unsigned long name_rvas, nexp;
 
3154
#     unsigned char *expdata, *erva;
 
3155
#     char *filename, *dll_name;
 
3156
#
 
3157
#     filename = argv[1];
 
3158
#
 
3159
#     dll = open(filename, O_RDONLY|O_BINARY);
 
3160
#     if (dll < 1)
 
3161
#       return 1;
 
3162
#
 
3163
#     dll_name = filename;
 
3164
#
 
3165
#     for (i=0; filename[i]; i++)
 
3166
#       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
 
3167
#           dll_name = filename + i +1;
 
3168
#
 
3169
#     pe_header_offset = pe_get32 (dll, 0x3c);
 
3170
#     opthdr_ofs = pe_header_offset + 4 + 20;
 
3171
#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
 
3172
#
 
3173
#     if (num_entries < 1) /* no exports */
 
3174
#       return 1;
 
3175
#
 
3176
#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
 
3177
#     export_size = pe_get32 (dll, opthdr_ofs + 100);
 
3178
#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
 
3179
#     secptr = (pe_header_offset + 4 + 20 +
 
3180
#             pe_get16 (dll, pe_header_offset + 4 + 16));
 
3181
#
 
3182
#     expptr = 0;
 
3183
#     for (i = 0; i < nsections; i++)
 
3184
#     {
 
3185
#       char sname[8];
 
3186
#       unsigned long secptr1 = secptr + 40 * i;
 
3187
#       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
 
3188
#       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
 
3189
#       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
 
3190
#       lseek(dll, secptr1, SEEK_SET);
 
3191
#       read(dll, sname, 8);
 
3192
#       if (vaddr <= export_rva && vaddr+vsize > export_rva)
 
3193
#       {
 
3194
#           expptr = fptr + (export_rva - vaddr);
 
3195
#           if (export_rva + export_size > vaddr + vsize)
 
3196
#               export_size = vsize - (export_rva - vaddr);
 
3197
#           break;
 
3198
#       }
 
3199
#     }
 
3200
#
 
3201
#     expdata = (unsigned char*)malloc(export_size);
 
3202
#     lseek (dll, expptr, SEEK_SET);
 
3203
#     read (dll, expdata, export_size);
 
3204
#     erva = expdata - export_rva;
 
3205
#
 
3206
#     nexp = pe_as32 (expdata+24);
 
3207
#     name_rvas = pe_as32 (expdata+32);
 
3208
#
 
3209
#     printf ("EXPORTS\n");
 
3210
#     for (i = 0; i<nexp; i++)
 
3211
#     {
 
3212
#       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
 
3213
#       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
 
3214
#     }
 
3215
#
 
3216
#     return 0;
 
3217
# }
 
3218
# /* impgen.c ends here */
 
3219
 
 
3220
EOF
 
3221
    ;;
 
3222
  esac
 
3223
 
 
3224
  # We use sed instead of cat because bash on DJGPP gets confused if
 
3225
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
3226
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
3227
  # is reportedly fixed, but why not run on old versions too?
 
3228
  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
 
3229
 
 
3230
  mv -f "${ofile}T" "$ofile" || \
 
3231
    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
 
3232
  chmod +x "$ofile"
 
3233
fi
 
3234
 
 
3235
])# _LT_AC_LTCONFIG_HACK
 
3236
 
 
3237
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
 
3238
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
 
3239
 
 
3240
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
 
3241
AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
 
3242
 
 
3243
# AC_ENABLE_SHARED - implement the --enable-shared flag
 
3244
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
 
3245
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 
3246
#   `yes'.
 
3247
AC_DEFUN([AC_ENABLE_SHARED],
 
3248
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 
3249
AC_ARG_ENABLE(shared,
 
3250
changequote(<<, >>)dnl
 
3251
<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
 
3252
changequote([, ])dnl
 
3253
[p=${PACKAGE-default}
 
3254
case $enableval in
 
3255
yes) enable_shared=yes ;;
 
3256
no) enable_shared=no ;;
 
3257
*)
 
3258
  enable_shared=no
 
3259
  # Look at the argument we got.  We use all the common list separators.
 
3260
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 
3261
  for pkg in $enableval; do
 
3262
    if test "X$pkg" = "X$p"; then
 
3263
      enable_shared=yes
 
3264
    fi
 
3265
  done
 
3266
  IFS="$ac_save_ifs"
 
3267
  ;;
 
3268
esac],
 
3269
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
 
3270
])
 
3271
 
 
3272
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
 
3273
AC_DEFUN([AC_DISABLE_SHARED],
 
3274
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3275
AC_ENABLE_SHARED(no)])
 
3276
 
 
3277
# AC_ENABLE_STATIC - implement the --enable-static flag
 
3278
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
 
3279
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 
3280
#   `yes'.
 
3281
AC_DEFUN([AC_ENABLE_STATIC],
 
3282
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 
3283
AC_ARG_ENABLE(static,
 
3284
changequote(<<, >>)dnl
 
3285
<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
 
3286
changequote([, ])dnl
 
3287
[p=${PACKAGE-default}
 
3288
case $enableval in
 
3289
yes) enable_static=yes ;;
 
3290
no) enable_static=no ;;
 
3291
*)
 
3292
  enable_static=no
 
3293
  # Look at the argument we got.  We use all the common list separators.
 
3294
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 
3295
  for pkg in $enableval; do
 
3296
    if test "X$pkg" = "X$p"; then
 
3297
      enable_static=yes
 
3298
    fi
 
3299
  done
 
3300
  IFS="$ac_save_ifs"
 
3301
  ;;
 
3302
esac],
 
3303
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
 
3304
])
 
3305
 
 
3306
# AC_DISABLE_STATIC - set the default static flag to --disable-static
 
3307
AC_DEFUN([AC_DISABLE_STATIC],
 
3308
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3309
AC_ENABLE_STATIC(no)])
 
3310
 
 
3311
 
 
3312
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
 
3313
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
 
3314
#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 
3315
#   `yes'.
 
3316
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 
3317
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 
3318
AC_ARG_ENABLE(fast-install,
 
3319
changequote(<<, >>)dnl
 
3320
<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
 
3321
changequote([, ])dnl
 
3322
[p=${PACKAGE-default}
 
3323
case $enableval in
 
3324
yes) enable_fast_install=yes ;;
 
3325
no) enable_fast_install=no ;;
 
3326
*)
 
3327
  enable_fast_install=no
 
3328
  # Look at the argument we got.  We use all the common list separators.
 
3329
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 
3330
  for pkg in $enableval; do
 
3331
    if test "X$pkg" = "X$p"; then
 
3332
      enable_fast_install=yes
 
3333
    fi
 
3334
  done
 
3335
  IFS="$ac_save_ifs"
 
3336
  ;;
 
3337
esac],
 
3338
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
 
3339
])
 
3340
 
 
3341
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
 
3342
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 
3343
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3344
AC_ENABLE_FAST_INSTALL(no)])
 
3345
 
 
3346
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
 
3347
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
 
3348
#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
 
3349
#   `both'.
 
3350
AC_DEFUN([AC_LIBTOOL_PICMODE],
 
3351
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3352
pic_mode=ifelse($#,1,$1,default)])
 
3353
 
 
3354
 
 
3355
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 
3356
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
3357
[AC_MSG_CHECKING([for $1])
 
3358
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
3359
[case $MAGIC_CMD in
 
3360
  /*)
 
3361
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
3362
  ;;
 
3363
  ?:/*)
 
3364
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
 
3365
  ;;
 
3366
  *)
 
3367
  ac_save_MAGIC_CMD="$MAGIC_CMD"
 
3368
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3369
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
3370
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
3371
dnl not every word.  This closes a longstanding sh security hole.
 
3372
  ac_dummy="ifelse([$2], , $PATH, [$2])"
 
3373
  for ac_dir in $ac_dummy; do
 
3374
    test -z "$ac_dir" && ac_dir=.
 
3375
    if test -f $ac_dir/$1; then
 
3376
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
3377
      if test -n "$file_magic_test_file"; then
 
3378
        case $deplibs_check_method in
 
3379
        "file_magic "*)
 
3380
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
3381
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3382
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
3383
            egrep "$file_magic_regex" > /dev/null; then
 
3384
            :
 
3385
          else
 
3386
            cat <<EOF 1>&2
 
3387
 
 
3388
*** Warning: the command libtool uses to detect shared libraries,
 
3389
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
3390
*** The result is that libtool may fail to recognize shared libraries
 
3391
*** as such.  This will affect the creation of libtool libraries that
 
3392
*** depend on shared libraries, but programs linked with such libtool
 
3393
*** libraries will work regardless of this problem.  Nevertheless, you
 
3394
*** may want to report the problem to your system manager and/or to
 
3395
*** bug-libtool@gnu.org
 
3396
 
 
3397
EOF
 
3398
          fi ;;
 
3399
        esac
 
3400
      fi
 
3401
      break
 
3402
    fi
 
3403
  done
 
3404
  IFS="$ac_save_ifs"
 
3405
  MAGIC_CMD="$ac_save_MAGIC_CMD"
 
3406
  ;;
 
3407
esac])
 
3408
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
3409
if test -n "$MAGIC_CMD"; then
 
3410
  AC_MSG_RESULT($MAGIC_CMD)
 
3411
else
 
3412
  AC_MSG_RESULT(no)
 
3413
fi
 
3414
])
 
3415
 
 
3416
 
 
3417
# AC_PATH_MAGIC - find a file program which can recognise a shared library
 
3418
AC_DEFUN([AC_PATH_MAGIC],
 
3419
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 
3420
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
 
3421
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
3422
  if test -n "$ac_tool_prefix"; then
 
3423
    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
 
3424
  else
 
3425
    MAGIC_CMD=:
 
3426
  fi
 
3427
fi
 
3428
])
 
3429
 
 
3430
 
 
3431
# AC_PROG_LD - find the path to the GNU or non-GNU linker
 
3432
AC_DEFUN([AC_PROG_LD],
 
3433
[AC_ARG_WITH(gnu-ld,
 
3434
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 
3435
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 
3436
AC_REQUIRE([AC_PROG_CC])dnl
 
3437
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3438
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
3439
AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
 
3440
ac_prog=ld
 
3441
if test "$GCC" = yes; then
 
3442
  # Check if gcc -print-prog-name=ld gives a path.
 
3443
  AC_MSG_CHECKING([for ld used by GCC])
 
3444
  case $host in
 
3445
  *-*-mingw*)
 
3446
    # gcc leaves a trailing carriage return which upsets mingw
 
3447
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
3448
  *)
 
3449
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
3450
  esac
 
3451
  case $ac_prog in
 
3452
    # Accept absolute paths.
 
3453
    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
 
3454
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
3455
      # Canonicalize the path of ld
 
3456
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 
3457
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 
3458
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 
3459
      done
 
3460
      test -z "$LD" && LD="$ac_prog"
 
3461
      ;;
 
3462
  "")
 
3463
    # If it fails, then pretend we aren't using GCC.
 
3464
    ac_prog=ld
 
3465
    ;;
 
3466
  *)
 
3467
    # If it is relative, then search for the first ld in PATH.
 
3468
    with_gnu_ld=unknown
 
3469
    ;;
 
3470
  esac
 
3471
elif test "$with_gnu_ld" = yes; then
 
3472
  AC_MSG_CHECKING([for GNU ld])
 
3473
else
 
3474
  AC_MSG_CHECKING([for non-GNU ld])
 
3475
fi
 
3476
AC_CACHE_VAL(lt_cv_path_LD,
 
3477
[if test -z "$LD"; then
 
3478
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3479
  for ac_dir in $PATH; do
 
3480
    test -z "$ac_dir" && ac_dir=.
 
3481
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
3482
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
3483
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
3484
      # but apparently some GNU ld's only accept -v.
 
3485
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
3486
      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 
3487
        test "$with_gnu_ld" != no && break
 
3488
      else
 
3489
        test "$with_gnu_ld" != yes && break
 
3490
      fi
 
3491
    fi
 
3492
  done
 
3493
  IFS="$ac_save_ifs"
 
3494
else
 
3495
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
3496
fi])
 
3497
LD="$lt_cv_path_LD"
 
3498
if test -n "$LD"; then
 
3499
  AC_MSG_RESULT($LD)
 
3500
else
 
3501
  AC_MSG_RESULT(no)
 
3502
fi
 
3503
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
3504
AC_PROG_LD_GNU
 
3505
])
 
3506
 
 
3507
# AC_PROG_LD_GNU -
 
3508
AC_DEFUN([AC_PROG_LD_GNU],
 
3509
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
3510
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
3511
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 
3512
  lt_cv_prog_gnu_ld=yes
 
3513
else
 
3514
  lt_cv_prog_gnu_ld=no
 
3515
fi])
 
3516
with_gnu_ld=$lt_cv_prog_gnu_ld
 
3517
])
 
3518
 
 
3519
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
 
3520
#   -- PORTME Some linkers may need a different reload flag.
 
3521
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
3522
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
 
3523
[lt_cv_ld_reload_flag='-r'])
 
3524
reload_flag=$lt_cv_ld_reload_flag
 
3525
test -n "$reload_flag" && reload_flag=" $reload_flag"
 
3526
])
 
3527
 
 
3528
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 
3529
#  -- PORTME fill in with the dynamic library characteristics
 
3530
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
3531
[AC_CACHE_CHECK([how to recognise dependant libraries],
 
3532
lt_cv_deplibs_check_method,
 
3533
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
3534
lt_cv_file_magic_test_file=
 
3535
lt_cv_deplibs_check_method='unknown'
 
3536
# Need to set the preceding variable on all platforms that support
 
3537
# interlibrary dependencies.
 
3538
# 'none' -- dependencies not supported.
 
3539
# `unknown' -- same as none, but documents that we really don't know.
 
3540
# 'pass_all' -- all dependencies passed with no checks.
 
3541
# 'test_compile' -- check by making test program.
 
3542
# 'file_magic [[regex]]' -- check by looking for files in library path
 
3543
# which responds to the $file_magic_cmd with a given egrep regex.
 
3544
# If you have `file' or equivalent on your system and you're not sure
 
3545
# whether `pass_all' will *always* work, you probably want this one.
 
3546
 
 
3547
case $host_os in
 
3548
aix4* | aix5*)
 
3549
  lt_cv_deplibs_check_method=pass_all
 
3550
  ;;
 
3551
 
 
3552
beos*)
 
3553
  lt_cv_deplibs_check_method=pass_all
 
3554
  ;;
 
3555
 
 
3556
bsdi4*)
 
3557
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
3558
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3559
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3560
  ;;
 
3561
 
 
3562
cygwin* | mingw* | pw32*)
 
3563
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
3564
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
3565
  ;;
 
3566
 
 
3567
darwin* | rhapsody*)
 
3568
  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
 
3569
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
3570
  case "$host_os" in
 
3571
  rhapsody* | darwin1.[[012]])
 
3572
    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
 
3573
    ;;
 
3574
  *) # Darwin 1.3 on
 
3575
    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 
3576
    ;;
 
3577
  esac
 
3578
  ;;
 
3579
 
 
3580
freebsd*)
 
3581
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
3582
    case $host_cpu in
 
3583
    i*86 )
 
3584
      # Not sure whether the presence of OpenBSD here was a mistake.
 
3585
      # Let's accept both of them until this is cleared up.
 
3586
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
3587
      lt_cv_file_magic_cmd=/usr/bin/file
 
3588
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3589
      ;;
 
3590
    esac
 
3591
  else
 
3592
    lt_cv_deplibs_check_method=pass_all
 
3593
  fi
 
3594
  ;;
 
3595
 
 
3596
gnu*)
 
3597
  lt_cv_deplibs_check_method=pass_all
 
3598
  ;;
 
3599
 
 
3600
hpux10.20*|hpux11*)
 
3601
  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
3602
  lt_cv_file_magic_cmd=/usr/bin/file
 
3603
  lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
3604
  ;;
 
3605
 
 
3606
irix5* | irix6*)
 
3607
  case $host_os in
 
3608
  irix5*)
 
3609
    # this will be overridden with pass_all, but let us keep it just in case
 
3610
    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
 
3611
    ;;
 
3612
  *)
 
3613
    case $LD in
 
3614
    *-32|*"-32 ") libmagic=32-bit;;
 
3615
    *-n32|*"-n32 ") libmagic=N32;;
 
3616
    *-64|*"-64 ") libmagic=64-bit;;
 
3617
    *) libmagic=never-match;;
 
3618
    esac
 
3619
    # this will be overridden with pass_all, but let us keep it just in case
 
3620
    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
 
3621
    ;;
 
3622
  esac
 
3623
  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
 
3624
  lt_cv_deplibs_check_method=pass_all
 
3625
  ;;
 
3626
 
 
3627
# This must be Linux ELF.
 
3628
linux-gnu*)
 
3629
  case $host_cpu in
 
3630
  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 
3631
    lt_cv_deplibs_check_method=pass_all ;;
 
3632
  *)
 
3633
    # glibc up to 2.1.1 does not perform some relocations on ARM
 
3634
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
 
3635
  esac
 
3636
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 
3637
  ;;
 
3638
 
 
3639
netbsd*)
 
3640
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 
3641
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 
3642
  else
 
3643
    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 
3644
  fi
 
3645
  ;;
 
3646
 
 
3647
newos6*)
 
3648
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
3649
  lt_cv_file_magic_cmd=/usr/bin/file
 
3650
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
3651
  ;;
 
3652
 
 
3653
openbsd*)
 
3654
  lt_cv_file_magic_cmd=/usr/bin/file
 
3655
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
3656
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3657
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
3658
  else
 
3659
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
3660
  fi
 
3661
  ;;
 
3662
 
 
3663
osf3* | osf4* | osf5*)
 
3664
  # this will be overridden with pass_all, but let us keep it just in case
 
3665
  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
 
3666
  lt_cv_file_magic_test_file=/shlib/libc.so
 
3667
  lt_cv_deplibs_check_method=pass_all
 
3668
  ;;
 
3669
 
 
3670
sco3.2v5*)
 
3671
  lt_cv_deplibs_check_method=pass_all
 
3672
  ;;
 
3673
 
 
3674
solaris*)
 
3675
  lt_cv_deplibs_check_method=pass_all
 
3676
  lt_cv_file_magic_test_file=/lib/libc.so
 
3677
  ;;
 
3678
 
 
3679
sysv5uw[[78]]* | sysv4*uw2*)
 
3680
  lt_cv_deplibs_check_method=pass_all
 
3681
  ;;
 
3682
 
 
3683
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
3684
  case $host_vendor in
 
3685
  motorola)
 
3686
    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]]'
 
3687
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
3688
    ;;
 
3689
  ncr)
 
3690
    lt_cv_deplibs_check_method=pass_all
 
3691
    ;;
 
3692
  sequent)
 
3693
    lt_cv_file_magic_cmd='/bin/file'
 
3694
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
3695
    ;;
 
3696
  sni)
 
3697
    lt_cv_file_magic_cmd='/bin/file'
 
3698
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
3699
    lt_cv_file_magic_test_file=/lib/libc.so
 
3700
    ;;
 
3701
  esac
 
3702
  ;;
 
3703
esac
 
3704
])
 
3705
file_magic_cmd=$lt_cv_file_magic_cmd
 
3706
deplibs_check_method=$lt_cv_deplibs_check_method
 
3707
])
 
3708
 
 
3709
 
 
3710
# AC_PROG_NM - find the path to a BSD-compatible name lister
 
3711
AC_DEFUN([AC_PROG_NM],
 
3712
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
 
3713
AC_MSG_CHECKING([for BSD-compatible nm])
 
3714
AC_CACHE_VAL(lt_cv_path_NM,
 
3715
[if test -n "$NM"; then
 
3716
  # Let the user override the test.
 
3717
  lt_cv_path_NM="$NM"
 
3718
else
 
3719
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3720
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
3721
    test -z "$ac_dir" && ac_dir=.
 
3722
    tmp_nm=$ac_dir/${ac_tool_prefix}nm
 
3723
    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
 
3724
      # Check to see if the nm accepts a BSD-compat flag.
 
3725
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
3726
      #   nm: unknown option "B" ignored
 
3727
      # Tru64's nm complains that /dev/null is an invalid object file
 
3728
      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 
3729
        lt_cv_path_NM="$tmp_nm -B"
 
3730
        break
 
3731
      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
 
3732
        lt_cv_path_NM="$tmp_nm -p"
 
3733
        break
 
3734
      else
 
3735
        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
3736
        continue # so that we can try to find one that supports BSD flags
 
3737
      fi
 
3738
    fi
 
3739
  done
 
3740
  IFS="$ac_save_ifs"
 
3741
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
3742
fi])
 
3743
NM="$lt_cv_path_NM"
 
3744
AC_MSG_RESULT([$NM])
 
3745
])
 
3746
 
 
3747
# AC_CHECK_LIBM - check for math library
 
3748
AC_DEFUN([AC_CHECK_LIBM],
 
3749
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
3750
LIBM=
 
3751
case $host in
 
3752
*-*-beos* | *-*-cygwin* | *-*-pw32*)
 
3753
  # These system don't have libm
 
3754
  ;;
 
3755
*-ncr-sysv4.3*)
 
3756
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
3757
  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 
3758
  ;;
 
3759
*)
 
3760
  AC_CHECK_LIB(m, main, LIBM="-lm")
 
3761
  ;;
 
3762
esac
 
3763
])
 
3764
 
 
3765
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
 
3766
# the libltdl convenience library and INCLTDL to the include flags for
 
3767
# the libltdl header and adds --enable-ltdl-convenience to the
 
3768
# configure arguments.  Note that LIBLTDL and INCLTDL are not
 
3769
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
 
3770
# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
 
3771
# with '${top_builddir}/' and INCLTDL will be prefixed with
 
3772
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
3773
# flat and you're not using automake, define top_builddir and
 
3774
# top_srcdir appropriately in the Makefiles.
 
3775
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 
3776
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3777
  case $enable_ltdl_convenience in
 
3778
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 
3779
  "") enable_ltdl_convenience=yes
 
3780
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 
3781
  esac
 
3782
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 
3783
  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
3784
])
 
3785
 
 
3786
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
 
3787
# the libltdl installable library and INCLTDL to the include flags for
 
3788
# the libltdl header and adds --enable-ltdl-install to the configure
 
3789
# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
 
3790
# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
 
3791
# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
 
3792
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
 
3793
# with '${top_srcdir}/' (note the single quotes!).  If your package is
 
3794
# not flat and you're not using automake, define top_builddir and
 
3795
# top_srcdir appropriately in the Makefiles.
 
3796
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 
3797
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 
3798
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 
3799
  AC_CHECK_LIB(ltdl, main,
 
3800
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 
3801
  [if test x"$enable_ltdl_install" = xno; then
 
3802
     AC_MSG_WARN([libltdl not installed, but installation disabled])
 
3803
   else
 
3804
     enable_ltdl_install=yes
 
3805
   fi
 
3806
  ])
 
3807
  if test x"$enable_ltdl_install" = x"yes"; then
 
3808
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
 
3809
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 
3810
    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 
3811
  else
 
3812
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 
3813
    LIBLTDL="-lltdl"
 
3814
    INCLTDL=
 
3815
  fi
 
3816
])
 
3817
 
 
3818
# old names
 
3819
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 
3820
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 
3821
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 
3822
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
3823
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 
3824
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 
3825
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 
3826
 
 
3827
# This is just to silence aclocal about the macro not being used
 
3828
ifelse([AC_DISABLE_FAST_INSTALL])
 
3829
 
 
3830
dnl
 
3831
dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
 
3832
dnl
 
3833
dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
 
3834
dnl is not found. 
 
3835
dnl
 
3836
 
 
3837
AC_DEFUN([GNOME_INIT_HOOK],[
 
3838
        AC_SUBST(GNOME_LIBS)
 
3839
        AC_SUBST(GNOMEUI_LIBS)
 
3840
        AC_SUBST(GNOMEGNORBA_LIBS)
 
3841
        AC_SUBST(GTKXMHTML_LIBS)
 
3842
        AC_SUBST(ZVT_LIBS)
 
3843
        AC_SUBST(GNOME_LIBDIR)
 
3844
        AC_SUBST(GNOME_INCLUDEDIR)
 
3845
 
 
3846
        AC_ARG_WITH(gnome-includes,
 
3847
        [  --with-gnome-includes   Specify location of GNOME headers],[
 
3848
        CFLAGS="$CFLAGS -I$withval"
 
3849
        ])
 
3850
        
 
3851
        AC_ARG_WITH(gnome-libs,
 
3852
        [  --with-gnome-libs       Specify location of GNOME libs],[
 
3853
        LDFLAGS="$LDFLAGS -L$withval"
 
3854
        gnome_prefix=$withval
 
3855
        ])
 
3856
 
 
3857
        AC_ARG_WITH(gnome,
 
3858
        [  --with-gnome            Specify prefix for GNOME files],
 
3859
                if test x$withval = xyes; then
 
3860
                        want_gnome=yes
 
3861
                        dnl Note that an empty true branch is not
 
3862
                        dnl valid sh syntax.
 
3863
                        ifelse([$1], [], :, [$1])
 
3864
                else
 
3865
                        if test "x$withval" = xno; then
 
3866
                                want_gnome=no
 
3867
                        else
 
3868
                                want_gnome=yes
 
3869
                                LDFLAGS="$LDFLAGS -L$withval/lib"
 
3870
                                CFLAGS="$CFLAGS -I$withval/include"
 
3871
                                gnome_prefix=$withval/lib
 
3872
                        fi
 
3873
                fi,
 
3874
                want_gnome=yes)
 
3875
 
 
3876
        if test "x$want_gnome" = xyes; then
 
3877
 
 
3878
            AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
 
3879
            if test "$GNOME_CONFIG" = "no"; then
 
3880
              no_gnome_config="yes"
 
3881
            else
 
3882
              AC_MSG_CHECKING(if $GNOME_CONFIG works)
 
3883
              if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
 
3884
                AC_MSG_RESULT(yes)
 
3885
                GNOME_GNORBA_HOOK([],$2)
 
3886
                GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
 
3887
                GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
 
3888
                GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
 
3889
                GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
 
3890
                ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
 
3891
                GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
 
3892
                GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
 
3893
                $1
 
3894
              else
 
3895
                AC_MSG_RESULT(no)
 
3896
                no_gnome_config="yes"
 
3897
              fi
 
3898
            fi
 
3899
 
 
3900
            if test x$exec_prefix = xNONE; then
 
3901
                if test x$prefix = xNONE; then
 
3902
                    gnome_prefix=$ac_default_prefix/lib
 
3903
                else
 
3904
                    gnome_prefix=$prefix/lib
 
3905
                fi
 
3906
            else
 
3907
                gnome_prefix=`eval echo \`echo $libdir\``
 
3908
            fi
 
3909
        
 
3910
            if test "$no_gnome_config" = "yes"; then
 
3911
              AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
 
3912
              if test -f $gnome_prefix/gnomeConf.sh; then
 
3913
                AC_MSG_RESULT(found)
 
3914
                echo "loading gnome configuration from" \
 
3915
                     "$gnome_prefix/gnomeConf.sh"
 
3916
                . $gnome_prefix/gnomeConf.sh
 
3917
                $1
 
3918
              else
 
3919
                AC_MSG_RESULT(not found)
 
3920
                if test x$2 = xfail; then
 
3921
                  AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
 
3922
                fi
 
3923
              fi
 
3924
            fi
 
3925
        fi
 
3926
 
 
3927
        if test -n "$3"; then
 
3928
          n="$3"
 
3929
          for i in $n; do
 
3930
            AC_MSG_CHECKING(extra library \"$i\")
 
3931
            case $i in 
 
3932
              applets)
 
3933
                AC_SUBST(GNOME_APPLETS_LIBS)
 
3934
                GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
 
3935
                AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
 
3936
              docklets)
 
3937
                AC_SUBST(GNOME_DOCKLETS_LIBS)
 
3938
                GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
 
3939
                AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
 
3940
              capplet)
 
3941
                AC_SUBST(GNOME_CAPPLET_LIBS)
 
3942
                GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
 
3943
                AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
 
3944
              *)
 
3945
                AC_MSG_RESULT(unknown library)
 
3946
            esac
 
3947
            EXTRA_INCLUDEDIR=`$GNOME_CONFIG --cflags $i`
 
3948
            GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR $EXTRA_INCLUDEDIR"
 
3949
          done
 
3950
        fi
 
3951
])
 
3952
 
 
3953
dnl
 
3954
dnl GNOME_INIT ([additional-inits])
 
3955
dnl
 
3956
 
 
3957
AC_DEFUN([GNOME_INIT],[
 
3958
        GNOME_INIT_HOOK([],fail,$1)
 
3959
])
 
3960
 
 
3961
dnl
 
3962
dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
 
3963
dnl
 
3964
dnl if failflag is "failure" it aborts if gnorba is not found.
 
3965
dnl
 
3966
 
 
3967
AC_DEFUN([GNOME_GNORBA_HOOK],[
 
3968
        GNOME_ORBIT_HOOK([],$2)
 
3969
        AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
 
3970
                gnome_cv_gnorba_found=no
 
3971
                if test x$gnome_cv_orbit_found = xyes; then
 
3972
                        GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
 
3973
                        GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
 
3974
                        if test -n "$GNORBA_LIBS"; then
 
3975
                                gnome_cv_gnorba_found=yes
 
3976
                        fi
 
3977
                fi
 
3978
        ])
 
3979
        AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
 
3980
        if test x$gnome_cv_orbit_found = xyes; then
 
3981
                $1
 
3982
                GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
 
3983
                GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
 
3984
                AC_SUBST(GNORBA_CFLAGS)
 
3985
                AC_SUBST(GNORBA_LIBS)
 
3986
        else
 
3987
                if test x$2 = xfailure; then
 
3988
                        AC_MSG_ERROR(gnorba library not installed or installation problem)
 
3989
                fi
 
3990
        fi
 
3991
])
 
3992
 
 
3993
AC_DEFUN([GNOME_GNORBA_CHECK], [
 
3994
        GNOME_GNORBA_HOOK([],failure)
 
3995
])
 
3996
 
 
3997
dnl
 
3998
dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
 
3999
dnl
 
4000
dnl if failflag is "failure" it aborts if orbit is not found.
 
4001
dnl
 
4002
 
 
4003
AC_DEFUN([GNOME_ORBIT_HOOK],[
 
4004
        AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
 
4005
        AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
 
4006
        AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
 
4007
                if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
 
4008
                        gnome_cv_orbit_found=no
 
4009
                else
 
4010
                        gnome_cv_orbit_found=yes
 
4011
                fi
 
4012
        ])
 
4013
        AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
 
4014
        if test x$gnome_cv_orbit_found = xyes; then
 
4015
                $1
 
4016
                ORBIT_CFLAGS=`orbit-config --cflags client server`
 
4017
                ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
 
4018
                AC_SUBST(ORBIT_CFLAGS)
 
4019
                AC_SUBST(ORBIT_LIBS)
 
4020
        else
 
4021
                if test x$2 = xfailure; then
 
4022
                        AC_MSG_ERROR(ORBit not installed or installation problem)
 
4023
                fi
 
4024
        fi
 
4025
])
 
4026
 
 
4027
AC_DEFUN([GNOME_ORBIT_CHECK], [
 
4028
        GNOME_ORBIT_HOOK([],failure)
 
4029
])
 
4030
 
 
4031
# Define a conditional.
 
4032
 
 
4033
AC_DEFUN([AM_CONDITIONAL],
 
4034
[AC_SUBST($1_TRUE)
 
4035
AC_SUBST($1_FALSE)
 
4036
if $2; then
 
4037
  $1_TRUE=
 
4038
  $1_FALSE='#'
 
4039
else
 
4040
  $1_TRUE='#'
 
4041
  $1_FALSE=
 
4042
fi])
 
4043
 
 
4044
#serial 1
 
4045
# This test replaces the one in autoconf.
 
4046
# Currently this macro should have the same name as the autoconf macro
 
4047
# because gettext's gettext.m4 (distributed in the automake package)
 
4048
# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
 
4049
# give these diagnostics:
 
4050
#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
 
4051
#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
 
4052
 
 
4053
undefine([AC_ISC_POSIX])
 
4054
 
 
4055
AC_DEFUN([AC_ISC_POSIX],
 
4056
  [
 
4057
    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
 
4058
    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
 
4059
  ]
 
4060
)
 
4061
 
 
4062
dnl GNOME_COMPILE_WARNINGS
 
4063
dnl Turn on many useful compiler warnings
 
4064
dnl For now, only works on GCC
 
4065
AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
4066
  AC_ARG_ENABLE(compile-warnings, 
 
4067
    [  --enable-compile-warnings=[no/minimum/yes]       Turn on compiler warnings.],,enable_compile_warnings=minimum)
 
4068
 
 
4069
  AC_MSG_CHECKING(what warning flags to pass to the C compiler)
 
4070
  warnCFLAGS=
 
4071
  if test "x$GCC" != xyes; then
 
4072
    enable_compile_warnings=no
 
4073
  fi
 
4074
 
 
4075
  if test "x$enable_compile_warnings" != "xno"; then
 
4076
    if test "x$GCC" = "xyes"; then
 
4077
      case " $CFLAGS " in
 
4078
      *[\ \     ]-Wall[\ \      ]*) ;;
 
4079
      *) warnCFLAGS="-Wall -Wunused" ;;
 
4080
      esac
 
4081
 
 
4082
      ## -W is not all that useful.  And it cannot be controlled
 
4083
      ## with individual -Wno-xxx flags, unlike -Wall
 
4084
      if test "x$enable_compile_warnings" = "xyes"; then
 
4085
        warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations"
 
4086
      fi
 
4087
    fi
 
4088
  fi
 
4089
  AC_MSG_RESULT($warnCFLAGS)
 
4090
 
 
4091
  AC_ARG_ENABLE(iso-c,
 
4092
    [  --enable-iso-c          Try to warn if code is not ISO C ],,
 
4093
    enable_iso_c=no)
 
4094
 
 
4095
  AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
 
4096
  complCFLAGS=
 
4097
  if test "x$enable_iso_c" != "xno"; then
 
4098
    if test "x$GCC" = "xyes"; then
 
4099
      case " $CFLAGS " in
 
4100
      *[\ \     ]-ansi[\ \      ]*) ;;
 
4101
      *) complCFLAGS="$complCFLAGS -ansi" ;;
 
4102
      esac
 
4103
 
 
4104
      case " $CFLAGS " in
 
4105
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
4106
      *) complCFLAGS="$complCFLAGS -pedantic" ;;
 
4107
      esac
 
4108
    fi
 
4109
  fi
 
4110
  AC_MSG_RESULT($complCFLAGS)
 
4111
  if test "x$cflags_set" != "xyes"; then
 
4112
    CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
 
4113
    cflags_set=yes
 
4114
    AC_SUBST(cflags_set)
 
4115
  fi
 
4116
])
 
4117
 
 
4118
dnl For C++, do basically the same thing.
 
4119
 
 
4120
AC_DEFUN([GNOME_CXX_WARNINGS],[
 
4121
  AC_ARG_ENABLE(cxx-warnings, 
 
4122
    [  --enable-cxx-warnings=[no/minimum/yes]   Turn on compiler warnings.],,enable_cxx_warnings=minimum)
 
4123
 
 
4124
  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
 
4125
  warnCXXFLAGS=
 
4126
  if test "x$GCC" != xyes; then
 
4127
    enable_compile_warnings=no
 
4128
  fi
 
4129
  if test "x$enable_cxx_warnings" != "xno"; then
 
4130
    if test "x$GCC" = "xyes"; then
 
4131
      case " $CXXFLAGS " in
 
4132
      *[\ \     ]-Wall[\ \      ]*) ;;
 
4133
      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
 
4134
      esac
 
4135
 
 
4136
      ## -W is not all that useful.  And it cannot be controlled
 
4137
      ## with individual -Wno-xxx flags, unlike -Wall
 
4138
      if test "x$enable_cxx_warnings" = "xyes"; then
 
4139
        warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual"
 
4140
      fi
 
4141
    fi
 
4142
  fi
 
4143
  AC_MSG_RESULT($warnCXXFLAGS)
 
4144
 
 
4145
   AC_ARG_ENABLE(iso-cxx,
 
4146
     [  --enable-iso-cxx          Try to warn if code is not ISO C++ ],,
 
4147
     enable_iso_cxx=no)
 
4148
 
 
4149
   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
 
4150
   complCXXFLAGS=
 
4151
   if test "x$enable_iso_cxx" != "xno"; then
 
4152
     if test "x$GCC" = "xyes"; then
 
4153
      case " $CXXFLAGS " in
 
4154
      *[\ \     ]-ansi[\ \      ]*) ;;
 
4155
      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
 
4156
      esac
 
4157
 
 
4158
      case " $CXXFLAGS " in
 
4159
      *[\ \     ]-pedantic[\ \  ]*) ;;
 
4160
      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
 
4161
      esac
 
4162
     fi
 
4163
   fi
 
4164
  AC_MSG_RESULT($complCXXFLAGS)
 
4165
  if test "x$cxxflags_set" != "xyes"; then
 
4166
    CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
 
4167
    cxxflags_set=yes
 
4168
    AC_SUBST(cxxflags_set)
 
4169
  fi
 
4170
])
 
4171
 
 
4172
dnl GNOME_X_CHECKS
 
4173
dnl
 
4174
dnl Basic X11 related checks for X11.  At the end, the following will be
 
4175
dnl defined/changed:
 
4176
dnl   GTK_{CFLAGS,LIBS}      From AM_PATH_GTK
 
4177
dnl   CPPFLAGS               Will include $X_CFLAGS
 
4178
dnl   GNOME_HAVE_SM          `true' or `false' depending on whether session
 
4179
dnl                          management is available.  It is available if
 
4180
dnl                          both -lSM and X11/SM/SMlib.h exist.  (Some
 
4181
dnl                          Solaris boxes have the library but not the header)
 
4182
dnl   XPM_LIBS               -lXpm if Xpm library is present, otherwise ""
 
4183
dnl
 
4184
dnl The following configure cache variables are defined (but not used):
 
4185
dnl   gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
 
4186
dnl
 
4187
AC_DEFUN([GNOME_X_CHECKS],
 
4188
[
 
4189
        AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
 
4190
        dnl Hope that GTK_CFLAGS have only -I and -D.  Otherwise, we could
 
4191
        dnl   test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
 
4192
        dnl
 
4193
        dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
 
4194
        dnl CPPFLAGS, not CFLAGS
 
4195
        CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
 
4196
 
 
4197
        saved_ldflags="$LDFLAGS"
 
4198
        LDFLAGS="$LDFLAGS $GTK_LIBS"
 
4199
 
 
4200
        gnome_cv_passdown_x_libs="$GTK_LIBS"
 
4201
        gnome_cv_passdown_X_LIBS="$GTK_LIBS"
 
4202
        gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
 
4203
        gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
 
4204
 
 
4205
        LDFLAGS="$saved_ldflags $GTK_LIBS"
 
4206
 
 
4207
dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
 
4208
        USE_DEVGTK=true
 
4209
 
 
4210
dnl     AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
 
4211
dnl     AC_EGREP_CPP(answer_affirmatively,
 
4212
dnl     [#include <gtk/gtkfeatures.h>
 
4213
dnl     #ifdef GTK_HAVE_FEATURES_1_1_0
 
4214
dnl        answer_affirmatively
 
4215
dnl     #endif
 
4216
dnl     ], dev_gtk=yes, dev_gtk=no)
 
4217
dnl     if test "$dev_gtk" = "yes"; then
 
4218
dnl        USE_DEVGTK=true
 
4219
dnl     fi
 
4220
dnl     AC_MSG_RESULT("$dev_gtk")
 
4221
 
 
4222
        GNOME_HAVE_SM=true
 
4223
        case "$GTK_LIBS" in
 
4224
         *-lSM*)
 
4225
            dnl Already found it.
 
4226
            ;;
 
4227
         *)
 
4228
            dnl Assume that if we have -lSM then we also have -lICE.
 
4229
            AC_CHECK_LIB(SM, SmcSaveYourselfDone,
 
4230
                [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
 
4231
                $x_libs -lICE)
 
4232
            ;;
 
4233
        esac
 
4234
 
 
4235
        if test "$GNOME_HAVE_SM" = true; then
 
4236
           AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
 
4237
        fi
 
4238
 
 
4239
        if test "$GNOME_HAVE_SM" = true; then
 
4240
           AC_DEFINE(HAVE_LIBSM)
 
4241
        fi
 
4242
 
 
4243
        XPM_LIBS=""
 
4244
        AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
 
4245
        AC_SUBST(XPM_LIBS)
 
4246
 
 
4247
        AC_REQUIRE([GNOME_PTHREAD_CHECK])
 
4248
        LDFLAGS="$saved_ldflags"
 
4249
 
 
4250
        AC_PROVIDE([GNOME_X_CHECKS])
 
4251
])
 
4252
 
 
4253
# Configure paths for GTK+
 
4254
# Owen Taylor     97-11-3
 
4255
 
 
4256
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
 
4257
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
 
4258
dnl
 
4259
AC_DEFUN(AM_PATH_GTK,
 
4260
[dnl 
 
4261
dnl Get the cflags and libraries from the gtk-config script
 
4262
dnl
 
4263
AC_ARG_WITH(gtk-prefix,[  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)],
 
4264
            gtk_config_prefix="$withval", gtk_config_prefix="")
 
4265
AC_ARG_WITH(gtk-exec-prefix,[  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
 
4266
            gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
 
4267
AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK program],
 
4268
                    , enable_gtktest=yes)
 
4269
 
 
4270
  for module in . $4
 
4271
  do
 
4272
      case "$module" in
 
4273
         gthread) 
 
4274
             gtk_config_args="$gtk_config_args gthread"
 
4275
         ;;
 
4276
      esac
 
4277
  done
 
4278
 
 
4279
  if test x$gtk_config_exec_prefix != x ; then
 
4280
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
 
4281
     if test x${GTK_CONFIG+set} != xset ; then
 
4282
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
 
4283
     fi
 
4284
  fi
 
4285
  if test x$gtk_config_prefix != x ; then
 
4286
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
 
4287
     if test x${GTK_CONFIG+set} != xset ; then
 
4288
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
 
4289
     fi
 
4290
  fi
 
4291
 
 
4292
  AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
 
4293
  min_gtk_version=ifelse([$1], ,0.99.7,$1)
 
4294
  AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
 
4295
  no_gtk=""
 
4296
  if test "$GTK_CONFIG" = "no" ; then
 
4297
    no_gtk=yes
 
4298
  else
 
4299
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
 
4300
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
 
4301
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
 
4302
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
4303
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
 
4304
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
4305
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
 
4306
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
4307
    if test "x$enable_gtktest" = "xyes" ; then
 
4308
      ac_save_CFLAGS="$CFLAGS"
 
4309
      ac_save_LIBS="$LIBS"
 
4310
      CFLAGS="$CFLAGS $GTK_CFLAGS"
 
4311
      LIBS="$GTK_LIBS $LIBS"
 
4312
dnl
 
4313
dnl Now check if the installed GTK is sufficiently new. (Also sanity
 
4314
dnl checks the results of gtk-config to some extent
 
4315
dnl
 
4316
      rm -f conf.gtktest
 
4317
      AC_TRY_RUN([
 
4318
#include <gtk/gtk.h>
 
4319
#include <stdio.h>
 
4320
#include <stdlib.h>
 
4321
 
 
4322
int 
 
4323
main ()
 
4324
{
 
4325
  int major, minor, micro;
 
4326
  char *tmp_version;
 
4327
 
 
4328
  system ("touch conf.gtktest");
 
4329
 
 
4330
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
4331
  tmp_version = g_strdup("$min_gtk_version");
 
4332
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 
4333
     printf("%s, bad version string\n", "$min_gtk_version");
 
4334
     exit(1);
 
4335
   }
 
4336
 
 
4337
  if ((gtk_major_version != $gtk_config_major_version) ||
 
4338
      (gtk_minor_version != $gtk_config_minor_version) ||
 
4339
      (gtk_micro_version != $gtk_config_micro_version))
 
4340
    {
 
4341
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
 
4342
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
 
4343
             gtk_major_version, gtk_minor_version, gtk_micro_version);
 
4344
      printf ("*** was found! If gtk-config was correct, then it is best\n");
 
4345
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
 
4346
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
 
4347
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
 
4348
      printf("*** required on your system.\n");
 
4349
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
 
4350
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
 
4351
      printf("*** before re-running configure\n");
 
4352
    } 
 
4353
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
 
4354
  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
 
4355
           (gtk_minor_version != GTK_MINOR_VERSION) ||
 
4356
           (gtk_micro_version != GTK_MICRO_VERSION))
 
4357
    {
 
4358
      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
 
4359
             GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
 
4360
      printf("*** library (version %d.%d.%d)\n",
 
4361
             gtk_major_version, gtk_minor_version, gtk_micro_version);
 
4362
    }
 
4363
#endif /* defined (GTK_MAJOR_VERSION) ... */
 
4364
  else
 
4365
    {
 
4366
      if ((gtk_major_version > major) ||
 
4367
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
 
4368
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
 
4369
      {
 
4370
        return 0;
 
4371
       }
 
4372
     else
 
4373
      {
 
4374
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
 
4375
               gtk_major_version, gtk_minor_version, gtk_micro_version);
 
4376
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
 
4377
               major, minor, micro);
 
4378
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
 
4379
        printf("***\n");
 
4380
        printf("*** If you have already installed a sufficiently new version, this error\n");
 
4381
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
 
4382
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 
4383
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
 
4384
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
 
4385
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 
4386
        printf("*** so that the correct libraries are found at run-time))\n");
 
4387
      }
 
4388
    }
 
4389
  return 1;
 
4390
}
 
4391
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
4392
       CFLAGS="$ac_save_CFLAGS"
 
4393
       LIBS="$ac_save_LIBS"
 
4394
     fi
 
4395
  fi
 
4396
  if test "x$no_gtk" = x ; then
 
4397
     AC_MSG_RESULT(yes)
 
4398
     ifelse([$2], , :, [$2])     
 
4399
  else
 
4400
     AC_MSG_RESULT(no)
 
4401
     if test "$GTK_CONFIG" = "no" ; then
 
4402
       echo "*** The gtk-config script installed by GTK could not be found"
 
4403
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
 
4404
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
 
4405
       echo "*** full path to gtk-config."
 
4406
     else
 
4407
       if test -f conf.gtktest ; then
 
4408
        :
 
4409
       else
 
4410
          echo "*** Could not run GTK test program, checking why..."
 
4411
          CFLAGS="$CFLAGS $GTK_CFLAGS"
 
4412
          LIBS="$LIBS $GTK_LIBS"
 
4413
          AC_TRY_LINK([
 
4414
#include <gtk/gtk.h>
 
4415
#include <stdio.h>
 
4416
],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
 
4417
        [ echo "*** The test program compiled, but did not run. This usually means"
 
4418
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
 
4419
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
 
4420
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
4421
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
4422
          echo "*** is required on your system"
 
4423
          echo "***"
 
4424
          echo "*** If you have an old version installed, it is best to remove it, although"
 
4425
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
 
4426
          echo "***"
 
4427
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
 
4428
          echo "*** came with the system with the command"
 
4429
          echo "***"
 
4430
          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
 
4431
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
4432
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
 
4433
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
 
4434
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
 
4435
          CFLAGS="$ac_save_CFLAGS"
 
4436
          LIBS="$ac_save_LIBS"
 
4437
       fi
 
4438
     fi
 
4439
     GTK_CFLAGS=""
 
4440
     GTK_LIBS=""
 
4441
     ifelse([$3], , :, [$3])
 
4442
  fi
 
4443
  AC_SUBST(GTK_CFLAGS)
 
4444
  AC_SUBST(GTK_LIBS)
 
4445
  rm -f conf.gtktest
 
4446
])
 
4447
 
 
4448
dnl
 
4449
dnl And better, use gthreads instead...
 
4450
dnl
 
4451
 
 
4452
AC_DEFUN([GNOME_PTHREAD_CHECK],[
 
4453
        PTHREAD_LIB=""
 
4454
        AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
 
4455
                [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
 
4456
                    [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
 
4457
                        [AC_CHECK_LIB(pthread, __pthread_attr_init_system, PTHREAD_LIB="-lpthread",
 
4458
                                [AC_CHECK_FUNC(pthread_create)]
 
4459
                        )]
 
4460
                    )]
 
4461
                )]
 
4462
        )
 
4463
        AC_SUBST(PTHREAD_LIB)
 
4464
        AC_PROVIDE([GNOME_PTHREAD_CHECK])
 
4465
])
 
4466
 
 
4467
# Configure paths for GLIB
 
4468
# Owen Taylor     97-11-3
 
4469
 
 
4470
dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
 
4471
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or 
 
4472
dnl gthread is specified in MODULES, pass to glib-config
 
4473
dnl
 
4474
AC_DEFUN(AM_PATH_GLIB,
 
4475
[dnl 
 
4476
dnl Get the cflags and libraries from the glib-config script
 
4477
dnl
 
4478
AC_ARG_WITH(glib-prefix,[  --with-glib-prefix=PFX   Prefix where GLIB is installed (optional)],
 
4479
            glib_config_prefix="$withval", glib_config_prefix="")
 
4480
AC_ARG_WITH(glib-exec-prefix,[  --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
 
4481
            glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
 
4482
AC_ARG_ENABLE(glibtest, [  --disable-glibtest       Do not try to compile and run a test GLIB program],
 
4483
                    , enable_glibtest=yes)
 
4484
 
 
4485
  if test x$glib_config_exec_prefix != x ; then
 
4486
     glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
 
4487
     if test x${GLIB_CONFIG+set} != xset ; then
 
4488
        GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
 
4489
     fi
 
4490
  fi
 
4491
  if test x$glib_config_prefix != x ; then
 
4492
     glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
 
4493
     if test x${GLIB_CONFIG+set} != xset ; then
 
4494
        GLIB_CONFIG=$glib_config_prefix/bin/glib-config
 
4495
     fi
 
4496
  fi
 
4497
 
 
4498
  for module in . $4
 
4499
  do
 
4500
      case "$module" in
 
4501
         gmodule) 
 
4502
             glib_config_args="$glib_config_args gmodule"
 
4503
         ;;
 
4504
         gthread) 
 
4505
             glib_config_args="$glib_config_args gthread"
 
4506
         ;;
 
4507
      esac
 
4508
  done
 
4509
 
 
4510
  AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
 
4511
  min_glib_version=ifelse([$1], ,0.99.7,$1)
 
4512
  AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
 
4513
  no_glib=""
 
4514
  if test "$GLIB_CONFIG" = "no" ; then
 
4515
    no_glib=yes
 
4516
  else
 
4517
    GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
 
4518
    GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
 
4519
    glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
 
4520
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
4521
    glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
 
4522
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
4523
    glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
 
4524
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
4525
    if test "x$enable_glibtest" = "xyes" ; then
 
4526
      ac_save_CFLAGS="$CFLAGS"
 
4527
      ac_save_LIBS="$LIBS"
 
4528
      CFLAGS="$CFLAGS $GLIB_CFLAGS"
 
4529
      LIBS="$GLIB_LIBS $LIBS"
 
4530
dnl
 
4531
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
 
4532
dnl checks the results of glib-config to some extent
 
4533
dnl
 
4534
      rm -f conf.glibtest
 
4535
      AC_TRY_RUN([
 
4536
#include <glib.h>
 
4537
#include <stdio.h>
 
4538
#include <stdlib.h>
 
4539
 
 
4540
int 
 
4541
main ()
 
4542
{
 
4543
  int major, minor, micro;
 
4544
  char *tmp_version;
 
4545
 
 
4546
  system ("touch conf.glibtest");
 
4547
 
 
4548
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
4549
  tmp_version = g_strdup("$min_glib_version");
 
4550
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 
4551
     printf("%s, bad version string\n", "$min_glib_version");
 
4552
     exit(1);
 
4553
   }
 
4554
 
 
4555
  if ((glib_major_version != $glib_config_major_version) ||
 
4556
      (glib_minor_version != $glib_config_minor_version) ||
 
4557
      (glib_micro_version != $glib_config_micro_version))
 
4558
    {
 
4559
      printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
 
4560
             $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
 
4561
             glib_major_version, glib_minor_version, glib_micro_version);
 
4562
      printf ("*** was found! If glib-config was correct, then it is best\n");
 
4563
      printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
 
4564
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
 
4565
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
 
4566
      printf("*** required on your system.\n");
 
4567
      printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
 
4568
      printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
 
4569
      printf("*** before re-running configure\n");
 
4570
    } 
 
4571
  else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
 
4572
           (glib_minor_version != GLIB_MINOR_VERSION) ||
 
4573
           (glib_micro_version != GLIB_MICRO_VERSION))
 
4574
    {
 
4575
      printf("*** GLIB header files (version %d.%d.%d) do not match\n",
 
4576
             GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
 
4577
      printf("*** library (version %d.%d.%d)\n",
 
4578
             glib_major_version, glib_minor_version, glib_micro_version);
 
4579
    }
 
4580
  else
 
4581
    {
 
4582
      if ((glib_major_version > major) ||
 
4583
        ((glib_major_version == major) && (glib_minor_version > minor)) ||
 
4584
        ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
 
4585
      {
 
4586
        return 0;
 
4587
       }
 
4588
     else
 
4589
      {
 
4590
        printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
 
4591
               glib_major_version, glib_minor_version, glib_micro_version);
 
4592
        printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
 
4593
               major, minor, micro);
 
4594
        printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
 
4595
        printf("***\n");
 
4596
        printf("*** If you have already installed a sufficiently new version, this error\n");
 
4597
        printf("*** probably means that the wrong copy of the glib-config shell script is\n");
 
4598
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 
4599
        printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
 
4600
        printf("*** correct copy of glib-config. (In this case, you will have to\n");
 
4601
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 
4602
        printf("*** so that the correct libraries are found at run-time))\n");
 
4603
      }
 
4604
    }
 
4605
  return 1;
 
4606
}
 
4607
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
4608
       CFLAGS="$ac_save_CFLAGS"
 
4609
       LIBS="$ac_save_LIBS"
 
4610
     fi
 
4611
  fi
 
4612
  if test "x$no_glib" = x ; then
 
4613
     AC_MSG_RESULT(yes)
 
4614
     ifelse([$2], , :, [$2])     
 
4615
  else
 
4616
     AC_MSG_RESULT(no)
 
4617
     if test "$GLIB_CONFIG" = "no" ; then
 
4618
       echo "*** The glib-config script installed by GLIB could not be found"
 
4619
       echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
 
4620
       echo "*** your path, or set the GLIB_CONFIG environment variable to the"
 
4621
       echo "*** full path to glib-config."
 
4622
     else
 
4623
       if test -f conf.glibtest ; then
 
4624
        :
 
4625
       else
 
4626
          echo "*** Could not run GLIB test program, checking why..."
 
4627
          CFLAGS="$CFLAGS $GLIB_CFLAGS"
 
4628
          LIBS="$LIBS $GLIB_LIBS"
 
4629
          AC_TRY_LINK([
 
4630
#include <glib.h>
 
4631
#include <stdio.h>
 
4632
],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
 
4633
        [ echo "*** The test program compiled, but did not run. This usually means"
 
4634
          echo "*** that the run-time linker is not finding GLIB or finding the wrong"
 
4635
          echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
 
4636
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
4637
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
4638
          echo "*** is required on your system"
 
4639
          echo "***"
 
4640
          echo "*** If you have an old version installed, it is best to remove it, although"
 
4641
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
 
4642
          echo "***"
 
4643
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
 
4644
          echo "*** came with the system with the command"
 
4645
          echo "***"
 
4646
          echo "***    rpm --erase --nodeps gtk gtk-devel" ],
 
4647
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
4648
          echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
 
4649
          echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
 
4650
          echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
 
4651
          CFLAGS="$ac_save_CFLAGS"
 
4652
          LIBS="$ac_save_LIBS"
 
4653
       fi
 
4654
     fi
 
4655
     GLIB_CFLAGS=""
 
4656
     GLIB_LIBS=""
 
4657
     ifelse([$3], , :, [$3])
 
4658
  fi
 
4659
  AC_SUBST(GLIB_CFLAGS)
 
4660
  AC_SUBST(GLIB_LIBS)
 
4661
  rm -f conf.glibtest
 
4662
])
 
4663
 
 
4664
# Configure paths for gdk-pixbuf
 
4665
# Elliot Lee 2000-01-10
 
4666
# stolen from Raph Levien 98-11-18
 
4667
# stolen from Manish Singh    98-9-30
 
4668
# stolen back from Frank Belew
 
4669
# stolen from Manish Singh
 
4670
# Shamelessly stolen from Owen Taylor
 
4671
 
 
4672
dnl AM_PATH_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 
4673
dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS
 
4674
dnl
 
4675
AC_DEFUN(AM_PATH_GDK_PIXBUF,
 
4676
[dnl 
 
4677
dnl Get the cflags and libraries from the gdk-pixbuf-config script
 
4678
dnl
 
4679
AC_ARG_WITH(gdk-pixbuf-prefix,[  --with-gdk-pixbuf-prefix=PFX   Prefix where GDK_PIXBUF is installed (optional)],
 
4680
            gdk_pixbuf_prefix="$withval", gdk_pixbuf_prefix="")
 
4681
AC_ARG_WITH(gdk-pixbuf-exec-prefix,[  --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional)],
 
4682
            gdk_pixbuf_exec_prefix="$withval", gdk_pixbuf_exec_prefix="")
 
4683
AC_ARG_ENABLE(gdk_pixbuftest, [  --disable-gdk_pixbuftest       Do not try to compile and run a test GDK_PIXBUF program],
 
4684
                    , enable_gdk_pixbuftest=yes)
 
4685
 
 
4686
  if test x$gdk_pixbuf_exec_prefix != x ; then
 
4687
     gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix"
 
4688
     if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
 
4689
        GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/gdk-pixbuf-config
 
4690
     fi
 
4691
  fi
 
4692
  if test x$gdk_pixbuf_prefix != x ; then
 
4693
     gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix"
 
4694
     if test x${GDK_PIXBUF_CONFIG+set} = xset ; then
 
4695
        GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config
 
4696
     fi
 
4697
  fi
 
4698
 
 
4699
  AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
 
4700
  min_gdk_pixbuf_version=ifelse([$1], ,0.2.5,$1)
 
4701
  AC_MSG_CHECKING(for GDK_PIXBUF - version >= $min_gdk_pixbuf_version)
 
4702
  no_gdk_pixbuf=""
 
4703
  if test "$GDK_PIXBUF_CONFIG" = "no" ; then
 
4704
    no_gdk_pixbuf=yes
 
4705
  else
 
4706
    GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags`
 
4707
    GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs`
 
4708
 
 
4709
    gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
 
4710
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
4711
    gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
 
4712
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
4713
    gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \
 
4714
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
4715
    if test "x$enable_gdk_pixbuftest" = "xyes" ; then
 
4716
      ac_save_CFLAGS="$CFLAGS"
 
4717
      ac_save_LIBS="$LIBS"
 
4718
      CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
 
4719
      LIBS="$LIBS $GDK_PIXBUF_LIBS"
 
4720
dnl
 
4721
dnl Now check if the installed GDK_PIXBUF is sufficiently new. (Also sanity
 
4722
dnl checks the results of gdk-pixbuf-config to some extent
 
4723
dnl
 
4724
      rm -f conf.gdk_pixbuftest
 
4725
      AC_TRY_RUN([
 
4726
#include <stdio.h>
 
4727
#include <stdlib.h>
 
4728
#include <string.h>
 
4729
#include <gdk-pixbuf/gdk-pixbuf.h>
 
4730
 
 
4731
char*
 
4732
my_strdup (char *str)
 
4733
{
 
4734
  char *new_str;
 
4735
  
 
4736
  if (str)
 
4737
    {
 
4738
      new_str = malloc ((strlen (str) + 1) * sizeof(char));
 
4739
      strcpy (new_str, str);
 
4740
    }
 
4741
  else
 
4742
    new_str = NULL;
 
4743
  
 
4744
  return new_str;
 
4745
}
 
4746
 
 
4747
int main ()
 
4748
{
 
4749
  int major, minor, micro;
 
4750
  char *tmp_version;
 
4751
 
 
4752
  system ("touch conf.gdk_pixbuftest");
 
4753
 
 
4754
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
4755
  tmp_version = my_strdup("$min_gdk_pixbuf_version");
 
4756
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 
4757
     printf("%s, bad version string\n", "$min_gdk_pixbuf_version");
 
4758
     exit(1);
 
4759
   }
 
4760
 
 
4761
   if (($gdk_pixbuf_major_version > major) ||
 
4762
      (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) ||
 
4763
      (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro)))
 
4764
    {
 
4765
      return 0;
 
4766
    }
 
4767
  else
 
4768
    {
 
4769
      printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version);
 
4770
      printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro);
 
4771
      printf("*** best to upgrade to the required version.\n");
 
4772
      printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n");
 
4773
      printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n");
 
4774
      printf("*** config.cache before re-running configure\n");
 
4775
      return 1;
 
4776
    }
 
4777
}
 
4778
 
 
4779
],, no_gdk_pixbuf=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
4780
       CFLAGS="$ac_save_CFLAGS"
 
4781
       LIBS="$ac_save_LIBS"
 
4782
     fi
 
4783
  fi
 
4784
  if test "x$no_gdk_pixbuf" = x ; then
 
4785
     AC_MSG_RESULT(yes)
 
4786
     ifelse([$2], , :, [$2])     
 
4787
  else
 
4788
     AC_MSG_RESULT(no)
 
4789
     if test "$GDK_PIXBUF_CONFIG" = "no" ; then
 
4790
       echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found"
 
4791
       echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in"
 
4792
       echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the"
 
4793
       echo "*** full path to gdk-pixbuf-config."
 
4794
     else
 
4795
       if test -f conf.gdk_pixbuftest ; then
 
4796
        :
 
4797
       else
 
4798
          echo "*** Could not run GDK_PIXBUF test program, checking why..."
 
4799
          CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
 
4800
          LIBS="$LIBS $GDK_PIXBUF_LIBS"
 
4801
          AC_TRY_LINK([
 
4802
#include <stdio.h>
 
4803
#include <gdk-pixbuf/gdk-pixbuf.h>
 
4804
],      [ return 0; ],
 
4805
        [ echo "*** The test program compiled, but did not run. This usually means"
 
4806
          echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong"
 
4807
          echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your"
 
4808
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
4809
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
4810
          echo "*** is required on your system"
 
4811
          echo "***"
 
4812
          echo "*** If you have an old version installed, it is best to remove it, although"
 
4813
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
 
4814
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
4815
          echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed"
 
4816
          echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you"
 
4817
          echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" ])
 
4818
          CFLAGS="$ac_save_CFLAGS"
 
4819
          LIBS="$ac_save_LIBS"
 
4820
       fi
 
4821
     fi
 
4822
     GDK_PIXBUF_CFLAGS=""
 
4823
     GDK_PIXBUF_LIBS=""
 
4824
     ifelse([$3], , :, [$3])
 
4825
  fi
 
4826
  AC_SUBST(GDK_PIXBUF_CFLAGS)
 
4827
  AC_SUBST(GDK_PIXBUF_LIBS)
 
4828
  rm -f conf.gdk_pixbuftest
 
4829
])
 
4830
 
 
4831
# Configure paths for LIBXML2
 
4832
# Toshio Kuratomi 2001-04-21
 
4833
# Adapted from:
 
4834
# Configure paths for GLIB
 
4835
# Owen Taylor     97-11-3
 
4836
 
 
4837
dnl AM_PATH_XML([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 
4838
dnl Test for XML, and define XML_CFLAGS and XML_LIBS
 
4839
dnl
 
4840
AC_DEFUN(AM_PATH_XML,[ 
 
4841
AC_ARG_WITH(xml-prefix,
 
4842
            [  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)],
 
4843
            xml_config_prefix="$withval", xml_config_prefix="")
 
4844
AC_ARG_WITH(xml-exec-prefix,
 
4845
            [  --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
 
4846
            xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
 
4847
AC_ARG_ENABLE(xmltest,
 
4848
              [  --disable-xmltest       Do not try to compile and run a test LIBXML program],,
 
4849
              enable_xmltest=yes)
 
4850
 
 
4851
  if test x$xml_config_exec_prefix != x ; then
 
4852
     xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
 
4853
     if test x${XML_CONFIG+set} != xset ; then
 
4854
        XML_CONFIG=$xml_config_exec_prefix/bin/xml-config
 
4855
     fi
 
4856
  fi
 
4857
  if test x$xml_config_prefix != x ; then
 
4858
     xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
 
4859
     if test x${XML_CONFIG+set} != xset ; then
 
4860
        XML_CONFIG=$xml_config_prefix/bin/xml-config
 
4861
     fi
 
4862
  fi
 
4863
 
 
4864
  AC_PATH_PROG(XML_CONFIG, xml-config, no)
 
4865
  min_xml_version=ifelse([$1], ,1.0.0,[$1])
 
4866
  AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
 
4867
  no_xml=""
 
4868
  if test "$XML_CONFIG" = "no" ; then
 
4869
    no_xml=yes
 
4870
  else
 
4871
    XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags`
 
4872
    XML_LIBS=`$XML_CONFIG $xml_config_args --libs`
 
4873
    xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \
 
4874
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
4875
    xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \
 
4876
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
4877
    xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \
 
4878
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
4879
    if test "x$enable_xmltest" = "xyes" ; then
 
4880
      ac_save_CFLAGS="$CFLAGS"
 
4881
      ac_save_LIBS="$LIBS"
 
4882
      CFLAGS="$CFLAGS $XML_CFLAGS"
 
4883
      LIBS="$XML_LIBS $LIBS"
 
4884
dnl
 
4885
dnl Now check if the installed libxml is sufficiently new.
 
4886
dnl (Also sanity checks the results of xml-config to some extent)
 
4887
dnl
 
4888
      rm -f conf.xmltest
 
4889
      AC_TRY_RUN([
 
4890
#include <stdlib.h>
 
4891
#include <stdio.h>
 
4892
#include <libxml/tree.h>
 
4893
 
 
4894
int 
 
4895
main()
 
4896
{
 
4897
  int xml_major_version, xml_minor_version, xml_micro_version;
 
4898
  int major, minor, micro;
 
4899
  char *tmp_version;
 
4900
  int tmp_int_version;
 
4901
 
 
4902
  system("touch conf.xmltest");
 
4903
 
 
4904
  /* Capture xml-config output via autoconf/configure variables */
 
4905
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
4906
  tmp_version = (char *)strdup("$min_xml_version");
 
4907
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 
4908
     printf("%s, bad version string from xml-config\n", "$min_xml_version");
 
4909
     exit(1);
 
4910
   }
 
4911
   free(tmp_version);
 
4912
 
 
4913
   /* Capture the version information from the header files */
 
4914
   tmp_int_version = LIBXML_VERSION;
 
4915
   xml_major_version=tmp_int_version / 10000;
 
4916
   xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100;
 
4917
   xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000);
 
4918
 
 
4919
 /* Compare xml-config output to the libxml headers */
 
4920
  if ((xml_major_version != $xml_config_major_version) ||
 
4921
      (xml_minor_version != $xml_config_minor_version)
 
4922
#if 0
 
4923
      ||
 
4924
/* The last released version of libxml-1.x has an incorrect micro version in
 
4925
 * the header file so neither the includes nor the library will match the
 
4926
 * micro_version to the output of xml-config
 
4927
 */
 
4928
      (xml_micro_version != $xml_config_micro_version)
 
4929
#endif 
 
4930
          )
 
4931
          
 
4932
    {
 
4933
      printf("*** libxml header files (version %d.%d.%d) do not match\n",
 
4934
         xml_major_version, xml_minor_version, xml_micro_version);
 
4935
      printf("*** xml-config (version %d.%d.%d)\n",
 
4936
         $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
 
4937
      return 1;
 
4938
    } 
 
4939
/* Compare the headers to the library to make sure we match */
 
4940
  /* Less than ideal -- doesn't provide us with return value feedback, 
 
4941
   * only exits if there's a serious mismatch between header and library.
 
4942
   */
 
4943
    LIBXML_TEST_VERSION;
 
4944
 
 
4945
    /* Test that the library is greater than our minimum version */
 
4946
    if (($xml_config_major_version > major) ||
 
4947
        (($xml_config_major_version == major) && ($xml_config_minor_version > minor)) ||
 
4948
        (($xml_config_major_version == major) && ($xml_config_minor_version == minor) &&
 
4949
        ($xml_config_micro_version >= micro)))
 
4950
      {
 
4951
        return 0;
 
4952
       }
 
4953
     else
 
4954
      {
 
4955
        printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
 
4956
               xml_major_version, xml_minor_version, xml_micro_version);
 
4957
        printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
 
4958
           major, minor, micro);
 
4959
        printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
 
4960
        printf("***\n");
 
4961
        printf("*** If you have already installed a sufficiently new version, this error\n");
 
4962
        printf("*** probably means that the wrong copy of the xml-config shell script is\n");
 
4963
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 
4964
        printf("*** of LIBXML, but you can also set the XML_CONFIG environment to point to the\n");
 
4965
        printf("*** correct copy of xml-config. (In this case, you will have to\n");
 
4966
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 
4967
        printf("*** so that the correct libraries are found at run-time))\n");
 
4968
    }
 
4969
  return 1;
 
4970
}
 
4971
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
4972
       CFLAGS="$ac_save_CFLAGS"
 
4973
       LIBS="$ac_save_LIBS"
 
4974
     fi
 
4975
  fi
 
4976
 
 
4977
  if test "x$no_xml" = x ; then
 
4978
     AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
 
4979
     ifelse([$2], , :, [$2])     
 
4980
  else
 
4981
     AC_MSG_RESULT(no)
 
4982
     if test "$XML_CONFIG" = "no" ; then
 
4983
       echo "*** The xml-config script installed by LIBXML could not be found"
 
4984
       echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
 
4985
       echo "*** your path, or set the XML_CONFIG environment variable to the"
 
4986
       echo "*** full path to xml-config."
 
4987
     else
 
4988
       if test -f conf.xmltest ; then
 
4989
        :
 
4990
       else
 
4991
          echo "*** Could not run libxml test program, checking why..."
 
4992
          CFLAGS="$CFLAGS $XML_CFLAGS"
 
4993
          LIBS="$LIBS $XML_LIBS"
 
4994
          AC_TRY_LINK([
 
4995
#include <libxml/tree.h>
 
4996
#include <stdio.h>
 
4997
],      [ LIBXML_TEST_VERSION; return 0;],
 
4998
        [ echo "*** The test program compiled, but did not run. This usually means"
 
4999
          echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
 
5000
          echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
 
5001
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
5002
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
5003
          echo "*** is required on your system"
 
5004
          echo "***"
 
5005
          echo "*** If you have an old version installed, it is best to remove it, although"
 
5006
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
 
5007
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
5008
          echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
 
5009
          echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
 
5010
          echo "*** may want to edit the xml-config script: $XML_CONFIG" ])
 
5011
          CFLAGS="$ac_save_CFLAGS"
 
5012
          LIBS="$ac_save_LIBS"
 
5013
       fi
 
5014
     fi
 
5015
 
 
5016
     XML_CFLAGS=""
 
5017
     XML_LIBS=""
 
5018
     ifelse([$3], , :, [$3])
 
5019
  fi
 
5020
  AC_SUBST(XML_CFLAGS)
 
5021
  AC_SUBST(XML_LIBS)
 
5022
  rm -f conf.xmltest
 
5023
])
 
5024
 
 
5025
# Configure paths for LIBXML2
 
5026
# Toshio Kuratomi 2001-04-21
 
5027
# Adapted from:
 
5028
# Configure paths for GLIB
 
5029
# Owen Taylor     97-11-3
 
5030
 
 
5031
dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
 
5032
dnl Test for XML, and define XML_CFLAGS and XML_LIBS
 
5033
dnl
 
5034
AC_DEFUN(AM_PATH_XML2,[ 
 
5035
AC_ARG_WITH(xml-prefix,
 
5036
            [  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)],
 
5037
            xml_config_prefix="$withval", xml_config_prefix="")
 
5038
AC_ARG_WITH(xml-exec-prefix,
 
5039
            [  --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
 
5040
            xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
 
5041
AC_ARG_ENABLE(xmltest,
 
5042
              [  --disable-xmltest       Do not try to compile and run a test LIBXML program],,
 
5043
              enable_xmltest=yes)
 
5044
 
 
5045
  if test x$xml_config_exec_prefix != x ; then
 
5046
     xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
 
5047
     if test x${XML2_CONFIG+set} != xset ; then
 
5048
        XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
 
5049
     fi
 
5050
  fi
 
5051
  if test x$xml_config_prefix != x ; then
 
5052
     xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
 
5053
     if test x${XML2_CONFIG+set} != xset ; then
 
5054
        XML2_CONFIG=$xml_config_prefix/bin/xml2-config
 
5055
     fi
 
5056
  fi
 
5057
 
 
5058
  AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
 
5059
  min_xml_version=ifelse([$1], ,2.0.0,[$1])
 
5060
  AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
 
5061
  no_xml=""
 
5062
  if test "$XML2_CONFIG" = "no" ; then
 
5063
    no_xml=yes
 
5064
  else
 
5065
    XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
 
5066
    XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
 
5067
    xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
 
5068
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 
5069
    xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
 
5070
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
 
5071
    xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
 
5072
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
 
5073
    if test "x$enable_xmltest" = "xyes" ; then
 
5074
      ac_save_CFLAGS="$CFLAGS"
 
5075
      ac_save_LIBS="$LIBS"
 
5076
      CFLAGS="$CFLAGS $XML_CFLAGS"
 
5077
      LIBS="$XML_LIBS $LIBS"
 
5078
dnl
 
5079
dnl Now check if the installed libxml is sufficiently new.
 
5080
dnl (Also sanity checks the results of xml2-config to some extent)
 
5081
dnl
 
5082
      rm -f conf.xmltest
 
5083
      AC_TRY_RUN([
 
5084
#include <stdlib.h>
 
5085
#include <stdio.h>
 
5086
#include <xmlversion.h>
 
5087
 
 
5088
int 
 
5089
main()
 
5090
{
 
5091
  int xml_major_version, xml_minor_version, xml_micro_version;
 
5092
  int major, minor, micro;
 
5093
  char *tmp_version;
 
5094
 
 
5095
  system("touch conf.xmltest");
 
5096
 
 
5097
  /* Capture xml2-config output via autoconf/configure variables */
 
5098
  /* HP/UX 9 (%@#!) writes to sscanf strings */
 
5099
  tmp_version = (char *)strdup("$min_xml_version");
 
5100
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
 
5101
     printf("%s, bad version string from xml2-config\n", "$min_xml_version");
 
5102
     exit(1);
 
5103
   }
 
5104
   free(tmp_version);
 
5105
 
 
5106
   /* Capture the version information from the header files */
 
5107
   tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
 
5108
   if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
 
5109
     printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
 
5110
     exit(1);
 
5111
   }
 
5112
   free(tmp_version);
 
5113
 
 
5114
 /* Compare xml2-config output to the libxml headers */
 
5115
  if ((xml_major_version != $xml_config_major_version) ||
 
5116
      (xml_minor_version != $xml_config_minor_version) ||
 
5117
      (xml_micro_version != $xml_config_micro_version))
 
5118
    {
 
5119
      printf("*** libxml header files (version %d.%d.%d) do not match\n",
 
5120
         xml_major_version, xml_minor_version, xml_micro_version);
 
5121
      printf("*** xml2-config (version %d.%d.%d)\n",
 
5122
         $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
 
5123
      return 1;
 
5124
    } 
 
5125
/* Compare the headers to the library to make sure we match */
 
5126
  /* Less than ideal -- doesn't provide us with return value feedback, 
 
5127
   * only exits if there's a serious mismatch between header and library.
 
5128
   */
 
5129
    LIBXML_TEST_VERSION;
 
5130
 
 
5131
    /* Test that the library is greater than our minimum version */
 
5132
    if ((xml_major_version > major) ||
 
5133
        ((xml_major_version == major) && (xml_minor_version > minor)) ||
 
5134
        ((xml_major_version == major) && (xml_minor_version == minor) &&
 
5135
        (xml_micro_version >= micro)))
 
5136
      {
 
5137
        return 0;
 
5138
       }
 
5139
     else
 
5140
      {
 
5141
        printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
 
5142
               xml_major_version, xml_minor_version, xml_micro_version);
 
5143
        printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
 
5144
           major, minor, micro);
 
5145
        printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
 
5146
        printf("***\n");
 
5147
        printf("*** If you have already installed a sufficiently new version, this error\n");
 
5148
        printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
 
5149
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
 
5150
        printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
 
5151
        printf("*** correct copy of xml2-config. (In this case, you will have to\n");
 
5152
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
 
5153
        printf("*** so that the correct libraries are found at run-time))\n");
 
5154
    }
 
5155
  return 1;
 
5156
}
 
5157
],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
 
5158
       CFLAGS="$ac_save_CFLAGS"
 
5159
       LIBS="$ac_save_LIBS"
 
5160
     fi
 
5161
  fi
 
5162
 
 
5163
  if test "x$no_xml" = x ; then
 
5164
     AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
 
5165
     ifelse([$2], , :, [$2])     
 
5166
  else
 
5167
     AC_MSG_RESULT(no)
 
5168
     if test "$XML2_CONFIG" = "no" ; then
 
5169
       echo "*** The xml2-config script installed by LIBXML could not be found"
 
5170
       echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
 
5171
       echo "*** your path, or set the XML2_CONFIG environment variable to the"
 
5172
       echo "*** full path to xml2-config."
 
5173
     else
 
5174
       if test -f conf.xmltest ; then
 
5175
        :
 
5176
       else
 
5177
          echo "*** Could not run libxml test program, checking why..."
 
5178
          CFLAGS="$CFLAGS $XML_CFLAGS"
 
5179
          LIBS="$LIBS $XML_LIBS"
 
5180
          AC_TRY_LINK([
 
5181
#include <xmlversion.h>
 
5182
#include <stdio.h>
 
5183
],      [ LIBXML_TEST_VERSION; return 0;],
 
5184
        [ echo "*** The test program compiled, but did not run. This usually means"
 
5185
          echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
 
5186
          echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
 
5187
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
 
5188
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
 
5189
          echo "*** is required on your system"
 
5190
          echo "***"
 
5191
          echo "*** If you have an old version installed, it is best to remove it, although"
 
5192
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
 
5193
        [ echo "*** The test program failed to compile or link. See the file config.log for the"
 
5194
          echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
 
5195
          echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
 
5196
          echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
 
5197
          CFLAGS="$ac_save_CFLAGS"
 
5198
          LIBS="$ac_save_LIBS"
 
5199
       fi
 
5200
     fi
 
5201
 
 
5202
     XML_CFLAGS=""
 
5203
     XML_LIBS=""
 
5204
     ifelse([$3], , :, [$3])
 
5205
  fi
 
5206
  AC_SUBST(XML_CFLAGS)
 
5207
  AC_SUBST(XML_LIBS)
 
5208
  rm -f conf.xmltest
 
5209
])
 
5210
 
 
5211
#serial AM2
 
5212
 
 
5213
dnl From Bruno Haible.
 
5214
 
 
5215
AC_DEFUN([AM_ICONV],
 
5216
[
 
5217
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
5218
  dnl those with the standalone portable GNU libiconv installed).
 
5219
 
 
5220
  AC_ARG_WITH([libiconv-prefix],
 
5221
[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
 
5222
    for dir in `echo "$withval" | tr : ' '`; do
 
5223
      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
 
5224
      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
 
5225
    done
 
5226
   ])
 
5227
 
 
5228
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
5229
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
5230
    am_cv_lib_iconv=no
 
5231
    AC_TRY_LINK([#include <stdlib.h>
 
5232
#include <iconv.h>],
 
5233
      [iconv_t cd = iconv_open("","");
 
5234
       iconv(cd,NULL,NULL,NULL,NULL);
 
5235
       iconv_close(cd);],
 
5236
      am_cv_func_iconv=yes)
 
5237
    if test "$am_cv_func_iconv" != yes; then
 
5238
      am_save_LIBS="$LIBS"
 
5239
      LIBS="$LIBS -liconv"
 
5240
      AC_TRY_LINK([#include <stdlib.h>
 
5241
#include <iconv.h>],
 
5242
        [iconv_t cd = iconv_open("","");
 
5243
         iconv(cd,NULL,NULL,NULL,NULL);
 
5244
         iconv_close(cd);],
 
5245
        am_cv_lib_iconv=yes
 
5246
        am_cv_func_iconv=yes)
 
5247
      LIBS="$am_save_LIBS"
 
5248
    fi
 
5249
  ])
 
5250
  if test "$am_cv_func_iconv" = yes; then
 
5251
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
5252
    AC_MSG_CHECKING([for iconv declaration])
 
5253
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
5254
      AC_TRY_COMPILE([
 
5255
#include <stdlib.h>
 
5256
#include <iconv.h>
 
5257
extern
 
5258
#ifdef __cplusplus
 
5259
"C"
 
5260
#endif
 
5261
#if defined(__STDC__) || defined(__cplusplus)
 
5262
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
5263
#else
 
5264
size_t iconv();
 
5265
#endif
 
5266
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
5267
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
5268
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
5269
    AC_MSG_RESULT([$]{ac_t:-
 
5270
         }[$]am_cv_proto_iconv)
 
5271
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
5272
      [Define as const if the declaration of iconv() needs const.])
 
5273
  fi
 
5274
  LIBICONV=
 
5275
  if test "$am_cv_lib_iconv" = yes; then
 
5276
    LIBICONV="-liconv"
 
5277
  fi
 
5278
  AC_SUBST(LIBICONV)
 
5279
])
 
5280
 
 
5281
# Macro to add for using GNU gettext.
 
5282
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
5283
#
 
5284
# This file can be copied and used freely without restrictions.  It can
 
5285
# be used in projects which are not available under the GNU General Public
 
5286
# License or the GNU Library General Public License but which still want
 
5287
# to provide support for the GNU gettext functionality.
 
5288
# Please note that the actual code of the GNU gettext library is covered
 
5289
# by the GNU Library General Public License, and the rest of the GNU
 
5290
# gettext package package is covered by the GNU General Public License.
 
5291
# They are *not* in the public domain.
 
5292
 
 
5293
# serial 10
 
5294
 
 
5295
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
 
5296
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
 
5297
dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
 
5298
dnl    depending on --{enable,disable}-{shared,static} and on the presence of
 
5299
dnl    AM-DISABLE-SHARED). Otherwise, a static library
 
5300
dnl    $(top_builddir)/intl/libintl.a will be created.
 
5301
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
 
5302
dnl    implementations (in libc or libintl) without the ngettext() function
 
5303
dnl    will be ignored.
 
5304
dnl LIBDIR is used to find the intl libraries.  If empty,
 
5305
dnl    the value `$(top_builddir)/intl/' is used.
 
5306
dnl
 
5307
dnl The result of the configuration is one of three cases:
 
5308
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
 
5309
dnl    and used.
 
5310
dnl    Catalog format: GNU --> install in $(datadir)
 
5311
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
5312
dnl 2) GNU gettext has been found in the system's C library.
 
5313
dnl    Catalog format: GNU --> install in $(datadir)
 
5314
dnl    Catalog extension: .mo after installation, .gmo in source tree
 
5315
dnl 3) No internationalization, always use English msgid.
 
5316
dnl    Catalog format: none
 
5317
dnl    Catalog extension: none
 
5318
dnl The use of .gmo is historical (it was needed to avoid overwriting the
 
5319
dnl GNU format catalogs when building on a platform with an X/Open gettext),
 
5320
dnl but we keep it in order not to force irrelevant filename changes on the
 
5321
dnl maintainers.
 
5322
dnl
 
5323
AC_DEFUN([AM_WITH_NLS],
 
5324
  [AC_MSG_CHECKING([whether NLS is requested])
 
5325
    dnl Default is enabled NLS
 
5326
    AC_ARG_ENABLE(nls,
 
5327
      [  --disable-nls           do not use Native Language Support],
 
5328
      USE_NLS=$enableval, USE_NLS=yes)
 
5329
    AC_MSG_RESULT($USE_NLS)
 
5330
    AC_SUBST(USE_NLS)
 
5331
 
 
5332
    BUILD_INCLUDED_LIBINTL=no
 
5333
    USE_INCLUDED_LIBINTL=no
 
5334
    INTLLIBS=
 
5335
 
 
5336
    dnl If we use NLS figure out what method
 
5337
    if test "$USE_NLS" = "yes"; then
 
5338
      AC_DEFINE(ENABLE_NLS, 1,
 
5339
        [Define to 1 if translation of program messages to the user's native language
 
5340
   is requested.])
 
5341
      AC_MSG_CHECKING([whether included gettext is requested])
 
5342
      AC_ARG_WITH(included-gettext,
 
5343
        [  --with-included-gettext use the GNU gettext library included here],
 
5344
        nls_cv_force_use_gnu_gettext=$withval,
 
5345
        nls_cv_force_use_gnu_gettext=no)
 
5346
      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
 
5347
 
 
5348
      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
 
5349
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
 
5350
        dnl User does not insist on using GNU NLS library.  Figure out what
 
5351
        dnl to use.  If GNU gettext is available we use this.  Else we have
 
5352
        dnl to fall back to GNU NLS library.
 
5353
        CATOBJEXT=NONE
 
5354
 
 
5355
        dnl Add a version number to the cache macros.
 
5356
        define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
 
5357
        define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
 
5358
 
 
5359
        AC_CHECK_HEADER(libintl.h,
 
5360
          [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
 
5361
            [AC_TRY_LINK([#include <libintl.h>
 
5362
extern int _nl_msg_cat_cntr;],
 
5363
               [bindtextdomain ("", "");
 
5364
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
 
5365
               gt_cv_func_gnugettext_libc=yes,
 
5366
               gt_cv_func_gnugettext_libc=no)])
 
5367
 
 
5368
           if test "$gt_cv_func_gnugettext_libc" != "yes"; then
 
5369
             AC_CACHE_CHECK([for GNU gettext in libintl],
 
5370
               gt_cv_func_gnugettext_libintl,
 
5371
               [gt_save_LIBS="$LIBS"
 
5372
                LIBS="$LIBS -lintl $LIBICONV"
 
5373
                AC_TRY_LINK([#include <libintl.h>
 
5374
extern int _nl_msg_cat_cntr;],
 
5375
                  [bindtextdomain ("", "");
 
5376
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
 
5377
                  gt_cv_func_gnugettext_libintl=yes,
 
5378
                  gt_cv_func_gnugettext_libintl=no)
 
5379
                LIBS="$gt_save_LIBS"])
 
5380
           fi
 
5381
 
 
5382
           dnl If an already present or preinstalled GNU gettext() is found,
 
5383
           dnl use it.  But if this macro is used in GNU gettext, and GNU
 
5384
           dnl gettext is already preinstalled in libintl, we update this
 
5385
           dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
 
5386
           if test "$gt_cv_func_gnugettext_libc" = "yes" \
 
5387
              || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
 
5388
                   && test "$PACKAGE" != gettext; }; then
 
5389
             AC_DEFINE(HAVE_GETTEXT, 1,
 
5390
               [Define if the GNU gettext() function is already present or preinstalled.])
 
5391
 
 
5392
             if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
 
5393
               dnl If iconv() is in a separate libiconv library, then anyone
 
5394
               dnl linking with libintl{.a,.so} also needs to link with
 
5395
               dnl libiconv.
 
5396
               INTLLIBS="-lintl $LIBICONV"
 
5397
             fi
 
5398
 
 
5399
             gt_save_LIBS="$LIBS"
 
5400
             LIBS="$LIBS $INTLLIBS"
 
5401
             AC_CHECK_FUNCS(dcgettext)
 
5402
             LIBS="$gt_save_LIBS"
 
5403
 
 
5404
             dnl Search for GNU msgfmt in the PATH.
 
5405
             AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
5406
               [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
 
5407
             AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
5408
 
 
5409
             dnl Search for GNU xgettext in the PATH.
 
5410
             AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
5411
               [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
 
5412
 
 
5413
             CATOBJEXT=.gmo
 
5414
           fi
 
5415
        ])
 
5416
 
 
5417
        if test "$CATOBJEXT" = "NONE"; then
 
5418
          dnl GNU gettext is not found in the C library.
 
5419
          dnl Fall back on GNU gettext library.
 
5420
          nls_cv_use_gnu_gettext=yes
 
5421
        fi
 
5422
      fi
 
5423
 
 
5424
      if test "$nls_cv_use_gnu_gettext" = "yes"; then
 
5425
        dnl Mark actions used to generate GNU NLS library.
 
5426
        INTLOBJS="\$(GETTOBJS)"
 
5427
        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
 
5428
          [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
 
5429
        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
 
5430
        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
 
5431
          [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
 
5432
        AC_SUBST(MSGFMT)
 
5433
        BUILD_INCLUDED_LIBINTL=yes
 
5434
        USE_INCLUDED_LIBINTL=yes
 
5435
        CATOBJEXT=.gmo
 
5436
        INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
 
5437
        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
 
5438
      fi
 
5439
 
 
5440
      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
5441
      dnl Test whether we really found GNU msgfmt.
 
5442
      if test "$GMSGFMT" != ":"; then
 
5443
        dnl If it is no GNU msgfmt we define it as : so that the
 
5444
        dnl Makefiles still can work.
 
5445
        if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
 
5446
          : ;
 
5447
        else
 
5448
          AC_MSG_RESULT(
 
5449
            [found msgfmt program is not GNU msgfmt; ignore it])
 
5450
          GMSGFMT=":"
 
5451
        fi
 
5452
      fi
 
5453
 
 
5454
      dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
 
5455
      dnl Test whether we really found GNU xgettext.
 
5456
      if test "$XGETTEXT" != ":"; then
 
5457
        dnl If it is no GNU xgettext we define it as : so that the
 
5458
        dnl Makefiles still can work.
 
5459
        if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
 
5460
          : ;
 
5461
        else
 
5462
          AC_MSG_RESULT(
 
5463
            [found xgettext program is not GNU xgettext; ignore it])
 
5464
          XGETTEXT=":"
 
5465
        fi
 
5466
      fi
 
5467
 
 
5468
      dnl We need to process the po/ directory.
 
5469
      POSUB=po
 
5470
    fi
 
5471
    AC_OUTPUT_COMMANDS(
 
5472
     [for ac_file in $CONFIG_FILES; do
 
5473
        # Support "outfile[:infile[:infile...]]"
 
5474
        case "$ac_file" in
 
5475
          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
5476
        esac
 
5477
        # PO directories have a Makefile.in generated from Makefile.in.in.
 
5478
        case "$ac_file" in */Makefile.in)
 
5479
          # Adjust a relative srcdir.
 
5480
          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
 
5481
          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
 
5482
          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
 
5483
          # In autoconf-2.13 it is called $ac_given_srcdir.
 
5484
          # In autoconf-2.50 it is called $srcdir.
 
5485
          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
 
5486
          case "$ac_given_srcdir" in
 
5487
            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
 
5488
            /*) top_srcdir="$ac_given_srcdir" ;;
 
5489
            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
5490
          esac
 
5491
          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
 
5492
            rm -f "$ac_dir/POTFILES"
 
5493
            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
 
5494
            sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
 
5495
            test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
 
5496
            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
 
5497
          fi
 
5498
          ;;
 
5499
        esac
 
5500
      done])
 
5501
 
 
5502
 
 
5503
    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
 
5504
    dnl to 'yes' because some of the testsuite requires it.
 
5505
    if test "$PACKAGE" = gettext; then
 
5506
      BUILD_INCLUDED_LIBINTL=yes
 
5507
    fi
 
5508
 
 
5509
    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
 
5510
    dnl because plural.y uses bison specific features. It requires at least
 
5511
    dnl bison-1.26 because earlier versions generate a plural.c that doesn't
 
5512
    dnl compile.
 
5513
    dnl bison is only needed for the maintainer (who touches plural.y). But in
 
5514
    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
 
5515
    dnl the rule in general Makefile. Now, some people carelessly touch the
 
5516
    dnl files or have a broken "make" program, hence the plural.c rule will
 
5517
    dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
 
5518
    dnl present or too old.
 
5519
    AC_CHECK_PROGS([INTLBISON], [bison])
 
5520
    if test -z "$INTLBISON"; then
 
5521
      ac_verc_fail=yes
 
5522
    else
 
5523
      dnl Found it, now check the version.
 
5524
      AC_MSG_CHECKING([version of bison])
 
5525
changequote(<<,>>)dnl
 
5526
      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
 
5527
      case $ac_prog_version in
 
5528
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
 
5529
        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 
5530
changequote([,])dnl
 
5531
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
 
5532
        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
5533
      esac
 
5534
      AC_MSG_RESULT([$ac_prog_version])
 
5535
    fi
 
5536
    if test $ac_verc_fail = yes; then
 
5537
      INTLBISON=:
 
5538
    fi
 
5539
 
 
5540
    dnl These rules are solely for the distribution goal.  While doing this
 
5541
    dnl we only have to keep exactly one list of the available catalogs
 
5542
    dnl in configure.in.
 
5543
    for lang in $ALL_LINGUAS; do
 
5544
      GMOFILES="$GMOFILES $lang.gmo"
 
5545
      POFILES="$POFILES $lang.po"
 
5546
    done
 
5547
 
 
5548
    dnl Make all variables we use known to autoconf.
 
5549
    AC_SUBST(BUILD_INCLUDED_LIBINTL)
 
5550
    AC_SUBST(USE_INCLUDED_LIBINTL)
 
5551
    AC_SUBST(CATALOGS)
 
5552
    AC_SUBST(CATOBJEXT)
 
5553
    AC_SUBST(GMOFILES)
 
5554
    AC_SUBST(INTLLIBS)
 
5555
    AC_SUBST(INTLOBJS)
 
5556
    AC_SUBST(POFILES)
 
5557
    AC_SUBST(POSUB)
 
5558
 
 
5559
    dnl For backward compatibility. Some configure.ins may be using this.
 
5560
    nls_cv_header_intl=
 
5561
    nls_cv_header_libgt=
 
5562
 
 
5563
    dnl For backward compatibility. Some Makefiles may be using this.
 
5564
    DATADIRNAME=share
 
5565
    AC_SUBST(DATADIRNAME)
 
5566
 
 
5567
    dnl For backward compatibility. Some Makefiles may be using this.
 
5568
    INSTOBJEXT=.mo
 
5569
    AC_SUBST(INSTOBJEXT)
 
5570
 
 
5571
    dnl For backward compatibility. Some Makefiles may be using this.
 
5572
    GENCAT=gencat
 
5573
    AC_SUBST(GENCAT)
 
5574
  ])
 
5575
 
 
5576
dnl Usage: Just like AM_WITH_NLS, which see.
 
5577
AC_DEFUN([AM_GNU_GETTEXT],
 
5578
  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 
5579
   AC_REQUIRE([AC_PROG_CC])dnl
 
5580
   AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
5581
   AC_REQUIRE([AC_PROG_RANLIB])dnl
 
5582
   AC_REQUIRE([AC_ISC_POSIX])dnl
 
5583
   AC_REQUIRE([AC_HEADER_STDC])dnl
 
5584
   AC_REQUIRE([AC_C_CONST])dnl
 
5585
   AC_REQUIRE([AC_C_INLINE])dnl
 
5586
   AC_REQUIRE([AC_TYPE_OFF_T])dnl
 
5587
   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
 
5588
   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 
5589
   AC_REQUIRE([AC_FUNC_MMAP])dnl
 
5590
   AC_REQUIRE([jm_GLIBC21])dnl
 
5591
 
 
5592
   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
 
5593
stdlib.h string.h unistd.h sys/param.h])
 
5594
   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
 
5595
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
 
5596
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
 
5597
 
 
5598
   AM_ICONV
 
5599
   AM_LANGINFO_CODESET
 
5600
   AM_LC_MESSAGES
 
5601
   AM_WITH_NLS([$1],[$2],[$3])
 
5602
 
 
5603
   if test "x$CATOBJEXT" != "x"; then
 
5604
     if test "x$ALL_LINGUAS" = "x"; then
 
5605
       LINGUAS=
 
5606
     else
 
5607
       AC_MSG_CHECKING(for catalogs to be installed)
 
5608
       NEW_LINGUAS=
 
5609
       for presentlang in $ALL_LINGUAS; do
 
5610
         useit=no
 
5611
         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
 
5612
           # Use the presentlang catalog if desiredlang is
 
5613
           #   a. equal to presentlang, or
 
5614
           #   b. a variant of presentlang (because in this case,
 
5615
           #      presentlang can be used as a fallback for messages
 
5616
           #      which are not translated in the desiredlang catalog).
 
5617
           case "$desiredlang" in
 
5618
             "$presentlang"*) useit=yes;;
 
5619
           esac
 
5620
         done
 
5621
         if test $useit = yes; then
 
5622
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
 
5623
         fi
 
5624
       done
 
5625
       LINGUAS=$NEW_LINGUAS
 
5626
       AC_MSG_RESULT($LINGUAS)
 
5627
     fi
 
5628
 
 
5629
     dnl Construct list of names of catalog files to be constructed.
 
5630
     if test -n "$LINGUAS"; then
 
5631
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
 
5632
     fi
 
5633
   fi
 
5634
 
 
5635
   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
 
5636
   dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
 
5637
   dnl Try to locate is.
 
5638
   MKINSTALLDIRS=
 
5639
   if test -n "$ac_aux_dir"; then
 
5640
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
 
5641
   fi
 
5642
   if test -z "$MKINSTALLDIRS"; then
 
5643
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
 
5644
   fi
 
5645
   AC_SUBST(MKINSTALLDIRS)
 
5646
 
 
5647
   dnl Enable libtool support if the surrounding package wishes it.
 
5648
   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
 
5649
   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
 
5650
  ])
 
5651
 
 
5652
# Search path for a program which passes the given test.
 
5653
# Ulrich Drepper <drepper@cygnus.com>, 1996.
 
5654
#
 
5655
# This file can be copied and used freely without restrictions.  It can
 
5656
# be used in projects which are not available under the GNU General Public
 
5657
# License or the GNU Library General Public License but which still want
 
5658
# to provide support for the GNU gettext functionality.
 
5659
# Please note that the actual code of the GNU gettext library is covered
 
5660
# by the GNU Library General Public License, and the rest of the GNU
 
5661
# gettext package package is covered by the GNU General Public License.
 
5662
# They are *not* in the public domain.
 
5663
 
 
5664
# serial 2
 
5665
 
 
5666
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
 
5667
dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
 
5668
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
 
5669
[# Extract the first word of "$2", so it can be a program name with args.
 
5670
set dummy $2; ac_word=[$]2
 
5671
AC_MSG_CHECKING([for $ac_word])
 
5672
AC_CACHE_VAL(ac_cv_path_$1,
 
5673
[case "[$]$1" in
 
5674
  /*)
 
5675
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
 
5676
  ;;
 
5677
  *)
 
5678
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
 
5679
  for ac_dir in ifelse([$5], , $PATH, [$5]); do
 
5680
    test -z "$ac_dir" && ac_dir=.
 
5681
    if test -f $ac_dir/$ac_word; then
 
5682
      if [$3]; then
 
5683
        ac_cv_path_$1="$ac_dir/$ac_word"
 
5684
        break
 
5685
      fi
 
5686
    fi
 
5687
  done
 
5688
  IFS="$ac_save_ifs"
 
5689
dnl If no 4th arg is given, leave the cache variable unset,
 
5690
dnl so AC_PATH_PROGS will keep looking.
 
5691
ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
 
5692
])dnl
 
5693
  ;;
 
5694
esac])dnl
 
5695
$1="$ac_cv_path_$1"
 
5696
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 
5697
  AC_MSG_RESULT([$]$1)
 
5698
else
 
5699
  AC_MSG_RESULT(no)
 
5700
fi
 
5701
AC_SUBST($1)dnl
 
5702
])
 
5703
 
 
5704
#serial 2
 
5705
 
 
5706
# Test for the GNU C Library, version 2.1 or newer.
 
5707
# From Bruno Haible.
 
5708
 
 
5709
AC_DEFUN([jm_GLIBC21],
 
5710
  [
 
5711
    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
 
5712
      ac_cv_gnu_library_2_1,
 
5713
      [AC_EGREP_CPP([Lucky GNU user],
 
5714
        [
 
5715
#include <features.h>
 
5716
#ifdef __GNU_LIBRARY__
 
5717
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
 
5718
  Lucky GNU user
 
5719
 #endif
 
5720
#endif
 
5721
        ],
 
5722
        ac_cv_gnu_library_2_1=yes,
 
5723
        ac_cv_gnu_library_2_1=no)
 
5724
      ]
 
5725
    )
 
5726
    AC_SUBST(GLIBC21)
 
5727
    GLIBC21="$ac_cv_gnu_library_2_1"
 
5728
  ]
 
5729
)
 
5730
 
 
5731
#serial AM1
 
5732
 
 
5733
dnl From Bruno Haible.
 
5734
 
 
5735
AC_DEFUN([AM_LANGINFO_CODESET],
 
5736
[
 
5737
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
 
5738
    [AC_TRY_LINK([#include <langinfo.h>],
 
5739
      [char* cs = nl_langinfo(CODESET);],
 
5740
      am_cv_langinfo_codeset=yes,
 
5741
      am_cv_langinfo_codeset=no)
 
5742
    ])
 
5743
  if test $am_cv_langinfo_codeset = yes; then
 
5744
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
 
5745
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 
5746
  fi
 
5747
])
 
5748
 
 
5749
# Check whether LC_MESSAGES is available in <locale.h>.
 
5750
# Ulrich Drepper <drepper@cygnus.com>, 1995.
 
5751
#
 
5752
# This file can be copied and used freely without restrictions.  It can
 
5753
# be used in projects which are not available under the GNU General Public
 
5754
# License or the GNU Library General Public License but which still want
 
5755
# to provide support for the GNU gettext functionality.
 
5756
# Please note that the actual code of the GNU gettext library is covered
 
5757
# by the GNU Library General Public License, and the rest of the GNU
 
5758
# gettext package package is covered by the GNU General Public License.
 
5759
# They are *not* in the public domain.
 
5760
 
 
5761
# serial 2
 
5762
 
 
5763
AC_DEFUN([AM_LC_MESSAGES],
 
5764
  [if test $ac_cv_header_locale_h = yes; then
 
5765
    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
 
5766
      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
 
5767
       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
 
5768
    if test $am_cv_val_LC_MESSAGES = yes; then
 
5769
      AC_DEFINE(HAVE_LC_MESSAGES, 1,
 
5770
        [Define if your <locale.h> file defines LC_MESSAGES.])
 
5771
    fi
 
5772
  fi])
 
5773