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