From: Bdale Garbee Date: Wed, 22 Oct 2008 16:12:03 +0000 (+0200) Subject: Merge branch 'upstream' X-Git-Tag: debian/2.6.1p1-1~38 X-Git-Url: https://git.gag.com/?p=debian%2Famanda;a=commitdiff_plain;h=e442edb4d5816c4ad107ad9e71164f845eba70ad Merge branch 'upstream' Conflicts: AUTHORS ChangeLog Makefile.am Makefile.in NEWS ReleaseNotes acinclude.m4 aclocal.m4 amandad-src/Makefile.am amandad-src/Makefile.in amandad-src/amandad.c amandad-src/amandad.h amandad-src/amandad_util.c amplot/Makefile.am amplot/Makefile.in amplot/amplot.sh autogen changer-src/Makefile.am changer-src/Makefile.in changer-src/chg-disk.sh changer-src/chg-lib.sh.in changer-src/chg-manual.sh.in changer-src/chg-mtx.sh changer-src/chg-multi.sh changer-src/chg-null.sh changer-src/chg-scsi-chio.c changer-src/chg-scsi.c changer-src/chg-zd-mtx.sh changer-src/scsi-aix.c changer-src/scsi-bsd.c changer-src/scsi-cam.c changer-src/scsi-changer-driver.c changer-src/scsi-chio.c changer-src/scsi-hpux.c changer-src/scsi-hpux_new.c changer-src/scsi-irix.c changer-src/scsi-linux.c changer-src/scsi-solaris.c changer-src/sense.c client-src/Makefile.am client-src/Makefile.in client-src/amandates.c client-src/calcsize.c client-src/client_util.c client-src/client_util.h client-src/getfsent.c client-src/killpgrp.c client-src/noop.c client-src/rundump.c client-src/runtar.c client-src/selfcheck.c client-src/sendbackup-dump.c client-src/sendbackup-gnutar.c client-src/sendbackup.c client-src/sendsize.c client-src/versionsuffix.c common-src/Makefile.am common-src/Makefile.in common-src/alloc.c common-src/amanda.h common-src/amfeatures.c common-src/amflock-test.c common-src/amflock.c common-src/arglist.h common-src/bsd-security.c common-src/bsdtcp-security.c common-src/bsdudp-security.c common-src/clock.c common-src/clock.h common-src/columnar.h common-src/conffile.c common-src/conffile.h common-src/debug.c common-src/dgram.c common-src/dgram.h common-src/error.c common-src/event.c common-src/event.h common-src/file.c common-src/fileheader.c common-src/fileheader.h common-src/genversion.c common-src/krb4-security.c common-src/krb5-security.c common-src/match.c common-src/memmove.c common-src/packet.c common-src/packet.h common-src/pipespawn.c common-src/protocol.c common-src/regerror.c common-src/rsh-security.c common-src/security-util.c common-src/security-util.h common-src/security.c common-src/security.h common-src/ssh-security.c common-src/statfs.c common-src/stream.c common-src/stream.h common-src/strstr.c common-src/tapelist.c common-src/tapelist.h common-src/tapelist.h~HEAD common-src/token.c common-src/token.h common-src/util.c common-src/util.h common-src/version.c common-src/versuff.c config/Makefile.in config/acinclude.m4i config/config.guess config/config.h.in config/config.rpath config/config.sub config/depcomp config/gnulib/absolute-header.m4 config/gnulib/extensions.m4 config/gnulib/getaddrinfo.m4 config/gnulib/gnulib-cache.m4 config/gnulib/gnulib-comp.m4 config/gnulib/lock.m4 config/gnulib/netinet_in_h.m4 config/gnulib/snprintf.m4 config/gnulib/socklen.m4 config/gnulib/string_h.m4 config/gnulib/sys_socket_h.m4 config/gnulib/vasnprintf.m4 config/gnulib/wint_t.m4 config/install-sh config/libtool.m4 config/ltmain.sh config/missing config/mkinstalldirs configure configure.in contrib/set_prod_link.pl debian/copyright docs/Makefile.am docs/Makefile.in dumper-src/Makefile.am dumper-src/Makefile.in example/Makefile.am example/Makefile.in example/amanda-client.conf.in example/amanda.conf.in example/chg-mcutil.conf gnulib/Makefile.am gnulib/Makefile.in gnulib/alloca_.h gnulib/getaddrinfo.c gnulib/printf-args.c gnulib/printf-args.h gnulib/printf-parse.c gnulib/printf-parse.h gnulib/regenerate/getaddrinfo-cygwin.patch gnulib/regenerate/no-error.patch gnulib/regenerate/regenerate gnulib/snprintf.c gnulib/stdbool_.h gnulib/string_.h gnulib/vasnprintf.c gnulib/vasnprintf.h man/Makefile.am man/Makefile.in man/amadmin.8 man/amaespipe.8 man/amanda-client.conf.5 man/amanda.8 man/amanda.conf.5 man/amcheck.8 man/amcheckdb.8 man/amcleanup.8 man/amcrypt-ossl-asym.8 man/amcrypt-ossl.8 man/amcrypt.8 man/amdd.8 man/amdump.8 man/amfetchdump.8 man/amflush.8 man/amgetconf.8 man/amlabel.8 man/ammt.8 man/amoverview.8 man/amplot.8 man/amrecover.8 man/amreport.8 man/amrestore.8 man/amrmtape.8 man/amstatus.8 man/amtape.8 man/amtapetype.8 man/amtoc.8 man/amverify.8 man/amverifyrun.8 man/xml-source/amadmin.8.xml man/xml-source/amaespipe.8.xml man/xml-source/amanda-client.conf.5.xml man/xml-source/amanda.8.xml man/xml-source/amanda.conf.5.xml man/xml-source/amcheck.8.xml man/xml-source/amcheckdb.8.xml man/xml-source/amcleanup.8.xml man/xml-source/amcrypt-ossl-asym.8.xml man/xml-source/amcrypt-ossl.8.xml man/xml-source/amcrypt.8.xml man/xml-source/amdd.8.xml man/xml-source/amdump.8.xml man/xml-source/amfetchdump.8.xml man/xml-source/amflush.8.xml man/xml-source/amgetconf.8.xml man/xml-source/amlabel.8.xml man/xml-source/ammt.8.xml man/xml-source/amoverview.8.xml man/xml-source/amplot.8.xml man/xml-source/amrecover.8.xml man/xml-source/amreport.8.xml man/xml-source/amrestore.8.xml man/xml-source/amrmtape.8.xml man/xml-source/amstatus.8.xml man/xml-source/amtape.8.xml man/xml-source/amtapetype.8.xml man/xml-source/amtoc.8.xml man/xml-source/amverify.8.xml man/xml-source/amverifyrun.8.xml oldrecover-src/Makefile.am oldrecover-src/Makefile.in oldrecover-src/amrecover.c oldrecover-src/display_commands.c oldrecover-src/extract_list.c oldrecover-src/help.c oldrecover-src/set_commands.c oldrecover-src/uparse.c oldrecover-src/uparse.y oldrecover-src/uscan.c oldrecover-src/uscan.l recover-src/Makefile.am recover-src/Makefile.in recover-src/amrecover.c recover-src/amrecover.h recover-src/display_commands.c recover-src/extract_list.c recover-src/help.c recover-src/set_commands.c recover-src/uparse.c recover-src/uparse.h recover-src/uparse.y recover-src/uscan.c recover-src/uscan.l restore-src/Makefile.am restore-src/Makefile.in restore-src/amfetchdump.c restore-src/amidxtaped.c restore-src/amrestore.c restore-src/restore.c restore-src/restore.h server-src/Makefile.am server-src/Makefile.in server-src/amadmin.c server-src/amcheck.c server-src/amcleanup.sh.in server-src/amcleanupdisk.c server-src/amdump.sh server-src/amflush.c server-src/amfreetapes.sh.in server-src/amindex.c server-src/amindexd.c server-src/amlabel.c server-src/amlogroll.c server-src/amoverview.pl.in server-src/amstatus.pl.in server-src/amtape.c server-src/amtrmidx.c server-src/amtrmlog.c server-src/amverify.sh server-src/amverifyrun.sh.in server-src/changer.c server-src/chunker.c server-src/cmdline.c server-src/cmdline.h server-src/disk_history.c server-src/disk_history.h server-src/diskfile.c server-src/diskfile.h server-src/driver.c server-src/driverio.c server-src/driverio.h server-src/dumper.c server-src/find.c server-src/find.h server-src/getconf.c server-src/holding.c server-src/holding.h server-src/infofile.c server-src/infofile.h server-src/logfile.c server-src/logfile.h server-src/planner.c server-src/reporter.c server-src/server_util.c server-src/server_util.h server-src/tapefile.c server-src/tapefile.h server-src/taper.c server-src/taperscan.c server-src/taperscan.h tape-src/Makefile.am tape-src/Makefile.in tape-src/amdd.c tape-src/ammt.c tape-src/output-file.c tape-src/output-rait.c tape-src/output-tape.c tape-src/tapeio.c tape-src/tapeio.h tape-src/tapetype.c --- e442edb4d5816c4ad107ad9e71164f845eba70ad diff --cc ChangeLog index fbba979,e671971..271276c --- a/ChangeLog +++ b/ChangeLog @@@ -3660,7 -6518,7 +6518,7 @@@ 2006-02-03 Ian Turner * server-src/amadmin.c (main): Don't free conf_tapelist too -- early. Thanks to Cédric Lucantis ++ early. Thanks to Cédric Lucantis for the patch. 2006-02-02 Kevin Till @@@ -10553,7 -13411,7 +13411,7 @@@ * server-src/amverify.sh.in: Wait until device becomes ready after rewinding. --1999-06-15 Björn Brezger , Alexandre Oliva ++1999-06-15 Björn Brezger , Alexandre Oliva * client-src/calcsize.c (ROUND): Rewrite, it was broken. Reported by Erik Lindahl @@@ -14240,7 -17098,7 +17098,7 @@@ * example/Makefile.am (EXTRA_DIST): add DIN-A4.ps --1998-08-07 Günter Felkel ++1998-08-07 Günter Felkel * example/DIN-A4.ps: new file @@@ -15054,7 -17912,7 +17912,7 @@@ Version 2.4.0p -Rob Riggs pass kerberos encryption switch to client. -- -Fredrik Jönsson ++ -Fredrik Jönsson rename afree to amfree, to work around IRIX 6.4's afree. -oliva, reported Stephan P. Martin diff --cc Makefile.in index 1679e3c,ac65c5e..209160d --- a/Makefile.in +++ b/Makefile.in @@@ -230,10 -421,9 +423,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc amandad-src/amandad.h index 471f73c,471f73c..0000000 deleted file mode 100644,100644 --- a/amandad-src/amandad.h +++ /dev/null @@@ -1,56 -1,56 +1,0 @@@ --/* -- * Amanda, The Advanced Maryland Automatic Network Disk Archiver -- * Copyright (c) 1991-1998 University of Maryland at College Park -- * All Rights Reserved. -- * -- * Permission to use, copy, modify, distribute, and sell this software and its -- * documentation for any purpose is hereby granted without fee, provided that -- * the above copyright notice appear in all copies and that both that -- * copyright notice and this permission notice appear in supporting -- * documentation, and that the name of U.M. not be used in advertising or -- * publicity pertaining to distribution of the software without specific, -- * written prior permission. U.M. makes no representations about the -- * suitability of this software for any purpose. It is provided "as is" -- * without express or implied warranty. -- * -- * U.M. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL -- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL U.M. -- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- * -- * Authors: the Amanda Development Team. Its members are listed in a -- * file named AUTHORS, in the root directory of this distribution. -- */ --/* -- * $Id: amandad.h,v 1.5 2006/07/19 17:46:07 martinea Exp $ -- * -- */ -- --#ifndef AMANDAD_UTIL_H --#define AMANDAD_UTIL_H -- --#include "amanda.h" --#include "amfeatures.h" --#include "sl.h" --#include "util.h" /* for bstrncmp() */ -- --#define DATA_FD_COUNT 3 /* number of general-use pipes */ --#define DATA_FD_OFFSET 50 -- --typedef struct g_option_s { -- char *str; -- am_feature_t *features; -- char *hostname; -- char *auth; -- int maxdumps; -- char *config; --} g_option_t; -- -- --void init_g_options(g_option_t *g_options); --g_option_t *parse_g_options(char *str, int verbose); --void free_g_options(g_option_t *); -- --#endif diff --cc amplot/Makefile.in index a0c2eda,f2e6b09..12179cb --- a/amplot/Makefile.in +++ b/amplot/Makefile.in @@@ -211,10 -515,9 +517,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc amplot/amplot.sh index fe47bcc,fe47bcc..cfbe3f9 --- a/amplot/amplot.sh +++ b/amplot/amplot.sh @@@ -48,7 -48,7 +48,8 @@@ confdir=@CONFIG_DIR PATH="$PATH:/usr/sbin:/sbin:/usr/ucb" export PATH --# we use a different version of the compression variable than amanda itself. ++AWK=@AWK@ ++GNUPLOT=@GNUPLOT@ COMPRESS=@AMPLOT_COMPRESS@ # Function to check that awk can do command-line variable diff --cc changer-src/Makefile.in index a161797,fb70087..6c5552c --- a/changer-src/Makefile.in +++ b/changer-src/Makefile.in @@@ -254,10 -580,9 +582,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc client-src/Makefile.in index b797c1b,e830366..9a1d003 --- a/client-src/Makefile.in +++ b/client-src/Makefile.in @@@ -328,10 -620,9 +622,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc client-src/getfsent.c index 03e68d8,6f0f275..496c4e1 --- a/client-src/getfsent.c +++ b/client-src/getfsent.c @@@ -659,10 -666,8 +666,10 @@@ main /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); + malloc_size_1 = malloc_inuse(&malloc_hist_1); + if(!open_fstab()) { - fprintf(stderr, "getfsent_test: could not open fstab\n"); + g_fprintf(stderr, _("getfsent_test: could not open fstab\n")); return 1; } diff --cc client-src/killpgrp.c index e2b983d,d747294..3749e32 --- a/client-src/killpgrp.c +++ b/client-src/killpgrp.c @@@ -98,9 -100,9 +100,10 @@@ main /*NOTREACHED*/ } + /* Consume any extranious input */ signal(SIGTERM, term_kill_soft); + /* Consume any extranious input */ do { ch = getchar(); /* wait until EOF */ diff --cc client-src/sendbackup.c index 9cfa397,9f26daf..2e91c9b --- a/client-src/sendbackup.c +++ b/client-src/sendbackup.c @@@ -193,11 -193,8 +193,9 @@@ main char *line = NULL; char *err_extra = NULL; char *s; + char *conffile; int i; int ch; - unsigned long malloc_hist_1, malloc_size_1; - unsigned long malloc_hist_2, malloc_size_2; FILE *toolin; int status; @@@ -752,13 -747,11 +748,12 @@@ check_status return 0; /* normal exit */ } + snprintf(numberpid, SIZEOF(number), "%d", (int)pid); if(ret == 0) { - snprintf(number, SIZEOF(number), "%d", sig); - thiserr = vstralloc(strX, "(", numberpid, ") ", str, " got signal ", number, NULL); + thiserr = vstrallocf(_("%s (%d) %s got signal %d"), strX, (int)pid, str, + sig); } else { - snprintf(number, SIZEOF(number), "%d", ret); - thiserr = vstralloc(strX, "(", numberpid, ") ", str, " returned ", number, NULL); + thiserr = vstrallocf(_("%s (%d) %s returned %d"), strX, (int)pid, str, ret); } if(errorstr) { diff --cc common-src/Makefile.am index 672eb19,91a42a1..488b276 --- a/common-src/Makefile.am +++ b/common-src/Makefile.am @@@ -68,16 -120,22 +120,26 @@@ noinst_HEADERS = util.h \ version.h +.sh: + cat $< > $@ + chmod a+x $@ + EXTRA_PROGRAMS = genversion $(TEST_PROGS) - genversion_SOURCES = genversion.c - genversion_LDADD = $(libamanda_la_LIBADD) versuff.lo + # Version-building steps: + # + # 1. configure builds svn-info.h, if svn info is available; this + # file is included in distribution tarballs + # 2. Makefile creates genversion.h with build-time information + # 3. Makefile builds genversion + # 4. Makefile runs genversion to create version.c + # 5. version.c is compiled into libamanda normally + + genversion_SOURCES = genversion.c genversion.h svn-info.h + genversion_LDADD = $(libamanda_la_LIBADD) \ + versuff.lo \ + ../gnulib/libgnu.la - genversion.@OBJEXT@: genversion.h genversion.h: $(top_builddir)/config.status -rm -f $@ $@.new echo '#define CC "$(CC)"' > $@.new diff --cc common-src/Makefile.in index e22c64b,b88a973..af31e0a --- a/common-src/Makefile.in +++ b/common-src/Makefile.in @@@ -264,10 -621,9 +623,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc common-src/amflock.c index cc1cd4e,c105996..2b012e3 --- a/common-src/amflock.c +++ b/common-src/amflock.c @@@ -41,284 -41,65 +41,67 @@@ ** blocking file locks as used by Amanda. ** USE_LNLOCK - Home brew exclusive, blocking file lock. ** - No locking available. User beware! - ** - "configure" compiles this with -DCONFIGURE_TEST to try and determine - ** whether a particular type of locking works. */ + /* FIXME: This code has several limitations to be fixed: + * - It should be possible to select a locking mode (or detect the + * best mode for a particular filesystem) at runtime. + * - There should be a locking mode that works with NFS filesystems. + * - Semantics should be clear when different parts of a single + * process (possibly in the same/different threads) both try to lock + * the same file (but with different file descriptors). + * - It should be possible to promote a read-only lock to an + * exclusive lock. + * - Arbitrary strings should be useable as resource names. */ + #include "amanda.h" + /* Interface to the implementations in common-src/amflock-*.c */ - #if defined(USE_POSIX_FCNTL) - static struct flock lock; /* zero-initialized */ + #ifdef WANT_AMFLOCK_POSIX + extern amflock_impl_t amflock_posix_impl; #endif - - #if !defined(USE_POSIX_FCNTL) && defined(USE_FLOCK) - # ifdef HAVE_SYS_FILE_H - # include - # endif - - # if !defined(HAVE_FLOCK_DECL) && !defined(CONFIGURE_TEST) - extern int flock(int fd, int operation); - # endif + #ifdef WANT_AMFLOCK_FLOCK + extern amflock_impl_t amflock_flock_impl; #endif - - - #if !defined(USE_POSIX_FCNTL) && !defined(USE_FLOCK) && defined(USE_LOCKF) - - /* XPG4-UNIX (eg, SGI IRIX, DEC DU) has F_ULOCK instead of F_UNLOCK */ - #if defined(F_ULOCK) && !defined(F_UNLOCK) - # define F_UNLOCK F_ULOCK + #ifdef WANT_AMFLOCK_LOCKF + extern amflock_impl_t amflock_lockf_impl; #endif - - /* Lock a file using lockf(). - ** Notes: - ** - returns errors for some non-files like pipes. - ** - probably only works for files open for writing. - */ - int - use_lockf( - int fd, /* fd of file to operate on */ - int op) /* true to lock; false to unlock */ - { - off_t pos; - - if (op) { - /* lock from here on */ - if (lockf(fd, F_LOCK, (off_t)0) == -1) return -1; - } - else { - /* unlock from here on */ - if (lockf(fd, F_UNLOCK, (off_t)0) == -1) return -1; - - /* unlock from bof to here */ - pos = lseek(fd, (off_t)0, SEEK_CUR); - if (pos == (off_t)-1) { - if (errno == ESPIPE) pos = (off_t)0; - else return -1; - } - - if (pos > (off_t)0 && - lockf(fd, F_UNLOCK, -pos) == -1) return -1; - } - - return 0; - } - + #ifdef WANT_AMFLOCK_LNLOCK + extern amflock_impl_t amflock_lnlock_impl; #endif - #if !defined(USE_POSIX_FCNTL) && !defined(USE_FLOCK) && !defined(USE_LOCKF) && defined(USE_LNLOCK) - /* XXX - error checking in this section needs to be tightened up */ - - /* Delete a lock file. - */ - int - delete_lock( - char *fn) - { - int rc; - - rc = unlink(fn); - if (rc != 0 && errno == ENOENT) rc = 0; - - return rc; - } - - /* Create a lock file. - */ - int - create_lock( - char *fn, - pid_t pid) - { - int fd; - FILE *f; - int mask; - - (void)delete_lock(fn); /* that's MY file! */ - - mask = umask(0027); - fd = open(fn, O_WRONLY | O_CREAT | O_EXCL, 0640); - umask(mask); - if (fd == -1) return -1; - - if((f = fdopen(fd, "w")) == NULL) { - aclose(fd); - return -1; - } - fprintf(f, "%ld\n", pid); - if (fclose(f) == EOF) - return -1; - return 0; - } - - /* Read the pid out of a lock file. - ** -1=error, otherwise pid. - */ - long - read_lock( - char * fn) /* name of lock file */ - { - int save_errno; - FILE *f; - long pid; - - if ((f = fopen(fn, "r")) == NULL) { - return -1; - } - if (fscanf(f, "%ld", &pid) != 1) { - save_errno = errno; - afclose(f); - errno = save_errno; - return -1; - } - if (fclose(f) != 0) { - return -1; - } - return pid; - } - - /* Link a lock if we can. - ** 0=done, 1=already locked, -1=error. - */ - int - link_lock( - char * lk, /* real lock file */ - char * tlk) /* temp lock file */ - { - int rc; - int serrno; /* saved errno */ - struct stat lkstat, tlkstat; - - /* an atomic check and set operation */ - rc = link(tlk, lk); - if (rc == 0) return 0; /* XXX do we trust it? */ - - /* link() says it failed - don't beleive it */ - serrno = errno; - - if (stat(lk, &lkstat) == 0 && - stat(tlk, &tlkstat) == 0 && - lkstat.st_ino == tlkstat.st_ino) - return 0; /* it did work! */ - - errno = serrno; - - if (errno == EEXIST) rc = 1; - - return rc; - } - - /* Steal a lock if we can. - ** 0=done; 1=still in use; -1 = error. - */ - int - steal_lock( - char * fn, /* name of lock file to steal */ - pid_t mypid, /* my process id */ - char * sres) /* name of steal-resource to lock */ - { - int fd; - char buff[64]; - long pid; - int rc; - - /* prevent a race with another stealer */ - rc = ln_lock(sres, 1); - if (rc != 0) goto error; - - pid = read_lock(fn); - if (pid == -1) { - if (errno == ENOENT) goto done; - goto error; - } - - if (pid == mypid) goto steal; /* i'm the locker! */ - - /* are they still there ? */ - rc = kill((pid_t)pid, 0); - if (rc != 0) { - if (errno == ESRCH) goto steal; /* locker has gone */ - goto error; - } - - inuse: - rc = ln_lock(sres, 0); - if (rc != 0) goto error; - - return 1; - - steal: - rc = delete_lock(fn); - if (rc != 0) goto error; - - done: - rc = ln_lock(sres, 0); - if (rc != 0) goto error; - - return 0; - - error: - rc = ln_lock(sres, 0); + amflock_impl_t *amflock_impls[] = { + #ifdef WANT_AMFLOCK_POSIX + &amflock_posix_impl, + #endif + #ifdef WANT_AMFLOCK_FLOCK + &amflock_flock_impl, + #endif + #ifdef WANT_AMFLOCK_LOCKF + &amflock_lockf_impl, + #endif + #ifdef WANT_AMFLOCK_LNLOCK + &amflock_lnlock_impl, + #endif + NULL + }; - return -1; - } + /* Interface functions */ + /* FIXME: for now, these just use the first non-NULL implementation + */ -/* Get a file lock (for read/write files). +/* Locking using existance of a file. */ int - ln_lock( - char * res, /* name of resource to lock */ - int op) /* true to lock; false to unlock */ + amflock( + int fd, + char * resource) { - long mypid; - char *lockfile = NULL; - char *tlockfile = NULL; - char *mres = NULL; - int rc; - char pid_str[NUM_STR_SIZE]; - - mypid = (long)getpid(); - - lockfile = vstralloc(AMANDA_TMPDIR, "/am", res, ".lock", NULL); - - if (!op) { - /* unlock the resource */ - assert(read_lock(lockfile) == mypid); - - (void)delete_lock(lockfile); - amfree(lockfile); - return 0; - } - - /* lock the resource */ - - snprintf(pid_str, SIZEOF(pid_str), "%ld", mypid); - tlockfile = vstralloc(AMANDA_TMPDIR, "am", res, ".", pid_str, NULL); - - (void)create_lock(tlockfile, mypid); - - mres = stralloc2(res, "."); - - while(1) { - rc = link_lock(lockfile, tlockfile); - if (rc == -1) break; - if (rc == 0) break; - - rc = steal_lock(lockfile, mypid, mres); - if (rc == -1) break; - if (rc == 0) continue; - sleep(1); - } - - (void) delete_lock(tlockfile); - - amfree(mres); - amfree(tlockfile); - amfree(lockfile); - - return rc; + if (!amflock_impls[0]) return 0; /* no locking */ + return amflock_impls[0]->amflock_impl(fd, resource); } +#endif + /* * Get a file lock (for read-only files). diff --cc config/Makefile.am index bf61cb0,489e52c..6e32254 --- a/config/Makefile.am +++ b/config/Makefile.am @@@ -1,11 -1,9 +1,10 @@@ ## Process this file with automake to produce Makefile.in - EXTRA_DIST = acinclude.m4i \ - config.guess \ + EXTRA_DIST = config.guess \ config.sub \ + gnulib.m4i \ install-sh \ - libtool.m4i \ + libtool.m4 \ ltmain.sh \ missing \ mkinstalldirs diff --cc config/Makefile.in index bf8205d,7f0a293..3f046b7 --- a/config/Makefile.in +++ b/config/Makefile.in @@@ -197,10 -378,9 +380,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc config/config.h.in index 0f02920,5c2d004..2196c49 --- a/config/config.h.in +++ b/config/config.h.in @@@ -1482,12 -1572,9 +1587,12 @@@ first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN - /* Define if IPv6 is working. */ + /* Target system has functional IPv6 support */ #undef WORKING_IPV6 +/* Define on XENIX/ISC. */ +#undef XENIX_TAPEIO + /* Define the location of the xfsdump program on Irix hosts. */ #undef XFSDUMP diff --cc configure index 08704fb,49ddd55..d90c7e7 --- a/configure +++ b/configure @@@ -1557,18 -2459,7 +2459,12 @@@ echo "$as_me: error: run \`make distcle { (exit 1); exit 1; }; } fi - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - +gl_header_list="$gl_header_list arpa/inet.h" +gl_header_list="$gl_header_list sys/socket.h" +gl_header_list="$gl_header_list netinet/in.h" +gl_header_list="$gl_header_list netdb.h" +gl_header_list="$gl_header_list string.h" @@@ -2123,65 -3100,54 +3105,65 @@@ ac_config_headers="$ac_config_headers c +if test -f "$srcdir/SNAPSHOT"; then + cat < "$srcdir/SNAPSHOT" - snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT` + # + # Take care of some early Amanda-specific setup + # - test -z "$snapdate" || VERSION="$VERSION-$snapdate" - SNAPSHOT_STAMP=SNAPSHOT - else - SNAPSHOT_STAMP= - fi + # initialize warnings file + rm -f config.warnings - if test -f config.local; then - echo "running local script ./config.local" - . ./config.local - fi + if test -f "$srcdir/SNAPSHOT"; then + cat < "$srcdir/SNAPSHOT" + snapdate=`sed -n '/^Snapshot Date: \([0-9]*\)/ s//\1/p' < $srcdir/SNAPSHOT` - VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'` - VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'` - VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` - VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\" + test -z "$snapdate" || VERSION="$VERSION-$snapdate" + SNAPSHOT_STAMP=SNAPSHOT + else + SNAPSHOT_STAMP= + fi +VERSION_SUFFIX="$VERSION" + VERSION_MAJOR=`expr "$VERSION" : '\([0-9]*\)'` + VERSION_MINOR=`expr "$VERSION" : '[0-9]*\.\([0-9]*\)'` + VERSION_PATCH=`expr "$VERSION" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` + VERSION_COMMENT=\"`expr "$VERSION" : '[0-9]*\.[0-9]*\.[0-9]*\(.*\)'`\" + VERSION_SUFFIX="$VERSION" - SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc" - LOCPATH=`( - test "x$prefix" = xNONE && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix=${prefix} - eval echo "$libexecdir:$PATH:/usr/local/sbin:/usr/local/bin:/usr/ccs/bin" - )` - SYSLOCPATH="$SYSPATH:$LOCPATH" - LOCSYSPATH="$LOCPATH:$SYSPATH" - # Check whether --with-cflags or --without-cflags was given. - if test "${with_cflags+set}" = set; then - withval="$with_cflags" + case "$withval" in + "" | y | ye | yes | n | no) + { { echo "$as_me:$LINENO: error: *** You must supply an argument to the --with-cflags option." >&5 +echo "$as_me: error: *** You must supply an argument to the --with-cflags option." >&2;} + { (exit 1); exit 1; }; } + ;; + esac + CFLAGS="$withval" - fi; + if test -f config.local; then + echo "running local script ./config.local" + . ./config.local + fi - CFLAGS="-D_GNU_SOURCE $CFLAGS" + # + # Set up compiler location, basic flags, and include locations + # and library locations before we start checking the system + # configuration in more detail... + # ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@ -2296,56 -3280,15 +3296,19 @@@ f fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 - echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 + echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - - fi - if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 - echo "$as_me:$LINENO: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done - done - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 - echo "${ECHO_T}$ac_ct_CC" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } fi + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. @@@ -2952,160 -4046,21 +4066,161 @@@ rm -f conftest.$ac_ex CC=$ac_save_CC fi - - case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 - echo "${ECHO_T}none needed" >&6 ;; + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 + echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 + echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@@ -3608,52 -4571,170 +4731,182 @@@ ac_link='$CC -o conftest$ac_exeext $CFL ac_compiler_gnu=$ac_cv_c_compiler_gnu - echo "$as_me:$LINENO: checking for egrep" >&5 - echo $ECHO_N "checking for egrep... $ECHO_C" >&6 - if test "${ac_cv_prog_egrep+set}" = set; then + { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 + echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } + if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # Extract the first word of "grep ggrep" to use in msg output + if test -z "$GREP"; then + set dummy grep ggrep; ac_prog_name=$2 + if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP + case `"$ac_path_GREP" --version 2>&1` in + *GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; + *) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + + + $ac_path_GREP_found && break 3 + done + done + + done + IFS=$as_save_IFS + + fi - echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 - echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep + GREP="$ac_cv_path_GREP" + if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 + echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi + else + ac_cv_path_GREP=$GREP + fi +echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef _AIX + yes +#endif - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - cat >>confdefs.h <<\_ACEOF - #define _ALL_SOURCE 1 - _ACEOF + fi + { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 + echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + + { echo "$as_me:$LINENO: checking for egrep" >&5 + echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } + if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output + if test -z "$EGREP"; then + set dummy egrep; ac_prog_name=$2 + if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in + *GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + *) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + + + $ac_path_EGREP_found && break 3 + done + done + + done + IFS=$as_save_IFS + + + fi + + EGREP="$ac_cv_path_EGREP" + if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 + echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 + ac_cv_path_EGREP=$EGREP fi +rm -f conftest* - echo "$as_me:$LINENO: checking for ANSI C header files" >&5 - echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + fi + fi + { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 + echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 + echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@ -7249,20 -9491,111 +9663,108 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + #define _XOPEN_SOURCE_EXTENDED 1 + #include + /* The following two lines are a workaround against an autoconf-2.52 bug. */ + #include + #include + + int + main () + { + static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + #define _XOPEN_SOURCE_EXTENDED 1 + #include + /* The following two lines are a workaround against an autoconf-2.52 bug. */ + #include + #include + + int + main () + { + static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; + test_array [0] = 0 + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@@ -7569,114 -9901,39 +10070,36 @@@ main ( return 0; } _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long_long_int=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gt_cv_c_wint_t=yes else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ( exit $ac_status ) - ac_cv_type_long_long_int=no + gt_cv_c_wint_t=no fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_long_long_int=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 - echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 - if test $ac_cv_type_long_long_int = yes; then - - cat >>confdefs.h <<\_ACEOF - #define HAVE_LONG_LONG_INT 1 - _ACEOF - - fi - - - echo "$as_me:$LINENO: checking for long double" >&5 - echo $ECHO_N "checking for long double... $ECHO_C" >&6 - if test "${gt_cv_c_long_double+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test "$GCC" = yes; then - gt_cv_c_long_double=yes - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - /* The Stardent Vistra knows sizeof(long double), but does not support it. */ - long double foo = 0.0; - /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ - int array [2*(sizeof(long double) >= sizeof(double)) - 1]; - - int - main () - { - - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gt_cv_c_long_double=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_long_double=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - fi - echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 - echo "${ECHO_T}$gt_cv_c_long_double" >&6 - if test $gt_cv_c_long_double = yes; then + { echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 + echo "${ECHO_T}$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then cat >>confdefs.h <<\_ACEOF - #define HAVE_LONG_DOUBLE 1 + #define HAVE_WINT_T 1 _ACEOF fi @@@ -8512,70 -10876,38 +11042,41 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include - #else - # include - #endif - - #undef $ac_func - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - { - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char $ac_func (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) - choke me - #else - char (*f) () = $ac_func; + #include + #ifdef HAVE_SYS_PARAM_H + #include #endif - #ifdef __cplusplus - } + #ifdef HAVE_SYS_MOUNT_H + #include #endif - - int - main () - { - return f != $ac_func; - ; - return 0; - } + int + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + return statfs (".", &fsd) != 0; + } _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + rm -f conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@@ -8694,22 -11043,123 +11212,117 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + + cat >>confdefs.h <<\_ACEOF + #define STAT_READ_FILSYS 1 + _ACEOF + + ac_fsusage_space=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f conftest.err conftest.$ac_ext + fi + + if test $ac_fsusage_space = yes; then + gl_cv_fs_space=yes + else + gl_cv_fs_space=no + fi + + + + if test $gl_cv_fs_space = yes; then + gl_LIBOBJS="$gl_LIBOBJS fsusage.$ac_objext" + + + + + + for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? + { echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 + echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? + { echo "$as_me:$LINENO: checking $ac_header presence" >&5 + echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="-l$ac_lib" - break + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@@ -9163,27 -12074,22 +12237,19 @@@ main ( } _ACEOF rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_have_decl_freeaddrinfo=yes else echo "$as_me: failed program was:" >&5 @@@ -9622,42 -12484,262 +12644,275 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_have_decl_inet_ntop=yes + gl_cv_func_gettimeofday_clobber=no else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_inet_ntop=no + ( exit $ac_status ) + gl_cv_func_gettimeofday_clobber=yes fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5 +echo "${ECHO_T}$ac_cv_have_decl_inet_ntop" >&6 +if test $ac_cv_have_decl_inet_ntop = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_NTOP 0 +_ACEOF + fi + { echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 + echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; } + + if test $gl_cv_func_gettimeofday_clobber = yes; then + REPLACE_GETTIMEOFDAY=1 + SYS_TIME_H=sys/time.h + + gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + + + for ac_header in sys/timeb.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + else + # Is the header compilable? + { echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 + echo "${ECHO_T}$ac_header_compiler" >&6; } + + # Is the header present? + { echo "$as_me:$LINENO: checking $ac_header presence" >&5 + echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi + + rm -f conftest.err conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; + esac + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + fi + done + for ac_func in _ftime + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ + #define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + #ifdef __STDC__ + # include + #else + # include + #endif + #undef $ac_func + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me + #endif + int + main () + { + return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" + fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + fi + done @@@ -9945,127 -13159,70 +13332,108 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_cv_have_decl_inet_ntop=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_have_decl_inet_ntop" >&5 + echo "${ECHO_T}$ac_cv_have_decl_inet_ntop" >&6; } + if test $ac_cv_have_decl_inet_ntop = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_DECL_INET_NTOP 1 + _ACEOF + + + else + cat >>confdefs.h <<_ACEOF + #define HAVE_DECL_INET_NTOP 0 + _ACEOF + + fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include - int - main () - { - static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; - test_array [0] = 0 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include ++ ac_hi=$ac_mid ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + + + + + +int +main () +{ - static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; - test_array [0] = 0 - ; - return 0; - } + + + + + + + + if test $gl_cv_func_malloc_posix = yes; then + HAVE_MALLOC_POSIX=1 + + cat >>confdefs.h <<\_ACEOF + #define HAVE_MALLOC_POSIX 1 _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + else + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + HAVE_MALLOC_POSIX=0 + fi - ac_lo= ac_hi= - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - # Binary search between lo and hi bounds. - while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + + + + GNULIB_MALLOC_POSIX=1 + + + + + for ac_func in mkdtemp + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@ -10277,20 -13463,81 +13674,86 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done ++ test "$gl_cv_socklen_t_equiv" != "" && break ++ done ++ test "$gl_cv_socklen_t_equiv" != "" && break ++ done + + rm -f conftest.err conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; + esac + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=\$ac_header_preproc" + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } - cat >conftest.$ac_ext <<_ACEOF + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + + + + + : + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 + echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } + if test "${gl_cv_next_netinet_in_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + if test $ac_cv_header_netinet_in_h = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -26230,835 -29925,2853 +30141,3213 @@@ els ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then + amanda_cv_honor_nodump=yes + else + amanda_cv_honor_nodump=no + fi + rm -f conftest.d conftest.d-h + ;; + *) amanda_cv_honor_nodump=no + ;; + esac + + fi + { echo "$as_me:$LINENO: result: $amanda_cv_honor_nodump" >&5 + echo "${ECHO_T}$amanda_cv_honor_nodump" >&6; } + else - aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'` - # Check for a 64-bit object if we didn't find anything. - if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + { echo "$as_me:$LINENO: WARNING: $DUMP is not executable, cannot run -h test" >&5 + echo "$as_me: WARNING: $DUMP is not executable, cannot run -h test" >&2;} + + + cat <>config.warnings + $DUMP is not executable, cannot run -h test + AAW_EOF + + + amanda_cv_honor_nodump=no + fi + if test "x$amanda_cv_honor_nodump" = xyes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_HONOR_NODUMP 1 + _ACEOF + + fi fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec=' ' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; + fi - amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - # see comment about different semantics on the GNU ld section - ld_shlibs=no - ;; - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='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}' - module_expsym_cmds='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}' + # call with + + # Check whether --with-gnutar was given. + if test "${with_gnutar+set}" = set; then + withval=$with_gnutar; + # check withval + case "$withval" in + /*) GNUTAR="$withval";; + y|ye|yes) :;; + n|no) GNUTAR=no ;; + *) { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-gnutar" >&5 + echo "$as_me: error: *** You must supply a full pathname to --with-gnutar" >&2;} + { (exit 1); exit 1; }; };; + esac + # done + + + fi + + + if test "x$GNUTAR" = "xno"; then + GNUTAR= else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds='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}' - module_expsym_cmds='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}' - ;; - *) - ld_shlibs=no - ;; - esac + for gnutar_name in gtar gnutar tar; do + for ac_prog in $gnutar_name + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_GNUTAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $GNUTAR in + [\\/]* | ?:[\\/]*) + ac_cv_path_GNUTAR="$GNUTAR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + GNUTAR=$ac_cv_path_GNUTAR + if test -n "$GNUTAR"; then + { echo "$as_me:$LINENO: result: $GNUTAR" >&5 + echo "${ECHO_T}$GNUTAR" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$GNUTAR" && break + done + + if test -n "$GNUTAR"; then + case "`\"$GNUTAR\" --version 2>&1`" in + *GNU*tar* | *Free*paxutils* ) + # OK, it is GNU tar + break + ;; + *) + # warning.. + + { echo "$as_me:$LINENO: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&5 + echo "$as_me: WARNING: $GNUTAR is not GNU tar, so it will not be used." >&2;} + + + cat <>config.warnings + $GNUTAR is not GNU tar, so it will not be used. + AAW_EOF + + + # reset the cache for GNUTAR so AC_PATH_PROGS will search again + GNUTAR='' + unset ac_cv_path_GNUTAR + ;; + esac + fi + done fi - ;; - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; + if test "x$GNUTAR" != "x"; then + # define unquoted - freebsd1*) - ld_shlibs=no - ;; + cat >>confdefs.h <<_ACEOF + #define GNUTAR "$GNUTAR" + _ACEOF - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; + fi - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$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' - else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*|ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; + # Check whether --with-smbclient was given. + if test "${with_smbclient+set}" = set; then + withval=$with_smbclient; + case "$withval" in + /*) SAMBA_CLIENT="$withval";; + y|ye|yes) :;; + n|no) SAMBA_CLIENT=no ;; + *) { { echo "$as_me:$LINENO: error: *** You must supply a full pathname to --with-smbclient" >&5 + echo "$as_me: error: *** You must supply a full pathname to --with-smbclient" >&2;} + { (exit 1); exit 1; }; };; + esac - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' - fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + + + + # Check whether --with-samba-user was given. + if test "${with_samba_user+set}" = set; then + withval=$with_samba_user; { { echo "$as_me:$LINENO: error: --with-samba-user is no longer supported; place username in 'amandapass'" >&5 + echo "$as_me: error: --with-samba-user is no longer supported; place username in 'amandapass'" >&2;} + { (exit 1); exit 1; }; } + + fi + + + if test "x$SAMBA_CLIENT" != "xno"; then + # Extract the first word of "smbclient", so it can be a program name with args. + set dummy smbclient; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_SAMBA_CLIENT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $SAMBA_CLIENT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SAMBA_CLIENT="$SAMBA_CLIENT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SAMBA_CLIENT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + SAMBA_CLIENT=$ac_cv_path_SAMBA_CLIENT + if test -n "$SAMBA_CLIENT"; then + { echo "$as_me:$LINENO: result: $SAMBA_CLIENT" >&5 + echo "${ECHO_T}$SAMBA_CLIENT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + smbversion=0 + if test ! -z "$SAMBA_CLIENT"; then + case "`\"$SAMBA_CLIENT\" '\\\\not.a.host.name\\notashare' -U nosuchuser -N -Tx /dev/null 2>&1`" in + *"Unknown host"*) + smbversion=1 + ;; + *"Connection to not.a.host.name failed"*) + smbversion=2 + ;; + *) + + { echo "$as_me:$LINENO: WARNING: $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&5 + echo "$as_me: WARNING: $SAMBA_CLIENT does not seem to be smbclient, so it will not be used." >&2;} + + + cat <>config.warnings + $SAMBA_CLIENT does not seem to be smbclient, so it will not be used. + AAW_EOF + + + SAMBA_CLIENT= + ;; + esac + if test -n "$SAMBA_CLIENT"; then + + cat >>confdefs.h <<_ACEOF + #define SAMBA_CLIENT "$SAMBA_CLIENT" + _ACEOF + + + cat >>confdefs.h <<_ACEOF + #define SAMBA_VERSION $smbversion + _ACEOF + + fi fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; + fi - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; + if test -n "$SAMBA_CLIENT"; then + WANT_SAMBA_TRUE= + WANT_SAMBA_FALSE='#' + else + WANT_SAMBA_TRUE='#' + WANT_SAMBA_FALSE= + fi - openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + + + USE_RUNDUMP=no + + # some systems require rundump unconditionally + case "$target" in + *-ultrix*) USE_RUNDUMP=yes ;; + *-dg-*) USE_RUNDUMP=yes ;; + esac + + + # Check whether --with-rundump was given. + if test "${with_rundump+set}" = set; then + withval=$with_rundump; + case "$withval" in + n | no) USE_RUNDUMP=no ;; + y | ye | yes) USE_RUNDUMP=yes ;; + *) { { echo "$as_me:$LINENO: error: You must not supply an argument to --with-rundump option." >&5 + echo "$as_me: error: You must not supply an argument to --with-rundump option." >&2;} + { (exit 1); exit 1; }; };; + esac + + fi + + + if test x"$USE_RUNDUMP" = x"yes"; then + + cat >>confdefs.h <<\_ACEOF + #define USE_RUNDUMP 1 + _ACEOF + + fi + + + # + # Look for other programs Amanda will use + # + + + # Extract the first word of "grep", so it can be a program name with args. + set dummy grep; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $GREP in + [\\/]* | ?:[\\/]*) + ac_cv_path_GREP="$GREP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + test -z "$ac_cv_path_GREP" && ac_cv_path_GREP="grep" + ;; + esac + fi + GREP=$ac_cv_path_GREP + if test -n "$GREP"; then + { echo "$as_me:$LINENO: result: $GREP" >&5 + echo "${ECHO_T}$GREP" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + cat >>confdefs.h <<_ACEOF + #define GREP "$GREP" + _ACEOF + + + { echo "$as_me:$LINENO: checking for egrep" >&5 + echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } + if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output + if test -z "$EGREP"; then + set dummy egrep; ac_prog_name=$2 + if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP + case `"$ac_path_EGREP" --version 2>&1` in + *GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; + *) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + + + $ac_path_EGREP_found && break 3 + done + done + + done + IFS=$as_save_IFS + + + fi + + EGREP="$ac_cv_path_EGREP" + if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 + echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi + + else + ac_cv_path_EGREP=$EGREP + fi + + + fi + fi + { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 + echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + + + + + + # Extract the first word of "lint", so it can be a program name with args. + set dummy lint; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_AMLINT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $AMLINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_dummy="/opt/SUNWspro/bin:$SYSLOCPATH" + for as_dir in $as_dummy + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_AMLINT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + AMLINT=$ac_cv_path_AMLINT + if test -n "$AMLINT"; then + { echo "$as_me:$LINENO: result: $AMLINT" >&5 + echo "${ECHO_T}$AMLINT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + if test ! -z "$AMLINT"; then + $AMLINT -flags 2>&1 | $GREP -- '-errfmt=' > /dev/null + if test $? -eq 0; then + AMLINTFLAGS="-n -s -u -m -x" + AMLINTFLAGS="$AMLINTFLAGS -errchk=%all" + AMLINTFLAGS="$AMLINTFLAGS -errfmt=macro" + AMLINTFLAGS="$AMLINTFLAGS -errhdr=no%/usr/include" + AMLINTFLAGS="$AMLINTFLAGS -errhdr=%user" + AMLINTFLAGS="$AMLINTFLAGS -errsecurity=extended" + AMLINTFLAGS="$AMLINTFLAGS -errtags=yes" + AMLINTFLAGS="$AMLINTFLAGS -Ncheck=%all" + AMLINTFLAGS="$AMLINTFLAGS -Nlevel=2" + AMLINTFLAGS="$AMLINTFLAGS -erroff=E_ASGN_NEVER_USED" + AMLINTFLAGS="$AMLINTFLAGS,E_ASGN_RESET" + AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_CONST_TO_SMALL_INT" + AMLINTFLAGS="$AMLINTFLAGS,E_CAST_INT_TO_SMALL_INT" + AMLINTFLAGS="$AMLINTFLAGS,E_CAST_UINT_TO_SIGNED_INT" + AMLINTFLAGS="$AMLINTFLAGS,E_CONSTANT_CONDITION" + AMLINTFLAGS="$AMLINTFLAGS,E_ENUM_UNUSE" + AMLINTFLAGS="$AMLINTFLAGS,E_EXPR_NULL_EFFECT" + AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_ALWAYS_IGNOR" + AMLINTFLAGS="$AMLINTFLAGS,E_FUNC_RET_MAYBE_IGNORED" + AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK0" + AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK1" + AMLINTFLAGS="$AMLINTFLAGS,E_H_C_CHECK2" + AMLINTFLAGS="$AMLINTFLAGS,E_INCL_MNUSD" + AMLINTFLAGS="$AMLINTFLAGS,E_INCL_NUSD" + AMLINTFLAGS="$AMLINTFLAGS,E_MCR_NODIFF" + AMLINTFLAGS="$AMLINTFLAGS,E_NAME_MULTIPLY_DEF" + AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_NULL_PSBL" + AMLINTFLAGS="$AMLINTFLAGS,E_P_REF_SUSP" + AMLINTFLAGS="$AMLINTFLAGS,E_PTRDIFF_OVERFLOW" + AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_NULL_PSBL" + AMLINTFLAGS="$AMLINTFLAGS,E_P_USE_SUSP" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_ACCESS_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHDIR_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CHMOD_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_CREAT_WITHOUT_EXCL" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_PATH" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_EXEC_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_FOPEN_MODE" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_GETENV_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_MKDIR_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_PRINTF_VAR_FMT" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_RAND_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SCANF_VAR_FMT" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SELECT_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_SHELL_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_STRNCPY_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_UMASK_WARN" + AMLINTFLAGS="$AMLINTFLAGS,E_SEC_USE_AFTER_STAT" + AMLINTFLAGS="$AMLINTFLAGS,E_SIGN_EXTENSION_PSBL" + AMLINTFLAGS="$AMLINTFLAGS,E_TYPEDEF_UNUSE" + AMLINTFLAGS="$AMLINTFLAGS,E_UNCAL_F" else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + AMLINTFLAGS="" fi - ;; + else + # Extract the first word of "splint", so it can be a program name with args. + set dummy splint; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_AMLINT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $AMLINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_AMLINT="$AMLINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $SYSLOCPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_AMLINT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; + ;; + esac + fi + AMLINT=$ac_cv_path_AMLINT + if test -n "$AMLINT"; then + { echo "$as_me:$LINENO: result: $AMLINT" >&5 + echo "${ECHO_T}$AMLINT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + if test ! -z "$AMLINT"; then + AMLINT="splint" else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + AMLINT='echo "Error: LINT is not installed" ; false' fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; + AMLINTFLAGS='+show-scan +unixlib -weak -globs +usedef +usereleased +impouts -paramimptemp -varuse -warnposix -redef -preproc -fixedformalarray -retval -unrecog -usevarargs -formatcode' + fi - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $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' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; + for ac_prog in flex lex + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_LEX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; + fi + fi + LEX=$ac_cv_prog_LEX + if test -n "$LEX"; then + { echo "$as_me:$LINENO: result: $LEX" >&5 + echo "${ECHO_T}$LEX" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${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' ;; - esac ;; - esac - link_all_deplibs=yes - ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; + test -n "$LEX" && break + done + test -n "$LEX" || LEX=":" + + if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF + %% + a { ECHO; } + b { REJECT; } + c { yymore (); } + d { yyless (1); } + e { yyless (input () != 0); } + f { unput (yytext[0]); } + . { BEGIN INITIAL; } + %% + #ifdef YYTEXT_POINTER + extern char *yytext; + #endif + int + main (void) + { + return ! yylex () + ! yywrap (); + } + _ACEOF + { (ac_try="$LEX conftest.l" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$LEX conftest.l") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: checking lex output file root" >&5 + echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } + if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy + elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy + else + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 + echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } + fi + fi + { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 + echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } + LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + + if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 + echo $ECHO_N "checking lex library... $ECHO_C" >&6; } + if test "${ac_cv_lib_lex+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF + `cat $LEX_OUTPUT_ROOT.c` + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 + echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex + fi + + + { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 + echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } + if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # POSIX says lex can declare yytext either as a pointer or an array; the + # default is implementation-dependent. Figure out which it is, since + # not all implementations provide the %pointer and %array declarations. + ac_cv_prog_lex_yytext_pointer=no + ac_save_LIBS=$LIBS + LIBS="$LEXLIB $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF + #define YYTEXT_POINTER 1 + `cat $LEX_OUTPUT_ROOT.c` + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_prog_lex_yytext_pointer=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_save_LIBS + + fi + { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 + echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } + if test $ac_cv_prog_lex_yytext_pointer = yes; then + + cat >>confdefs.h <<\_ACEOF + #define YYTEXT_POINTER 1 + _ACEOF + + fi + rm -f conftest.l $LEX_OUTPUT_ROOT.c + + fi + if test "$LEX" = :; then + LEX=${am_missing_run}flex + fi + + + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + AR=$ac_cv_path_AR + if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 + echo "${ECHO_T}$AR" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + + + # Extract the first word of "gettext", so it can be a program name with args. + set dummy gettext; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_GETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $GETTEXT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GETTEXT="$GETTEXT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GETTEXT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + GETTEXT=$ac_cv_path_GETTEXT + if test -n "$GETTEXT"; then + { echo "$as_me:$LINENO: result: $GETTEXT" >&5 + echo "${ECHO_T}$GETTEXT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 + echo "${ECHO_T}$AWK" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$AWK" && break + done + + for ac_prog in 'bison -y' byacc + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + YACC=$ac_cv_prog_YACC + if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 + echo "${ECHO_T}$YACC" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$YACC" && break + done + test -n "$YACC" || YACC="yacc" + + { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 + echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } + if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done + IFS=$as_save_IFS + + fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi + fi + { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 + echo "${ECHO_T}$MKDIR_P" >&6; } + + + + # Extract the first word of "dd", so it can be a program name with args. + set dummy dd; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_DD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $DD in + [\\/]* | ?:[\\/]*) + ac_cv_path_DD="$DD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DD="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + DD=$ac_cv_path_DD + if test -n "$DD"; then + { echo "$as_me:$LINENO: result: $DD" >&5 + echo "${ECHO_T}$DD" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + + + # Extract the first word of "bash", so it can be a program name with args. + set dummy bash; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_BASH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASH="$BASH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $SYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + BASH=$ac_cv_path_BASH + if test -n "$BASH"; then + { echo "$as_me:$LINENO: result: $BASH" >&5 + echo "${ECHO_T}$BASH" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + + + + + # Extract the first word of "sort", so it can be a program name with args. + set dummy sort; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_SORT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $SORT in + [\\/]* | ?:[\\/]*) + ac_cv_path_SORT="$SORT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="NONE" + ;; + esac + fi + SORT=$ac_cv_path_SORT + if test -n "$SORT"; then + { echo "$as_me:$LINENO: result: $SORT" >&5 + echo "${ECHO_T}$SORT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + # sort is only needed in the server build + if test x"$SORT" = x"NONE" && $WANT_SERVER; then + { { echo "$as_me:$LINENO: error: Set SORT to the path of the sort program." >&5 + echo "$as_me: error: Set SORT to the path of the sort program." >&2;} + { (exit 1); exit 1; }; } + fi + + + cat >>confdefs.h <<_ACEOF + #define SORT_PATH "$SORT" + _ACEOF + + + + + for ac_prog in Mail mailx mail + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_MAILER+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $MAILER in + [\\/]* | ?:[\\/]*) + ac_cv_path_MAILER="$MAILER" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MAILER="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + MAILER=$ac_cv_path_MAILER + if test -n "$MAILER"; then + { echo "$as_me:$LINENO: result: $MAILER" >&5 + echo "${ECHO_T}$MAILER" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$MAILER" && break + done + test -n "$MAILER" || MAILER="NONE" + + if test x"$MAILER" = x"NONE"; then + + { echo "$as_me:$LINENO: WARNING: WARNING: Amanda cannot send mail reports without a mailer." >&5 + echo "$as_me: WARNING: WARNING: Amanda cannot send mail reports without a mailer." >&2;} + + + cat <>config.warnings + WARNING: Amanda cannot send mail reports without a mailer. + AAW_EOF + + + else + + cat >>confdefs.h <<_ACEOF + #define MAILER "$MAILER" + _ACEOF + + fi + + + + # Extract the first word of "mt", so it can be a program name with args. + set dummy mt; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_MT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $MT in + [\\/]* | ?:[\\/]*) + ac_cv_path_MT="$MT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + test -z "$ac_cv_path_MT" && ac_cv_path_MT="mt" + ;; + esac + fi + MT=$ac_cv_path_MT + if test -n "$MT"; then + { echo "$as_me:$LINENO: result: $MT" >&5 + echo "${ECHO_T}$MT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + case "$target" in + *-hp-*) MT_FILE_FLAG="-t" ;; + *) MT_FILE_FLAG="-f" ;; + esac + + + + cat >>confdefs.h <<_ACEOF + #define MT_FILE_FLAG "$MT_FILE_FLAG" + _ACEOF + + + + + + for ac_prog in lpr lp + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_PRINT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $PRINT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PRINT="$PRINT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PRINT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + PRINT=$ac_cv_path_PRINT + if test -n "$PRINT"; then + { echo "$as_me:$LINENO: result: $PRINT" >&5 + echo "${ECHO_T}$PRINT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$PRINT" && break + done + + if test ! -z "$PRINT"; then + + cat >>confdefs.h <<_ACEOF + #define LPRCMD "$PRINT" + _ACEOF + + + { echo "$as_me:$LINENO: checking which flag to use to select a printer" >&5 + echo $ECHO_N "checking which flag to use to select a printer... $ECHO_C" >&6; } + if test "${amanda_cv_printer_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + amanda_cv_printer_flag=$PRINTER_FLAG + case "$PRINT" in + lpr|*/lpr) amanda_cv_printer_flag="-P";; + lp|*/lp) amanda_cv_printer_flag="-d";; + esac + + fi + { echo "$as_me:$LINENO: result: $amanda_cv_printer_flag" >&5 + echo "${ECHO_T}$amanda_cv_printer_flag" >&6; } + if test ! -z "$amanda_cv_printer_flag"; then + + cat >>confdefs.h <<_ACEOF + #define LPRFLAG "$amanda_cv_printer_flag" + _ACEOF + + else + + { echo "$as_me:$LINENO: WARNING: WARNING: amanda will always print to the default printer" >&5 + echo "$as_me: WARNING: WARNING: amanda will always print to the default printer" >&2;} + + + cat <>config.warnings + WARNING: amanda will always print to the default printer + AAW_EOF + + + fi + fi + + + + # Extract the first word of "pcat", so it can be a program name with args. + set dummy pcat; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_PCAT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $PCAT in + [\\/]* | ?:[\\/]*) + ac_cv_path_PCAT="$PCAT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PCAT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + PCAT=$ac_cv_path_PCAT + if test -n "$PCAT"; then + { echo "$as_me:$LINENO: result: $PCAT" >&5 + echo "${ECHO_T}$PCAT" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + + + + for ac_prog in perl5 perl + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + PERL=$ac_cv_path_PERL + if test -n "$PERL"; then + { echo "$as_me:$LINENO: result: $PERL" >&5 + echo "${ECHO_T}$PERL" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$PERL" && break + done + + + # Make sure we have perl + if test -z "$PERL"; then + # Extract the first word of "perl", so it can be a program name with args. + set dummy perl; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_PERL="perl" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + PERL=$ac_cv_prog_PERL + if test -n "$PERL"; then + { echo "$as_me:$LINENO: result: $PERL" >&5 + echo "${ECHO_T}$PERL" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + + # Check if version of Perl is sufficient + ac_perl_version="5.6.0" + + if test "x$PERL" != "x"; then + { echo "$as_me:$LINENO: checking for perl version greater than or equal to $ac_perl_version" >&5 + echo $ECHO_N "checking for perl version greater than or equal to $ac_perl_version... $ECHO_C" >&6; } + # NB: It would be nice to log the error if there is one, but we cannot rely + # on autoconf internals + $PERL -e "use $ac_perl_version;" > /dev/null 2>&1 + if test $? -ne 0; then + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; }; + + { { echo "$as_me:$LINENO: error: Amanda requires at least perl 5.6.0" >&5 + echo "$as_me: error: Amanda requires at least perl 5.6.0" >&2;} + { (exit 1); exit 1; }; } + + else + { echo "$as_me:$LINENO: result: ok" >&5 + echo "${ECHO_T}ok" >&6; }; + + fi + else + { echo "$as_me:$LINENO: WARNING: could not find perl" >&5 + echo "$as_me: WARNING: could not find perl" >&2;} + fi + + + + + for ac_prog in swig + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_SWIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $LOCSYSPATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + SWIG=$ac_cv_path_SWIG + if test -n "$SWIG"; then + { echo "$as_me:$LINENO: result: $SWIG" >&5 + echo "${ECHO_T}$SWIG" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$SWIG" && break + done + + + + # Extract the first word of "swig", so it can be a program name with args. + set dummy swig; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_SWIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $SWIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + ;; + esac + fi + SWIG=$ac_cv_path_SWIG + if test -n "$SWIG"; then + { echo "$as_me:$LINENO: result: $SWIG" >&5 + echo "${ECHO_T}$SWIG" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + if test -z "$SWIG" ; then + SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' + elif test -n "1.3.28" ; then + { echo "$as_me:$LINENO: checking for SWIG version" >&5 + echo $ECHO_N "checking for SWIG version... $ECHO_C" >&6; } + swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` + { echo "$as_me:$LINENO: result: $swig_version" >&5 + echo "${ECHO_T}$swig_version" >&6; } + if test -n "$swig_version" ; then + # Calculate the required version number components + required=1.3.28 + required_major=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_major" ; then + required_major=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_minor=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_minor" ; then + required_minor=0 + fi + required=`echo $required | sed 's/[0-9]*[^0-9]//'` + required_patch=`echo $required | sed 's/[^0-9].*//'` + if test -z "$required_patch" ; then + required_patch=0 + fi + # Calculate the available version number components + available=$swig_version + available_major=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_major" ; then + available_major=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_minor=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_minor" ; then + available_minor=0 + fi + available=`echo $available | sed 's/[0-9]*[^0-9]//'` + available_patch=`echo $available | sed 's/[^0-9].*//'` + if test -z "$available_patch" ; then + available_patch=0 + fi + if test $available_major -ne $required_major \ + -o $available_minor -ne $required_minor \ + -o $available_patch -lt $required_patch ; then + SWIG='echo "Error: SWIG version >= 1.3.28 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' + else + SWIG_LIB=`$SWIG -swiglib` + fi + else + SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' + fi + fi + + + + + + # + # Compiler / system characteristics + # + + # + # compiler + # + if test $ac_cv_c_compiler_gnu = yes; then + { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 + echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } + if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + Autoconf TIOCGETP + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes + else + ac_cv_prog_gcc_traditional=no + fi + rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + Autoconf TCGETA + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes + fi + rm -f conftest* + + fi + fi + { echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 + echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi + fi + + { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 + echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } + if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + int + main () + { + /* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; + #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 + echo "${ECHO_T}$ac_cv_c_const" >&6; } + if test $ac_cv_c_const = no; then + + cat >>confdefs.h <<\_ACEOF + #define const + _ACEOF + + fi + + { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 + echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } + if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include + + int + main () + { + #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + #include + + int + main () + { + #if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + # It does not; compile a test program. + if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } + short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } + int + main () + { + _ascii (); _ebcdic (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + int + main () + { + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; + } + _ACEOF + rm -f conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no + else + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ( exit $ac_status ) + ac_cv_c_bigendian=yes + fi + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 + echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in + yes) + + cat >>confdefs.h <<\_ACEOF + #define WORDS_BIGENDIAN 1 + _ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 + echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + # GCC_COMPILER is needed in the gnulib Makefile to silence errors + if test "x$GCC" = "xyes"; then + GCC_COMPILER_TRUE= + GCC_COMPILER_FALSE='#' + else + GCC_COMPILER_TRUE='#' + GCC_COMPILER_FALSE= + fi + + + # + # Warnings + # + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wparentheses" >&5 + echo $ECHO_N "checking for gcc flag -Wparentheses... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wparentheses[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wparentheses" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wdeclaration-after-statement" >&5 + echo $ECHO_N "checking for gcc flag -Wdeclaration-after-statement... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wdeclaration-after-statement[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wdeclaration-after-statement" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wmissing-prototypes" >&5 + echo $ECHO_N "checking for gcc flag -Wmissing-prototypes... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wmissing-prototypes[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wmissing-prototypes" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wstrict-prototypes" >&5 + echo $ECHO_N "checking for gcc flag -Wstrict-prototypes... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wstrict-prototypes[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wstrict-prototypes" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wmissing-declarations" >&5 + echo $ECHO_N "checking for gcc flag -Wmissing-declarations... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wmissing-declarations[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wmissing-declarations" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wformat" >&5 + echo $ECHO_N "checking for gcc flag -Wformat... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wformat[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wformat" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wsign-compare" >&5 + echo $ECHO_N "checking for gcc flag -Wsign-compare... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wsign-compare[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wsign-compare" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wfloat-equal" >&5 + echo $ECHO_N "checking for gcc flag -Wfloat-equal... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wfloat-equal[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wfloat-equal" + + + else + : + fi + + + + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wold-style-definition" >&5 + echo $ECHO_N "checking for gcc flag -Wold-style-definition... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wold-style-definition[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wold-style-definition" + + + else + : + fi + + + + # test for -W'warning', then add the 'no-' version. + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wstrict-aliasing" >&5 + echo $ECHO_N "checking for gcc flag -Wstrict-aliasing... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wstrict-aliasing[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-strict-aliasing" + + + else + : + fi + + + + # test for -W'warning', then add the 'no-' version. + + + + { echo "$as_me:$LINENO: checking for gcc flag -Wunknown-pragmas" >&5 + echo $ECHO_N "checking for gcc flag -Wunknown-pragmas... $ECHO_C" >&6; } + if test "x$GCC" = "xyes"; then + $CC -v --help 2>&1 | $EGREP -- '[^[:alnum:]]-Wunknown-pragmas[^[:alnum:]-]' 2>&1 > /dev/null + if test $? -eq 0; then + found_warning=yes + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + found_warning=no + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + else + found_warning=no + { echo "$as_me:$LINENO: result: no (not using gcc)" >&5 + echo "${ECHO_T}no (not using gcc)" >&6; } + fi + + if test x"$found_warning" = x"yes"; then + AMANDA_WARNING_CFLAGS="$AMANDA_WARNING_CFLAGS -Wno-unknown-pragmas" + + + else + : + fi + + + + + # + # Libtool + # + # Check whether --enable-shared was given. + if test "${enable_shared+set}" = set; then + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac + else + enable_shared=yes + fi + + + # Check whether --enable-static was given. + if test "${enable_static+set}" = set; then + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" ++ lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + enable_static=yes + fi + + + # Check whether --enable-fast-install was given. + if test "${enable_fast_install+set}" = set; then + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi - done - IFS="$lt_save_ifs" - ;; ++ ;; ++ chorus*) ++ case $cc_basename in ++ cxch68*) ++ # Green Hills C++ Compiler ++ # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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" ++ ;; ++ esac ++ ;; ++ darwin*) ++ # PIC is the default on this platform ++ # Common symbols not allowed in MH_DYLIB files ++ case $cc_basename in ++ xlc*) ++ lt_prog_compiler_pic_CXX='-qnocommon' ++ lt_prog_compiler_wl_CXX='-Wl,' ++ ;; ++ esac ++ ;; ++ dgux*) ++ case $cc_basename in ++ ec++*) ++ lt_prog_compiler_pic_CXX='-KPIC' ++ ;; ++ ghcx*) ++ # Green Hills C++ Compiler ++ lt_prog_compiler_pic_CXX='-pic' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ freebsd* | kfreebsd*-gnu | dragonfly*) ++ # FreeBSD uses GNU C++ ++ ;; ++ hpux9* | hpux10* | hpux11*) ++ case $cc_basename in ++ CC*) ++ lt_prog_compiler_wl_CXX='-Wl,' ++ lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" ++ if test "$host_cpu" != ia64; then ++ lt_prog_compiler_pic_CXX='+Z' ++ fi ++ ;; ++ aCC*) ++ lt_prog_compiler_wl_CXX='-Wl,' ++ lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" ++ case $host_cpu in ++ hppa*64*|ia64*) ++ # +Z the default ++ ;; ++ *) ++ lt_prog_compiler_pic_CXX='+Z' ++ ;; ++ esac ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ irix5* | irix6* | nonstopux*) ++ case $cc_basename in ++ CC*) ++ lt_prog_compiler_wl_CXX='-Wl,' ++ lt_prog_compiler_static_CXX='-non_shared' ++ # CC pic flag -KPIC is the default. ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ linux*) ++ case $cc_basename in ++ KCC*) ++ # KAI C++ Compiler ++ lt_prog_compiler_wl_CXX='--backend -Wl,' ++ lt_prog_compiler_pic_CXX='-fPIC' ++ ;; ++ icpc* | ecpc*) ++ # Intel C++ ++ lt_prog_compiler_wl_CXX='-Wl,' ++ lt_prog_compiler_pic_CXX='-KPIC' ++ lt_prog_compiler_static_CXX='-static' ++ ;; ++ pgCC*) ++ # Portland Group C++ compiler. ++ lt_prog_compiler_wl_CXX='-Wl,' ++ lt_prog_compiler_pic_CXX='-fpic' ++ lt_prog_compiler_static_CXX='-Bstatic' ++ ;; ++ cxx*) ++ # Compaq C++ ++ # Make sure the PIC flag is empty. It appears that all Alpha ++ # Linux and Compaq Tru64 Unix objects are PIC. ++ lt_prog_compiler_pic_CXX= ++ lt_prog_compiler_static_CXX='-non_shared' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ lynxos*) ++ ;; ++ m88k*) ++ ;; ++ mvs*) ++ case $cc_basename in ++ cxx*) ++ lt_prog_compiler_pic_CXX='-W c,exportall' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ netbsd*) ++ ;; ++ osf3* | osf4* | osf5*) ++ case $cc_basename in ++ KCC*) ++ lt_prog_compiler_wl_CXX='--backend -Wl,' ++ ;; ++ RCC*) ++ # Rational C++ 2.4.1 ++ lt_prog_compiler_pic_CXX='-pic' ++ ;; ++ cxx*) ++ # Digital/Compaq C++ ++ lt_prog_compiler_wl_CXX='-Wl,' ++ # Make sure the PIC flag is empty. It appears that all Alpha ++ # Linux and Compaq Tru64 Unix objects are PIC. ++ lt_prog_compiler_pic_CXX= ++ lt_prog_compiler_static_CXX='-non_shared' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ psos*) ++ ;; ++ sco*) ++ case $cc_basename in ++ CC*) ++ lt_prog_compiler_pic_CXX='-fPIC' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ solaris*) ++ case $cc_basename in ++ CC*) ++ # Sun C++ 4.2, 5.x and Centerline C++ ++ lt_prog_compiler_pic_CXX='-KPIC' ++ lt_prog_compiler_static_CXX='-Bstatic' ++ lt_prog_compiler_wl_CXX='-Qoption ld ' ++ ;; ++ gcx*) ++ # Green Hills C++ Compiler ++ lt_prog_compiler_pic_CXX='-PIC' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ sunos4*) ++ case $cc_basename in ++ CC*) ++ # Sun C++ 4.x ++ lt_prog_compiler_pic_CXX='-pic' ++ lt_prog_compiler_static_CXX='-Bstatic' ++ ;; ++ lcc*) ++ # Lucid ++ lt_prog_compiler_pic_CXX='-pic' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ tandem*) ++ case $cc_basename in ++ NCC*) ++ # NonStop-UX NCC 3.20 ++ lt_prog_compiler_pic_CXX='-KPIC' ++ ;; ++ *) ++ ;; ++ esac ++ ;; ++ unixware*) ++ ;; ++ vxworks*) ++ ;; ++ *) ++ lt_prog_compiler_can_build_shared_CXX=no ++ ;; + esac + else + enable_fast_install=yes + fi + + + { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 + echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } + if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # Loop through the user's path and test for sed and gsed. + # Then use that list of sed's as ones to test for truncation. + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done + done + lt_ac_max=0 + lt_ac_count=0 + # Add /usr/xpg4/bin/sed as it is typically found on Solaris + # along with /bin/sed that truncates output. + for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done + done + + fi ++echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + + SED=$lt_cv_path_SED + { echo "$as_me:$LINENO: result: $SED" >&5 + echo "${ECHO_T}$SED" >&6; } + + + # Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no + fi + + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown ++ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; + esac + elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 + echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } + else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 + echo "${ECHO_T}$LD" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 + echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 + echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &5 + echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld + ++ lt_compiler_flag="-o out/conftest2.$ac_objext" ++ # Insert the option either (1) after the last *FLAGS variable, or ++ # (2) before a word containing "conftest.", or (3) at the end. ++ # Note that $ac_compile itself does not contain backslashes and begins ++ # with a dollar sign (not a hyphen), so the echo should work correctly. ++ lt_compile=`echo "$ac_compile" | $SED \ ++ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ ++ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ ++ -e 's:$: $lt_compiler_flag:'` ++ (eval echo "\"\$as_me:30398: $lt_compile\"" >&5) ++ (eval "$lt_compile" 2>out/conftest.err) ++ ac_status=$? ++ cat out/conftest.err >&5 ++ echo "$as_me:30402: \$? = $ac_status" >&5 ++ if (exit $ac_status) && test -s out/conftest2.$ac_objext ++ then ++ # The compiler can only warn and ignore the option if not recognized ++ # So say no if there are warnings ++ $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp ++ $SED '/^$/d' out/conftest.err >out/conftest.er2 ++ if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then ++ lt_cv_prog_compiler_c_o_CXX=yes ++ fi ++ fi ++ chmod u+w . 2>&5 ++ $rm conftest* ++ # SGI C++ compiler will create directory out/ii_files/ for ++ # template instantiation ++ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files ++ $rm out/* && rmdir out ++ cd .. ++ rmdir conftest ++ $rm conftest* + + { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 + echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } + if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_ld_reload_flag='-r' + fi + { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 + echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } + reload_flag=$lt_cv_ld_reload_flag + case $reload_flag in + "" | " "*) ;; + *) reload_flag=" $reload_flag" ;; + esac + reload_cmds='$LD$reload_flag -o $output$reload_objs' + case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; + esac - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no + { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 + echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } + if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" + else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; - - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm + fi + fi + { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 + echo "${ECHO_T}$lt_cv_path_NM" >&6; } + NM="$lt_cv_path_NM" - sysv5*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - ;; + { echo "$as_me:$LINENO: checking whether ln -s works" >&5 + echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } + LN_S=$as_ln_s + if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + echo "${ECHO_T}no, using $LN_S" >&6; } + fi - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; + { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 + echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } + if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_file_magic_cmd='$MAGIC_CMD' + lt_cv_file_magic_test_file= + lt_cv_deplibs_check_method='unknown' + # Need to set the preceding variable on all platforms that support + # interlibrary dependencies. + # 'none' -- dependencies not supported. + # `unknown' -- same as none, but documents that we really don't know. + # 'pass_all' -- all dependencies passed with no checks. + # 'test_compile' -- check by making test program. + # 'file_magic [[regex]]' -- check by looking for files in library path + # which responds to the $file_magic_cmd with a given extended regex. + # If you have `file' or equivalent on your system and you're not sure + # whether `pass_all' will *always* work, you probably want this one. - *) - ld_shlibs=no - ;; - esac - fi -case $host_os in -aix4* | aix5*) - lt_cv_deplibs_check_method=pass_all ++ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ case $host_os in ++ aix4* | aix5*) ++ # If we're using GNU nm, then we don't want the "-C" option. ++ # -C means demangle to AIX nm, but means don't demangle with GNU nm ++ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then ++ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ++ else ++ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ++ fi ++ ;; ++ pw32*) ++ export_symbols_cmds_CXX="$ltdll_cmds" + ;; - -beos*) - lt_cv_deplibs_check_method=pass_all ++ cygwin* | mingw*) ++ export_symbols_cmds_CXX='$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' ++ ;; ++ *) ++ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; ++ esac - echo "$as_me:$LINENO: result: $ld_shlibs" >&5 - echo "${ECHO_T}$ld_shlibs" >&6 - test "$ld_shlibs" = no && can_build_shared=no + bsdi[45]*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; +# +# Do we need to explicitly link libc? +# - case "x$archive_cmds_need_lc" in ++case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added - archive_cmds_need_lc=yes ++ archive_cmds_need_lc_CXX=yes -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; + if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in ++ case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $rm conftest* - echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 - echo "${ECHO_T}$archive_cmds_need_lc" >&6 - ;; - esac - fi - ;; - esac - - echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 - echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 - library_names_spec= - libname_spec='lib$name' - soname_spec= - shrext_cmds=".so" - postinstall_cmds= - postuninstall_cmds= - finish_cmds= - finish_eval= - shlibpath_var= - shlibpath_overrides_runpath=unknown - version_type=none - dynamic_linker="$host_os ld.so" - sys_lib_dlsearch_path_spec="/lib /usr/lib" - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - fi - need_lib_prefix=unknown - hardcode_into_libs=no - - # when you set need_version to no, make sure it does not cause -set_version - # flags to be left without arguments - need_version=unknown - - case $host_os in - aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - - aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - - amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - 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' - ;; - - beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - - bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - - cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" - ;; - mingw*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + freebsd* | kfreebsd*-gnu | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + 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"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` else - lt_cv_deplibs_check_method=pass_all + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac ;; gnu*) - lt_cv_deplibs_check_method=pass_all + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes ;; - hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no + hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - 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]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) @@@ -27281,131 -32851,153 +33516,231 @@@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5* esac ;; -sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no ;; esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 - hardcode_action= - if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var" || \ - test "X$hardcode_automatic" = "Xyes" ; then ++hardcode_action_CXX= ++if test -n "$hardcode_libdir_flag_spec_CXX" || \ ++ test -n "$runpath_var_CXX" || \ ++ test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && ++ if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then ++ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && ++ test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. - hardcode_action=relink ++ hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate ++ hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. - hardcode_action=unsupported ++ hardcode_action_CXX=unsupported fi - echo "$as_me:$LINENO: result: $hardcode_action" >&5 - echo "${ECHO_T}$hardcode_action" >&6 + { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 + echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } + file_magic_cmd=$lt_cv_file_magic_cmd + deplibs_check_method=$lt_cv_deplibs_check_method + test -z "$deplibs_check_method" && deplibs_check_method=unknown - if test "$hardcode_action" = relink; then ++if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi -# Allow CC to be a program name with arguments. -compiler=$CC +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; + fi - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; + test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + # Some flags need to be propagated to the compiler or linker for good + # libtool support. + case $host in + ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; + *-*-irix6*) + # Find out which ABI we are using. + echo '#line 32904 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; + x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 - echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 - if test "${ac_cv_lib_dl_dlopen+set}" = set; then + *-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } + if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -27454,86 -33035,65 +33785,105 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no + lt_cv_cc_needs_belf=no fi - rm -f conftest.err conftest.$ac_objext \ + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 - if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" - else + { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 + echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; -esac + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes -need_locks="$enable_libtool_lock" +fi + ;; - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 - echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 - if test "${ac_cv_func_shl_load+set}" = set; then + + for ac_header in dlfcn.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? + { echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@@ -27581,25 -33124,15 +33914,29 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@@ -27624,65 -33147,220 +33951,242 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 - echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 - if test $ac_cv_lib_dld_shl_load = yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" - else - echo "$as_me:$LINENO: checking for dlopen" >&5 - echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 - if test "${ac_cv_func_dlopen+set}" = set; then + + rm -f conftest.err conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; + esac + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ - #define dlopen innocuous_dlopen - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + eval "$as_ac_Header=\$ac_header_preproc" + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +#ifdef __STDC__ +# include +#else +# include +#endif -fi +#undef dlopen -done +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + CXX=$ac_cv_prog_CXX + if test -n "$CXX"; then + { echo "$as_me:$LINENO: result: $CXX" >&5 + echo "${ECHO_T}$CXX" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$CXX" && break + done + fi + if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_CXX=$ac_cv_prog_ac_ct_CXX + if test -n "$ac_ct_CXX"; then + { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + echo "${ECHO_T}$ac_ct_CXX" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + test -n "$ac_ct_CXX" && break + done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + CXX=$ac_ct_CXX + fi + fi + + fi + fi + # Provide some information about the compiler. + echo "$as_me:$LINENO: checking for C++ compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` + { (ac_try="$ac_compiler --version >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -v >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -V >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } + if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + int main () { @@@ -27921,891 -33532,1530 +34362,1524 @@@ sed 's/^/| /' conftest.$ac_ext >& fi - - fi - - + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes + { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 + echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS + elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" else - enable_dlopen=no + CXXFLAGS="-g" + fi + else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= fi + fi + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -depcc="$CXX" am_compiler_list= + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 - echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 - if test "${lt_cv_dlopen_self+set}" = set; then + { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 + echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } + if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif - #ifdef __cplusplus - extern "C" void exit (int); - #endif + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } + fi + { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 + echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } + CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - exit (status); - } - EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' + else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= fi +rm -fr conftest* - fi - echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 - echo "${ECHO_T}$lt_cv_dlopen_self" >&6 - if test "x$lt_cv_dlopen_self" = xyes; then - LDFLAGS="$LDFLAGS $link_static_flag" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 - echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 - if test "${lt_cv_dlopen_self_static+set}" = set; then + + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 + echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } + if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __STDC__ + # include + #else + # include + #endif + Syntax error + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < - #endif + # Broken: fails on valid input. + continue + fi - #include + rm -f conftest.err conftest.$ac_ext - #ifdef RTLD_GLOBAL - # define LT_DLGLOBAL RTLD_GLOBAL - #else - # ifdef DL_GLOBAL - # define LT_DLGLOBAL DL_GLOBAL - # else - # define LT_DLGLOBAL 0 - # endif - #endif + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. + continue + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - /* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ - #ifndef LT_DLLAZY_OR_NOW - # ifdef RTLD_LAZY - # define LT_DLLAZY_OR_NOW RTLD_LAZY - # else - # ifdef DL_LAZY - # define LT_DLLAZY_OR_NOW DL_LAZY - # else - # ifdef RTLD_NOW - # define LT_DLLAZY_OR_NOW RTLD_NOW - # else - # ifdef DL_NOW - # define LT_DLLAZY_OR_NOW DL_NOW - # else - # define LT_DLLAZY_OR_NOW 0 - # endif - # endif - # endif - # endif - #endif + # Passes both tests. + ac_preproc_ok=: + break + fi - #ifdef __cplusplus - extern "C" void exit (int); - #endif + rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; - done - ac_cv_prog_CXXCPP=$CXXCPP + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } - exit (status); - } - EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + fi + CXXCPP=$ac_cv_prog_CXXCPP + else + ac_cv_prog_CXXCPP=$CXXCPP + fi + { echo "$as_me:$LINENO: result: $CXXCPP" >&5 + echo "${ECHO_T}$CXXCPP" >&6; } + ac_preproc_ok=false + for ac_cxx_preproc_warn_flag in '' yes + do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #ifdef __STDC__ + # include + #else + # include + #endif + Syntax error + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi - fi - rm -fr conftest* - + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue fi - echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 - echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 - fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac + rm -f conftest.err conftest.$ac_ext - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include + _ACEOF + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. + continue + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac fi - - # Report which librarie types wil actually be built - echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 - echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $can_build_shared" >&5 - echo "${ECHO_T}$can_build_shared" >&6 - - echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 - echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - echo "$as_me:$LINENO: result: $enable_shared" >&5 - echo "${ECHO_T}$enable_shared" >&6 - - echo "$as_me:$LINENO: checking whether to build static libraries" >&5 - echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - echo "$as_me:$LINENO: result: $enable_static" >&5 - echo "${ECHO_T}$enable_static" >&6 + rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ - compiler \ - CC \ - LD \ - lt_prog_compiler_wl \ - lt_prog_compiler_pic \ - lt_prog_compiler_static \ - lt_prog_compiler_no_builtin_flag \ - export_dynamic_flag_spec \ - thread_safe_flag_spec \ - whole_archive_flag_spec \ - enable_shared_with_static_runtimes \ - old_archive_cmds \ - old_archive_from_new_cmds \ - predep_objects \ - postdep_objects \ - predeps \ - postdeps \ - compiler_lib_search_path \ - archive_cmds \ - archive_expsym_cmds \ - postinstall_cmds \ - postuninstall_cmds \ - old_archive_from_expsyms_cmds \ - allow_undefined_flag \ - no_undefined_flag \ - export_symbols_cmds \ - hardcode_libdir_flag_spec \ - hardcode_libdir_flag_spec_ld \ - hardcode_libdir_separator \ - hardcode_automatic \ - module_cmds \ - module_expsym_cmds \ - lt_cv_prog_compiler_c_o \ - exclude_expsyms \ - include_expsyms; do - - case $var in - old_archive_cmds | \ - old_archive_from_new_cmds | \ - archive_cmds | \ - archive_expsym_cmds | \ - module_cmds | \ - module_expsym_cmds | \ - old_archive_from_expsyms_cmds | \ - export_symbols_cmds | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac - - cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - { echo "$as_me:$LINENO: creating $ofile" >&5 - echo "$as_me: creating $ofile" >&6;} - - cat <<__EOF__ >> "$cfgfile" - #! $SHELL - - # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. - # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - # - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 - # Free Software Foundation, Inc. - # - # This file is part of GNU Libtool: - # Originally by Gordon Matzigkeit , 1996 - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - - # A sed program that does not truncate output. - SED=$lt_SED ++ compiler_CXX \ ++ CC_CXX \ ++ LD_CXX \ ++ lt_prog_compiler_wl_CXX \ ++ lt_prog_compiler_pic_CXX \ ++ lt_prog_compiler_static_CXX \ ++ lt_prog_compiler_no_builtin_flag_CXX \ ++ export_dynamic_flag_spec_CXX \ ++ thread_safe_flag_spec_CXX \ ++ whole_archive_flag_spec_CXX \ ++ enable_shared_with_static_runtimes_CXX \ ++ old_archive_cmds_CXX \ ++ old_archive_from_new_cmds_CXX \ ++ predep_objects_CXX \ ++ postdep_objects_CXX \ ++ predeps_CXX \ ++ postdeps_CXX \ ++ compiler_lib_search_path_CXX \ ++ archive_cmds_CXX \ ++ archive_expsym_cmds_CXX \ ++ postinstall_cmds_CXX \ ++ postuninstall_cmds_CXX \ ++ old_archive_from_expsyms_cmds_CXX \ ++ allow_undefined_flag_CXX \ ++ no_undefined_flag_CXX \ ++ export_symbols_cmds_CXX \ ++ hardcode_libdir_flag_spec_CXX \ ++ hardcode_libdir_flag_spec_ld_CXX \ ++ hardcode_libdir_separator_CXX \ ++ hardcode_automatic_CXX \ ++ module_cmds_CXX \ ++ module_expsym_cmds_CXX \ ++ lt_cv_prog_compiler_c_o_CXX \ ++ exclude_expsyms_CXX \ ++ include_expsyms_CXX; do - # Sed that helps us avoid accidentally triggering echo(1) options like -n. - Xsed="$SED -e 1s/^X//" + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # The HP-UX ksh and POSIX shell print the target directory to stdout - # if CDPATH is set. - (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + fi - # The names of the tagged configurations supported by this script. - available_tags= - # ### BEGIN LIBTOOL CONFIG + ac_ext=f + ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' + ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_f77_compiler_gnu + if test -n "$ac_tool_prefix"; then + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + fi + fi + F77=$ac_cv_prog_F77 + if test -n "$F77"; then + { echo "$as_me:$LINENO: result: $F77" >&5 + echo "${ECHO_T}$F77" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - # Shell to use when invoking shell scripts. - SHELL=$lt_SHELL - # Whether or not to build shared libraries. - build_libtool_libs=$enable_shared + test -n "$F77" && break + done + fi + if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Whether or not to build static libraries. - build_old_libs=$enable_static + fi + fi + ac_ct_F77=$ac_cv_prog_ac_ct_F77 + if test -n "$ac_ct_F77"; then + { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 + echo "${ECHO_T}$ac_ct_F77" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - # Whether or not to add -lc for building shared libraries. - build_libtool_need_lc=$archive_cmds_need_lc - # Whether or not to disallow shared libs when runtime libs are static - allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + test -n "$ac_ct_F77" && break + done - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + F77=$ac_ct_F77 + fi + fi +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os - # The build system. - build_alias=$build_alias - build=$build - build_os=$build_os + # Provide some information about the compiler. + echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 + ac_compiler=`set X $ac_compile; echo $2` + { (ac_try="$ac_compiler --version >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -v >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { (ac_try="$ac_compiler -V >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -f a.out - # An echo program that does not interpret backslashes. - echo=$lt_echo + # If we don't use `.F' as extension, the preprocessor is not run on the + # input file. (Note that this only needs to work for GNU compilers.) + ac_save_ext=$ac_ext + ac_ext=F + { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 + echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } + if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + program main + #ifndef __GNUC__ + choke me + #endif - # The archiver. - AR=$lt_AR - AR_FLAGS=$lt_AR_FLAGS + end + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # A C compiler. - LTCC=$lt_LTCC + ac_compiler_gnu=no + fi - # A language-specific compiler. - CC=$lt_compiler + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_f77_compiler_gnu=$ac_compiler_gnu - # Is the compiler the GNU C compiler? - with_gcc=$GCC + fi + { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 + echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } + ac_ext=$ac_save_ext + ac_test_FFLAGS=${FFLAGS+set} + ac_save_FFLAGS=$FFLAGS + FFLAGS= + { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 + echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } + if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + FFLAGS=-g + cat >conftest.$ac_ext <<_ACEOF + program main - # An ERE matcher. - EGREP=$lt_EGREP + end + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # The linker used to build libraries. - LD=$lt_LD + ac_cv_prog_f77_g=no + fi - # Whether we need hard or soft links. - LN_S=$lt_LN_S + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - # A BSD-compatible nm program. - NM=$lt_NM + fi + { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 + echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } + if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS + elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi + else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi + fi -G77=`test $ac_compiler_gnu = yes && echo yes` -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# A symbol stripping program +STRIP=$lt_STRIP +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" -# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" - # Used on cygwin: assembler. - AS="$AS" + # find the maximum length of command line arguments + { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 + echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } + if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + i=0 + teststring="ABCD" - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; +# The name of the directory that contains temporary libtool files. +objdir=$objdir - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds - cygwin* | mingw*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; +# How to pass a linker flag through the compiler. - wl=$lt_lt_prog_compiler_wl ++wl=$lt_lt_prog_compiler_wl_CXX - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - # Executable file suffix (normally ""). - exeext="$exeext" + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac -fi +# Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic ++pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode - # What is the maximum length of a command? - max_cmd_len=$lt_cv_sys_max_cmd_len + if test -n $lt_cv_sys_max_cmd_len ; then + { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } + else + { echo "$as_me:$LINENO: result: none" >&5 + echo "${ECHO_T}none" >&6; } + fi +# Does compiler simultaneously support -c and -o options? - compiler_c_o=$lt_lt_cv_prog_compiler_c_o ++compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX +# Must we lock files when doing compilation? +need_locks=$lt_need_locks +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix - # Do we need a version for libraries? - need_version=$need_version + # Check for command to grab the raw symbol name followed by C symbol from nm. + { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 + echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } + if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static + # Transform an extracted symbol line into a proper C declaration + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" -# Transform an extracted symbol line into symbol name and symbol address -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'" +# Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag ++no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - # Compiler flag to allow reflexive dlopens. - export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + # Define system-specific variables. + case $host_os in + aix*) + symcode='[BCDT]' + ;; + cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; + hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + 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'" + ;; + linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + 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'" + fi + ;; + irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; + osf*) + symcode='[BCDEGQRST]' + ;; + solaris* | sysv5*) + symcode='[BDRT]' + ;; + sysv4) + symcode='[DFNSTU]' + ;; + esac -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac +# Compiler flag to generate shared objects directly from archives. - whole_archive_flag_spec=$lt_whole_archive_flag_spec ++whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac +# Compiler flag to generate thread-safe objects. - thread_safe_flag_spec=$lt_thread_safe_flag_spec ++thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX -# Try without a prefix undercore, then with it. -for ac_symprfx in "" "_"; do +# Library versioning type. +version_type=$version_type - # Format of library name prefix. - libname_spec=$lt_libname_spec + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" - # List of archive names. First name is the real one, the rest are links. - # The last name is the one that the linker finds with -lNAME. - library_names_spec=$lt_library_names_spec + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - # Check to see that the pipe works correctly. - pipe_works=no +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - rm -f conftest* - cat > conftest.$ac_ext <&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi +# Create an old-style archive from a shared archive. - old_archive_from_new_cmds=$lt_old_archive_from_new_cmds ++old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - # Make sure that we snagged all the symbols we need. - if grep ' nm_test_var$' "$nlist" >/dev/null; then - if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif +# Create a temporary old-style archive to link instead of a shared archive. - old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds ++old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX -EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' +# Commands used to build and install a shared archive. - archive_cmds=$lt_archive_cmds - archive_expsym_cmds=$lt_archive_expsym_cmds ++archive_cmds=$lt_archive_cmds_CXX ++archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds - cat <> conftest.$ac_ext -#if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * -#else -# define lt_ptr_t char * -# define const -#endif +# Commands used to build a loadable module (assumed same as above if empty) - module_cmds=$lt_module_cmds - module_expsym_cmds=$lt_module_expsym_cmds ++module_cmds=$lt_module_cmds_CXX ++module_expsym_cmds=$lt_module_expsym_cmds_CXX -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - lt_ptr_t address; -} -lt_preloaded_symbols[] = -{ -EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext - {0, (lt_ptr_t) 0} -}; +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -f conftest* conftst* +# Dependencies to place before the objects being linked to create a +# shared library. - predep_objects=$lt_predep_objects ++predep_objects=$lt_predep_objects_CXX - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done +# Dependencies to place after the objects being linked to create a +# shared library. - postdep_objects=$lt_postdep_objects ++postdep_objects=$lt_postdep_objects_CXX -fi +# Dependencies to place before the objects being linked to create a +# shared library. - predeps=$lt_predeps ++predeps=$lt_predeps_CXX - # Dependencies to place after the objects being linked to create a - # shared library. - postdeps=$lt_postdeps + if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= + fi + if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + { echo "$as_me:$LINENO: result: failed" >&5 + echo "${ECHO_T}failed" >&6; } + else + { echo "$as_me:$LINENO: result: ok" >&5 + echo "${ECHO_T}ok" >&6; } + fi - # The library search path used internally by the compiler when linking - # a shared library. - compiler_lib_search_path=$lt_compiler_lib_search_path + { echo "$as_me:$LINENO: checking for objdir" >&5 + echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } + if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + rm -f .libs 2>/dev/null + mkdir .libs 2>/dev/null + if test -d .libs; then + lt_cv_objdir=.libs + else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs + fi + rmdir .libs 2>/dev/null + fi + { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 + echo "${ECHO_T}$lt_cv_objdir" >&6; } + objdir=$lt_cv_objdir +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd +# Flag that allows shared libraries with undefined symbols to be built. - allow_undefined_flag=$lt_allow_undefined_flag ++allow_undefined_flag=$lt_allow_undefined_flag_CXX +# Flag that forces no undefined symbols. - no_undefined_flag=$lt_no_undefined_flag ++no_undefined_flag=$lt_no_undefined_flag_CXX -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds - # Same as above, but a single script fragment to be evaled but not shown. - finish_eval=$lt_finish_eval + # Sed substitution that helps us do robust quoting. It backslashifies + # metacharacters that are still active within double-quoted strings. + Xsed='sed -e 1s/^X//' + sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# Constants: -rm="rm -f" +# This is the shared library runtime path variable. +runpath_var=$runpath_var -# Global variables: -default_ofile=libtool -can_build_shared=yes +# This is the shared library path variable. +shlibpath_var=$shlibpath_var - # Is shlibpath searched before the hard-coded library search path? - shlibpath_overrides_runpath=$shlibpath_overrides_runpath + # All known linkers require a `.a' archive for static linking (except MSVC, + # which needs '.lib'). + libext=a + ltmain="$ac_aux_dir/ltmain.sh" + ofile="$default_ofile" + with_gnu_ld="$lt_cv_prog_gnu_ld" - # How to hardcode a shared library path into an executable. - hardcode_action=$hardcode_action + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. + set dummy ${ac_tool_prefix}ar; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Whether we should hardcode library paths into libraries. - hardcode_into_libs=$hardcode_into_libs + fi + fi + AR=$ac_cv_prog_AR + if test -n "$AR"; then + { echo "$as_me:$LINENO: result: $AR" >&5 + echo "${ECHO_T}$AR" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - # Flag to hardcode \$libdir into a binary during linking. - # This must work even if \$libdir does not exist. - hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - # If ld is used when linking, flag to hardcode \$libdir into - # a binary during linking. This must work even if \$libdir does - # not exist. - hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + fi + if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. + set dummy ar; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Whether we need a single -rpath flag with a separated argument. - hardcode_libdir_separator=$lt_hardcode_libdir_separator + fi + fi + ac_ct_AR=$ac_cv_prog_ac_ct_AR + if test -n "$ac_ct_AR"; then + { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + echo "${ECHO_T}$ac_ct_AR" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + AR=$ac_ct_AR + fi + else + AR="$ac_cv_prog_AR" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 + echo "${ECHO_T}$RANLIB" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + + fi + if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS + + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + RANLIB=$ac_ct_RANLIB + fi + else + RANLIB="$ac_cv_prog_RANLIB" + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the - # resulting binary. - hardcode_direct=$hardcode_direct + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 + echo "${ECHO_T}$STRIP" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - # Set to yes if using the -LDIR flag during linking hardcodes DIR into the - # resulting binary. - hardcode_minus_L=$hardcode_minus_L - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into - # the resulting binary. - hardcode_shlibpath_var=$hardcode_shlibpath_var + fi + if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 + { echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + IFS=$as_save_IFS - # Set to yes if building a shared library automatically hardcodes DIR into the library - # and all subsequent libraries and executables linked against it. - hardcode_automatic=$hardcode_automatic + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + echo "${ECHO_T}$ac_ct_STRIP" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi - # Variables whose values should be saved in libtool wrapper scripts and - # restored at relink time. - variables_saved_for_relink="$variables_saved_for_relink" + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in + yes:) + { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&5 + echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools + whose name does not start with the host triplet. If you think this + configuration is useful to you, please write to autoconf@gnu.org." >&2;} + ac_tool_warned=yes ;; + esac + STRIP=$ac_ct_STRIP + fi + else + STRIP="$ac_cv_prog_STRIP" + fi - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs ++# Symbols that must always be exported. ++include_expsyms=$lt_include_expsyms_CXX - # Compile-time system search path for libraries - sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -old_CC="$CC" -old_CFLAGS="$CFLAGS" ++# ### END LIBTOOL TAG CONFIG: $tagname - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + # Set sane defaults for various variables + test -z "$AR" && AR=ar + test -z "$AR_FLAGS" && AR_FLAGS=cru + test -z "$AS" && AS=as + test -z "$CC" && CC=cc + test -z "$LTCC" && LTCC=$CC + test -z "$DLLTOOL" && DLLTOOL=dlltool + test -z "$LD" && LD=ld + test -z "$LN_S" && LN_S="ln -s" + test -z "$MAGIC_CMD" && MAGIC_CMD=file + test -z "$NM" && NM=nm + test -z "$SED" && SED=sed + test -z "$OBJDUMP" && OBJDUMP=objdump + test -z "$RANLIB" && RANLIB=: + test -z "$STRIP" && STRIP=: + test -z "$ac_objext" && ac_objext=o - # Fix the shell variable \$srcfile for the compiler. - fix_srcfile_path="$fix_srcfile_path" + # Determine commands to create old-style static archives. + old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' + old_postinstall_cmds='chmod 644 $oldlib' + old_postuninstall_cmds= - # Set to yes if exported symbols are required. - always_export_symbols=$always_export_symbols + if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + fi - # The commands to list exported symbols. - export_symbols_cmds=$lt_export_symbols_cmds + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - # The commands to extract the exported symbol list from a shared archive. - extract_expsyms_cmds=$lt_extract_expsyms_cmds - # Symbols that should not be listed in the preloaded symbols. - exclude_expsyms=$lt_exclude_expsyms + # Only perform the check for file, if the check method requires it + case $deplibs_check_method in + file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + *) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 - # Symbols that must always be exported. - include_expsyms=$lt_include_expsyms + *** Warning: the command libtool uses to detect shared libraries, + *** $file_magic_cmd, produces output that libtool cannot recognize. + *** The result is that libtool may fail to recognize shared libraries + *** as such. This will affect the creation of libtool libraries that + *** depend on shared libraries, but programs linked with such libtool + *** libraries will work regardless of this problem. Nevertheless, you + *** may want to report the problem to your system manager and/or to + *** bug-libtool@gnu.org - # ### END LIBTOOL CONFIG + EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; + esac + fi - __EOF__ + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + echo "${ECHO_T}$MAGIC_CMD" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + { echo "$as_me:$LINENO: checking for file" >&5 + echo $ECHO_N "checking for file... $ECHO_C" >&6; } + if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $MAGIC_CMD in + [\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + *) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 - case $host_os in - aix3*) - cat <<\EOF >> "$cfgfile" + *** Warning: the command libtool uses to detect shared libraries, + *** $file_magic_cmd, produces output that libtool cannot recognize. + *** The result is that libtool may fail to recognize shared libraries + *** as such. This will affect the creation of libtool libraries that + *** depend on shared libraries, but programs linked with such libtool + *** libraries will work regardless of this problem. Nevertheless, you + *** may want to report the problem to your system manager and/or to + *** bug-libtool@gnu.org - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi EOF - ;; - esac - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || \ - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; + esac + fi + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if test -n "$MAGIC_CMD"; then + { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + echo "${ECHO_T}$MAGIC_CMD" >&6; } else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + + else + MAGIC_CMD=: fi fi - fi - ;; -esac -enable_dlopen=no -enable_win32_dll=no +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - CC="$lt_save_CC" - - - # Check whether --with-tags or --without-tags was given. - if test "${with_tags+set}" = set; then - withval="$with_tags" - tagnames="$withval" - fi; - - if test -f "$ltmain" && test -n "$tagnames"; then - if test ! -f "${ofile}"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 - echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 - echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} - else - { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 - echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} - fi - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for tagname in $tagnames; do - IFS="$lt_save_ifs" - # Check whether tagname contains only valid characters - case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in - "") ;; - *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 - echo "$as_me: error: invalid tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null - then - { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 - echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} - { (exit 1); exit 1; }; } - fi - - # Update the list of available tags. - if test -n "$tagname"; then - echo appending configuration tag \"$tagname\" to $ofile - - case $tagname in - CXX) - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cc - ac_cpp='$CXXCPP $CPPFLAGS' - ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # Check whether --enable-libtool-lock was given. + if test "${enable_libtool_lock+set}" = set; then + enableval=$enable_libtool_lock; + fi + test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ++ F77) ++ if test -n "$F77" && test "X$F77" != "Xno"; then + # Check whether --with-pic was given. + if test "${with_pic+set}" = set; then + withval=$with_pic; pic_mode="$withval" + else + pic_mode=default + fi - archive_cmds_need_lc_CXX=no - allow_undefined_flag_CXX= - always_export_symbols_CXX=no - archive_expsym_cmds_CXX= - export_dynamic_flag_spec_CXX= - hardcode_direct_CXX=no - hardcode_libdir_flag_spec_CXX= - hardcode_libdir_flag_spec_ld_CXX= - hardcode_libdir_separator_CXX= - hardcode_minus_L_CXX=no - hardcode_automatic_CXX=no - module_cmds_CXX= - module_expsym_cmds_CXX= - link_all_deplibs_CXX=unknown - old_archive_cmds_CXX=$old_archive_cmds - no_undefined_flag_CXX= - whole_archive_flag_spec_CXX= - enable_shared_with_static_runtimes_CXX=no + test -z "$pic_mode" && pic_mode=default - # Dependencies to place before and after the object being linked: - predep_objects_CXX= - postdep_objects_CXX= - predeps_CXX= - postdeps_CXX= - compiler_lib_search_path_CXX= -# Use C for the default configuration in the libtool script -tagname= -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ++archive_cmds_need_lc_F77=no ++allow_undefined_flag_F77= ++always_export_symbols_F77=no ++archive_expsym_cmds_F77= ++export_dynamic_flag_spec_F77= ++hardcode_direct_F77=no ++hardcode_libdir_flag_spec_F77= ++hardcode_libdir_flag_spec_ld_F77= ++hardcode_libdir_separator_F77= ++hardcode_minus_L_F77=no ++hardcode_automatic_F77=no ++module_cmds_F77= ++module_expsym_cmds_F77= ++link_all_deplibs_F77=unknown ++old_archive_cmds_F77=$old_archive_cmds ++no_undefined_flag_F77= ++whole_archive_flag_spec_F77= ++enable_shared_with_static_runtimes_F77=no - # Source file extension for C++ test sources. - ac_ext=cpp -# Source file extension for C test sources. -ac_ext=c ++# Source file extension for f77 test sources. ++ac_ext=f - # Object file extension for compiled C++ test sources. -# Object file extension for compiled C test sources. ++# Object file extension for compiled f77 test sources. objext=o - objext_CXX=$objext -objext=$objext ++objext_F77=$objext # Code to be used in simple compile tests --lt_simple_compile_test_code="int some_variable = 0;\n" ++lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *) { return(0); }\n' -lt_simple_link_test_code='int main(){return(0);}\n' ++lt_simple_link_test_code=" program t\n end\n" +# ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} @@@ -28828,1653 -35078,1405 +35902,1416 @@@ _lt_linker_boilerplate=`cat conftest.er $rm conftest* - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; + # + # Check for any special shared library compilation flags. + # + lt_prog_cc_shlib= + if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + lt_prog_cc_shlib='-belf' + ;; esac - done - cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - - # We don't want -fno-exception wen compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' - else - lt_prog_compiler_no_builtin_flag_CXX= fi + if test -n "$lt_prog_cc_shlib"; then - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 + echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} - # Check whether --with-gnu-ld or --without-gnu-ld was given. - if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes - else - with_gnu_ld=no - fi; - ac_prog=ld - if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 - echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 - echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 - else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 - echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 - fi - if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 - echo "${ECHO_T}$LD" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 - echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 - echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 - if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - # I'd rather use --version here, but apparently some GNU lds only accept -v. - case `$LD -v 2>&1 &5 - echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 - with_gnu_ld=$lt_cv_prog_gnu_ld + cat <>config.warnings + \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries + AAW_EOF + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 + echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' + cat <>config.warnings + add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure + AAW_EOF - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + lt_cv_prog_cc_can_build_shared=no fi + fi + ++ case $host_os in ++ aix*) ++ # All AIX code is PIC. ++ if test "$host_cpu" = ia64; then ++ # AIX 5 now supports IA64 processor ++ lt_prog_compiler_static_F77='-Bstatic' ++ fi ++ ;; - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + # + # Check to make sure the static flag actually works. + # + { echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 + echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6; } + if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_prog_compiler_static" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" - else - GXX=no - with_gnu_ld=no - wlarc= fi + { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 + echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } - # PORTME: fill in a description of your system's C++ link characteristics - echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 - echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 - ld_shlibs_CXX=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - esac -if test x"$lt_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi ++ mingw* | pw32* | os2*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ lt_prog_compiler_pic_F77='-DDLL_EXPORT' ++ ;; - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi ++ darwin* | rhapsody*) ++ # PIC is the default on this platform ++ # Common symbols not allowed in MH_DYLIB files ++ lt_prog_compiler_pic_F77='-fno-common' ++ ;; - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. ++ msdosdjgpp*) ++ # Just because we use GCC doesn't mean we suddenly get shared libraries ++ # on systems that don't support them. ++ lt_prog_compiler_can_build_shared_F77=no ++ enable_shared=no ++ ;; - archive_cmds_CXX='' - hardcode_direct_CXX=yes - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... ++ sysv4*MP*) ++ if test -d /usr/nec; then ++ lt_prog_compiler_pic_F77=-Kconform_pic ++ fi ++ ;; - if test "$GXX" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_CXX=yes - else - # We have old collect2 - hardcode_direct_CXX=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_CXX=yes - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_libdir_separator_CXX= - fi -lt_prog_compiler_no_builtin_flag= ++ hpux*) ++ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but ++ # not for PA HP-UX. ++ case $host_cpu in ++ hppa*64*|ia64*) ++ # +Z the default ++ ;; ++ *) ++ lt_prog_compiler_pic_F77='-fPIC' ++ ;; + esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi ++ ;; - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' - int - main () - { - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:35191: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:35195: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* - aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'` - # Check for a 64-bit object if we didn't find anything. - if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'`; fi + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + : + fi fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + lt_prog_compiler_wl= + lt_prog_compiler_pic= + lt_prog_compiler_static= + + { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; - int - main () - { + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; - aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'` - # Check for a 64-bit object if we didn't find anything. - if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_CXX=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX=' ' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic fi - fi - ;; - chorus*) - case $cc_basename in + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no + lt_prog_compiler_pic='-fPIC' ;; - esac - ;; - - - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes + esac + ;; - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) - lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_static_F77='-Bstatic' else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' ++ lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes + esac + ;; - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then - lt_int_apple_cc_single_mod=yes - fi - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - else - archive_cmds_CXX='$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' - fi - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - if test "X$lt_int_apple_cc_single_mod" = Xyes ; then - archive_expsym_cmds_CXX='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}' - else - archive_expsym_cmds_CXX='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}' - fi - module_expsym_cmds_CXX='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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_CXX='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}' - module_expsym_cmds_CXX='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}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - fi - ;; + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' ++ lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no + hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default ;; *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - lt_prog_compiler_pic='+Z' ++ lt_prog_compiler_pic_F77='+Z' ;; - esac - ;; - freebsd[12]*) - # C++ shared libraries reported to be fairly broken before switch to ELF - ld_shlibs_CXX=no - ;; - freebsd-elf*) - archive_cmds_need_lc_CXX=no - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - ld_shlibs_CXX=yes - ;; - gnu*) - ;; - hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' ++ lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; - aCC*) - archive_cmds_CXX='$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' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' + + irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' ++ lt_prog_compiler_static_F77='-non_shared' ;; - *) - if test "$GXX" = yes; then - archive_cmds_CXX='$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' - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi + + newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_pic_F77='-KPIC' ++ lt_prog_compiler_static_F77='-Bstatic' ;; - esac - ;; - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - hardcode_libdir_separator_CXX=: + + linux*) + case $cc_basename in + icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' ++ lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_pic_F77='-KPIC' ++ lt_prog_compiler_static_F77='-static' ;; - ia64*) - hardcode_libdir_flag_spec_CXX='-L$libdir' + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' ;; - *) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' + ccc*) - lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' ++ lt_prog_compiler_static_F77='-non_shared' ;; esac - fi - case $host_cpu in - hppa*64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no ;; - ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. + + osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' ++ lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' ++ lt_prog_compiler_static_F77='-non_shared' ;; - *) - hardcode_direct_CXX=yes - hardcode_minus_L_CXX=yes # Not in the search PATH, - # but as the default - # location of the library. + + sco3.2v5*) - lt_prog_compiler_pic='-Kpic' - lt_prog_compiler_static='-dn' ++ lt_prog_compiler_pic_F77='-Kpic' ++ lt_prog_compiler_static_F77='-dn' ;; - esac - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - aCC*) - case $host_cpu in - hppa*64*|ia64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' - ;; + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl='-Qoption ld ';; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - ia64*|hppa*64*) - archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' - ;; - *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - archive_cmds_CXX='$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' + lt_prog_compiler_wl='-Wl,';; + esac + ;; - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$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' - else - archive_cmds_CXX='$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' - fi - fi - link_all_deplibs_CXX=yes - ;; + sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_wl_F77='-Qoption ld ' ++ lt_prog_compiler_pic_F77='-PIC' ++ lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_pic_F77='-KPIC' ++ lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_pic_F77='-Kconform_pic' ++ lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + unicos*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_can_build_shared=no + ;; + + uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' ++ lt_prog_compiler_pic_F77='-pic' ++ lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) - lt_prog_compiler_can_build_shared=no ++ lt_prog_compiler_can_build_shared_F77=no + ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - ;; - linux*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler + fi - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='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' - archive_expsym_cmds_CXX='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' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } - hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + # + # Check to make sure the PIC flag actually works. + # -if test -n "$lt_prog_compiler_pic"; then ++if test -n "$lt_prog_compiler_pic_F77"; then - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc*) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$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' + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } + if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else - lt_prog_compiler_pic_works=no ++ lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ++ lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:35453: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:35457: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + fi + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: -if test x"$lt_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in ++if test x"$lt_prog_compiler_pic_works_F77" = xyes; then ++ case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; ++ *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac + else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no ++ lt_prog_compiler_pic_F77= ++ lt_prog_compiler_can_build_shared_F77=no + fi - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' - ;; - esac - ;; - lynxos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - m88k*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no + fi + case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) - lt_prog_compiler_pic= ++ lt_prog_compiler_pic_F77= ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' + *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ++ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; - osf3*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler + esac - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='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' + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else - lt_cv_prog_compiler_c_o=no ++ lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:35515: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:35519: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$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' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: + hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then ++if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 + echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$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' + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + cat <>config.warnings + \`$CC' does not support \`-c -o', so \`make -j' may be unsafe + AAW_EOF - else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; + + need_locks=warn + fi + else + need_locks=no + fi + + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= - allow_undefined_flag= - enable_shared_with_static_runtimes=no - archive_cmds= - archive_expsym_cmds= - old_archive_From_new_cmds= - old_archive_from_expsyms_cmds= - export_dynamic_flag_spec= - whole_archive_flag_spec= - thread_safe_flag_spec= - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - link_all_deplibs=unknown - hardcode_automatic=no - module_cmds= - module_expsym_cmds= - always_export_symbols=no - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ++ allow_undefined_flag_F77= ++ enable_shared_with_static_runtimes_F77=no ++ archive_cmds_F77= ++ archive_expsym_cmds_F77= ++ old_archive_From_new_cmds_F77= ++ old_archive_from_expsyms_cmds_F77= ++ export_dynamic_flag_spec_F77= ++ whole_archive_flag_spec_F77= ++ thread_safe_flag_spec_F77= ++ hardcode_libdir_flag_spec_F77= ++ hardcode_libdir_flag_spec_ld_F77= ++ hardcode_libdir_separator_F77= ++ hardcode_direct_F77=no ++ hardcode_minus_L_F77=no ++ hardcode_shlibpath_var_F77=unsupported ++ link_all_deplibs_F77=unknown ++ hardcode_automatic_F77=no ++ module_cmds_F77= ++ module_expsym_cmds_F77= ++ always_export_symbols_F77=no ++ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list - include_expsyms= ++ include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. - exclude_expsyms="_GLOBAL_OFFSET_TABLE_" ++ exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + - ld_shlibs=yes ++ ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; esac - ;; - osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - archive_cmds_CXX='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' + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then - ld_shlibs=no ++ ld_shlibs_F77=no + cat <&2 - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - hardcode_libdir_separator_CXX=: + *** Warning: the GNU linker, at least up to release 2.9.1, is reported + *** to be unable to reliably create shared libraries on AIX. + *** Therefore, libtool is disabling shared libraries support. If you + *** really care for shared libraries, you may want to modify your PATH + *** so that a non-GNU linker is found, and then restart. - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - cxx*) - allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$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' - archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $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~ - $rm $lib.exp' + EOF + fi + ;; - hardcode_libdir_flag_spec_CXX='-rpath $libdir' - hardcode_libdir_separator_CXX=: + amigaos*) - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes ++ archive_cmds_F77='$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)' ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_minus_L_F77=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - 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' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$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' + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. - ld_shlibs=no ++ ld_shlibs_F77=no + ;; - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_CXX=: + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported ++ allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else - ld_shlibs=no ++ ld_shlibs_F77=no + fi + ;; - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, ++ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' ++ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then ++ archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; else - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - fi - ;; - esac - ;; - psos*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - sco*) - archive_cmds_need_lc_CXX=no - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $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' + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else - ld_shlibs=no ++ ld_shlibs_F77=no + fi + ;; - hardcode_libdir_flag_spec_CXX='-R$libdir' - hardcode_shlibpath_var_CXX=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${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' - ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' - if $CC --version | grep -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" - fi + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi - ;; - esac - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - archive_cmds_need_lc_CXX=no - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - ;; - vxworks*) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac - echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 - echo "${ECHO_T}$ld_shlibs_CXX" >&6 - test "$ld_shlibs_CXX" = no && can_build_shared=no + else + ld_shlibs=no + fi + ;; - GCC_CXX="$GXX" - LD_CXX="$LD" + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' ++ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no ++ ld_shlibs_F77=no + cat <&2 + + *** Warning: The releases 2.8.* of the GNU linker cannot reliably + *** create shared libraries on Solaris systems. Therefore, libtool + *** is disabling shared libraries support. We urge you to upgrade GNU + *** binutils to release 2.9.1 or newer. Another option is to modify + *** your PATH or compiler configuration so that the native linker is + *** used, and then restart. - cat > conftest.$ac_ext <&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else - ld_shlibs=no ++ ld_shlibs_F77=no + fi + ;; - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. + sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no ++ hardcode_direct_F77=yes ++ hardcode_shlibpath_var_F77=no + ;; - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ++ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' ++ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else - ld_shlibs=no ++ ld_shlibs_F77=no + fi + ;; + esac - # The `*' in the case matches for architectures that use `case' in - # $output_verbose_cmd can trigger glob expansion during the loop - # eval without this substitution. - output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + if test "$ld_shlibs" = no; then + runpath_var= + hardcode_libdir_flag_spec= + export_dynamic_flag_spec= + whole_archive_flag_spec= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' ++ allow_undefined_flag_F77=unsupported ++ always_export_symbols_F77=yes ++ archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. - hardcode_minus_L=yes ++ hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. - hardcode_direct=unsupported ++ hardcode_direct_F77=unsupported + fi + ;; - for p in `eval $output_verbose_link_cmd`; do - case $p in + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ++ export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' ++ export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" \ - || test $p = "-R"; then - prev=$p - continue - else - prev= - fi + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" - else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" - else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" - fi - fi - ;; + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - if test "$pre_test_object_deps_done" = no; then - if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" - else - predep_objects_CXX="$predep_objects_CXX $p" - fi - else - if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" - else - postdep_objects_CXX="$postdep_objects_CXX $p" - fi - fi - ;; - archive_cmds='' - hardcode_direct=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes ++ archive_cmds_F77='' ++ hardcode_direct_F77=yes ++ hardcode_libdir_separator_F77=':' ++ link_all_deplibs_F77=yes - *) ;; # Ignore the rest. + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 - hardcode_direct=yes ++ hardcode_direct_F77=yes + else + # We have old collect2 - hardcode_direct=unsupported ++ hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= ++ hardcode_minus_L_F77=yes ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_libdir_separator_F77= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes ++ always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' ++ allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ ++ program main - esac - done - ; - return 0; -} ++ end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - # Clean up. - rm -f a.out a.exe + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + # Check for a 64-bit object if we didn't find anything. + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi else - echo "libtool.m4: error: problem compiling CXX test program" - fi + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - $rm -f confest.$objext - # PORTME: override above test on systems where it is broken - case $host_os in - solaris*) - case $cc_basename in - CC*) - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - esac + fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - case " $postdeps_CXX " in - *" -lc "*) archive_cmds_need_lc_CXX=no ;; - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" ++ hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" ++ archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" ++ hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' ++ allow_undefined_flag_F77="-z nodefs" ++ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ ++ program main + - ; - return 0; -} ++ end + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - lt_prog_compiler_wl_CXX= - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX= + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + # Check for a 64-bit object if we didn't find anything. + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 - echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-static' + fi - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ++ hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' ++ no_undefined_flag_F77=' ${wl}-bernotok' ++ allow_undefined_flag_F77=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols=yes ++ always_export_symbols_F77=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi fi ;; + amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' - archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes ++ archive_cmds_F77='$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)' ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section - ld_shlibs=no ++ ld_shlibs_F77=no ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic ;; - mingw* | os2* | pw32*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported ++ hardcode_libdir_flag_spec_F77=' ' ++ allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' ++ archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds='true' ++ old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes ++ old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' ++ fix_srcfile_path_F77='`cygpath -w "$srcfile"`' ++ enable_shared_with_static_runtimes_F77=yes ;; + darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_CXX='-fno-common' + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='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}' + module_expsym_cmds='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}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='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}' + module_expsym_cmds='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}' + ;; + *) + ld_shlibs=no + ;; + esac + fi ;; - *djgpp*) - # DJGPP does not support shared libraries at all - lt_prog_compiler_pic_CXX= + + dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_shlibpath_var_F77=no ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_CXX=-Kconform_pic - fi + + freebsd1*) - ld_shlibs=no ++ ld_shlibs_F77=no ;; - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - esac + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' ++ hardcode_libdir_flag_spec_F77='-R$libdir' ++ hardcode_direct_F77=yes ++ hardcode_shlibpath_var_F77=no ;; - *) - lt_prog_compiler_pic_CXX='-fPIC' + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_direct_F77=yes ++ hardcode_minus_L_F77=yes ++ hardcode_shlibpath_var_F77=no ;; - esac - else - case $host_os in - aix4* | aix5*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_CXX='-Bstatic' - else - lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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" + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then - archive_cmds='$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' ++ archive_cmds_F77='$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' + else - archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ++ archive_cmds_F77='$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' + fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes ++ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator_F77=: ++ hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' ++ hardcode_minus_L_F77=yes ++ export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*|ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - lt_prog_compiler_pic_CXX='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | kfreebsd*-gnu | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - if test "$host_cpu" != ia64; then - lt_prog_compiler_pic_CXX='+Z' - fi - ;; - aCC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - lt_prog_compiler_wl_CXX='--backend -Wl,' - lt_prog_compiler_pic_CXX='-fPIC' - ;; - icpc* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - lt_prog_compiler_pic_CXX='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - lt_prog_compiler_wl_CXX='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - lt_prog_compiler_pic_CXX='-pic' - ;; - cxx*) - # Digital/Compaq C++ - lt_prog_compiler_wl_CXX='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - lt_prog_compiler_pic_CXX= - lt_prog_compiler_static_CXX='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - sco*) - case $cc_basename in - CC*) - lt_prog_compiler_pic_CXX='-fPIC' - ;; - *) - ;; - esac - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - lt_prog_compiler_wl_CXX='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - lt_prog_compiler_pic_CXX='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - lt_prog_compiler_pic_CXX='-pic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - lcc*) - # Lucid - lt_prog_compiler_pic_CXX='-pic' - ;; - *) - ;; + else + case $host_cpu in + hppa*64*|ia64*) - archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ++ archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ++ archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - lt_prog_compiler_pic_CXX='-KPIC' - ;; - *) - ;; + fi + if test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=no - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ++ hardcode_libdir_flag_spec_ld_F77='+b $libdir' ++ hardcode_libdir_separator_F77=: ++ hardcode_direct_F77=no ++ hardcode_shlibpath_var_F77=no + ;; + ia64*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_direct_F77=no ++ hardcode_shlibpath_var_F77=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. - hardcode_minus_L=yes ++ hardcode_minus_L_F77=yes + ;; + *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - export_dynamic_flag_spec='${wl}-E' ++ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator_F77=: ++ hardcode_direct_F77=yes ++ export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. - hardcode_minus_L=yes ++ hardcode_minus_L_F77=yes + ;; esac - ;; - unixware*) - ;; - vxworks*) - ;; - *) - lt_prog_compiler_can_build_shared_CXX=no - ;; - esac - fi + fi + ;; - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ archive_cmds_F77='$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' + else - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld='-rpath $libdir' ++ archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ++ hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - link_all_deplibs=yes ++ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator_F77=: ++ link_all_deplibs_F77=yes + ;; - # - # Check to make sure the PIC flag actually works. - # - if test -n "$lt_prog_compiler_pic_CXX"; then + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out ++ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF ++ archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77='-R$libdir' ++ hardcode_direct_F77=yes ++ hardcode_shlibpath_var_F77=no + ;; - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 - echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 - if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - lt_prog_compiler_pic_works_CXX=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:30336: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:30340: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp - $SED '/^$/d' conftest.err >conftest.er2 - if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_CXX=yes - fi - fi - $rm conftest* + newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_direct_F77=yes ++ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator_F77=: ++ hardcode_shlibpath_var_F77=no + ;; - fi - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + openbsd*) - hardcode_direct=yes - hardcode_shlibpath_var=no ++ hardcode_direct_F77=yes ++ hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' ++ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ++ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; - if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then - case $lt_prog_compiler_pic_CXX in - "" | " "*) ;; - *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; - esac - else - lt_prog_compiler_pic_CXX= - lt_prog_compiler_can_build_shared_CXX=no - fi + os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_minus_L_F77=yes ++ allow_undefined_flag_F77=unsupported ++ archive_cmds_F77='$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' ++ old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; - fi - case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_CXX= - ;; - *) - lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" - ;; - esac + osf3*) + if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ++ allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' ++ archive_cmds_F77='$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' + else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' ++ allow_undefined_flag_F77=' -expect_unresolved \*' ++ archive_cmds_F77='$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' + fi - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: ++ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator_F77=: + ;; - echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 - echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 - if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - lt_cv_prog_compiler_c_o_CXX=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' ++ archive_cmds_F77='$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' ++ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $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' - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:30398: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:30402: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp - $SED '/^$/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* + # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' ++ hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi - hardcode_libdir_separator=: ++ hardcode_libdir_separator_F77=: + ;; - fi - echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 - echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + sco3.2v5*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='${wl}-Bexport' ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_shlibpath_var_F77=no ++ export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "x$archive_cmds" = "x"; then + if test "$GCC" = yes; then + wlarc='${wl}' + if $CC -v --help 2>/dev/null | grep -- -shared > /dev/null 2> /dev/null; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + fi + else + wlarc='' + lt_prog_compiler_static='-static' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + lt_prog_compiler_static='-static' + fi + fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77='-R$libdir' ++ hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${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' ;; + esac ;; + esac - link_all_deplibs=yes ++ link_all_deplibs_F77=yes + ;; + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' ++ archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_direct_F77=yes ++ hardcode_minus_L_F77=yes ++ hardcode_shlibpath_var_F77=no + ;; - hard_links="nottested" - if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 - echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 - echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 - echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi - else - need_locks=no - fi + sysv4) + case $host_vendor in + sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no ++ archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' ++ reload_cmds_F77='$CC -r -o $output$reload_objs' ++ hardcode_direct_F77=no + ;; + motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ++ hardcode_shlibpath_var_F77=no + ;; - echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 - echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_shlibpath_var_F77=no ++ export_dynamic_flag_spec_F77='-Bexport' + ;; - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - case $host_os in - aix4* | aix5*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; - cygwin* | mingw*) - export_symbols_cmds_CXX='$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' - ;; - *) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac + sysv4*MP*) + if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes - ld_shlibs=yes ++ ld_shlibs_F77=yes + fi + ;; - echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 - echo "${ECHO_T}$ld_shlibs_CXX" >&6 - test "$ld_shlibs_CXX" = no && can_build_shared=no + sysv4.2uw2*) - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=no - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_direct_F77=yes ++ hardcode_minus_L_F77=no ++ hardcode_shlibpath_var_F77=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag='${wl}-z ${wl}text' ++ no_undefined_flag_F77='${wl}-z ${wl}text' + if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else - archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ++ archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no ++ hardcode_shlibpath_var_F77=no + ;; + + sysv5*) - no_undefined_flag=' -z text' ++ no_undefined_flag_F77=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ ++ archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec= - hardcode_shlibpath_var=no ++ hardcode_libdir_flag_spec_F77= ++ hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no ++ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec_F77='-L$libdir' ++ hardcode_shlibpath_var_F77=no + ;; + + *) - ld_shlibs=no ++ ld_shlibs_F77=no + ;; + esac + fi + + { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 + echo "${ECHO_T}$ld_shlibs" >&6; } + test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then @@@ -30484,13 -36486,13 +37321,13 @@@ f # # Do we need to explicitly link libc? # - case "x$archive_cmds_need_lc_CXX" in -case "x$archive_cmds_need_lc" in ++case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added - archive_cmds_need_lc_CXX=yes - archive_cmds_need_lc=yes ++ archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds_CXX in - case $archive_cmds in ++ case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; @@@ -30512,25 -36514,25 +37349,25 @@@ echo $ECHO_N "checking whether -lc shou lib=conftest libobjs=conftest.$ac_objext deplibs= - wl=$lt_prog_compiler_wl_CXX - wl=$lt_prog_compiler_wl ++ wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ++ lt_save_allow_undefined_flag=$allow_undefined_flag_F77 ++ allow_undefined_flag_F77= ++ if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 ++ (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then - archive_cmds_need_lc_CXX=no - archive_cmds_need_lc=no ++ archive_cmds_need_lc_F77=no else - archive_cmds_need_lc_CXX=yes - archive_cmds_need_lc=yes ++ archive_cmds_need_lc_F77=yes fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - allow_undefined_flag=$lt_save_allow_undefined_flag ++ allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi @@@ -31097,39 -37099,39 +37934,39 @@@ uts4* dynamic_linker=no ;; esac - echo "$as_me:$LINENO: result: $dynamic_linker" >&5 - echo "${ECHO_T}$dynamic_linker" >&6 + { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 + echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no - echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 - echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 - hardcode_action_CXX= - if test -n "$hardcode_libdir_flag_spec_CXX" || \ - test -n "$runpath_var_CXX" || \ - test "X$hardcode_automatic_CXX" = "Xyes" ; then + { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action= + if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. - if test "$hardcode_direct_CXX" != no && - if test "$hardcode_direct" != no && ++ if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then ++ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && ++ test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. - hardcode_action_CXX=relink - hardcode_action=relink ++ hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_CXX=immediate - hardcode_action=immediate ++ hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. - hardcode_action_CXX=unsupported - hardcode_action=unsupported ++ hardcode_action_F77=unsupported fi - echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 - echo "${ECHO_T}$hardcode_action_CXX" >&6 + { echo "$as_me:$LINENO: result: $hardcode_action" >&5 + echo "${ECHO_T}$hardcode_action" >&6; } - if test "$hardcode_action_CXX" = relink; then -if test "$hardcode_action" = relink; then ++if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || @@@ -31167,30 -37169,30 +38004,87 @@@ echo "${ECHO_T}no" >&6; esac fi --if test "x$enable_dlopen" != xyes; then -- enable_dlopen=unknown -- enable_dlopen_self=unknown -- enable_dlopen_self_static=unknown --else -- lt_cv_dlopen=no -- lt_cv_dlopen_libs= -- case $host_os in -- beos*) -- lt_cv_dlopen="load_add_on" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes -- ;; -- mingw* | pw32*) -- lt_cv_dlopen="LoadLibrary" -- lt_cv_dlopen_libs= -- ;; ++# The else clause should only fire when bootstrapping the ++# libtool distribution, otherwise you forgot to ship ltmain.sh ++# with your package, and you will get complaints that there are ++# no rules to generate ltmain.sh. ++if test -f "$ltmain"; then ++ # See if we are running on zsh, and set the options which allow our commands through ++ # without removal of \ escapes. ++ if test -n "${ZSH_VERSION+set}" ; then ++ setopt NO_GLOB_SUBST ++ fi ++ # Now quote all the things that may contain metacharacters while being ++ # careful not to overquote the AC_SUBSTed values. We take copies of the ++ # variables and quote the copies for generation of the libtool script. ++ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ ++ SED SHELL STRIP \ ++ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ ++ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ ++ deplibs_check_method reload_flag reload_cmds need_locks \ ++ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ ++ lt_cv_sys_global_symbol_to_c_name_address \ ++ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ ++ old_postinstall_cmds old_postuninstall_cmds \ ++ compiler_F77 \ ++ CC_F77 \ ++ LD_F77 \ ++ lt_prog_compiler_wl_F77 \ ++ lt_prog_compiler_pic_F77 \ ++ lt_prog_compiler_static_F77 \ ++ lt_prog_compiler_no_builtin_flag_F77 \ ++ export_dynamic_flag_spec_F77 \ ++ thread_safe_flag_spec_F77 \ ++ whole_archive_flag_spec_F77 \ ++ enable_shared_with_static_runtimes_F77 \ ++ old_archive_cmds_F77 \ ++ old_archive_from_new_cmds_F77 \ ++ predep_objects_F77 \ ++ postdep_objects_F77 \ ++ predeps_F77 \ ++ postdeps_F77 \ ++ compiler_lib_search_path_F77 \ ++ archive_cmds_F77 \ ++ archive_expsym_cmds_F77 \ ++ postinstall_cmds_F77 \ ++ postuninstall_cmds_F77 \ ++ old_archive_from_expsyms_cmds_F77 \ ++ allow_undefined_flag_F77 \ ++ no_undefined_flag_F77 \ ++ export_symbols_cmds_F77 \ ++ hardcode_libdir_flag_spec_F77 \ ++ hardcode_libdir_flag_spec_ld_F77 \ ++ hardcode_libdir_separator_F77 \ ++ hardcode_automatic_F77 \ ++ module_cmds_F77 \ ++ module_expsym_cmds_F77 \ ++ lt_cv_prog_compiler_c_o_F77 \ ++ exclude_expsyms_F77 \ ++ include_expsyms_F77; do -- cygwin*) -- lt_cv_dlopen="dlopen" -- lt_cv_dlopen_libs= -- ;; ++ case $var in ++ old_archive_cmds_F77 | \ ++ old_archive_from_new_cmds_F77 | \ ++ archive_cmds_F77 | \ ++ archive_expsym_cmds_F77 | \ ++ module_cmds_F77 | \ ++ module_expsym_cmds_F77 | \ ++ old_archive_from_expsyms_cmds_F77 | \ ++ export_symbols_cmds_F77 | \ ++ extract_expsyms_cmds | reload_cmds | finish_cmds | \ ++ postinstall_cmds | postuninstall_cmds | \ ++ old_postinstall_cmds | old_postuninstall_cmds | \ ++ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) ++ # Double-quote double-evaled strings. ++ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ++ ;; ++ *) ++ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ++ ;; ++ esac ++ done darwin*) # if libdl is installed we need to link against it @@@ -31262,17 -37261,17 +38153,18 @@@ if test $ac_cv_lib_dl_dlopen = yes; the lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else -- lt_cv_dlopen="dyld" -- lt_cv_dlopen_libs= -- lt_cv_dlopen_self=yes ++# Shell to use when invoking shell scripts. ++SHELL=$lt_SHELL --fi ++# Whether or not to build shared libraries. ++build_libtool_libs=$enable_shared -- ;; ++# Whether or not to build static libraries. ++build_old_libs=$enable_static *) - echo "$as_me:$LINENO: checking for shl_load" >&5 - echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for shl_load" >&5 + echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@ -31286,26 -37285,25 +38178,24 @@@ cat >>conftest.$ac_ext <<_ACEO For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char shl_load (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ ++# The build system. ++build_alias=$build_alias ++build=$build ++build_os=$build_os --#ifdef __STDC__ --# include --#else --# include --#endif ++# An echo program that does not interpret backslashes. ++echo=$lt_echo --#undef shl_load ++# The archiver. ++AR=$lt_AR ++AR_FLAGS=$lt_AR_FLAGS - /* Override any gcc2 internal prototype to avoid an error. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" - { #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@@ -31446,26 -37433,25 +38325,21 @@@ cat >>conftest.$ac_ext <<_ACEO For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char dlopen (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ ++# A symbol stripping program ++STRIP=$lt_STRIP --#ifdef __STDC__ --# include --#else --# include --#endif ++# Used to examine libraries when file_magic_cmd begins "file" ++MAGIC_CMD=$MAGIC_CMD --#undef dlopen ++# Used on cygwin: DLL creation program. ++DLLTOOL="$DLLTOOL" - /* Override any gcc2 internal prototype to avoid an error. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" - { #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@@ -31726,43 -37695,43 +38583,57 @@@ if test $ac_cv_lib_dld_dld_link = yes; lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi ++# Do we need the lib prefix for modules? ++need_lib_prefix=$need_lib_prefix --fi ++# Do we need a version for libraries? ++need_version=$need_version ++# Whether dlopen is supported. ++dlopen_support=$enable_dlopen --fi ++# Whether dlopen of programs is supported. ++dlopen_self=$enable_dlopen_self ++# Whether dlopen of statically linked programs is supported. ++dlopen_self_static=$enable_dlopen_self_static --fi ++# Compiler flag to prevent dynamic linking. ++link_static_flag=$lt_lt_prog_compiler_static_F77 ++# Compiler flag to turn off builtin functions. ++no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 --fi ++# Compiler flag to allow reflexive dlopens. ++export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 ++# Compiler flag to generate shared objects directly from archives. ++whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 --fi ++# Compiler flag to generate thread-safe objects. ++thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 -- ;; -- esac ++# Library versioning type. ++version_type=$version_type -- if test "x$lt_cv_dlopen" != xno; then -- enable_dlopen=yes -- else -- enable_dlopen=no -- fi ++# Format of library name prefix. ++libname_spec=$lt_libname_spec -- case $lt_cv_dlopen in -- dlopen) -- save_CPPFLAGS="$CPPFLAGS" -- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ++# List of archive names. First name is the real one, the rest are links. ++# The last name is the one that the linker finds with -lNAME. ++library_names_spec=$lt_library_names_spec -- save_LDFLAGS="$LDFLAGS" -- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ++# The coded name of the library, if different from the real name. ++soname_spec=$lt_soname_spec -- save_LIBS="$LIBS" -- LIBS="$lt_cv_dlopen_libs $LIBS" ++# Commands used to build and install an old-style archive. ++RANLIB=$lt_RANLIB ++old_archive_cmds=$lt_old_archive_cmds_F77 ++old_postinstall_cmds=$lt_old_postinstall_cmds ++old_postuninstall_cmds=$lt_old_postuninstall_cmds - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 - echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@ -31772,63 -37741,63 +38643,37 @@@ els lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < --#endif ++# Create a temporary old-style archive to link instead of a shared archive. ++old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 --#include ++# Commands used to build and install a shared archive. ++archive_cmds=$lt_archive_cmds_F77 ++archive_expsym_cmds=$lt_archive_expsym_cmds_F77 ++postinstall_cmds=$lt_postinstall_cmds ++postuninstall_cmds=$lt_postuninstall_cmds --#ifdef RTLD_GLOBAL --# define LT_DLGLOBAL RTLD_GLOBAL --#else --# ifdef DL_GLOBAL --# define LT_DLGLOBAL DL_GLOBAL --# else --# define LT_DLGLOBAL 0 --# endif --#endif ++# Commands used to build a loadable module (assumed same as above if empty) ++module_cmds=$lt_module_cmds_F77 ++module_expsym_cmds=$lt_module_expsym_cmds_F77 --/* We may have to define LT_DLLAZY_OR_NOW in the command line if we -- find out it does not work in some platform. */ --#ifndef LT_DLLAZY_OR_NOW --# ifdef RTLD_LAZY --# define LT_DLLAZY_OR_NOW RTLD_LAZY --# else --# ifdef DL_LAZY --# define LT_DLLAZY_OR_NOW DL_LAZY --# else --# ifdef RTLD_NOW --# define LT_DLLAZY_OR_NOW RTLD_NOW --# else --# ifdef DL_NOW --# define LT_DLLAZY_OR_NOW DL_NOW --# else --# define LT_DLLAZY_OR_NOW 0 --# endif --# endif --# endif --# endif --#endif ++# Commands to strip libraries. ++old_striplib=$lt_old_striplib ++striplib=$lt_striplib --#ifdef __cplusplus --extern "C" void exit (int); --#endif ++# Dependencies to place before the objects being linked to create a ++# shared library. ++predep_objects=$lt_predep_objects_F77 --void fnord() { int i=42;} --int main () --{ -- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); -- int status = $lt_dlunknown; ++# Dependencies to place after the objects being linked to create a ++# shared library. ++postdep_objects=$lt_postdep_objects_F77 -- if (self) -- { -- if (dlsym (self,"fnord")) status = $lt_dlno_uscore; -- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; -- /* dlclose (self); */ -- } ++# Dependencies to place before the objects being linked to create a ++# shared library. ++predeps=$lt_predeps_F77 exit (status); } @@@ -31852,10 -37821,10 +38697,13 @@@ EO fi rm -fr conftest* ++# The library search path used internally by the compiler when linking ++# a shared library. ++compiler_lib_search_path=$lt_compiler_lib_search_path_F77 fi - echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 - echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" @@@ -32269,10 -38323,10 +39202,10 @@@ deplibs_check_method=$lt_deplibs_check_ file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. - allow_undefined_flag=$lt_allow_undefined_flag_CXX -allow_undefined_flag=$lt_allow_undefined_flag ++allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. - no_undefined_flag=$lt_no_undefined_flag_CXX -no_undefined_flag=$lt_no_undefined_flag ++no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds @@@ -32299,45 -38353,45 +39232,45 @@@ shlibpath_var=$shlibpath_va shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. - hardcode_action=$hardcode_action_CXX -hardcode_action=$hardcode_action ++hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. - hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec ++hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. - hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld ++hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. - hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -hardcode_libdir_separator=$lt_hardcode_libdir_separator ++hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. - hardcode_direct=$hardcode_direct_CXX -hardcode_direct=$hardcode_direct ++hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. - hardcode_minus_L=$hardcode_minus_L_CXX -hardcode_minus_L=$hardcode_minus_L ++hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. - hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX -hardcode_shlibpath_var=$hardcode_shlibpath_var ++hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. - hardcode_automatic=$hardcode_automatic_CXX -hardcode_automatic=$hardcode_automatic ++hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs_CXX -link_all_deplibs=$link_all_deplibs ++link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec @@@ -32346,24 -38400,24 +39279,24 @@@ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. - fix_srcfile_path="$fix_srcfile_path_CXX" -fix_srcfile_path="$fix_srcfile_path" ++fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. - always_export_symbols=$always_export_symbols_CXX -always_export_symbols=$always_export_symbols ++always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. - export_symbols_cmds=$lt_export_symbols_cmds_CXX -export_symbols_cmds=$lt_export_symbols_cmds ++export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. - exclude_expsyms=$lt_exclude_expsyms_CXX -exclude_expsyms=$lt_exclude_expsyms ++exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. - include_expsyms=$lt_include_expsyms_CXX -include_expsyms=$lt_include_expsyms ++include_expsyms=$lt_include_expsyms_F77 -# ### END LIBTOOL CONFIG +# ### END LIBTOOL TAG CONFIG: $tagname __EOF__ @@@ -32385,62 -38464,135 +39318,136 @@@ ac_compile='$CC -c $CFLAGS $CPPFLAGS co ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ldcxx=$with_gnu_ld - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + CC="$lt_save_CC" - else - tagname="" - fi + + # Check whether --with-tags was given. + if test "${with_tags+set}" = set; then + withval=$with_tags; tagnames="$withval" + fi + + + if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 + echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + + + cat <>config.warnings + output file \`$ofile' does not exist + AAW_EOF + + + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 + echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + + + cat <>config.warnings + output file \`$ofile' does not look like a libtool script + AAW_EOF + + + else + + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 + echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + + + cat <>config.warnings + using \`LTCC=$LTCC', extracted from \`$ofile' + AAW_EOF + + + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 + echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } ;; - esac - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 + echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi - ac_ext=f - ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' - ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_f77_compiler_gnu + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - archive_cmds_need_lc_F77=no - allow_undefined_flag_F77= - always_export_symbols_F77=no - archive_expsym_cmds_F77= - export_dynamic_flag_spec_F77= - hardcode_direct_F77=no - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_minus_L_F77=no - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - link_all_deplibs_F77=unknown - old_archive_cmds_F77=$old_archive_cmds - no_undefined_flag_F77= - whole_archive_flag_spec_F77= - enable_shared_with_static_runtimes_F77=no - # Source file extension for f77 test sources. - ac_ext=f - # Object file extension for compiled f77 test sources. ++# Source file extension for Java test sources. ++ac_ext=java + + archive_cmds_need_lc_CXX=no + allow_undefined_flag_CXX= + always_export_symbols_CXX=no + archive_expsym_cmds_CXX= + export_dynamic_flag_spec_CXX= + hardcode_direct_CXX=no + hardcode_libdir_flag_spec_CXX= + hardcode_libdir_flag_spec_ld_CXX= + hardcode_libdir_separator_CXX= + hardcode_minus_L_CXX=no + hardcode_automatic_CXX=no + module_cmds_CXX= + module_expsym_cmds_CXX= + link_all_deplibs_CXX=unknown + old_archive_cmds_CXX=$old_archive_cmds + no_undefined_flag_CXX= + whole_archive_flag_spec_CXX= + enable_shared_with_static_runtimes_CXX=no + + # Dependencies to place before and after the object being linked: + predep_objects_CXX= + postdep_objects_CXX= + predeps_CXX= + postdeps_CXX= + compiler_lib_search_path_CXX= + + # Source file extension for C++ test sources. + ac_ext=cpp + + # Object file extension for compiled C++ test sources. objext=o - objext_F77=$objext -objext_CXX=$objext ++objext_GCJ=$objext # Code to be used in simple compile tests - lt_simple_compile_test_code=" subroutine t\n return\n end\n" -lt_simple_compile_test_code="int some_variable = 0;\n" ++lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests - lt_simple_link_test_code=" program t\n end\n" -lt_simple_link_test_code='int main(int, char *) { return(0); }\n' ++lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. @@@ -32466,10 -38618,26 +39473,10 @@@ $rm conftest # Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_LD=$LD -lt_save_GCC=$GCC -GCC=$GXX -lt_save_with_gnu_ld=$with_gnu_ld -lt_save_path_LD=$lt_cv_path_LD -if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx -else - unset lt_cv_prog_gnu_ld -fi -if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX -else - unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} +lt_save_CC="$CC" - CC=${F77-"f77"} ++CC=${GCJ-"gcj"} compiler=$CC - compiler_F77=$CC + compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; @@@ -32481,1273 -38649,1645 +39488,1794 @@@ don cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 - echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $can_build_shared" >&5 - echo "${ECHO_T}$can_build_shared" >&6 -# We don't want -fno-exception wen compiling C++ code, so set the -# no_builtin_flag separately -if test "$GXX" = yes; then - lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' -else - lt_prog_compiler_no_builtin_flag_CXX= -fi ++# GCJ did not exist at the time GCC didn't implicitly link libc in. ++archive_cmds_need_lc_GCJ=no - echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 - echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 - test "$can_build_shared" = "no" && enable_shared=no -if test "$GXX" = yes; then - # Set up default GNU C++ configuration ++old_archive_cmds_GCJ=$old_archive_cmds - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix4* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - echo "$as_me:$LINENO: result: $enable_shared" >&5 - echo "${ECHO_T}$enable_shared" >&6 ++## CAVEAT EMPTOR: ++## There is no encapsulation within the following macros, do not change ++## the running order or otherwise move them around unless you know exactly ++## what you are doing... - echo "$as_me:$LINENO: checking whether to build static libraries" >&5 - echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - echo "$as_me:$LINENO: result: $enable_static" >&5 - echo "${ECHO_T}$enable_static" >&6 + # Check whether --with-gnu-ld was given. + if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no + fi - test "$ld_shlibs_F77" = no && can_build_shared=no + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 + echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } + else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } + fi + if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 ++echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 - GCC_F77="$G77" - LD_F77="$LD" + LD="$lt_cv_path_LD" + if test -n "$LD"; then + { echo "$as_me:$LINENO: result: $LD" >&5 + echo "${ECHO_T}$LD" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 + echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 + echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + # I'd rather use --version here, but apparently some GNU lds only accept -v. + case `$LD -v 2>&1 &5 + echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$lt_cv_prog_gnu_ld - lt_prog_compiler_wl_F77= - lt_prog_compiler_pic_F77= - lt_prog_compiler_static_F77= ++lt_prog_compiler_wl_GCJ= ++lt_prog_compiler_pic_GCJ= ++lt_prog_compiler_static_GCJ= +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' ++ lt_prog_compiler_wl_GCJ='-Wl,' ++ lt_prog_compiler_static_GCJ='-static' - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ++ lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ - grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_CXX= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' ++ lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; -else - GXX=no - with_gnu_ld=no - wlarc= -fi + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' ++ lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no ++ lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic - fi - ;; + # PORTME: fill in a description of your system's C++ link characteristics + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + ld_shlibs_CXX=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) - lt_prog_compiler_pic_F77='-fPIC' ++ lt_prog_compiler_pic_GCJ='-fPIC' + ;; esac + ;; - *) - lt_prog_compiler_pic_F77='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' + # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_static_GCJ='-Bstatic' else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi ++ lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi - fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_pic_GCJ='-qnocommon' ++ lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' ++ lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; -int -main () -{ + hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) - lt_prog_compiler_pic_F77='+Z' ++ lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ++ lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' ++ lt_prog_compiler_static_GCJ='-non_shared' + ;; -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' + ;; + linux*) + case $cc_basename in + icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' ++ lt_prog_compiler_wl_GCJ='-Wl,' ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_wl_GCJ='-Wl,' ++ lt_prog_compiler_pic_GCJ='-fpic' ++ lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) - lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. - lt_prog_compiler_static_F77='-non_shared' ++ lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; -fi + osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' ++ lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' ++ lt_prog_compiler_static_GCJ='-non_shared' + ;; -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' ++ lt_prog_compiler_pic_GCJ='-Kpic' ++ lt_prog_compiler_static_GCJ='-dn' + ;; - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; ++ lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) - lt_prog_compiler_wl_F77='-Wl,';; ++ lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; - archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_wl_GCJ='-Qoption ld ' ++ lt_prog_compiler_pic_GCJ='-PIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' + ;; -int -main () -{ + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_wl_GCJ='-Wl,' ++ lt_prog_compiler_pic_GCJ='-KPIC' ++ lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_pic_GCJ='-Kconform_pic' ++ lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi + uts4*) - lt_prog_compiler_pic_F77='-pic' - lt_prog_compiler_static_F77='-Bstatic' ++ lt_prog_compiler_pic_GCJ='-pic' ++ lt_prog_compiler_static_GCJ='-Bstatic' + ;; + - *) - lt_prog_compiler_can_build_shared_F77=no - ;; - esac - fi + - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 ++fi + - # - # Check to make sure the PIC flag actually works. - # - if test -n "$lt_prog_compiler_pic_F77"; then ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 - echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 - if test "${lt_prog_compiler_pic_works_F77+set}" = set; then ++echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 ++echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 ++if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_prog_compiler_pic_works_F77=no - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 ++ lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_F77" ++ lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:32758: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:35216: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 - echo "$as_me:32762: \$? = $ac_status" >&5 ++ echo "$as_me:35220: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_F77=yes ++ lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 ++echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 ++echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + - if test x"$lt_prog_compiler_pic_works_F77" = xyes; then - case $lt_prog_compiler_pic_F77 in ++if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then ++ case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; - *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; ++ *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else - lt_prog_compiler_pic_F77= - lt_prog_compiler_can_build_shared_F77=no ++ lt_prog_compiler_pic_GCJ= ++ lt_prog_compiler_can_build_shared_GCJ=no +fi + - fi - case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_F77= - ;; - *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" - ;; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; +esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_cxx_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 - if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then ++if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - lt_cv_prog_compiler_c_o_F77=no ++ lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:32820: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:35278: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 - echo "$as_me:32824: \$? = $ac_status" >&5 ++ echo "$as_me:35282: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes ++ lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi - echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 - echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 ++echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 ++echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 - hard_links="nottested" - if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 - echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 - echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 - echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi - else - need_locks=no fi - echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 - echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - runpath_var= - allow_undefined_flag_F77= - enable_shared_with_static_runtimes_F77=no - archive_cmds_F77= - archive_expsym_cmds_F77= - old_archive_From_new_cmds_F77= - old_archive_from_expsyms_cmds_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - thread_safe_flag_spec_F77= - hardcode_libdir_flag_spec_F77= - hardcode_libdir_flag_spec_ld_F77= - hardcode_libdir_separator_F77= - hardcode_direct_F77=no - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=unsupported - link_all_deplibs_F77=unknown - hardcode_automatic_F77=no - module_cmds_F77= - module_expsym_cmds_F77= - always_export_symbols_F77=no - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_F77= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_CXX=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX=' ' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - ld_shlibs_CXX=no - ;; - esac ++ openbsd*) ++ with_gnu_ld=no + ;; + esac - done - cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - case $host_os in + cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs_CXX=no ++ whole_archive_flag_spec_GCJ= + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$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' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='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}' + else + archive_expsym_cmds_CXX='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}' + fi + module_expsym_cmds_CXX='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}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='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}' + module_expsym_cmds_CXX='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}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$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' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$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' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + hardcode_libdir_separator_CXX=: + ;; + ia64*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + *) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; ++ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers ++ whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ++ tmp_addflag=' $pic_flag -Mnomain' ;; ++ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 ++ tmp_addflag=' -i_dynamic' ;; ++ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 ++ tmp_addflag=' -i_dynamic -nofor_main' ;; ++ ifc* | ifort*) # Intel Fortran compiler ++ tmp_addflag=' -nofor_main' ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + ia64*|hppa*64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$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' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$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' + else + archive_cmds_CXX='$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' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='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' + archive_expsym_cmds_CXX='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' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$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' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no ;; openbsd*) - with_gnu_ld=no + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' ;; - esac - - ld_shlibs_F77=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_F77='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_F77= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='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' - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: - *** Warning: the GNU linker, at least up to release 2.9.1, is reported - *** to be unable to reliably create shared libraries on AIX. - *** Therefore, libtool is disabling shared libraries support. If you - *** really care for shared libraries, you may want to modify your PATH - *** so that a non-GNU linker is found, and then restart. + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' - EOF - fi - ;; + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$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' - amigaos*) - archive_cmds_F77='$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)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$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' - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_F77='-L$libdir' - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=no - enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs_F77=no - fi - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test $supports_anon_versioning = yes; then - archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no fi - else - ld_shlibs_F77=no - fi - ;; + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='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' - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: - *** Warning: The releases 2.8.* of the GNU linker cannot reliably - *** create shared libraries on Solaris systems. Therefore, libtool - *** is disabling shared libraries support. We urge you to upgrade GNU - *** binutils to release 2.9.1 or newer. Another option is to modify - *** your PATH or compiler configuration so that the native linker is - *** used, and then restart. + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$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' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $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~ + $rm $lib.exp' - EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + 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' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$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' - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: - if test "$ld_shlibs_F77" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag_F77=unsupported - always_export_symbols_F77=yes - archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L_F77=yes - if test "$GCC" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct_F77=unsupported - fi - ;; + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no fi - aix_use_runtimelinking=no + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $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' - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${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' + ;; esac + link_all_deplibs_CXX=yes - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi + output_verbose_link_cmd='echo' - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + if $CC -v --help 2>/dev/null | grep -- -shared > /dev/null 2> /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - hardcode_direct_F77=yes + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + lt_prog_compiler_static_CXX='-static' + else + archive_cmds_CXX='$CC ${wl}-G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC ${wl}-G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC ${wl}-G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + lt_prog_compiler_static_CXX='${wl}-Bstatic' + fi else - # We have old collect2 - hardcode_direct_F77=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L_F77=yes - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_libdir_separator_F77= + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi - fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 + echo "${ECHO_T}$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + GCC_CXX="$GXX" + LD_CXX="$LD" - end - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. - aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'` - # Check for a 64-bit object if we didn't find anything. - if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main + prev= + fi - end - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; - aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'` - # Check for a 64-bit object if we didn't find anything. - if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } - }'`; fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe + else + echo "libtool.m4: error: problem compiling CXX test program" fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag_F77=' ${wl}-bernotok' - allow_undefined_flag_F77=' ${wl}-berok' - # -bexpall does not export symbols beginning with underscore (_) - always_export_symbols_F77=yes - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77=' ' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; + $rm -f confest.$objext - amigaos*) - archive_cmds_F77='$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)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_F77=no - ;; + # PORTME: override above test on systems where it is broken + case $host_os in + solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + esac - bsdi[45]*) - export_dynamic_flag_spec_F77=-rdynamic - ;; - cygwin* | mingw* | pw32*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_From_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; + case " $postdeps_CXX " in + *" -lc "*) archive_cmds_need_lc_CXX=no ;; + esac - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='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}' - module_expsym_cmds_F77='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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - archive_expsym_cmds_F77='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}' - module_expsym_cmds_F77='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}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - fi - ;; + lt_prog_compiler_wl_CXX= + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX= - dgux*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; + { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - freebsd1*) - ld_shlibs_F77=no - ;; + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds_F77='$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' - else - archive_cmds_F77='$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' + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic fi - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' ;; - - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*|ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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" ;; esac - else - case $host_cpu in - hppa*64*|ia64*) - archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; esac - fi - if test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - ia64*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; - *) - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_direct_F77=yes - export_dynamic_flag_spec_F77='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_F77=yes - ;; + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_F77='$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' - else - archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - link_all_deplibs_F77=yes - ;; + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC*) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + if $CC -v --help 2>/dev/null | grep -- -static > /dev/null 2> /dev/null; then + lt_prog_compiler_static_CXX='-static' + else + # GCC with Sun linker + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='${wl}-Bstatic' + fi + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } - newsos6) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - hardcode_shlibpath_var_F77=no - ;; + # + # Check to make sure the PIC flag actually works. + # + if test -n "$lt_prog_compiler_pic_CXX"; then - openbsd*) - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-R$libdir' - ;; - *) - archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - ;; - esac - fi - ;; + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 + echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } + if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:40141: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:40145: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* - os2*) - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes - allow_undefined_flag_F77=unsupported - archive_cmds_F77='$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' - old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; + fi + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$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' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$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' - fi - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_F77=: - ;; + if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac + else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no + fi - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$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' - hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$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' - archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ - $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' + fi + case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; + esac - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_F77='-rpath $libdir' - fi - hardcode_libdir_separator_F77=: - ;; + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - sco3.2v5*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:40203: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:40207: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' - else - wlarc='' - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - fi - hardcode_libdir_flag_spec_F77='-R$libdir' - hardcode_shlibpath_var_F77=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${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' ;; - esac ;; - esac - link_all_deplibs_F77=yes - ;; + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_direct_F77=yes - hardcode_minus_L_F77=yes - hardcode_shlibpath_var_F77=no - ;; - sysv4) - case $host_vendor in - sni) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_F77='$CC -r -o $output$reload_objs' - hardcode_direct_F77=no - ;; - motorola) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 + echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; + cat <>config.warnings + \`$CC' does not support \`-c -o', so \`make -j' may be unsafe + AAW_EOF - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - ;; + need_locks=warn + fi + else + need_locks=no + fi - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - *) - ld_shlibs_F77=no - ;; - esac - fi + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$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' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac - echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 - echo "${ECHO_T}$ld_shlibs_F77" >&6 - test "$ld_shlibs_F77" = no && can_build_shared=no + { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 + echo "${ECHO_T}$ld_shlibs_CXX" >&6; } + test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then @@@ -34440,3289 -40980,3260 +41968,3972 @@@ echo "${ECHO_T}no" >&6; esac fi + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown + else + lt_cv_dlopen=no + lt_cv_dlopen_libs= - - # The else clause should only fire when bootstrapping the - # libtool distribution, otherwise you forgot to ship ltmain.sh - # with your package, and you will get complaints that there are - # no rules to generate ltmain.sh. - if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_F77 \ - CC_F77 \ - LD_F77 \ - lt_prog_compiler_wl_F77 \ - lt_prog_compiler_pic_F77 \ - lt_prog_compiler_static_F77 \ - lt_prog_compiler_no_builtin_flag_F77 \ - export_dynamic_flag_spec_F77 \ - thread_safe_flag_spec_F77 \ - whole_archive_flag_spec_F77 \ - enable_shared_with_static_runtimes_F77 \ - old_archive_cmds_F77 \ - old_archive_from_new_cmds_F77 \ - predep_objects_F77 \ - postdep_objects_F77 \ - predeps_F77 \ - postdeps_F77 \ - compiler_lib_search_path_F77 \ - archive_cmds_F77 \ - archive_expsym_cmds_F77 \ - postinstall_cmds_F77 \ - postuninstall_cmds_F77 \ - old_archive_from_expsyms_cmds_F77 \ - allow_undefined_flag_F77 \ - no_undefined_flag_F77 \ - export_symbols_cmds_F77 \ - hardcode_libdir_flag_spec_F77 \ - hardcode_libdir_flag_spec_ld_F77 \ - hardcode_libdir_separator_F77 \ - hardcode_automatic_F77 \ - module_cmds_F77 \ - module_expsym_cmds_F77 \ - lt_cv_prog_compiler_c_o_F77 \ - exclude_expsyms_F77 \ - include_expsyms_F77; do - - case $var in - old_archive_cmds_F77 | \ - old_archive_from_new_cmds_F77 | \ - archive_cmds_F77 | \ - archive_expsym_cmds_F77 | \ - module_cmds_F77 | \ - module_expsym_cmds_F77 | \ - old_archive_from_expsyms_cmds_F77 | \ - export_symbols_cmds_F77 | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes ;; - esac - - cfgfile="$ofile" - - cat <<__EOF__ >> "$cfgfile" - # ### BEGIN LIBTOOL TAG CONFIG: $tagname - - # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - - # Shell to use when invoking shell scripts. - SHELL=$lt_SHELL - - # Whether or not to build shared libraries. - build_libtool_libs=$enable_shared - # Whether or not to build static libraries. - build_old_libs=$enable_static - - # Whether or not to add -lc for building shared libraries. - build_libtool_need_lc=$archive_cmds_need_lc_F77 - - # Whether or not to disallow shared libs when runtime libs are static - allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 - - # Whether or not to optimize for fast installation. - fast_install=$enable_fast_install - - # The host system. - host_alias=$host_alias - host=$host - host_os=$host_os - - # The build system. - build_alias=$build_alias - build=$build - build_os=$build_os - - # An echo program that does not interpret backslashes. - echo=$lt_echo - - # The archiver. - AR=$lt_AR - AR_FLAGS=$lt_AR_FLAGS - - # A C compiler. - LTCC=$lt_LTCC - - # A language-specific compiler. - CC=$lt_compiler_F77 - - # Is the compiler the GNU C compiler? - with_gcc=$GCC_F77 - - # An ERE matcher. - EGREP=$lt_EGREP - - # The linker used to build libraries. - LD=$lt_LD_F77 - - # Whether we need hard or soft links. - LN_S=$lt_LN_S - - # A BSD-compatible nm program. - NM=$lt_NM - - # A symbol stripping program - STRIP=$lt_STRIP - - # Used to examine libraries when file_magic_cmd begins "file" - MAGIC_CMD=$MAGIC_CMD - - # Used on cygwin: DLL creation program. - DLLTOOL="$DLLTOOL" - - # Used on cygwin: object dumper. - OBJDUMP="$OBJDUMP" - - # Used on cygwin: assembler. - AS="$AS" - - # The name of the directory that contains temporary libtool files. - objdir=$objdir - - # How to create reloadable object files. - reload_flag=$lt_reload_flag - reload_cmds=$lt_reload_cmds - - # How to pass a linker flag through the compiler. - wl=$lt_lt_prog_compiler_wl_F77 - - # Object file suffix (normally "o"). - objext="$ac_objext" - - # Old archive suffix (normally "a"). - libext="$libext" - - # Shared library suffix (normally ".so"). - shrext_cmds='$shrext_cmds' - - # Executable file suffix (normally ""). - exeext="$exeext" - - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic_F77 - pic_mode=$pic_mode - - # What is the maximum length of a command? - max_cmd_len=$lt_cv_sys_max_cmd_len - - # Does compiler simultaneously support -c and -o options? - compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 - - # Must we lock files when doing compilation? - need_locks=$lt_need_locks - - # Do we need the lib prefix for modules? - need_lib_prefix=$need_lib_prefix + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; - # Do we need a version for libraries? - need_version=$need_version + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; - # Whether dlopen is supported. - dlopen_support=$enable_dlopen + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ - # Whether dlopen of programs is supported. - dlopen_self=$enable_dlopen_self + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dlopen (); + int + main () + { + return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Whether dlopen of statically linked programs is supported. - dlopen_self_static=$enable_dlopen_self_static + ac_cv_lib_dl_dlopen=no + fi - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static_F77 + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else - # Compiler flag to turn off builtin functions. - no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes - # Compiler flag to allow reflexive dlopens. - export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + fi - # Compiler flag to generate shared objects directly from archives. - whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + ;; - # Compiler flag to generate thread-safe objects. - thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 + echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } + if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ + #define shl_load innocuous_shl_load - # Library versioning type. - version_type=$version_type + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - # Format of library name prefix. - libname_spec=$lt_libname_spec + #ifdef __STDC__ + # include + #else + # include + #endif - # List of archive names. First name is the real one, the rest are links. - # The last name is the one that the linker finds with -lNAME. - library_names_spec=$lt_library_names_spec + #undef shl_load - # The coded name of the library, if different from the real name. - soname_spec=$lt_soname_spec + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char shl_load (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_shl_load || defined __stub___shl_load + choke me + #endif - # Commands used to build and install an old-style archive. - RANLIB=$lt_RANLIB - old_archive_cmds=$lt_old_archive_cmds_F77 - old_postinstall_cmds=$lt_old_postinstall_cmds - old_postuninstall_cmds=$lt_old_postuninstall_cmds + int + main () + { + return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Create an old-style archive from a shared archive. - old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + ac_cv_func_shl_load=no + fi - # Create a temporary old-style archive to link instead of a shared archive. - old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 + echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } + if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" + else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ - # Commands used to build and install a shared archive. - archive_cmds=$lt_archive_cmds_F77 - archive_expsym_cmds=$lt_archive_expsym_cmds_F77 - postinstall_cmds=$lt_postinstall_cmds - postuninstall_cmds=$lt_postuninstall_cmds + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char shl_load (); + int + main () + { + return shl_load (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_shl_load=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Commands used to build a loadable module (assumed same as above if empty) - module_cmds=$lt_module_cmds_F77 - module_expsym_cmds=$lt_module_expsym_cmds_F77 + ac_cv_lib_dld_shl_load=no + fi - # Commands to strip libraries. - old_striplib=$lt_old_striplib - striplib=$lt_striplib + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } + if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" + else + { echo "$as_me:$LINENO: checking for dlopen" >&5 + echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } + if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ + #define dlopen innocuous_dlopen - # Dependencies to place before the objects being linked to create a - # shared library. - predep_objects=$lt_predep_objects_F77 + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - # Dependencies to place after the objects being linked to create a - # shared library. - postdep_objects=$lt_postdep_objects_F77 + #ifdef __STDC__ + # include + #else + # include + #endif - # Dependencies to place before the objects being linked to create a - # shared library. - predeps=$lt_predeps_F77 + #undef dlopen - # Dependencies to place after the objects being linked to create a - # shared library. - postdeps=$lt_postdeps_F77 + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dlopen (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_dlopen || defined __stub___dlopen + choke me + #endif - # The library search path used internally by the compiler when linking - # a shared library. - compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + int + main () + { + return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method + ac_cv_func_dlopen=no + fi - # Command to use when deplibs_check_method == file_magic. - file_magic_cmd=$lt_file_magic_cmd + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 + echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } + if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" + else + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldl $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ - # Flag that allows shared libraries with undefined symbols to be built. - allow_undefined_flag=$lt_allow_undefined_flag_F77 + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dlopen (); + int + main () + { + return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dl_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Flag that forces no undefined symbols. - no_undefined_flag=$lt_no_undefined_flag_F77 + ac_cv_lib_dl_dlopen=no + fi - # Commands used to finish a libtool library installation in a directory. - finish_cmds=$lt_finish_cmds + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + else + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } + if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsvld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ - # Same as above, but a single script fragment to be evaled but not shown. - finish_eval=$lt_finish_eval + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dlopen (); + int + main () + { + return dlopen (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_svld_dlopen=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # Take the output of nm and produce a listing of raw symbols and C names. - global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + ac_cv_lib_svld_dlopen=no + fi - # Transform the output of nm in a proper C declaration - global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-ldld $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ - # Transform the output of nm in a C name address pair - global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dld_link (); + int + main () + { + return dld_link (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_dld_dld_link=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - # This is the shared library runtime path variable. - runpath_var=$runpath_var + ac_cv_lib_dld_dld_link=no + fi - # This is the shared library path variable. - shlibpath_var=$shlibpath_var + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } + if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" + fi - # Is shlibpath searched before the hard-coded library search path? - shlibpath_overrides_runpath=$shlibpath_overrides_runpath - # How to hardcode a shared library path into an executable. - hardcode_action=$hardcode_action_F77 + fi - # Whether we should hardcode library paths into libraries. - hardcode_into_libs=$hardcode_into_libs - # Flag to hardcode \$libdir into a binary during linking. - # This must work even if \$libdir does not exist. - hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + fi - # If ld is used when linking, flag to hardcode \$libdir into - # a binary during linking. This must work even if \$libdir does - # not exist. - hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 - # Whether we need a single -rpath flag with a separated argument. - hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + fi - # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the - # resulting binary. - hardcode_direct=$hardcode_direct_F77 - # Set to yes if using the -LDIR flag during linking hardcodes DIR into the - # resulting binary. - hardcode_minus_L=$hardcode_minus_L_F77 + fi - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into - # the resulting binary. - hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 - # Set to yes if building a shared library automatically hardcodes DIR into the library - # and all subsequent libraries and executables linked against it. - hardcode_automatic=$hardcode_automatic_F77 + fi - # Variables whose values should be saved in libtool wrapper scripts and - # restored at relink time. - variables_saved_for_relink="$variables_saved_for_relink" + ;; + esac - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs_F77 + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi - # Compile-time system search path for libraries - sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - # Run-time system search path for libraries - sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - # Fix the shell variable \$srcfile for the compiler. - fix_srcfile_path="$fix_srcfile_path_F77" + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" - # Set to yes if exported symbols are required. - always_export_symbols=$always_export_symbols_F77 + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < + #endif - # The commands to extract the exported symbol list from a shared archive. - extract_expsyms_cmds=$lt_extract_expsyms_cmds + #include - # Symbols that should not be listed in the preloaded symbols. - exclude_expsyms=$lt_exclude_expsyms_F77 + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LT_DLGLOBAL DL_GLOBAL + # else + # define LT_DLGLOBAL 0 + # endif + #endif - # Symbols that must always be exported. - include_expsyms=$lt_include_expsyms_F77 + /* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LT_DLLAZY_OR_NOW + # ifdef RTLD_LAZY + # define LT_DLLAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LT_DLLAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LT_DLLAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LT_DLLAZY_OR_NOW DL_NOW + # else + # define LT_DLLAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif - # ### END LIBTOOL TAG CONFIG: $tagname + #ifdef __cplusplus + extern "C" void exit (int); + #endif - __EOF__ + void fnord() { int i=42;} + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } - else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" + exit (status); + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no fi fi + rm -fr conftest* + + + fi + { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < + #endif - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu + #include - CC="$lt_save_CC" + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LT_DLGLOBAL DL_GLOBAL + # else + # define LT_DLGLOBAL 0 + # endif + #endif - else - tagname="" - fi - ;; + /* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LT_DLLAZY_OR_NOW + # ifdef RTLD_LAZY + # define LT_DLLAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LT_DLLAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LT_DLLAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LT_DLLAZY_OR_NOW DL_NOW + # else + # define LT_DLLAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif - GCJ) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + #ifdef __cplusplus + extern "C" void exit (int); + #endif + void fnord() { int i=42;} + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } - # Source file extension for Java test sources. - ac_ext=java + exit (status); + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi + fi + rm -fr conftest* - # Object file extension for compiled Java test sources. - objext=o - objext_GCJ=$objext - # Code to be used in simple compile tests - lt_simple_compile_test_code="class foo {}\n" + fi + { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi - # Code to be used in simple link tests - lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac - # ltmain only uses $CC for tagged configurations so make sure $CC is set. + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac - # If no C compiler was specified, use CC. - LTCC=${LTCC-"$CC"} + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac + fi - # Allow CC to be a program name with arguments. - compiler=$CC + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh + # with your package, and you will get complaints that there are + # no rules to generate ltmain.sh. + if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" >conftest.$ac_ext - eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err - _lt_compiler_boilerplate=`cat conftest.err` - $rm conftest* + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done - ac_outfile=conftest.$ac_objext - printf "$lt_simple_link_test_code" >conftest.$ac_ext - eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err - _lt_linker_boilerplate=`cat conftest.err` - $rm conftest* + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + cfgfile="$ofile" - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - CC=${GCJ-"gcj"} - compiler=$CC - compiler_GCJ=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + cat <<__EOF__ >> "$cfgfile" + # ### BEGIN LIBTOOL TAG CONFIG: $tagname + # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - # GCJ did not exist at the time GCC didn't implicitly link libc in. - archive_cmds_need_lc_GCJ=no + # Shell to use when invoking shell scripts. + SHELL=$lt_SHELL - old_archive_cmds_GCJ=$old_archive_cmds + # Whether or not to build shared libraries. + build_libtool_libs=$enable_shared - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... + # Whether or not to build static libraries. + build_old_libs=$enable_static - lt_prog_compiler_no_builtin_flag_GCJ= + # Whether or not to add -lc for building shared libraries. + build_libtool_need_lc=$archive_cmds_need_lc_CXX - if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + # Whether or not to disallow shared libs when runtime libs are static + allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + # Whether or not to optimize for fast installation. + fast_install=$enable_fast_install - echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 - echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 - if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:34954: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:34958: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp - $SED '/^$/d' conftest.err >conftest.er2 - if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $rm conftest* + # The host system. + host_alias=$host_alias + host=$host + host_os=$host_os - fi - echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 - echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + # The build system. + build_alias=$build_alias + build=$build + build_os=$build_os - if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" - else - : - fi + # An echo program that does not interpret backslashes. + echo=$lt_echo - fi + # The archiver. + AR=$lt_AR + AR_FLAGS=$lt_AR_FLAGS - lt_prog_compiler_wl_GCJ= - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_static_GCJ= + # A C compiler. + LTCC=$lt_LTCC - echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 - echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + # A language-specific compiler. + CC=$lt_compiler_CXX - if test "$GCC" = yes; then - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_static_GCJ='-static' + # Is the compiler the GNU C compiler? + with_gcc=$GCC_CXX - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; + # An ERE matcher. + EGREP=$lt_EGREP - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' - ;; + # The linker used to build libraries. + LD=$lt_LD_CXX - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; + # Whether we need hard or soft links. + LN_S=$lt_LN_S - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; + # A BSD-compatible nm program. + NM=$lt_NM - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_GCJ='-fno-common' - ;; + # A symbol stripping program + STRIP=$lt_STRIP - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_GCJ=no - enable_shared=no - ;; + # Used to examine libraries when file_magic_cmd begins "file" + MAGIC_CMD=$MAGIC_CMD - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic_GCJ=-Kconform_pic - fi - ;; + # Used on cygwin: DLL creation program. + DLLTOOL="$DLLTOOL" - hpux*) - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - ;; + # Used on cygwin: object dumper. + OBJDUMP="$OBJDUMP" - *) - lt_prog_compiler_pic_GCJ='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl_GCJ='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_GCJ='-Bstatic' - else - lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' - fi - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; + # Used on cygwin: assembler. + AS="$AS" - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; + # The name of the directory that contains temporary libtool files. + objdir=$objdir - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_GCJ='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' - ;; + # How to create reloadable object files. + reload_flag=$lt_reload_flag + reload_cmds=$lt_reload_cmds - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; + # How to pass a linker flag through the compiler. + wl=$lt_lt_prog_compiler_wl_CXX - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + # Object file suffix (normally "o"). + objext="$ac_objext" - linux*) - case $cc_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; - esac - ;; + # Old archive suffix (normally "a"). + libext="$libext" - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; + # Shared library suffix (normally ".so"). + shrext_cmds='$shrext_cmds' - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; + # Executable file suffix (normally ""). + exeext="$exeext" - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_CXX + pic_mode=$pic_mode - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + # What is the maximum length of a command? + max_cmd_len=$lt_cv_sys_max_cmd_len - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + # Does compiler simultaneously support -c and -o options? + compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + + # Must we lock files when doing compilation? + need_locks=$lt_need_locks - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; + # Do we need the lib prefix for modules? + need_lib_prefix=$need_lib_prefix - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; + # Do we need a version for libraries? + need_version=$need_version - uts4*) - lt_prog_compiler_pic_GCJ='-pic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; + # Whether dlopen is supported. + dlopen_support=$enable_dlopen - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi + # Whether dlopen of programs is supported. + dlopen_self=$enable_dlopen_self - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + # Whether dlopen of statically linked programs is supported. + dlopen_self_static=$enable_dlopen_self_static - # - # Check to make sure the PIC flag actually works. - # - if test -n "$lt_prog_compiler_pic_GCJ"; then + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_CXX - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 - echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 - if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - lt_prog_compiler_pic_works_GCJ=no - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_GCJ" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:35216: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:35220: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp - $SED '/^$/d' conftest.err >conftest.er2 - if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_pic_works_GCJ=yes - fi - fi - $rm conftest* + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX - fi - echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 - echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + # Compiler flag to allow reflexive dlopens. + export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX - if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac - else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no - fi + # Compiler flag to generate shared objects directly from archives. + whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX - fi - case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic_GCJ= - ;; - *) - lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" - ;; - esac + # Compiler flag to generate thread-safe objects. + thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX - echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 - echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 - if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - lt_cv_prog_compiler_c_o_GCJ=no - $rm -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + # Library versioning type. + version_type=$version_type - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:35278: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:35282: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp - $SED '/^$/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $rm conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files - $rm out/* && rmdir out - cd .. - rmdir conftest - $rm conftest* + # Format of library name prefix. + libname_spec=$lt_libname_spec - fi - echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 - echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + # List of archive names. First name is the real one, the rest are links. + # The last name is the one that the linker finds with -lNAME. + library_names_spec=$lt_library_names_spec + # The coded name of the library, if different from the real name. + soname_spec=$lt_soname_spec - hard_links="nottested" - if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 - echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 - hard_links=yes - $rm conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 - echo "${ECHO_T}$hard_links" >&6 - if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 - echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi - else - need_locks=no - fi + # Commands used to build and install an old-style archive. + RANLIB=$lt_RANLIB + old_archive_cmds=$lt_old_archive_cmds_CXX + old_postinstall_cmds=$lt_old_postinstall_cmds + old_postuninstall_cmds=$lt_old_postuninstall_cmds - echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 - echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + # Create an old-style archive from a shared archive. + old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX - runpath_var= - allow_undefined_flag_GCJ= - enable_shared_with_static_runtimes_GCJ=no - archive_cmds_GCJ= - archive_expsym_cmds_GCJ= - old_archive_From_new_cmds_GCJ= - old_archive_from_expsyms_cmds_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - thread_safe_flag_spec_GCJ= - hardcode_libdir_flag_spec_GCJ= - hardcode_libdir_flag_spec_ld_GCJ= - hardcode_libdir_separator_GCJ= - hardcode_direct_GCJ=no - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=unsupported - link_all_deplibs_GCJ=unknown - hardcode_automatic_GCJ=no - module_cmds_GCJ= - module_expsym_cmds_GCJ= - always_export_symbols_GCJ=no - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms_GCJ= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - extract_expsyms_cmds= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + # Create a temporary old-style archive to link instead of a shared archive. + old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX - case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no - ;; - esac + # Commands used to build and install a shared archive. + archive_cmds=$lt_archive_cmds_CXX + archive_expsym_cmds=$lt_archive_expsym_cmds_CXX + postinstall_cmds=$lt_postinstall_cmds + postuninstall_cmds=$lt_postuninstall_cmds - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + # Commands used to build a loadable module (assumed same as above if empty) + module_cmds=$lt_module_cmds_CXX + module_expsym_cmds=$lt_module_expsym_cmds_CXX - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec_GCJ= - fi - supports_anon_versioning=no - case `$LD -v 2>/dev/null` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac + # Commands to strip libraries. + old_striplib=$lt_old_striplib + striplib=$lt_striplib - # See if GNU ld supports shared libraries. - case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_GCJ=no - cat <&2 + # Dependencies to place before the objects being linked to create a + # shared library. + predep_objects=$lt_predep_objects_CXX - *** Warning: the GNU linker, at least up to release 2.9.1, is reported - *** to be unable to reliably create shared libraries on AIX. - *** Therefore, libtool is disabling shared libraries support. If you - *** really care for shared libraries, you may want to modify your PATH - *** so that a non-GNU linker is found, and then restart. + # Dependencies to place after the objects being linked to create a + # shared library. + postdep_objects=$lt_postdep_objects_CXX - EOF - fi - ;; + # Dependencies to place before the objects being linked to create a + # shared library. + predeps=$lt_predeps_CXX - amigaos*) - archive_cmds_GCJ='$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)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes + # Dependencies to place after the objects being linked to create a + # shared library. + postdeps=$lt_postdeps_CXX - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_CXX - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method - cygwin* | mingw* | pw32*) - # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_GCJ='-L$libdir' - allow_undefined_flag_GCJ=unsupported - always_export_symbols_GCJ=no - enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + # Command to use when deplibs_check_method == file_magic. + file_magic_cmd=$lt_file_magic_cmd - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' - else - ld_shlibs_GCJ=no - fi - ;; + # Flag that allows shared libraries with undefined symbols to be built. + allow_undefined_flag=$lt_allow_undefined_flag_CXX - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + # Flag that forces no undefined symbols. + no_undefined_flag=$lt_no_undefined_flag_CXX -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action_CXX + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 -# If ld is used when linking, flag to hardcode \$libdir into -# a binary during linking. This must work even if \$libdir does -# not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; -# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct_CXX + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L_CXX + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; -# Set to yes if building a shared library automatically hardcodes DIR into the library -# and all subsequent libraries and executables linked against it. -hardcode_automatic=$hardcode_automatic_CXX + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs_CXX + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$fix_srcfile_path_CXX" + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi -# Set to yes if exported symbols are required. -always_export_symbols=$always_export_symbols_CXX + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds_CXX +int +main () +{ -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms_CXX +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms_CXX +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi -# ### END LIBTOOL TAG CONFIG: $tagname + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -__EOF__ +int +main () +{ + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -CC=$lt_save_CC -LDCXX=$LD -LD=$lt_save_LD -GCC=$lt_save_GCC -with_gnu_ldcxx=$with_gnu_ld -with_gnu_ld=$lt_save_with_gnu_ld -lt_cv_path_LDCXX=$lt_cv_path_LD -lt_cv_path_LD=$lt_save_path_LD -lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld -lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - else - tagname="" + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_GCJ=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ=' ' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi - ;; - - F77) - if test -n "$F77" && test "X$F77" != "Xno"; then + fi + ;; -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu + amigaos*) + archive_cmds_GCJ='$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)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; -archive_cmds_need_lc_F77=no -allow_undefined_flag_F77= -always_export_symbols_F77=no -archive_expsym_cmds_F77= -export_dynamic_flag_spec_F77= -hardcode_direct_F77=no -hardcode_libdir_flag_spec_F77= -hardcode_libdir_flag_spec_ld_F77= -hardcode_libdir_separator_F77= -hardcode_minus_L_F77=no -hardcode_automatic_F77=no -module_cmds_F77= -module_expsym_cmds_F77= -link_all_deplibs_F77=unknown -old_archive_cmds_F77=$old_archive_cmds -no_undefined_flag_F77= -whole_archive_flag_spec_F77= -enable_shared_with_static_runtimes_F77=no + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; -# Source file extension for f77 test sources. -ac_ext=f + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='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}' + module_expsym_cmds_GCJ='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}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='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}' + module_expsym_cmds_GCJ='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}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; -# Object file extension for compiled f77 test sources. -objext=o -objext_F77=$objext + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; -# Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; + # Code to be used in simple link tests + lt_simple_link_test_code=" program t\n end\n" - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; + # ltmain only uses $CC for tagged configurations so make sure $CC is set. - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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' - else - archive_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes + # If no C compiler was specified, use CC. + LTCC=${LTCC-"$CC"} - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; + # Allow CC to be a program name with arguments. + compiler=$CC - hpux10* | hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*|ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*|ia64*) - archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' - ;; - *) - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - ia64*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; + ac_outfile=conftest.$ac_objext + printf "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` + $rm conftest* - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + CC=${F77-"f77"} + compiler=$CC + compiler_F77=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $can_build_shared" >&5 + echo "${ECHO_T}$can_build_shared" >&6; } + + { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { echo "$as_me:$LINENO: result: $enable_shared" >&5 + echo "${ECHO_T}$enable_shared" >&6; } + + { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { echo "$as_me:$LINENO: result: $enable_static" >&5 + echo "${ECHO_T}$enable_static" >&6; } -test "$ld_shlibs_F77" = no && can_build_shared=no + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; -GCC_F77="$G77" -LD_F77="$LD" + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; -lt_prog_compiler_wl_F77= -lt_prog_compiler_pic_F77= -lt_prog_compiler_static_F77= + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$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' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; + { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } - if test "$GCC" = yes; then - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_static_F77='-static' + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$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' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$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' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $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' - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi + hardcode_libdir_separator_GCJ=: ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + sco3.2v5*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${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' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic_F77='-fno-common' + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no ;; - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared_F77=no - enable_shared=no + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then - lt_prog_compiler_pic_F77=-Kconform_pic + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv5*) + no_undefined_flag_GCJ=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_GCJ= + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' ;; - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac ;; *) - lt_prog_compiler_pic_F77='-fPIC' + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - # PORTME Check for flag to pass linker flags through the system compiler. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. case $host_os in - aix*) - lt_prog_compiler_wl_F77='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static_F77='-Bstatic' + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : else - lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + can_build_shared=no fi ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_F77='-DDLL_EXPORT' - ;; +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + 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' + ;; - beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_F77='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_F77='-non_shared' - ;; +bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; - newsos6) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32*) - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $rm \$dlpath' - shlibpath_overrides_runpath=yes + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_F77='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_F77='-non_shared' + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; - - sco3.2v5*) - lt_prog_compiler_pic_F77='-Kpic' - lt_prog_compiler_static_F77='-dn' + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac ;; + esac + ;; - sunos4*) - lt_prog_compiler_wl_F77='-Qoption ld ' - lt_prog_compiler_pic_F77='-PIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_F77='-Kconform_pic' - lt_prog_compiler_static_F77='-Bstatic' - fi - ;; +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + 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"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; - freebsd1*) - dynamic_linker=no - ;; + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; - kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; - *) - lt_prog_compiler_can_build_shared_F77=no - ;; +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; esac fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; - gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_F77"; then +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; - irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 + echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } + if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:42538: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:42542: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + + fi + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } + + if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac + else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no + fi + + fi + case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= ;; *) - lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac ;; -esac + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; - # No shared lib support for Linux oldld, aout, or coff. - linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # This must be Linux ELF. - linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:42600: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:42604: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; - knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 + echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then - netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; + cat <>config.warnings + \`$CC' does not support \`-c -o', so \`make -j' may be unsafe + AAW_EOF + + + need_locks=warn + fi + else + need_locks=no + fi + + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +openbsd*) + version_type=sunos + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in - cygwin* | mingw* | pw32*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - openbsd*) - with_gnu_ld=no - ;; + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. case $host_os in - aix3* | aix4* | aix5*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs_F77=no - cat <&2 + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; -EOF - fi - ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; - amigaos*) - archive_cmds_F77='$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)' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_minus_L_F77=yes +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_F77=no - ;; +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_F77=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_F77=no - fi - ;; +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_F77=no + fi ;; - siemens) - need_lib_prefix=no + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi ;; - - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; + esac + ;; - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_F77=no - cat <&2 +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no - sunos4*) - archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_F77=yes - hardcode_shlibpath_var_F77=no - ;; +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi - else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported - fi - echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 - echo "${ECHO_T}$hardcode_action_GCJ" >&6 + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac - if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no - elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless - fi + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - archive_cmds_F77='' - hardcode_direct_F77=yes - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes ++ cygwin*) ++ lt_cv_dlopen="dlopen" ++ lt_cv_dlopen_libs= ++ ;; + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_F77=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_F77='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main - - end ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char dlopen (); ++int ++main () ++{ ++dlopen (); ++ ; ++ return 0; ++} + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + # Check for a 64-bit object if we didn't find anything. + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + - hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_F77="-z nodefs" - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF - program main ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char shl_load (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_shl_load) || defined (__stub___shl_load) ++choke me ++#else ++char (*f) () = shl_load; ++#endif ++#ifdef __cplusplus ++} ++#endif + - end ++int ++main () ++{ ++return f != shl_load; ++ ; ++ return 0; ++} + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + + aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'` + # Check for a 64-bit object if we didn't find anything. + if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } + }'`; fi + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_F77=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77=' ' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$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)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='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}' + module_expsym_cmds_F77='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}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='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}' + module_expsym_cmds_F77='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}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$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' + else + archive_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + ia64*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + *) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' - darwin*) - # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 - echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 - if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldl $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char dlopen (); - int - main () - { - dlopen (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dl_dlopen=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$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' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; - ac_cv_lib_dl_dlopen=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 - if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" - else + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; - fi + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; - ;; + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; - *) - echo "$as_me:$LINENO: checking for shl_load" >&5 - echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 - if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ - #define shl_load innocuous_shl_load + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$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' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$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' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$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' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $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' - #ifdef __STDC__ - # include - #else - # include - #endif + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; - #undef shl_load + sco3.2v5*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - { - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char shl_load (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_shl_load) || defined (__stub___shl_load) - choke me - #else - char (*f) () = shl_load; - #endif - #ifdef __cplusplus - } - #endif + solaris*) + no_undefined_flag_F77=' -z text' + if test "x$archive_cmds" = "x"; then + if test "$GCC" = yes; then + wlarc='${wl}' + if $CC -v --help 2>/dev/null | grep -- -shared > /dev/null 2> /dev/null; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_F77='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + fi + else + wlarc='' + lt_prog_compiler_static_F77='-static' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + lt_prog_compiler_static_F77='-static' + fi + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${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' ;; + esac ;; + esac + link_all_deplibs_F77=yes + ;; - int - main () - { - return f != shl_load; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; - ac_cv_func_shl_load=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 - echo "${ECHO_T}$ac_cv_func_shl_load" >&6 - if test $ac_cv_func_shl_load = yes; then - lt_cv_dlopen="shl_load" - else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 - echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 - if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldld $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; - sysv4.3*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - export_dynamic_flag_spec_F77='-Bexport' - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_F77=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_F77=yes - fi - ;; +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen - sysv4.2uw2*) - archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_F77=yes - hardcode_minus_L_F77=no - hardcode_shlibpath_var_F77=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_F77='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_F77=no - ;; +#ifdef __STDC__ +# include +#else +# include +#endif - sysv5*) - no_undefined_flag_F77=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_F77= - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - ;; +#undef dlopen - uts4*) - archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_F77='-L$libdir' - hardcode_shlibpath_var_F77=no - ;; +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif - *) - ld_shlibs_F77=no - ;; - esac - fi +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_dlopen=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 + echo "${ECHO_T}$ld_shlibs_F77" >&6; } + test "$ld_shlibs_F77" = no && can_build_shared=no + + variables_saved_for_relink="PATH $shlibpath_var $runpath_var" + if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_F77" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_F77=yes +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_dl_dlopen=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 - if test $ac_cv_lib_dl_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" - else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 - echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 - if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsvld $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 - (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_svld_dlopen=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 + echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } + ;; + esac + fi + ;; + esac - ac_cv_lib_svld_dlopen=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 - echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 - if test $ac_cv_lib_svld_dlopen = yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" - else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 - echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 - if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= + shrext_cmds=".so" + postinstall_cmds= + postuninstall_cmds= + finish_cmds= + finish_eval= + shlibpath_var= + shlibpath_overrides_runpath=unknown + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - 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' - ;; +fi -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - fi + bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - fi + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - fi + darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + 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"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; +fi -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + ;; + esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` else - enable_dlopen=no + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif - #include + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +#ifdef __cplusplus +extern "C" void exit (int); +#endif -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } - exit (status); - } - EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_unknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no + openbsd*) + version_type=sunos + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes fi - ;; +fi +rm -fr conftest* -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; +#include -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; +#ifdef __cplusplus +extern "C" void exit (int); +#endif - void fnord() { int i=42;} - int main () - { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; + *) + dynamic_linker=no + ;; + esac + { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 + echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } + { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action_F77= + if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct_F77" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_F77=unsupported fi - rm -fr conftest* - + { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 + echo "${ECHO_T}$hardcode_action_F77" >&6; } -if test "$hardcode_action_F77" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + striplib= + old_striplib= + { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 + echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } ;; esac -fi + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi # The else clause should only fire when bootstrapping the @@@ -38096,99 -44607,568 +46307,544 @@@ sys_lib_search_path_spec=$lt_sys_lib_se # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path_F77" + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_F77 + + # The commands to list exported symbols. + export_symbols_cmds=$lt_export_symbols_cmds_F77 + + # The commands to extract the exported symbol list from a shared archive. + extract_expsyms_cmds=$lt_extract_expsyms_cmds + + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$lt_exclude_expsyms_F77 + + # Symbols that must always be exported. + include_expsyms=$lt_include_expsyms_F77 + + # ### END LIBTOOL TAG CONFIG: $tagname + + __EOF__ + + + else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi + fi + + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + # Source file extension for Java test sources. + ac_ext=java + + # Object file extension for compiled Java test sources. + objext=o + objext_GCJ=$objext + + # Code to be used in simple compile tests + lt_simple_compile_test_code="class foo {}\n" + + # Code to be used in simple link tests + lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + # If no C compiler was specified, use CC. + LTCC=${LTCC-"$CC"} + + # Allow CC to be a program name with arguments. + compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext + printf "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` + $rm conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + CC=${GCJ-"gcj"} + compiler=$CC + compiler_GCJ=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + + # GCJ did not exist at the time GCC didn't implicitly link libc in. + archive_cmds_need_lc_GCJ=no + + old_archive_cmds_GCJ=$old_archive_cmds + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + + lt_prog_compiler_no_builtin_flag_GCJ= + + if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + + { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:44747: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:44751: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } + + if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" + else + : + fi + + fi + + lt_prog_compiler_wl_GCJ= + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_static_GCJ= + + { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 + echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + - mingw* | pw32* | os2*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' - ;; ++# Whether we need a single -rpath flag with a separated argument. ++hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl_GCJ='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static_GCJ='-non_shared' - ;; ++# Set to yes if using the -LDIR flag during linking hardcodes DIR into the ++# resulting binary. ++hardcode_minus_L=$hardcode_minus_L_GCJ + - newsos6) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; ++# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into ++# the resulting binary. ++hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + - osf3* | osf4* | osf5*) - lt_prog_compiler_wl_GCJ='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static_GCJ='-non_shared' - ;; ++# Variables whose values should be saved in libtool wrapper scripts and ++# restored at relink time. ++variables_saved_for_relink="$variables_saved_for_relink" + - sco3.2v5*) - lt_prog_compiler_pic_GCJ='-Kpic' - lt_prog_compiler_static_GCJ='-dn' - ;; ++# Whether libtool must link a program against all its dependency libraries. ++link_all_deplibs=$link_all_deplibs_GCJ + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + - sunos4*) - lt_prog_compiler_wl_GCJ='-Qoption ld ' - lt_prog_compiler_pic_GCJ='-PIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; ++# Run-time system search path for libraries ++sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic_GCJ='-Kconform_pic' - lt_prog_compiler_static_GCJ='-Bstatic' - fi - ;; +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ - # The commands to list exported symbols. - export_symbols_cmds=$lt_export_symbols_cmds_GCJ + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; - # The commands to extract the exported symbol list from a shared archive. - extract_expsyms_cmds=$lt_extract_expsyms_cmds + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; - *) - lt_prog_compiler_can_build_shared_GCJ=no - ;; - esac - fi +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ - # Symbols that must always be exported. - include_expsyms=$lt_include_expsyms_GCJ + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic_GCJ"; then +# ### END LIBTOOL TAG CONFIG: $tagname - __EOF__ + { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 + echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } + if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:45009: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:45013: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp + $SED '/^$/d' conftest.err >conftest.er2 + if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + fi + { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 + echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } -if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then - case $lt_prog_compiler_pic_GCJ in - "" | " "*) ;; - *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; - esac else - lt_prog_compiler_pic_GCJ= - lt_prog_compiler_can_build_shared_GCJ=no + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi + fi + case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; + esac - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - CC="$lt_save_CC" - - else - tagname="" - fi - ;; - - RC) - - - - # Source file extension for RC test sources. - ac_ext=rc + { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } + if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # Object file extension for compiled RC test sources. - objext=o - objext_RC=$objext + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:45071: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:45075: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp + $SED '/^$/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . 2>&5 + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* - # Code to be used in simple compile tests - lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + fi + { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 + echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" - # ltmain only uses $CC for tagged configurations so make sure $CC is set. + hard_links="nottested" + if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + { echo "$as_me:$LINENO: result: $hard_links" >&5 + echo "${ECHO_T}$hard_links" >&6; } + if test "$hard_links" = no; then - # If no C compiler was specified, use CC. - LTCC=${LTCC-"$CC"} + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - # Allow CC to be a program name with arguments. - compiler=$CC + cat <>config.warnings + \`$CC' does not support \`-c -o', so \`make -j' may be unsafe + AAW_EOF - # save warnings/boilerplate of simple test code - ac_outfile=conftest.$ac_objext - printf "$lt_simple_compile_test_code" >conftest.$ac_ext - eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err - _lt_compiler_boilerplate=`cat conftest.err` - $rm conftest* - ac_outfile=conftest.$ac_objext - printf "$lt_simple_link_test_code" >conftest.$ac_ext - eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err - _lt_linker_boilerplate=`cat conftest.err` - $rm conftest* + need_locks=warn + fi + else + need_locks=no + fi + { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - CC=${RC-"windres"} - compiler=$CC - compiler_RC=$CC - for cc_temp in $compiler""; do + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; @@@ -38286,758 -45192,1574 +46942,1257 @@@ if test -f "$ltmain"; the ;; esac - ld_shlibs_GCJ=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" - # Used on cygwin: assembler. - AS="$AS" + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac - # The name of the directory that contains temporary libtool files. - objdir=$objdir + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -EOF - fi - ;; +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC - amigaos*) - archive_cmds_GCJ='$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)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes +# Object file suffix (normally "o"). +objext="$ac_objext" - # Samuel A. Falvo II reports - # that the semantics of dynamic libraries on AmigaOS, at least up - # to version 4, is to share data among multiple programs linked - # with the same dynamic library. Since this doesn't match the - # behavior of shared libraries on other platforms, we can't use - # them. - ld_shlibs_GCJ=no - ;; +# Old archive suffix (normally "a"). +libext="$libext" - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_GCJ=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' - # Executable file suffix (normally ""). - exeext="$exeext" + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' - # Additional compiler flags for building library objects. - pic_flag=$lt_lt_prog_compiler_pic_RC - pic_mode=$pic_mode + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_GCJ=no + fi + ;; - # What is the maximum length of a command? - max_cmd_len=$lt_cv_sys_max_cmd_len + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - # Does compiler simultaneously support -c and -o options? - compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - solaris* | sysv5*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs_GCJ=no - cat <&2 +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. +# Do we need a version for libraries? +need_version=$need_version -EOF - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; +# Whether dlopen is supported. +dlopen_support=$enable_dlopen - sunos4*) - archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self - # Whether dlopen of statically linked programs is supported. - dlopen_self_static=$enable_dlopen_self_static + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac - # Compiler flag to prevent dynamic linking. - link_static_flag=$lt_lt_prog_compiler_static_RC + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; - aix4* | aix5*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | grep 'GNU' > /dev/null; then - export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix5*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - esac +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - archive_cmds_GCJ='' - hardcode_direct_GCJ=yes - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes +# Library versioning type. +version_type=$version_type - # Format of library name prefix. - libname_spec=$lt_libname_spec + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols_GCJ=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag_GCJ='-berok' - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec -int -main () -{ +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec - # Commands used to build and install an old-style archive. - RANLIB=$lt_RANLIB - old_archive_cmds=$lt_old_archive_cmds_RC - old_postinstall_cmds=$lt_old_postinstall_cmds - old_postuninstall_cmds=$lt_old_postuninstall_cmds + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - # Create a temporary old-style archive to link instead of a shared archive. - old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - # Commands used to build and install a shared archive. - archive_cmds=$lt_archive_cmds_RC - archive_expsym_cmds=$lt_archive_expsym_cmds_RC - postinstall_cmds=$lt_postinstall_cmds - postuninstall_cmds=$lt_postuninstall_cmds + fi - # Commands used to build a loadable module (assumed same as above if empty) - module_cmds=$lt_module_cmds_RC - module_expsym_cmds=$lt_module_expsym_cmds_RC + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag_GCJ="-z nodefs" - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -int -main () -{ +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC - # Dependencies to place after the objects being linked to create a - # shared library. - postdep_objects=$lt_postdep_objects_RC + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC - # Dependencies to place after the objects being linked to create a - # shared library. - postdeps=$lt_postdeps_RC - # The library search path used internally by the compiler when linking - # a shared library. - compiler_lib_search_path=$lt_compiler_lib_search_path_RC + fi - # Method to check whether dependent libraries are shared objects. - deplibs_check_method=$lt_deplibs_check_method + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi - # Command to use when deplibs_check_method == file_magic. - file_magic_cmd=$lt_file_magic_cmd + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_GCJ=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ=' ' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; - amigaos*) - archive_cmds_GCJ='$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)' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - # see comment about different semantics on the GNU ld section - ld_shlibs_GCJ=no - ;; +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC - # Flag that forces no undefined symbols. - no_undefined_flag=$lt_no_undefined_flag_RC + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; - # Commands used to finish a libtool library installation in a directory. - finish_cmds=$lt_finish_cmds + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; - # Same as above, but a single script fragment to be evaled but not shown. - finish_eval=$lt_finish_eval + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='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}' + module_expsym_cmds_GCJ='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}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='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}' + module_expsym_cmds_GCJ='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}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; - dgux*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - freebsd1*) - ld_shlibs_GCJ=no - ;; +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# This is the shared library runtime path variable. +runpath_var=$runpath_var - # This is the shared library path variable. - shlibpath_var=$shlibpath_var + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; - hpux9*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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' - else - archive_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' - ;; +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC - # Whether we should hardcode library paths into libraries. - hardcode_into_libs=$hardcode_into_libs + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*|ia64*) + archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + ia64*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - *) - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_direct_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-E' +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L_GCJ=yes - ;; - esac - fi - ;; +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds_GCJ='$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' - else - archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - link_all_deplibs_GCJ=yes - ;; +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec_GCJ='-R$libdir' - hardcode_direct_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC - newsos6) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - hardcode_shlibpath_var_GCJ=no - ;; +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC - # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into - # the resulting binary. - hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; - os2*) - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_minus_L_GCJ=yes - allow_undefined_flag_GCJ=unsupported - archive_cmds_GCJ='$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' - old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$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' - else - allow_undefined_flag_GCJ=' -expect_unresolved \*' - archive_cmds_GCJ='$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' - fi - hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - ;; +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" - # Whether libtool must link a program against all its dependency libraries. - link_all_deplibs=$link_all_deplibs_RC + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$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' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$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' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $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' - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec_GCJ='-rpath $libdir' - fi - hardcode_libdir_separator_GCJ=: - ;; +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - sco3.2v5*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ;; +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - # Fix the shell variable \$srcfile for the compiler. - fix_srcfile_path="$fix_srcfile_path_RC" + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "x$archive_cmds" = "x"; then + if test "$GCC" = yes; then + wlarc='${wl}' + if $CC -v --help 2>/dev/null | grep -- -shared > /dev/null 2> /dev/null; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_GCJ='$CC ${wl}-G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC ${wl}-G ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + fi + else + wlarc='' + lt_prog_compiler_static_GCJ='-static' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + lt_prog_compiler_static_GCJ='-static' + fi + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${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' ;; + esac ;; + esac + link_all_deplibs_GCJ=yes + ;; - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=yes - hardcode_shlibpath_var_GCJ=no - ;; +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC - sysv4) - case $host_vendor in - sni) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds_GCJ='$CC -r -o $output$reload_objs' - hardcode_direct_GCJ=no - ;; - motorola) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC - sysv4.3*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - export_dynamic_flag_spec_GCJ='-Bexport' - ;; +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var_GCJ=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs_GCJ=yes - fi - ;; +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC - sysv4.2uw2*) - archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct_GCJ=yes - hardcode_minus_L_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_runpath_var=yes - runpath_var=LD_RUN_PATH - ;; +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z ${wl}text' - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var_GCJ=no - ;; +# ### END LIBTOOL TAG CONFIG: $tagname - sysv5*) - no_undefined_flag_GCJ=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' - hardcode_libdir_flag_spec_GCJ= - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - ;; +__EOF__ - uts4*) - archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec_GCJ='-L$libdir' - hardcode_shlibpath_var_GCJ=no - ;; - *) - ld_shlibs_GCJ=no - ;; - esac +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" fi +fi + { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 + echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } + test "$ld_shlibs_GCJ" = no && can_build_shared=no -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc_GCJ" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc_GCJ=yes +CC="$lt_save_CC" + + ;; - *) - { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 - echo "$as_me: error: Unsupported tag name: $tagname" >&2;} - { (exit 1); exit 1; }; } - ;; - esac + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # Append the new tag name to the list of available tags. - if test -n "$tagname" ; then - available_tags="$available_tags $tagname" - fi - fi - done - IFS="$lt_save_ifs" + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 + echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } + ;; + esac + fi + ;; + esac - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" + { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } + library_names_spec= + libname_spec='lib$name' + soname_spec= + shrext_cmds=".so" + postinstall_cmds= + postuninstall_cmds= + finish_cmds= + finish_eval= + shlibpath_var= + shlibpath_overrides_runpath=unknown + version_type=none + dynamic_linker="$host_os ld.so" + sys_lib_dlsearch_path_spec="/lib /usr/lib" + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } fi -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi -need_lib_prefix=unknown -hardcode_into_libs=no -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + -aix4* | aix5*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - 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' - ;; -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; + bsdi[45]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; -cygwin* | mingw* | pw32*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; + darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + 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"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; -freebsd1*) - dynamic_linker=no - ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; + hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; -# This must be Linux ELF. -linux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 - echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 - if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - Autoconf TIOCGETP - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes - else - ac_cv_prog_gcc_traditional=no - fi - rm -f conftest* + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -nto-qnx*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -openbsd*) - version_type=sunos - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" fi - ;; +fi -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - ;; + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_c_const=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 - echo "${ECHO_T}$ac_cv_c_const" >&6 - if test $ac_cv_c_const = no; then -sunos4*) ++openbsd*) + version_type=sunos ++ need_lib_prefix=no ++ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. ++ case $host_os in ++ openbsd3.3 | openbsd3.3.*) need_version=yes ;; ++ *) need_version=no ;; ++ esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ case $host_os in ++ openbsd2.[89] | openbsd2.[89].*) ++ shlibpath_overrides_runpath=no ++ ;; ++ *) ++ shlibpath_overrides_runpath=yes ++ ;; ++ esac ++ else ++ shlibpath_overrides_runpath=yes + fi - need_version=yes + ;; -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - export_dynamic_flag_spec='${wl}-Blargedynsym' - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; +fi -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; + + echo "$as_me:$LINENO: checking for working unsigned long constants" >&5 +echo $ECHO_N "checking for working unsigned long constants... $ECHO_C" >&6 +if test "${amanda_cv_c_unsigned_long_constants+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + +int +main () +{ + + long l = 1ul; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_c_unsigned_long_constants=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + *) + dynamic_linker=no + ;; + esac + { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 + echo "${ECHO_T}$dynamic_linker" >&6; } + test "$dynamic_linker" = no && can_build_shared=no - amanda_cv_c_unsigned_long_constants=no + { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } + hardcode_action_GCJ= + if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then - # We can hardcode non-existant directories. - if test "$hardcode_direct_GCJ" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && - test "$hardcode_minus_L_GCJ" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_GCJ=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_GCJ=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action_GCJ=unsupported fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - + { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 + echo "${ECHO_T}$hardcode_action_GCJ" >&6; } -if test "$hardcode_action_GCJ" = relink; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless fi +echo "$as_me:$LINENO: result: $amanda_cv_c_unsigned_long_constants" >&5 +echo "${ECHO_T}$amanda_cv_c_unsigned_long_constants" >&6 + if test "$amanda_cv_c_unsigned_long_constants" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_CONSTANTS 1 +_ACEOF + + fi - - echo "$as_me:$LINENO: checking for off_t" >&5 - echo $ECHO_N "checking for off_t... $ECHO_C" >&6 - if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default - int - main () - { - if ((off_t *) 0) - return 0; - if (sizeof (off_t)) - return 0; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 - echo "${ECHO_T}$ac_cv_type_off_t" >&6 - if test $ac_cv_type_off_t = yes; then - : + striplib= + old_striplib= + { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 + echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } + if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } else - - cat >>confdefs.h <<_ACEOF - #define off_t long - _ACEOF - + # FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + fi + ;; + *) + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + ;; + esac fi -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - lt_cv_dlopen=no - lt_cv_dlopen_libs= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; +ac_cv_type_pid_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else - mingw* | pw32*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; +fi - echo "$as_me:$LINENO: checking for size_t" >&5 - echo $ECHO_N "checking for size_t... $ECHO_C" >&6 - if test "${ac_cv_type_size_t+set}" = set; then + darwin*) + # if libdl is installed we need to link against it + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -39082,26 -46804,31 +48237,30 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_size_t=no + ac_cv_lib_dl_dlopen=no fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 - echo "${ECHO_T}$ac_cv_type_size_t" >&6 - if test $ac_cv_type_size_t = yes; then - : + { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF fi - ;; - echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 - echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 - if test "${ac_cv_type_uid_t+set}" = set; then + *) + { echo "$as_me:$LINENO: checking for shl_load" >&5 + echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } + if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -39110,53 -46837,35 +48269,45 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load +#include -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* -#ifdef __STDC__ -# include -#else -# include -#endif +fi +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +if test $ac_cv_type_uid_t = no; then -#undef shl_load +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi - echo "$as_me:$LINENO: checking return type of signal handlers" >&5 - echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 - if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include - #ifdef signal - # undef signal - #endif + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus - extern "C" void (*signal (int, void (*)(int)))(int); - #else - void (*signal ()) (); + extern "C" + #endif + char shl_load (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_shl_load || defined __stub___shl_load + choke me #endif int @@@ -39194,32 -46899,38 +48341,38 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_signal=int - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_func_shl_load=no fi - echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 - echo "${ECHO_T}$ac_cv_type_signal" >&6 - - cat >>confdefs.h <<_ACEOF - #define RETSIGTYPE $ac_cv_type_signal - _ACEOF - - echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 - echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 - if test "${ac_cv_struct_tm+set}" = set; then + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 + echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } + if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" + else + { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char shl_load (); int main () { @@@ -39255,78 -46962,49 +48404,35 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_struct_tm=sys/time.h - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 - echo "${ECHO_T}$ac_cv_struct_tm" >&6 - if test $ac_cv_struct_tm = sys/time.h; then - - cat >>confdefs.h <<\_ACEOF - #define TM_IN_SYS_TIME 1 - _ACEOF - + ac_cv_lib_dld_shl_load=no fi - for ac_prog in flex lex - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 - echo "$as_me:$LINENO: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_LEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LEX="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done - done - - fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi - LEX=$ac_cv_prog_LEX - if test -n "$LEX"; then - echo "$as_me:$LINENO: result: $LEX" >&5 - echo "${ECHO_T}$LEX" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } + if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - - test -n "$LEX" && break - done - test -n "$LEX" || LEX=":" - - if test -z "$LEXLIB" - then - echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 - echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 - if test "${ac_cv_lib_fl_yywrap+set}" = set; then + { echo "$as_me:$LINENO: checking for dlopen" >&5 + echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } + if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - /* Override any gcc2 internal prototype to avoid an error. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif @@@ -39368,20 -47047,20 +48475,21 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_fl_yywrap=no + ac_cv_func_dlopen=no fi - rm -f conftest.err conftest.$ac_objext \ + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 - echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 - if test $ac_cv_lib_fl_yywrap = yes; then - LEXLIB="-lfl" + { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 + echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } + if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" else - echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 - echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 - if test "${ac_cv_lib_l_yywrap+set}" = set; then + { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } + if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@@ -39441,66 -47117,48 +48546,53 @@@ rm -f core conftest.err conftest.$ac_ob conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 - echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 - if test $ac_cv_lib_l_yywrap = yes; then - LEXLIB="-ll" - fi - - fi - - fi - - if test "x$LEX" != "x:"; then - echo "$as_me:$LINENO: checking lex output file root" >&5 - echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 - if test "${ac_cv_prog_lex_root+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - # The minimal lex program is just a single line: %%. But some broken lexes - # (Solaris, I think it was) want two %% lines, so accommodate them. - cat >conftest.l <<_ACEOF - %% - %% - _ACEOF - { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 - (eval $LEX conftest.l) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy - elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy + { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } + if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 - echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} - { (exit 1); exit 1; }; } - fi - fi - echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 - echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 - rm -f conftest.l - LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - - echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 - echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 - if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } + if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS=$LIBS +LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF - `cat $LEX_OUTPUT_ROOT.c` + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dlopen (); + int + main () + { + return dlopen (); + ; + return 0; + } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@@ -39525,44 -47174,39 +48608,41 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_save_LIBS - rm -f "${LEX_OUTPUT_ROOT}.c" - - fi - echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 - echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 - if test $ac_cv_prog_lex_yytext_pointer = yes; then - - cat >>confdefs.h <<\_ACEOF - #define YYTEXT_POINTER 1 - _ACEOF - + ac_cv_lib_svld_dlopen=no fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi - if test "$LEX" = :; then - LEX=${am_missing_run}flex - fi - - echo "$as_me:$LINENO: checking for ANSI C header files" >&5 - echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 - if test "${ac_cv_header_stdc+set}" = set; then + { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 + echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } + if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + else + { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } + if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include +#include +#include +#include + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char dld_link (); int main () { @@@ -39598,28 -47238,22 +48674,38 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no + ac_cv_lib_dld_dld_link=no + fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi + { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 + echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } + if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi - +rm -f conftest* fi @@@ -39644,2238 -47263,1220 +48730,1701 @@@ rm -f conftest fi - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : + + fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #if ((' ' & 0x0FF) == 0x020) - # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') - # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL #else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" void exit (int); +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif -void fnord() { int i=42;} -int main () +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () { - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - - exit (status); + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); } -EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ( exit $ac_status ) - ac_cv_header_stdc=no - fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi + fi -rm -fr conftest* - - ++rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } + if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross + else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < + #endif + + #include + + #ifdef RTLD_GLOBAL + # define LT_DLGLOBAL RTLD_GLOBAL + #else + # ifdef DL_GLOBAL + # define LT_DLGLOBAL DL_GLOBAL + # else + # define LT_DLGLOBAL 0 + # endif + #endif + + /* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ + #ifndef LT_DLLAZY_OR_NOW + # ifdef RTLD_LAZY + # define LT_DLLAZY_OR_NOW RTLD_LAZY + # else + # ifdef DL_LAZY + # define LT_DLLAZY_OR_NOW DL_LAZY + # else + # ifdef RTLD_NOW + # define LT_DLLAZY_OR_NOW RTLD_NOW + # else + # ifdef DL_NOW + # define LT_DLLAZY_OR_NOW DL_NOW + # else + # define LT_DLLAZY_OR_NOW 0 + # endif + # endif + # endif + # endif + #endif + + #ifdef __cplusplus + extern "C" void exit (int); + #endif + + void fnord() { int i=42;} + int main () + { + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); + } + EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi fi -rm -fr conftest* - - fi - echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 - echo "${ECHO_T}$ac_cv_header_stdc" >&6 - if test $ac_cv_header_stdc = yes; then + { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 + echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } + fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac fi -# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ - SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - compiler_GCJ \ - CC_GCJ \ - LD_GCJ \ - lt_prog_compiler_wl_GCJ \ - lt_prog_compiler_pic_GCJ \ - lt_prog_compiler_static_GCJ \ - lt_prog_compiler_no_builtin_flag_GCJ \ - export_dynamic_flag_spec_GCJ \ - thread_safe_flag_spec_GCJ \ - whole_archive_flag_spec_GCJ \ - enable_shared_with_static_runtimes_GCJ \ - old_archive_cmds_GCJ \ - old_archive_from_new_cmds_GCJ \ - predep_objects_GCJ \ - postdep_objects_GCJ \ - predeps_GCJ \ - postdeps_GCJ \ - compiler_lib_search_path_GCJ \ - archive_cmds_GCJ \ - archive_expsym_cmds_GCJ \ - postinstall_cmds_GCJ \ - postuninstall_cmds_GCJ \ - old_archive_from_expsyms_cmds_GCJ \ - allow_undefined_flag_GCJ \ - no_undefined_flag_GCJ \ - export_symbols_cmds_GCJ \ - hardcode_libdir_flag_spec_GCJ \ - hardcode_libdir_flag_spec_ld_GCJ \ - hardcode_libdir_separator_GCJ \ - hardcode_automatic_GCJ \ - module_cmds_GCJ \ - module_expsym_cmds_GCJ \ - lt_cv_prog_compiler_c_o_GCJ \ - exclude_expsyms_GCJ \ - include_expsyms_GCJ; do - case $var in - old_archive_cmds_GCJ | \ - old_archive_from_new_cmds_GCJ | \ - archive_cmds_GCJ | \ - archive_expsym_cmds_GCJ | \ - module_cmds_GCJ | \ - module_expsym_cmds_GCJ | \ - old_archive_from_expsyms_cmds_GCJ | \ - export_symbols_cmds_GCJ | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done +echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + ac_cv_type_socklen_t=yes +else + ac_cv_type_socklen_t=no +fi +rm -f conftest* - case $lt_echo in - *'\$0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` - ;; - esac +fi +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +if test "x$ac_cv_type_socklen_t" = xno; then -cfgfile="$ofile" +cat >>confdefs.h <<\_ACEOF +#define socklen_t int +_ACEOF - cat <<__EOF__ >> "$cfgfile" -# ### BEGIN LIBTOOL TAG CONFIG: $tagname +fi -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +echo "$as_me:$LINENO: checking for sa_family_t" >&5 +echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6 +if test "${ac_cv_type_sa_family_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if STDC_HEADERS +#include +#include +#endif +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "(^|[^a-zA-Z_0-9])sa_family_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + ac_cv_type_sa_family_t=yes +else + ac_cv_type_sa_family_t=no +fi +rm -f conftest* -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +fi +echo "$as_me:$LINENO: result: $ac_cv_type_sa_family_t" >&5 +echo "${ECHO_T}$ac_cv_type_sa_family_t" >&6 +if test "x$ac_cv_type_sa_family_t" = xno; then -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +cat >>confdefs.h <<\_ACEOF +#define sa_family_t unsigned short +_ACEOF -# Whether or not to build static libraries. -build_old_libs=$enable_static +fi -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc_GCJ -# Whether or not to disallow shared libs when runtime libs are static -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install + # The host system. + host_alias=$host_alias + host=$host + host_os=$host_os + # The build system. + build_alias=$build_alias + build=$build + build_os=$build_os -# An echo program that does not interpret backslashes. -echo=$lt_echo -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_hdr> -# A C compiler. -LTCC=$lt_LTCC +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# A language-specific compiler. -CC=$lt_compiler_GCJ +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ +ac_header_dirent=$ac_hdr; break +fi -# An ERE matcher. -EGREP=$lt_EGREP +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# The linker used to build libraries. -LD=$lt_LD_GCJ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Whether we need hard or soft links. -LN_S=$lt_LN_S +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# A BSD-compatible nm program. -NM=$lt_NM +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# A symbol stripping program -STRIP=$lt_STRIP +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" -# Used to examine libraries when file_magic_cmd begins "file" -MAGIC_CMD=$MAGIC_CMD +fi -# Used on cygwin: DLL creation program. -DLLTOOL="$DLLTOOL" +else + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# Used on cygwin: object dumper. -OBJDUMP="$OBJDUMP" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Used on cygwin: assembler. -AS="$AS" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -# The name of the directory that contains temporary libtool files. -objdir=$objdir +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" - fi + # How to pass a linker flag through the compiler. + wl=$lt_lt_prog_compiler_wl_GCJ -# Object file suffix (normally "o"). -objext="$ac_objext" +fi -# Old archive suffix (normally "a"). -libext="$libext" -# Shared library suffix (normally ".so"). -shrext_cmds='$shrext_cmds' -# Executable file suffix (normally ""). -exeext="$exeext" + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_GCJ + pic_mode=$pic_mode -# What is the maximum length of a command? -max_cmd_len=$lt_cv_sys_max_cmd_len +for ac_header in sys/wait.h wait.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 + # Does compiler simultaneously support -c and -o options? + compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ - # Is the header present? - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include <$ac_header> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi - else - ac_cpp_err=yes - fi - if test -z "$ac_cpp_err"; then - ac_header_preproc=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Must we lock files when doing compilation? + need_locks=$lt_need_locks -# Do we need the lib prefix for modules? -need_lib_prefix=$need_lib_prefix + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -# Do we need a version for libraries? -need_version=$need_version +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -# Whether dlopen is supported. -dlopen_support=$enable_dlopen +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self +fi -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static +done - echo "$as_me:$LINENO: checking whether wait uses union wait" >&5 - echo $ECHO_N "checking whether wait uses union wait... $ECHO_C" >&6 - if test "${cf_cv_arg_union_wait+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_GCJ - #include + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ - #if HAVE_SYS_WAIT_H - # include - #else - # if HAVE_WAIT_H - # include - # endif - #endif + # Compiler flag to allow reflexive dlopens. + export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ - #ifdef __STDC__ - pid_t wait(union wait *); - #endif + # Compiler flag to generate shared objects directly from archives. + whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ - int - main () - { + # Compiler flag to generate thread-safe objects. + thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ -# Library versioning type. -version_type=$version_type + union wait x; int i; + wait(&x); i = WIFEXITED(x) -# Format of library name prefix. -libname_spec=$lt_libname_spec + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_cv_arg_union_wait=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec=$lt_library_names_spec +cf_cv_arg_union_wait=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $cf_cv_arg_union_wait" >&5 +echo "${ECHO_T}$cf_cv_arg_union_wait" >&6 +if test $cf_cv_arg_union_wait = yes; then -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec +cat >>confdefs.h <<\_ACEOF +#define WAIT_USES_UNION 1 +_ACEOF - fi - - - - - - for ac_header in sys/wait.h wait.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - else - # Is the header compilable? - echo "$as_me:$LINENO: checking $ac_header usability" >&5 - echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default - #include <$ac_header> - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - - # Is the header present? - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include <$ac_header> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi - else - ac_cpp_err=yes - fi - if test -z "$ac_cpp_err"; then - ac_header_preproc=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no - fi - rm -f conftest.err conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 - echo "${ECHO_T}$ac_header_preproc" >&6 - - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 - echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 - echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 - echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 - echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX - ## ------------------------------------------ ## - ## Report this to the AC_PACKAGE_NAME lists. ## - ## ------------------------------------------ ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - - fi - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - - fi - - done - - echo "$as_me:$LINENO: checking whether wait uses int" >&5 - echo $ECHO_N "checking whether wait uses int... $ECHO_C" >&6 - if test "${cf_cv_arg_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - #include - - #if HAVE_SYS_WAIT_H - # include - #else - # if HAVE_WAIT_H - # include - # endif - #endif - - #ifdef __STDC__ - pid_t wait(int *); - #endif - - int - main () - { - - int x; int i; - wait(&x); i = WIFEXITED(x) - - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_arg_int=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - cf_cv_arg_int=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5 - echo "${ECHO_T}$cf_cv_arg_int" >&6 - if test $cf_cv_arg_int = yes; then - - cat >>confdefs.h <<\_ACEOF - #define WAIT_USES_INT 1 - _ACEOF - - fi - - echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 - echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 - if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include - #include - - int - main () - { - if ((struct tm *) 0) - return 0; - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_time=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 - echo "${ECHO_T}$ac_cv_header_time" >&6 - if test $ac_cv_header_time = yes; then - - cat >>confdefs.h <<\_ACEOF - #define TIME_WITH_SYS_TIME 1 - _ACEOF - - fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Commands used to build and install an old-style archive. + RANLIB=$lt_RANLIB + old_archive_cmds=$lt_old_archive_cmds_GCJ + old_postinstall_cmds=$lt_old_postinstall_cmds + old_postuninstall_cmds=$lt_old_postuninstall_cmds + # Create an old-style archive from a shared archive. + old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + # Create a temporary old-style archive to link instead of a shared archive. + old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ - for ac_header in \ - arpa/inet.h \ - camlib.h \ - cam/cam.h \ - cam/scsi/scsi_message.h \ - chio.h \ - db.h \ - dbm.h \ - fcntl.h \ - fnmatch.h \ - fstab.h \ - grp.h \ - history.h \ - libc.h \ - libgen.h \ - limits.h \ - linux/zftape.h \ - math.h \ - mntent.h \ - mnttab.h \ - ndbm.h \ - netdb.h \ - netinet/in_systm.h \ - readline.h \ - readline/history.h \ - readline/readline.h \ - scsi/sg.h \ - scsi/scsi_ioctl.h \ - stdarg.h \ - stdlib.h \ - string.h \ - strings.h \ - sys/chio.h \ - sys/dsreq.h \ - sys/fcntl.h \ - sys/file.h \ - sys/ioctl.h \ - sys/ipc.h \ - sys/mman.h \ - sys/mntent.h \ - sys/mtio.h \ - sys/param.h \ - sys/scarray.h \ - sys/gscdds.h \ - sys/scsiio.h \ - sys/scsi.h \ - sys/scsi/impl/uscsi.h \ - sys/scsi/scsi/ioctl.h \ - sys/select.h \ - sys/shm.h \ - sys/stat.h \ - sys/statfs.h \ - sys/statvfs.h \ - sys/tape.h \ - sys/time.h \ - sys/types.h \ - sys/uio.h \ - sys/vfs.h \ - sys/vfstab.h \ - syslog.h \ - unistd.h \ - vtblc.h \ + # Commands used to build and install a shared archive. + archive_cmds=$lt_archive_cmds_GCJ + archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ + postinstall_cmds=$lt_postinstall_cmds + postuninstall_cmds=$lt_postuninstall_cmds + + # Commands used to build a loadable module (assumed same as above if empty) + module_cmds=$lt_module_cmds_GCJ + module_expsym_cmds=$lt_module_expsym_cmds_GCJ -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib ++for ac_header in sys/wait.h wait.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 + # Dependencies to place before the objects being linked to create a + # shared library. + predep_objects=$lt_predep_objects_GCJ - # Is the header present? - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include <$ac_header> - _ACEOF - if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi - else - ac_cpp_err=yes - fi - if test -z "$ac_cpp_err"; then - ac_header_preproc=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Dependencies to place after the objects being linked to create a + # shared library. + postdep_objects=$lt_postdep_objects_GCJ - ac_header_preproc=no - fi - rm -f conftest.err conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 - echo "${ECHO_T}$ac_header_preproc" >&6 + # Dependencies to place before the objects being linked to create a + # shared library. + predeps=$lt_predeps_GCJ - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 - echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 - echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 - echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 - echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX - ## ------------------------------------------ ## - ## Report this to the AC_PACKAGE_NAME lists. ## - ## ------------------------------------------ ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + # Dependencies to place after the objects being linked to create a + # shared library. + postdeps=$lt_postdeps_GCJ - fi - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method +fi -# Command to use when deplibs_check_method == file_magic. -file_magic_cmd=$lt_file_magic_cmd +done + # Flag that allows shared libraries with undefined symbols to be built. + allow_undefined_flag=$lt_allow_undefined_flag_GCJ + # Flag that forces no undefined symbols. + no_undefined_flag=$lt_no_undefined_flag_GCJ - for ac_header in netinet/ip.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #if HAVE_SYS_TYPES_H - #include -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds ++#if HAVE_SYS_WAIT_H ++# include ++#else ++# if HAVE_WAIT_H ++# include ++# endif +#endif - #ifdef HAVE_NETINET_IN_SYSTM_H - #include + -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval=$lt_finish_eval ++#ifdef __STDC__ ++pid_t wait(int *); +#endif - #include -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe ++int ++main () ++{ - #include <$ac_header> -# Transform the output of nm in a proper C declaration -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl ++ int x; int i; ++ wait(&x); i = WIFEXITED(x) + -# Transform the output of nm in a C name address pair -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address ++ ; ++ return 0; ++} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" ++ cf_cv_arg_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -# This is the shared library runtime path variable. -runpath_var=$runpath_var ++cf_cv_arg_int=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++echo "$as_me:$LINENO: result: $cf_cv_arg_int" >&5 ++echo "${ECHO_T}$cf_cv_arg_int" >&6 ++if test $cf_cv_arg_int = yes; then + -# This is the shared library path variable. -shlibpath_var=$shlibpath_var ++cat >>confdefs.h <<\_ACEOF ++#define WAIT_USES_INT 1 +_ACEOF -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath +fi - done - - - - for ac_header in sys/mount.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #ifdef HAVE_SYS_PARAM_H - #include - #endif - + # How to hardcode a shared library path into an executable. + hardcode_action=$hardcode_action_GCJ - #include <$ac_header> -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs ++int ++main () ++{ ++if ((struct tm *) 0) ++return 0; ++ ; ++ return 0; ++} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" ++ ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF + # Flag to hardcode \$libdir into a binary during linking. + # This must work even if \$libdir does not exist. + hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + + # If ld is used when linking, flag to hardcode \$libdir into + # a binary during linking. This must work even if \$libdir does + # not exist. + hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + + # Whether we need a single -rpath flag with a separated argument. + hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + + # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the + # resulting binary. + hardcode_direct=$hardcode_direct_GCJ + + # Set to yes if using the -LDIR flag during linking hardcodes DIR into the + # resulting binary. + hardcode_minus_L=$hardcode_minus_L_GCJ + + # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into + # the resulting binary. + hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + + # Set to yes if building a shared library automatically hardcodes DIR into the library + # and all subsequent libraries and executables linked against it. + hardcode_automatic=$hardcode_automatic_GCJ + -# Variables whose values should be saved in libtool wrapper scripts and -# restored at relink time. -variables_saved_for_relink="$variables_saved_for_relink" + + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs_GCJ + -# Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + -# Run-time system search path for libraries -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path_GCJ" + + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_GCJ + + # The commands to list exported symbols. + export_symbols_cmds=$lt_export_symbols_cmds_GCJ + -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds + + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$lt_exclude_expsyms_GCJ + + # Symbols that must always be exported. + include_expsyms=$lt_include_expsyms_GCJ + -# ### END LIBTOOL TAG CONFIG: $tagname + -__EOF__ + + -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` - if test -f "$ltmain_in"; then - test -f Makefile && make "$ltmain" - fi -fi + + -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + -CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + # Source file extension for RC test sources. + ac_ext=rc + + # Object file extension for compiled RC test sources. + objext=o + objext_RC=$objext + + # Code to be used in simple compile tests + lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + + # Code to be used in simple link tests + lt_simple_link_test_code="$lt_simple_compile_test_code" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + + # If no C compiler was specified, use CC. + LTCC=${LTCC-"$CC"} + + # Allow CC to be a program name with arguments. + compiler=$CC + + + # save warnings/boilerplate of simple test code + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" >conftest.$ac_ext + eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_compiler_boilerplate=`cat conftest.err` + $rm conftest* + + ac_outfile=conftest.$ac_objext + printf "$lt_simple_link_test_code" >conftest.$ac_ext + eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err + _lt_linker_boilerplate=`cat conftest.err` + $rm conftest* + + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + CC=${RC-"windres"} + compiler=$CC + compiler_RC=$CC + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + lt_cv_prog_compiler_c_o_RC=yes + + # The else clause should only fire when bootstrapping the + # libtool distribution, otherwise you forgot to ship ltmain.sh + # with your package, and you will get complaints that there are + # no rules to generate ltmain.sh. + if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + + cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" + # ### BEGIN LIBTOOL TAG CONFIG: $tagname + + # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + + # Shell to use when invoking shell scripts. + SHELL=$lt_SHELL + + # Whether or not to build shared libraries. + build_libtool_libs=$enable_shared + + # Whether or not to build static libraries. + build_old_libs=$enable_static + + # Whether or not to add -lc for building shared libraries. + build_libtool_need_lc=$archive_cmds_need_lc_RC + + # Whether or not to disallow shared libs when runtime libs are static + allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + + # Whether or not to optimize for fast installation. + fast_install=$enable_fast_install + + # The host system. + host_alias=$host_alias + host=$host + host_os=$host_os + + # The build system. + build_alias=$build_alias + build=$build + build_os=$build_os + + # An echo program that does not interpret backslashes. + echo=$lt_echo + + # The archiver. + AR=$lt_AR + AR_FLAGS=$lt_AR_FLAGS + + # A C compiler. + LTCC=$lt_LTCC + + # A language-specific compiler. + CC=$lt_compiler_RC + + # Is the compiler the GNU C compiler? + with_gcc=$GCC_RC + + # An ERE matcher. + EGREP=$lt_EGREP + + # The linker used to build libraries. + LD=$lt_LD_RC + + # Whether we need hard or soft links. + LN_S=$lt_LN_S + + # A BSD-compatible nm program. + NM=$lt_NM + + # A symbol stripping program + STRIP=$lt_STRIP + + # Used to examine libraries when file_magic_cmd begins "file" + MAGIC_CMD=$MAGIC_CMD + + # Used on cygwin: DLL creation program. + DLLTOOL="$DLLTOOL" + + # Used on cygwin: object dumper. + OBJDUMP="$OBJDUMP" + + # Used on cygwin: assembler. + AS="$AS" + + # The name of the directory that contains temporary libtool files. + objdir=$objdir + + # How to create reloadable object files. + reload_flag=$lt_reload_flag + reload_cmds=$lt_reload_cmds + + # How to pass a linker flag through the compiler. + wl=$lt_lt_prog_compiler_wl_RC + + # Object file suffix (normally "o"). + objext="$ac_objext" + + # Old archive suffix (normally "a"). + libext="$libext" + + # Shared library suffix (normally ".so"). + shrext_cmds='$shrext_cmds' + + # Executable file suffix (normally ""). + exeext="$exeext" + + # Additional compiler flags for building library objects. + pic_flag=$lt_lt_prog_compiler_pic_RC + pic_mode=$pic_mode + + # What is the maximum length of a command? + max_cmd_len=$lt_cv_sys_max_cmd_len + + # Does compiler simultaneously support -c and -o options? + compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + + # Must we lock files when doing compilation? + need_locks=$lt_need_locks - fi + # Do we need the lib prefix for modules? + need_lib_prefix=$need_lib_prefix - done + # Do we need a version for libraries? + need_version=$need_version + # Whether dlopen is supported. + dlopen_support=$enable_dlopen - NO_SCSI_CHANGER_MODE=true - NO_CHIO_CHANGER_MODE=true + # Whether dlopen of programs is supported. + dlopen_self=$enable_dlopen_self - echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 - echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 - if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include + # Whether dlopen of statically linked programs is supported. + dlopen_self_static=$enable_dlopen_self_static - int - main () - { - #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros - #endif + # Compiler flag to prevent dynamic linking. + link_static_flag=$lt_lt_prog_compiler_static_RC - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include + # Compiler flag to turn off builtin functions. + no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC - int - main () - { - #if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif + # Compiler flag to allow reflexive dlopens. + export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Compiler flag to generate shared objects directly from archives. + whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC - ac_cv_c_bigendian=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Compiler flag to generate thread-safe objects. + thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC - # It does not; compile a test program. - if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } - short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } - int - main () - { - _ascii (); _ebcdic (); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi - fi - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Library versioning type. + version_type=$version_type - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - int - main () - { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); - } - _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Format of library name prefix. + libname_spec=$lt_libname_spec - ( exit $ac_status ) - ac_cv_c_bigendian=yes - fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 - echo "${ECHO_T}$ac_cv_c_bigendian" >&6 - case $ac_cv_c_bigendian in - yes) + # List of archive names. First name is the real one, the rest are links. + # The last name is the one that the linker finds with -lNAME. + library_names_spec=$lt_library_names_spec - cat >>confdefs.h <<\_ACEOF - #define WORDS_BIGENDIAN 1 - _ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 - echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; - esac + # The coded name of the library, if different from the real name. + soname_spec=$lt_soname_spec + # Commands used to build and install an old-style archive. + RANLIB=$lt_RANLIB + old_archive_cmds=$lt_old_archive_cmds_RC + old_postinstall_cmds=$lt_old_postinstall_cmds + old_postuninstall_cmds=$lt_old_postuninstall_cmds - if test x"$ac_cv_header_sys_scsi_h" = x"yes"; then - echo "$as_me:$LINENO: checking for HP/UX-like scsi changer support" >&5 - echo $ECHO_N "checking for HP/UX-like scsi changer support... $ECHO_C" >&6 - if test "${amanda_cv_hpux_scsi_chio+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Create an old-style archive from a shared archive. + old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC - #include + # Create a temporary old-style archive to link instead of a shared archive. + old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC - int - main () - { + # Commands used to build and install a shared archive. + archive_cmds=$lt_archive_cmds_RC + archive_expsym_cmds=$lt_archive_expsym_cmds_RC + postinstall_cmds=$lt_postinstall_cmds + postuninstall_cmds=$lt_postuninstall_cmds - static struct element_addresses changer_info; - int i = SIOC_ELEMENT_ADDRESSES; - int j = SIOC_ELEMENT_STATUS; - int k = SIOC_MOVE_MEDIUM; + # Commands used to build a loadable module (assumed same as above if empty) + module_cmds=$lt_module_cmds_RC + module_expsym_cmds=$lt_module_expsym_cmds_RC - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_hpux_scsi_chio=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Commands to strip libraries. + old_striplib=$lt_old_striplib + striplib=$lt_striplib - amanda_cv_hpux_scsi_chio=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi_chio" >&5 - echo "${ECHO_T}$amanda_cv_hpux_scsi_chio" >&6 - if test x"$amanda_cv_hpux_scsi_chio" = x"yes"; then + # Dependencies to place before the objects being linked to create a + # shared library. + predep_objects=$lt_predep_objects_RC - cat >>confdefs.h <<\_ACEOF - #define HAVE_HPUX_SCSI_CHIO 1 - _ACEOF + # Dependencies to place after the objects being linked to create a + # shared library. + postdep_objects=$lt_postdep_objects_RC - NO_SCSI_CHANGER_MODE=false - fi - fi + # Dependencies to place before the objects being linked to create a + # shared library. + predeps=$lt_predeps_RC - if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_scsi_scsi_ioctl_h" = x"yes"; then - echo "$as_me:$LINENO: checking for Linux like scsi support (ioctl)" >&5 - echo $ECHO_N "checking for Linux like scsi support (ioctl)... $ECHO_C" >&6 - if test "${amanda_cv_linux_scsi+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Dependencies to place after the objects being linked to create a + # shared library. + postdeps=$lt_postdeps_RC - #include - #include + # The library search path used internally by the compiler when linking + # a shared library. + compiler_lib_search_path=$lt_compiler_lib_search_path_RC - int - main () - { + # Method to check whether dependent libraries are shared objects. + deplibs_check_method=$lt_deplibs_check_method - int device; - char *Command; - ioctl(device, SCSI_IOCTL_SEND_COMMAND, Command); + # Command to use when deplibs_check_method == file_magic. + file_magic_cmd=$lt_file_magic_cmd - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_linux_scsi=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Flag that allows shared libraries with undefined symbols to be built. + allow_undefined_flag=$lt_allow_undefined_flag_RC - amanda_cv_linux_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $amanda_cv_linux_scsi" >&5 - echo "${ECHO_T}$amanda_cv_linux_scsi" >&6 - fi + # Flag that forces no undefined symbols. + no_undefined_flag=$lt_no_undefined_flag_RC - if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_scsi_sg_h" = x"yes"; then - echo "$as_me:$LINENO: checking for Linux like scsi support (sg)" >&5 - echo $ECHO_N "checking for Linux like scsi support (sg)... $ECHO_C" >&6 - if test "${amanda_cv_linux_sg_scsi+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Commands used to finish a libtool library installation in a directory. + finish_cmds=$lt_finish_cmds - #include - #include - #include + # Same as above, but a single script fragment to be evaled but not shown. + finish_eval=$lt_finish_eval - int - main () - { + # Take the output of nm and produce a listing of raw symbols and C names. + global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - int device; - struct sg_header *psg_header; - char *buffer; - write(device, buffer, 1); + # Transform the output of nm in a proper C declaration + global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_linux_sg_scsi=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Transform the output of nm in a C name address pair + global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - amanda_cv_linux_sg_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $amanda_cv_linux_sg_scsi" >&5 - echo "${ECHO_T}$amanda_cv_linux_sg_scsi" >&6 - fi + # This is the shared library runtime path variable. + runpath_var=$runpath_var - if test x"$amanda_cv_linux_scsi" = x"yes" || - test x"$amanda_cv_linux_sg_scsi" = x"yes";then + # This is the shared library path variable. + shlibpath_var=$shlibpath_var - cat >>confdefs.h <<\_ACEOF - #define HAVE_LINUX_LIKE_SCSI 1 - _ACEOF + # Is shlibpath searched before the hard-coded library search path? + shlibpath_overrides_runpath=$shlibpath_overrides_runpath - NO_SCSI_CHANGER_MODE=false - fi + # How to hardcode a shared library path into an executable. + hardcode_action=$hardcode_action_RC - if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_scsi_h" = x"yes"; then - echo "$as_me:$LINENO: checking for HP-UX like scsi support" >&5 - echo $ECHO_N "checking for HP-UX like scsi support... $ECHO_C" >&6 - if test "${amanda_cv_hpux_scsi+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Whether we should hardcode library paths into libraries. + hardcode_into_libs=$hardcode_into_libs - #include - #include - #include - #include + # Flag to hardcode \$libdir into a binary during linking. + # This must work even if \$libdir does not exist. + hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + + # If ld is used when linking, flag to hardcode \$libdir into + # a binary during linking. This must work even if \$libdir does + # not exist. + hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + + # Whether we need a single -rpath flag with a separated argument. + hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + + # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the + # resulting binary. + hardcode_direct=$hardcode_direct_RC + + # Set to yes if using the -LDIR flag during linking hardcodes DIR into the + # resulting binary. + hardcode_minus_L=$hardcode_minus_L_RC + + # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into + # the resulting binary. + hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + + # Set to yes if building a shared library automatically hardcodes DIR into the library + # and all subsequent libraries and executables linked against it. + hardcode_automatic=$hardcode_automatic_RC + + # Variables whose values should be saved in libtool wrapper scripts and + # restored at relink time. + variables_saved_for_relink="$variables_saved_for_relink" + + # Whether libtool must link a program against all its dependency libraries. + link_all_deplibs=$link_all_deplibs_RC - int - main () - { + # Compile-time system search path for libraries + sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - int device; - char *Command; - ioctl(device, SIOC_IO, Command); + # Run-time system search path for libraries + sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_hpux_scsi=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + # Fix the shell variable \$srcfile for the compiler. + fix_srcfile_path="$fix_srcfile_path_RC" - amanda_cv_hpux_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $amanda_cv_hpux_scsi" >&5 - echo "${ECHO_T}$amanda_cv_hpux_scsi" >&6 - if test x"$amanda_cv_hpux_scsi" = x"yes";then + # Set to yes if exported symbols are required. + always_export_symbols=$always_export_symbols_RC - cat >>confdefs.h <<\_ACEOF - #define HAVE_HPUX_LIKE_SCSI 1 - _ACEOF + # The commands to list exported symbols. + export_symbols_cmds=$lt_export_symbols_cmds_RC - NO_SCSI_CHANGER_MODE=false - NO_CHIO_CHANGER_MODE=false - fi - fi + # The commands to extract the exported symbol list from a shared archive. + extract_expsyms_cmds=$lt_extract_expsyms_cmds - if test x"$ac_cv_header_sys_mtio_h" = x"yes" && - test x"$ac_cv_header_sys_dsreq_h" = x"yes"; then - echo "$as_me:$LINENO: checking for Irix like scsi support" >&5 - echo $ECHO_N "checking for Irix like scsi support... $ECHO_C" >&6 - if test "${amanda_cv_irix_scsi+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ + # Symbols that should not be listed in the preloaded symbols. + exclude_expsyms=$lt_exclude_expsyms_RC - #include - #include - #include + # Symbols that must always be exported. + include_expsyms=$lt_include_expsyms_RC - int - main () - { + # ### END LIBTOOL TAG CONFIG: $tagname + + __EOF__ + int device=1; + char Command; + ioctl(device, DS_ENTER, &Command); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_irix_scsi=yes else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - amanda_cv_irix_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi fi - echo "$as_me:$LINENO: result: $amanda_cv_irix_scsi" >&5 - echo "${ECHO_T}$amanda_cv_irix_scsi" >&6 - if test x"$amanda_cv_irix_scsi" = x"yes";then - cat >>confdefs.h <<\_ACEOF - #define HAVE_IRIX_LIKE_SCSI 1 - _ACEOF - NO_SCSI_CHANGER_MODE=false - fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 + echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 + echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi fi +if test x"$ac_cv_header_sys_mtio_h" = x"yes" && + test x"$ac_cv_header_sys_scsi_impl_uscsi_h" = x"yes"; then + echo "$as_me:$LINENO: checking for Solaris-like scsi support" >&5 +echo $ECHO_N "checking for Solaris-like scsi support... $ECHO_C" >&6 +if test "${amanda_cv_solaris_scsi+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - #include - #include - #include - int - main () - { + # This can be used to rebuild libtool when needed + LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + + # Always use our own libtool. + LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + # Prevent multiple expansion + + - int device; - char *Command; - ioctl(device, USCSICMD, Command); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_solaris_scsi=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - amanda_cv_solaris_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: $amanda_cv_solaris_scsi" >&5 - echo "${ECHO_T}$amanda_cv_solaris_scsi" >&6 - if test x"$amanda_cv_solaris_scsi" = x"yes";then - cat >>confdefs.h <<\_ACEOF - #define HAVE_SOLARIS_LIKE_SCSI 1 - _ACEOF - NO_SCSI_CHANGER_MODE=false - fi - fi - if test x"$ac_cv_header_sys_tape_h" = x"yes" && - test x"$ac_cv_header_sys_scarray_h" = x"yes" && - test x"$ac_cv_header_sys_gscdds_h" = x"yes"; then - echo "$as_me:$LINENO: checking for AIX like scsi support" >&5 - echo $ECHO_N "checking for AIX like scsi support... $ECHO_C" >&6 - if test "${amanda_cv_aix_scsi+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include - #include - int - main () - { - int device; - char *Command; - ioctl(device, STIOCMD, Command); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + amanda_cv_aix_scsi=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +amanda_cv_aix_scsi=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $amanda_cv_aix_scsi" >&5 +echo "${ECHO_T}$amanda_cv_aix_scsi" >&6 + if test x"$amanda_cv_aix_scsi" = x"yes";then +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIX_LIKE_SCSI 1 +_ACEOF + NO_SCSI_CHANGER_MODE=false + fi +fi +if test x"$ac_cv_header_cam_cam_h" = x"yes";then + echo "$as_me:$LINENO: checking for CAM like scsi support" >&5 +echo $ECHO_N "checking for CAM like scsi support... $ECHO_C" >&6 +if test "${amanda_cv_cam_scsi+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +# include +# include +# include +# include +# include +# include - int - main () - { - struct cam_device *curdev; - curdev = cam_open_pass("", O_RDWR, NULL); - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_cam_scsi=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - amanda_cv_cam_scsi=no - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + # Check whether --enable-static-binary was given. + if test "${enable_static_binary+set}" = set; then + enableval=$enable_static_binary; + case "$withval" in + "" | y | ye | yes) + AMANDA_STATIC_LDFLAGS=-static + if test x"$enable_static" = x"no"; then + { { echo "$as_me:$LINENO: error: *** --enable-static-binary is incompatible with --disable-static" >&5 + echo "$as_me: error: *** --enable-static-binary is incompatible with --disable-static" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + *n | no) + AMANDA_STATIC_LDFLAGS= + ;; + esac + fi - echo "$as_me:$LINENO: result: $amanda_cv_cam_scsi" >&5 - echo "${ECHO_T}$amanda_cv_cam_scsi" >&6 - if test x"$amanda_cv_cam_scsi" = x"yes";then - cat >>confdefs.h <<\_ACEOF - #define HAVE_CAM_LIKE_SCSI 1 - _ACEOF - NO_SCSI_CHANGER_MODE=false - echo "$as_me:$LINENO: checking for main in -lcam" >&5 - echo $ECHO_N "checking for main in -lcam... $ECHO_C" >&6 - if test "${ac_cv_lib_cam_main+set}" = set; then + + # + # headers + # + { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 + echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } + if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcam $LIBS" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -41952,86 -48530,46 +50478,57 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include - #include - #include - #include - - int - main () - { - - int device=1; - char Command; - ioctl(device, SCIOCCOMMAND, &Command); - - ; - return 0; - } _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_cv_bsd_scsi=yes + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - amanda_cv_bsd_scsi=no + ac_cv_header_stdc=no fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + rm -f conftest* + fi - echo "$as_me:$LINENO: result: $amanda_cv_bsd_scsi" >&5 - echo "${ECHO_T}$amanda_cv_bsd_scsi" >&6 - if test x"$amanda_cv_bsd_scsi" = x"yes";then - cat >>confdefs.h <<\_ACEOF - #define HAVE_BSD_LIKE_SCSI 1 + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include - NO_SCSI_CHANGER_MODE=false - fi + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : + else + ac_cv_header_stdc=no fi + rm -f conftest* +if test x"$ac_cv_header_chio_h" = x"yes" || + test x"$ac_cv_header_sys_chio_h" = x"yes"; then + if test x"$ac_cv_header_camlib_h" != x"yes"; then + if $NO_SCSI_CHANGER_MODE; then + NO_SCSI_CHANGER_MODE=false + else + NO_CHIO_CHANGER_MODE=false + fi + fi fi - - echo "$as_me:$LINENO: checking for main in -lcur_colr" >&5 - echo $ECHO_N "checking for main in -lcur_colr... $ECHO_C" >&6 - if test "${ac_cv_lib_cur_colr_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcur_colr $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -42069,38 -48620,37 +50579,38 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_cur_colr_main=yes + : else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_cur_colr_main=no + ( exit $ac_status ) + ac_cv_header_stdc=no fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_lib_cur_colr_main" >&5 - echo "${ECHO_T}$ac_cv_lib_cur_colr_main" >&6 - if test $ac_cv_lib_cur_colr_main = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBCUR_COLR 1 - _ACEOF - LIBS="-lcur_colr $LIBS" fi + fi + { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 + echo "${ECHO_T}$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + cat >>confdefs.h <<\_ACEOF + #define STDC_HEADERS 1 + _ACEOF -fi - echo "$as_me:$LINENO: checking for main in -lintl" >&5 - echo $ECHO_N "checking for main in -lintl... $ECHO_C" >&6 - if test "${ac_cv_lib_intl_main+set}" = set; then + { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 + echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } + if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -42143,53 -48691,104 +50648,111 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_intl_main=no + ac_cv_header_time=no fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_lib_intl_main" >&5 - echo "${ECHO_T}$ac_cv_lib_intl_main" >&6 - if test $ac_cv_lib_intl_main = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBINTL 1 - _ACEOF + { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 + echo "${ECHO_T}$ac_cv_header_time" >&6; } + if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF + LIBS="-lintl $LIBS" fi +case "$target" in + *sgi-irix*) - echo "$as_me:$LINENO: checking for main in -lsocket" >&5 - echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6 - if test "${ac_cv_lib_socket_main+set}" = set; then + + + + + + + + + + + + + + + + + + + + + + + + for ac_header in arpa/inet.h \ + grp.h \ + libc.h \ + libgen.h \ + limits.h \ + math.h \ + netdb.h \ + netinet/in.h \ + stdarg.h \ + stdlib.h \ + string.h \ + strings.h \ + sys/file.h \ + sys/ioctl.h \ + sys/ipc.h \ + sys/mntent.h \ + sys/param.h \ + sys/select.h \ + sys/stat.h \ + sys/shm.h \ + sys/time.h \ + sys/types.h \ + sys/uio.h \ + syslog.h \ + unistd.h \ + + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket $LIBS" + # Is the header compilable? + { echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + +int +main () +{ +main (); + ; + return 0; +} _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@@ -42247,19 -48819,15 +50783,23 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + + +int +main () +{ +main (); + ; + return 0; +} _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 + if { (ac_try="$ac_cpp conftest.$ac_ext" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@@ -42284,32 -48842,69 +50814,71 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no +ac_cv_lib_resolv_main=no fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + + rm -f conftest.err conftest.$ac_ext + { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6; } + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; + esac + { echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" fi - echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5 - echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6 - if test $ac_cv_lib_resolv_main = yes; then + ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIBRESOLV 1 _ACEOF -fi + LIBS="-lresolv $LIBS" -done +fi - echo "$as_me:$LINENO: checking for main in -lnsl" >&5 - echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6 - if test "${ac_cv_lib_nsl_main+set}" = set; then + # + # Types + # + { echo "$as_me:$LINENO: checking if sockaddr_storage struct exists" >&5 + echo $ECHO_N "checking if sockaddr_storage struct exists... $ECHO_C" >&6; } + if test "${ac_cv_has_sockaddr_storage+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -42352,32 -48943,27 +50917,29 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nsl_main=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + ac_cv_has_sockaddr_storage=no fi - echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 - echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6 - if test $ac_cv_lib_nsl_main = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBNSL 1 - _ACEOF - - LIBS="-lnsl $LIBS" + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + { echo "$as_me:$LINENO: result: $ac_cv_has_sockaddr_storage" >&5 + echo "${ECHO_T}$ac_cv_has_sockaddr_storage" >&6; } + if test $ac_cv_has_sockaddr_storage = yes ; then - echo "$as_me:$LINENO: checking for main in -lsocket" >&5 - echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6 - if test "${ac_cv_lib_socket_main+set}" = set; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_SOCKADDR_STORAGE 1 + _ACEOF + + fi + { echo "$as_me:$LINENO: checking for int" >&5 + echo $ECHO_N "checking for int... $ECHO_C" >&6; } + if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -42794,46 -49255,25 +51231,27 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_readline_readline=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 - echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6 - if test $ac_cv_lib_readline_readline = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBREADLINE 1 - _ACEOF - - LIBS="-lreadline $LIBS" - - fi - - if test "x$ac_cv_lib_readline_readline" = xyes; then - READLINE_LIBS="-lreadline" - - else - { echo "$as_me:$LINENO: WARNING: *** No readline library, no history and command line editing in amrecover!" >&5 - echo "$as_me: WARNING: *** No readline library, no history and command line editing in amrecover!" >&2;} - fi - else - { echo "$as_me:$LINENO: WARNING: *** No terminal library, no history and command line editing in amrecover!" >&5 - echo "$as_me: WARNING: *** No terminal library, no history and command line editing in amrecover!" >&2;} + ac_lo=`expr '(' $ac_mid ')' + 1` fi - if test "x$ac_cv_header_linux_zftape_h" = xyes; then - if test "x$ac_cv_header_vtblc_h" = xyes; then - - echo "$as_me:$LINENO: checking for main in -lvtblc" >&5 - echo $ECHO_N "checking for main in -lvtblc... $ECHO_C" >&6 - if test "${ac_cv_lib_vtblc_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_int=$ac_lo;; + '') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (int) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; + esac else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lvtblc $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -42871,47 -49332,43 +51310,44 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_vtblc_main=yes + ac_cv_sizeof_int=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_vtblc_main=no + ( exit $ac_status ) + if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (int) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_lib_vtblc_main" >&5 - echo "${ECHO_T}$ac_cv_lib_vtblc_main" >&6 - if test $ac_cv_lib_vtblc_main = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBVTBLC 1 - _ACEOF + rm -f conftest.val + fi + { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 + echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } - LIBS="-lvtblc $LIBS" - fi - if test "x$ac_cv_lib_vtblc_main" != xyes; then - { echo "$as_me:$LINENO: WARNING: *** vtblc library not found - no QIC volume table support!" >&5 - echo "$as_me: WARNING: *** vtblc library not found - no QIC volume table support!" >&2;} - fi - else - { echo "$as_me:$LINENO: WARNING: *** vtblc headers not found - no QIC volume table support!" >&5 - echo "$as_me: WARNING: *** vtblc headers not found - no QIC volume table support!" >&2;} - fi - fi + cat >>confdefs.h <<_ACEOF + #define SIZEOF_INT $ac_cv_sizeof_int + _ACEOF - echo "$as_me:$LINENO: checking for modf in -lm" >&5 - echo $ECHO_N "checking for modf in -lm... $ECHO_C" >&6 - if test "${ac_cv_lib_m_modf+set}" = set; then + { echo "$as_me:$LINENO: checking for long" >&5 + echo $ECHO_N "checking for long... $ECHO_C" >&6; } + if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -43293,26 -49660,25 +51639,30 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - mt_erreg_result="not found" + ac_lo=`expr '(' $ac_mid ')' + 1` fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $mt_erreg_result" >&5 +echo "${ECHO_T}$mt_erreg_result" >&6 - - DB_HEADER= - DB_LIB= - - save_LIBS="$LIBS" - - echo "$as_me:$LINENO: checking for dbm_open in -lc" >&5 - echo $ECHO_N "checking for dbm_open in -lc... $ECHO_C" >&6 - if test "${ac_cv_lib_c_dbm_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_long=$ac_lo;; + '') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (long) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; + esac else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -43356,42 -49737,43 +51721,45 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_c_dbm_open=yes + ac_cv_sizeof_long=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_c_dbm_open=no + ( exit $ac_status ) + if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (long) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_lib_c_dbm_open" >&5 - echo "${ECHO_T}$ac_cv_lib_c_dbm_open" >&6 - if test $ac_cv_lib_c_dbm_open = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBC 1 - _ACEOF + rm -f conftest.val + fi + { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 + echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } - LIBS="-lc $LIBS" - fi - LIBS="$save_LIBS" + cat >>confdefs.h <<_ACEOF + #define SIZEOF_LONG $ac_cv_sizeof_long + _ACEOF - case "$DB_STYLE" in - db) - if test "x$ac_cv_header_db_h" = xyes; then - echo "$as_me:$LINENO: checking for main in -ldb" >&5 - echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6 - if test "${ac_cv_lib_db_main+set}" = set; then + { echo "$as_me:$LINENO: checking for long long" >&5 + echo $ECHO_N "checking for long long... $ECHO_C" >&6; } + if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldb $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -43660,21 -49955,48 +51941,45 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + typedef long long ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dbm_dbm_open=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@@ -43844,64 -50142,43 +52125,45 @@@ eval "echo \"\$as_me:$LINENO: $ac_try_e ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_gdbm_dbm_open=yes + ac_cv_sizeof_long_long=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_gdbm_dbm_open=no + ( exit $ac_status ) + if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (long long) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_dbm_open" >&5 - echo "${ECHO_T}$ac_cv_lib_gdbm_dbm_open" >&6 - if test $ac_cv_lib_gdbm_dbm_open = yes; then - cat >>confdefs.h <<_ACEOF - #define HAVE_LIBGDBM 1 - _ACEOF + rm -f conftest.val + fi + { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 + echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } - LIBS="-lgdbm $LIBS" - fi - if test "x$ac_cv_lib_gdbm_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=gdbm - else - DB_STYLE= - { echo "$as_me:$LINENO: WARNING: *** gdbm database library requested but -lgdbm not found." >&5 - echo "$as_me: WARNING: *** gdbm database library requested but -lgdbm not found." >&2;} - fi - else - if test "x$ac_cv_lib_c_dbm_open" = xyes; then - DB_HEADER=ndbm.h - DB_LIB=c - else - DB_STYLE= - { echo "$as_me:$LINENO: WARNING: *** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found." >&5 - echo "$as_me: WARNING: *** gdbm library requested but -lgdbm doesn't exist and dbm_open cannot be found." >&2;} - fi - fi - else - DB_STYLE= - { echo "$as_me:$LINENO: WARNING: *** gdbm database library requested but ndbm.h not found." >&5 - echo "$as_me: WARNING: *** gdbm database library requested but ndbm.h not found." >&2;} - fi - ;; + cat >>confdefs.h <<_ACEOF + #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long + _ACEOF + ndbm) + if test "x$ac_cv_header_ndbm_h" = xyes; then - echo "$as_me:$LINENO: checking for main in -lndbm" >&5 - echo $ECHO_N "checking for main in -lndbm... $ECHO_C" >&6 - if test "${ac_cv_lib_ndbm_main+set}" = set; then + { echo "$as_me:$LINENO: checking for intmax_t" >&5 + echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6; } + if test "${ac_cv_type_intmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lndbm $LIBS" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -44244,73 -50372,121 +52357,138 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + $ac_includes_default + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 - #include - #ifdef CHAR_MIN - yes - #endif - + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - amanda_cv_have_char_min=yes + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break else - amanda_cv_have_char_min=no + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi - rm -f conftest* + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= fi +echo "$as_me:$LINENO: result: $amanda_cv_have_char_min" >&5 +echo "${ECHO_T}$amanda_cv_have_char_min" >&6 +if test "x$amanda_cv_have_char_min" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHAR_MIN 1 +_ACEOF + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking whether CHAR_MAX is defined" >&5 - echo $ECHO_N "checking whether CHAR_MAX is defined... $ECHO_C" >&6 - if test "${amanda_cv_have_char_max+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + $ac_includes_default + typedef intmax_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 - #include - #ifdef CHAR_MAX - yes - #endif - + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - amanda_cv_have_char_max=yes + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + amanda_cv_have_char_max=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $amanda_cv_have_char_max" >&5 +echo "${ECHO_T}$amanda_cv_have_char_max" >&6 +if test "x$amanda_cv_have_char_max" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHAR_MAX 1 +_ACEOF + ac_lo=`expr '(' $ac_mid ')' + 1` fi - echo "$as_me:$LINENO: checking whether CHAR_BIT is defined" >&5 - echo $ECHO_N "checking whether CHAR_BIT is defined... $ECHO_C" >&6 - if test "${amanda_cv_have_char_bit+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_intmax_t=$ac_lo;; + '') if test "$ac_cv_type_intmax_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (intmax_t) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_intmax_t=0 + fi ;; + esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -44318,41 -50494,93 +52496,96 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + $ac_includes_default + typedef intmax_t ac__type_sizeof_; + static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } + static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } + #include + #include + int + main () + { - #include - #ifdef CHAR_BIT - yes - #endif + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then - amanda_cv_have_char_bit=yes + rm -f conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_intmax_t=`cat conftest.val` else - amanda_cv_have_char_bit=no - fi - rm -f conftest* + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) + if test "$ac_cv_type_intmax_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (intmax_t) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_intmax_t=0 + fi fi - echo "$as_me:$LINENO: result: $amanda_cv_have_char_bit" >&5 - echo "${ECHO_T}$amanda_cv_have_char_bit" >&6 - if test "x$amanda_cv_have_char_bit" = xyes; then + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + rm -f conftest.val + fi + { echo "$as_me:$LINENO: result: $ac_cv_sizeof_intmax_t" >&5 + echo "${ECHO_T}$ac_cv_sizeof_intmax_t" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_CHAR_BIT 1 +_ACEOF - fi + cat >>confdefs.h <<_ACEOF + #define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t + _ACEOF - ice_have_accept=no - for ac_func in accept - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for off_t" >&5 + echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } + if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -44466,60 -50649,92 +52654,88 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <$header> + $ac_includes_default + typedef off_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; + test_array [0] = 0 - ; - return 0; -} _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}accept[ ]*\(" >/dev/null 2>&1; then - ice_cv_have_accept_decl=yes - fi - rm -f conftest* - - if test "$ice_cv_have_accept_decl" = yes; then - break - fi - # Check for "fixed" declaration like "getpid _PARAMS((int))" - cat >conftest.$ac_ext <<_ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <$header> - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}accept[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then - ice_cv_have_accept_decl=yes - fi - rm -f conftest* - - if test "$ice_cv_have_accept_decl" = yes; then - break - fi - done - - fi - - echo "$as_me:$LINENO: result: $ice_cv_have_accept_decl" >&5 - echo "${ECHO_T}$ice_cv_have_accept_decl" >&6 - if test "$ice_cv_have_accept_decl" = yes; then + $ac_includes_default + typedef off_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; + test_array [0] = 0 - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_ACCEPT_DECL 1 _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - fi + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works - # for constant arguments. Useless! - echo "$as_me:$LINENO: checking for working alloca.h" >&5 - echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 - if test "${ac_cv_working_alloca_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -44643,70 -50811,30 +52812,39 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_alloca_works=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi - echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 - echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 - - if test $ac_cv_func_alloca_works = yes; then - - cat >>confdefs.h <<\_ACEOF - #define HAVE_ALLOCA 1 - _ACEOF - - else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions - # that cause trouble. Some versions do not even contain alloca or - # contain a buggy version. If you still want to use their alloca, - # use ar to extract alloca.o from them instead of compiling alloca.c. - - ALLOCA=alloca.$ac_objext - - cat >>confdefs.h <<\_ACEOF - #define C_ALLOCA 1 - _ACEOF - - echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 - echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 - if test "${ac_cv_os_cray+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes - else - ac_cv_os_cray=no + ac_lo= ac_hi= fi - rm -f conftest* + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 - echo "${ECHO_T}$ac_cv_os_cray" >&6 - if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@ -44818,24 -50899,37 +52909,39 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + $ac_includes_default + typedef off_t ac__type_sizeof_; + static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } + static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } + #include + #include int -main () +find_stack_direction () { - static char *addr = 0; - auto char dummy; - if (addr == 0) + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - addr = &dummy; - return find_stack_direction (); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); } else - return (&dummy > addr) ? 1 : -1; - } + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; - ; - return 0; +int +main () +{ + exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext @@@ -45062,34 -51125,21 +53137,22 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - ice_have_atof=yes + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi +done - if test "${ice_have_atof}" = yes; then - echo "$as_me:$LINENO: checking for atof declaration in stdlib.h" >&5 - echo $ECHO_N "checking for atof declaration in stdlib.h... $ECHO_C" >&6 - if test "${ice_cv_have_atof_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - ice_cv_have_atof_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in stdlib.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -45566,34 -51530,21 +53543,22 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - ice_have_atoll=yes + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi +done - if test "${ice_have_atoll}" = yes; then - echo "$as_me:$LINENO: checking for atoll declaration in stdlib.h" >&5 - echo $ECHO_N "checking for atoll declaration in stdlib.h... $ECHO_C" >&6 - if test "${ice_cv_have_atoll_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - ice_cv_have_atoll_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in stdlib.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -45618,44 -51587,64 +53601,66 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <$header> + $ac_includes_default + typedef ssize_t ac__type_sizeof_; + int + main () + { + static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; + test_array [0] = 0 + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}atoll[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then - ice_cv_have_atoll_decl=yes - fi - rm -f conftest* - - if test "$ice_cv_have_atoll_decl" = yes; then - break - fi - done + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi - echo "$as_me:$LINENO: result: $ice_cv_have_atoll_decl" >&5 - echo "${ECHO_T}$ice_cv_have_atoll_decl" >&6 - if test "$ice_cv_have_atoll_decl" = yes; then - - cat >>confdefs.h <<_ACEOF - #define HAVE_ATOLL_DECL 1 - _ACEOF + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi +fi + - ice_have_strtol=no + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - for ac_func in strtol - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@ -45734,34 -51685,25 +53701,26 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - ice_have_strtol=yes + ac_lo=`expr '(' $ac_mid ')' + 1` fi +done - if test "${ice_have_strtol}" = yes; then - echo "$as_me:$LINENO: checking for strtol declaration in stdlib.h" >&5 - echo $ECHO_N "checking for strtol declaration in stdlib.h... $ECHO_C" >&6 - if test "${ice_cv_have_strtol_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + case $ac_lo in + ?*) ac_cv_sizeof_ssize_t=$ac_lo;; + '') if test "$ac_cv_type_ssize_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t) + See \`config.log' for more details." >&5 + echo "$as_me: error: cannot compute sizeof (ssize_t) + See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_ssize_t=0 + fi ;; + esac else - - ice_cv_have_strtol_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in stdlib.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -46068,33 -51935,21 +53952,25 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi +done + + +ice_have_bind=no - for ac_func in bind - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else - cat >conftest.$ac_ext <<_ACEOF + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -46172,34 -52026,31 +54047,32 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - ice_have_bind=yes + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi +done - if test "${ice_have_bind}" = yes; then - echo "$as_me:$LINENO: checking for bind declaration in sys/types.h sys/socket.h" >&5 - echo $ECHO_N "checking for bind declaration in sys/types.h sys/socket.h... $ECHO_C" >&6 - if test "${ice_cv_have_bind_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - ice_cv_have_bind_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in sys/types.h sys/socket.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF + ac_lo= ac_hi= + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + # Binary search between lo and hi bounds. + while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -46340,53 -52244,29 +54266,38 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF - ice_have_bcopy=yes + ac_cv_type_off_t=no fi - done - if test "${ice_have_bcopy}" = yes; then - echo "$as_me:$LINENO: checking for bcopy declaration in string.h strings.h stdlib.h" >&5 - echo $ECHO_N "checking for bcopy declaration in string.h strings.h stdlib.h... $ECHO_C" >&6 - if test "${ice_cv_have_bcopy_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 + echo "${ECHO_T}$ac_cv_type_off_t" >&6; } + if test $ac_cv_type_off_t = yes; then + : else - ice_cv_have_bcopy_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in string.h strings.h stdlib.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + cat >>confdefs.h <<_ACEOF + #define off_t long int _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$header> +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}bcopy[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_bcopy_decl=yes fi +rm -f conftest* - if test "$ice_cv_have_bcopy_decl" = yes; then - break - fi - # Check for "fixed" declaration like "getpid _PARAMS((int))" - cat >conftest.$ac_ext <<_ACEOF + { echo "$as_me:$LINENO: checking for pid_t" >&5 + echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } + if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -46508,34 -52370,29 +54401,30 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + ac_cv_type_size_t=no fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 + echo "${ECHO_T}$ac_cv_type_size_t" >&6; } + if test $ac_cv_type_size_t = yes; then + : + else + + cat >>confdefs.h <<_ACEOF + #define size_t unsigned int _ACEOF - ice_have_bzero=yes + fi +done - if test "${ice_have_bzero}" = yes; then - echo "$as_me:$LINENO: checking for bzero declaration in string.h strings.h stdlib.h" >&5 - echo $ECHO_N "checking for bzero declaration in string.h strings.h stdlib.h... $ECHO_C" >&6 - if test "${ice_cv_have_bzero_decl+set}" = set; then + { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 + echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } + if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - ice_cv_have_bzero_decl=no - ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' - ice_re_word='(^|[^a-zA-Z0-9_])' - for header in string.h strings.h stdlib.h; do - # Check for ordinary declaration - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -46560,40 -52436,56 +54468,59 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <$header> + #include + #include + int + main () + { + return *(signal (0, 0)) (0) == 1; + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}bzero[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then - ice_cv_have_bzero_decl=yes - fi - rm -f conftest* + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 - if test "$ice_cv_have_bzero_decl" = yes; then - break + ac_cv_type_signal=void fi - done + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - - echo "$as_me:$LINENO: result: $ice_cv_have_bzero_decl" >&5 - echo "${ECHO_T}$ice_cv_have_bzero_decl" >&6 - if test "$ice_cv_have_bzero_decl" = yes; then + { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 + echo "${ECHO_T}$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF - #define HAVE_BZERO_DECL 1 + #define RETSIGTYPE $ac_cv_type_signal _ACEOF - fi - fi - echo "$as_me:$LINENO: checking whether closedir returns void" >&5 - echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6 - if test "${ac_cv_func_closedir_void+set}" = set; then + { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 + echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } + if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -46615,35 -52506,39 +54541,37 @@@ struct tm tm return 0; } _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_closedir_void=no + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_struct_tm=time.h else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ( exit $ac_status ) - ac_cv_func_closedir_void=yes - fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_struct_tm=sys/time.h fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 - echo "${ECHO_T}$ac_cv_func_closedir_void" >&6 - if test $ac_cv_func_closedir_void = yes; then + { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 + echo "${ECHO_T}$ac_cv_struct_tm" >&6; } + if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF - #define CLOSEDIR_VOID 1 + #define TM_IN_SYS_TIME 1 _ACEOF fi @@@ -46737,34 -52596,39 +54629,48 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + + ## end lifting from config/gnulib/socklen.m4 + # fallback if the check fails + if test "$gl_cv_socklen_t_equiv" = ""; then + gl_cv_socklen_t_equiv=socklen_t + fi + { echo "$as_me:$LINENO: result: $gl_cv_socklen_t_equiv" >&5 + echo "${ECHO_T}$gl_cv_socklen_t_equiv" >&6; } + + + cat >>confdefs.h <<_ACEOF + #define socklen_t_equiv $gl_cv_socklen_t_equiv _ACEOF + ice_have_closelog=yes +fi +done - if test "${ice_have_closelog}" = yes; then - echo "$as_me:$LINENO: checking for closelog declaration in syslog.h" >&5 - echo $ECHO_N "checking for closelog declaration in syslog.h... $ECHO_C" >&6 - if test "${ice_cv_have_closelog_decl+set}" = set; then + + + + { echo "$as_me:$LINENO: checking for sa_family_t" >&5 + echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; } + if test "${ac_cv_type_sa_family_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + +ice_cv_have_closelog_decl=no +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' +ice_re_word='(^|[^a-zA-Z0-9_])' +for header in syslog.h; do +# Check for ordinary declaration +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -47252,20 -53208,21 +55250,22 @@@ cat >>confdefs.h <<\_ACEO _ACEOF fi +done - ice_have_fclose=no + # + # Libraries + # + # cur_colr is on some HP's - for ac_func in fclose - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for main in -lcur_colr" >&5 + echo $ECHO_N "checking for main in -lcur_colr... $ECHO_C" >&6; } + if test "${ac_cv_lib_cur_colr_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS + LIBS="-lcur_colr $LIBS" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -47712,19 -53494,65 +55537,66 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include <$header> + + int + main () + { + return main (); + ; + return 0; + } _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}flock[ ]*\(" >/dev/null 2>&1; then - ice_cv_have_flock_decl=yes + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_main=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_main=no fi - rm -f conftest* - if test "$ice_cv_have_flock_decl" = yes; then - break + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS fi - # Check for "fixed" declaration like "getpid _PARAMS((int))" + { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 + echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; } + if test $ac_cv_lib_nsl_main = yes; then + cat >>confdefs.h <<_ACEOF + #define HAVE_LIBNSL 1 + _ACEOF + + LIBS="-lnsl $LIBS" + + fi ++done + + + { echo "$as_me:$LINENO: checking for main in -lsocket" >&5 + echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; } + if test "${ac_cv_lib_socket_main+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@@ -48853,30 -54898,48 +56942,48 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + ac_cv_func_backtrace_symbols_fd=no fi - rm -f conftest.err conftest.$ac_objext \ + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + { echo "$as_me:$LINENO: result: $ac_cv_func_backtrace_symbols_fd" >&5 + echo "${ECHO_T}$ac_cv_func_backtrace_symbols_fd" >&6; } + if test $ac_cv_func_backtrace_symbols_fd = yes; then + + + cat >>confdefs.h <<\_ACEOF + #define HAVE_GLIBC_BACKTRACE 1 _ACEOF + fi - done -fi +ice_have_gethostname=no - for ac_func in gethostname + + + + # + # Declarations + # + # Checks for library functions and if the function is declared in + # an appropriate header file. Functions which exist, but for which + # no declaration is available, are declared in common-src/amanda.h. + # It's not clear that any existing system implements but does not + # declare common functions such as these. + # + + ice_have_accept=no + + for ac_func in accept do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -49036,15 -55091,14 +57135,16 @@@ _ACEO fi fi - # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. - echo "$as_me:$LINENO: checking for getmntent in -lsun" >&5 - echo $ECHO_N "checking for getmntent in -lsun... $ECHO_C" >&6 - if test "${ac_cv_lib_sun_getmntent+set}" = set; then + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! + { echo "$as_me:$LINENO: checking for working alloca.h" >&5 + echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } + if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -49093,25 -55137,28 +57183,29 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_sun_getmntent=no + ac_cv_working_alloca_h=no fi - rm -f conftest.err conftest.$ac_objext \ + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getmntent" >&5 - echo "${ECHO_T}$ac_cv_lib_sun_getmntent" >&6 - if test $ac_cv_lib_sun_getmntent = yes; then - LIBS="-lsun $LIBS" - else - echo "$as_me:$LINENO: checking for getmntent in -lseq" >&5 - echo $ECHO_N "checking for getmntent in -lseq... $ECHO_C" >&6 - if test "${ac_cv_lib_seq_getmntent+set}" = set; then + { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 + echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } + if test $ac_cv_working_alloca_h = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_ALLOCA_H 1 + _ACEOF + + fi + + { echo "$as_me:$LINENO: checking for alloca" >&5 + echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } + if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS - LIBS="-lseq $LIBS" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -49184,72 -55256,30 +57303,29 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" + #if defined CRAY && ! defined CRAY2 + webecray + #else + wenotbecray #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char getmntent (); - int - main () - { - getmntent (); - ; - return 0; - } + _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gen_getmntent=yes + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_gen_getmntent=no - fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi - echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getmntent" >&5 - echo "${ECHO_T}$ac_cv_lib_gen_getmntent" >&6 - if test $ac_cv_lib_gen_getmntent = yes; then - LIBS="-lgen $LIBS" - fi - + ac_cv_os_cray=no fi -rm -f conftest* fi - - - for ac_func in getmntent - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 + echo "${ECHO_T}$ac_cv_os_cray" >&6; } + if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -49501,28 -55544,15 +57641,28 @@@ if test "$ice_cv_have_getopt_decl" = ye fi done +fi + +echo "$as_me:$LINENO: result: $ice_cv_have_getopt_decl" >&5 +echo "${ECHO_T}$ice_cv_have_getopt_decl" >&6 +if test "$ice_cv_have_getopt_decl" = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_DECL 1 +_ACEOF + +fi +fi + - ice_have_getpeername=no + ice_have_atof=no - for ac_func in getpeername + for ac_func in atof do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -49714,13 -55738,12 +57848,13 @@@ cat >>conftest.$ac_ext <<_ACEO #undef $ac_func - /* Override any gcc2 internal prototype to avoid an error. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" +{ #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@@ -49796,53 -55818,47 +57929,50 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - $ac_includes_default - int - main () - { - getpgrp (0); - ; - return 0; - } + #include <$header> + _ACEOF - rm -f conftest.$ac_objext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_getpgrp_void=no - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}atol[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_atol_decl=yes + fi + rm -f conftest* - ac_cv_func_getpgrp_void=yes + if test "$ice_cv_have_atol_decl" = yes; then + break fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # Check for "fixed" declaration like "getpid _PARAMS((int))" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}atol[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_atol_decl=yes + fi + rm -f conftest* + + if test "$ice_cv_have_atol_decl" = yes; then + break + fi + done fi +echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 +if test $ac_cv_func_getpgrp_void = yes; then - cat >>confdefs.h <<\_ACEOF - #define GETPGRP_VOID 1 + { echo "$as_me:$LINENO: result: $ice_cv_have_atol_decl" >&5 + echo "${ECHO_T}$ice_cv_have_atol_decl" >&6; } + if test "$ice_cv_have_atol_decl" = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_ATOL_DECL 1 _ACEOF fi @@@ -50352,29 -56345,49 +58459,43 @@@ f fi - - echo "$as_me:$LINENO: checking for gettimeofday number of arguments" >&5 - echo $ECHO_N "checking for gettimeofday number of arguments... $ECHO_C" >&6 - if test "${amanda_cv_gettimeofday_args+set}" = set; then + for ac_func in basename + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include +#ifdef TIME_WITH_SYS_TIME +# include +# include #else - # ifdef HAVE_SYS_TIME_H - # include - # else - # include - # endif + # include + #endif + + #undef $ac_func + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me #endif int @@@ -50416,33 -56421,32 +58529,33 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - amanda_cv_gettimeofday_args=1 - + eval "$as_ac_var=no" fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $amanda_cv_gettimeofday_args" >&5 - echo "${ECHO_T}$amanda_cv_gettimeofday_args" >&6 - if test "$amanda_cv_gettimeofday_args" = 2; then - - cat >>confdefs.h <<\_ACEOF - #define HAVE_TWO_ARG_GETTIMEOFDAY 1 + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -fi -done + fi + + + ice_have_bind=no - for ac_func in getvfsent initgroups isascii + for ac_func in bind do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -50538,15 -56585,28 +58694,27 @@@ if test "$ice_cv_have_bind_decl" = yes fi done -fi - ice_have_initgroups=no + { echo "$as_me:$LINENO: result: $ice_cv_have_bind_decl" >&5 + echo "${ECHO_T}$ice_cv_have_bind_decl" >&6; } + if test "$ice_cv_have_bind_decl" = yes; then - for ac_func in initgroups + cat >>confdefs.h <<_ACEOF + #define HAVE_BIND_DECL 1 + _ACEOF + + fi + fi + + + ice_have_bcopy=no + + for ac_func in bcopy do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -51984,15 -58097,28 +60205,27 @@@ if test "$ice_cv_have_fputs_decl" = yes fi done -fi - ice_have_mkstemp=no + { echo "$as_me:$LINENO: result: $ice_cv_have_fputs_decl" >&5 + echo "${ECHO_T}$ice_cv_have_fputs_decl" >&6; } + if test "$ice_cv_have_fputs_decl" = yes; then - for ac_func in mkstemp + cat >>confdefs.h <<_ACEOF + #define HAVE_FPUTS_DECL 1 + _ACEOF + + fi + fi + + + ice_have_fread=no + + for ac_func in fread do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -52489,23 -58591,15 +60698,21 @@@ f fi - - for ac_header in stdlib.h unistd.h + for ac_func in getgrgid_r do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@@ -52541,213 -58667,127 +60780,150 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + eval "$as_ac_var=no" fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 - echo "${ECHO_T}$ac_header_compiler" >&6 - # Is the header present? - echo "$as_me:$LINENO: checking $ac_header presence" >&5 - echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ ++for ac_func in getpwuid_r ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 - echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 - echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 - echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 - echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 - echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 - echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 - echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX - ## ------------------------------------------ ## - ## Report this to the AC_PACKAGE_NAME lists. ## - ## ------------------------------------------ ## - _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac - echo "$as_me:$LINENO: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - eval "$as_ac_Header=\$ac_header_preproc" - fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - - fi - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF - - fi - - done - - - for ac_func in getpagesize - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ - #define $ac_func innocuous_$ac_func - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + - /* Override any gcc2 internal prototype to avoid an error. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" - { +#endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ - #if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func +choke me - #else - char (*f) () = $ac_func; - #endif - #ifdef __cplusplus - } +#endif + +int +main () +{ - return f != $ac_func; ++return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + - eval "$as_ac_var=no" ++ eval "$as_ac_var=no" +fi - rm -f conftest.err conftest.$ac_objext \ ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi - echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF - #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi -done - - -for ac_func in getpwuid_r -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func + -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi done - echo "$as_me:$LINENO: checking for working mmap" >&5 - echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 - if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + + ice_have_gethostname=no + + for ac_func in gethostname + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -53792,15 -60026,28 +62162,27 @@@ if test "$ice_cv_have_ioctl_decl" = yes fi done -fi - ice_have_puts=no + { echo "$as_me:$LINENO: result: $ice_cv_have_ioctl_decl" >&5 + echo "${ECHO_T}$ice_cv_have_ioctl_decl" >&6; } + if test "$ice_cv_have_ioctl_decl" = yes; then - for ac_func in puts + cat >>confdefs.h <<_ACEOF + #define HAVE_IOCTL_DECL 1 + _ACEOF + + fi + fi + + + ice_have_isnormal=no + + for ac_func in isnormal do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -54071,10 -60302,10 +62437,10 @@@ if test "${ice_cv_have_listen_decl+set} echo $ECHO_N "(cached) $ECHO_C" >&6 else - ice_cv_have_realloc_decl=no + ice_cv_have_listen_decl=no ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' ice_re_word='(^|[^a-zA-Z0-9_])' -for header in sys/types.h sys/socket.h; do +for header in stdlib.h; do # Check for ordinary declaration cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -54887,30 -61078,96 +63213,91 @@@ els echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + eval "$as_ac_var=no" fi - rm -f conftest.err conftest.$ac_objext \ + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + ice_have_mkstemp=yes + fi + done + + if test "${ice_have_mkstemp}" = yes; then + { echo "$as_me:$LINENO: checking for mkstemp declaration in stdlib.h" >&5 + echo $ECHO_N "checking for mkstemp declaration in stdlib.h... $ECHO_C" >&6; } + if test "${ice_cv_have_mkstemp_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + + ice_cv_have_mkstemp_decl=no + ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' + ice_re_word='(^|[^a-zA-Z0-9_])' + for header in stdlib.h; do + # Check for ordinary declaration + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}mkstemp[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_mkstemp_decl=yes + fi + rm -f conftest* + + if test "$ice_cv_have_mkstemp_decl" = yes; then + break + fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$header> - +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}mkstemp[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_mkstemp_decl=yes + fi + rm -f conftest* + if test "$ice_cv_have_mkstemp_decl" = yes; then + break fi done -fi - ice_have_ruserok=no + { echo "$as_me:$LINENO: result: $ice_cv_have_mkstemp_decl" >&5 + echo "${ECHO_T}$ice_cv_have_mkstemp_decl" >&6; } + if test "$ice_cv_have_mkstemp_decl" = yes; then - for ac_func in ruserok + cat >>confdefs.h <<_ACEOF + #define HAVE_MKSTEMP_DECL 1 + _ACEOF + + fi + fi + + + ice_have_mktemp=no + + for ac_func in mktemp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -55170,154 -61411,177 +63541,169 @@@ if test `eval echo '${'$as_ac_var'}'` cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - ice_have_select=yes - ice_have_mktime=yes -fi -done - -if test "${ice_have_mktime}" = yes; then -{ echo "$as_me:$LINENO: checking for mktime declaration in time.h sys/time.h" >&5 -echo $ECHO_N "checking for mktime declaration in time.h sys/time.h... $ECHO_C" >&6; } -if test "${ice_cv_have_mktime_decl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ice_cv_have_mktime_decl=no -ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' -ice_re_word='(^|[^a-zA-Z0-9_])' -for header in time.h sys/time.h; do -# Check for ordinary declaration -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$header> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}mktime[ ]*\(" >/dev/null 2>&1; then - ice_cv_have_mktime_decl=yes -fi -rm -f conftest* - -if test "$ice_cv_have_mktime_decl" = yes; then - break -fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$header> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}mktime[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then - ice_cv_have_mktime_decl=yes -fi -rm -f conftest* - -if test "$ice_cv_have_mktime_decl" = yes; then - break -fi -done - -fi - -{ echo "$as_me:$LINENO: result: $ice_cv_have_mktime_decl" >&5 -echo "${ECHO_T}$ice_cv_have_mktime_decl" >&6; } -if test "$ice_cv_have_mktime_decl" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_MKTIME_DECL 1 -_ACEOF - -fi -fi - - -for ac_func in on_exit -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF ++ ice_have_mktime=yes +fi +done + - if test "${ice_have_select}" = yes; then - echo "$as_me:$LINENO: checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h" >&5 - echo $ECHO_N "checking for select declaration in sys/types.h sys/socket.h sys/select.h time.h sys/time.h... $ECHO_C" >&6 - if test "${ice_cv_have_select_decl+set}" = set; then ++if test "${ice_have_mktime}" = yes; then ++{ echo "$as_me:$LINENO: checking for mktime declaration in time.h sys/time.h" >&5 ++echo $ECHO_N "checking for mktime declaration in time.h sys/time.h... $ECHO_C" >&6; } ++if test "${ice_cv_have_mktime_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + - ice_cv_have_select_decl=no ++ice_cv_have_mktime_decl=no +ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' +ice_re_word='(^|[^a-zA-Z0-9_])' - for header in sys/types.h sys/socket.h sys/select.h time.h sys/time.h; do ++for header in time.h sys/time.h; do +# Check for ordinary declaration +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$header> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}select[ ]*\(" >/dev/null 2>&1; then - ice_cv_have_select_decl=yes ++ $EGREP "${ice_re_word}mktime[ ]*\(" >/dev/null 2>&1; then ++ ice_cv_have_mktime_decl=yes +fi +rm -f conftest* + - if test "$ice_cv_have_select_decl" = yes; then ++if test "$ice_cv_have_mktime_decl" = yes; then + break +fi +# Check for "fixed" declaration like "getpid _PARAMS((int))" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$header> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "${ice_re_word}select[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then - ice_cv_have_select_decl=yes ++ $EGREP "${ice_re_word}mktime[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then ++ ice_cv_have_mktime_decl=yes +fi +rm -f conftest* + - if test "$ice_cv_have_select_decl" = yes; then ++if test "$ice_cv_have_mktime_decl" = yes; then + break +fi +done + +fi + - echo "$as_me:$LINENO: result: $ice_cv_have_select_decl" >&5 - echo "${ECHO_T}$ice_cv_have_select_decl" >&6 - if test "$ice_cv_have_select_decl" = yes; then ++{ echo "$as_me:$LINENO: result: $ice_cv_have_mktime_decl" >&5 ++echo "${ECHO_T}$ice_cv_have_mktime_decl" >&6; } ++if test "$ice_cv_have_mktime_decl" = yes; then + +cat >>confdefs.h <<_ACEOF - #define HAVE_SELECT_DECL 1 ++#define HAVE_MKTIME_DECL 1 +_ACEOF + +fi +fi + + - echo "$as_me:$LINENO: checking for select() argument type" >&5 - echo $ECHO_N "checking for select() argument type... $ECHO_C" >&6 - if test "${amanda_cv_select_arg_type+set}" = set; then ++for ac_func in on_exit ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + rm -f conftest.c + cat <conftest.$ac_ext +#include "confdefs.h" +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_SELECT_H +# include +#endif - #ifdef HAVE_SYS_SOCKET_H - # include ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" +#endif - #ifdef HAVE_UNISTD_H - # include ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$ac_func || defined __stub___$ac_func ++choke me +#endif + +int main() +{ - #ifdef FD_SET_POINTER - (void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0); - #else - (void)select(0, (int *) 0, (int *) 0, (int *) 0, 0); - #endif - return 0; ++return $ac_func (); ++ ; ++ return 0; +} - EOF - - amanda_cv_select_arg_type=no - select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS" - $select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1 - if test $? -ne 0; then - amanda_cv_select_arg_type=int - fi - if test "$amanda_cv_select_arg_type" = no; then - $select_compile conftest.$ac_ext 1>conftest.int 2>&1 - if test $? -ne 0; then - amanda_cv_select_arg_type=fd_set - fi - fi - if test "$amanda_cv_select_arg_type" = no; then - wc_fdset=`wc -l &5 ++ (eval "$ac_link") 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + ++ eval "$as_ac_var=no" +fi - echo "$as_me:$LINENO: result: $amanda_cv_select_arg_type" >&5 - echo "${ECHO_T}$amanda_cv_select_arg_type" >&6 + - cat >>confdefs.h <<_ACEOF - #define SELECT_ARG_TYPE $amanda_cv_select_arg_type ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + fi + done + ice_have_openlog=no - ice_have_sendto=no - - for ac_func in sendto + for ac_func in openlog do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -56081,27 -62364,23 +64486,20 @@@ return $ac_func () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 @@@ -56679,124 -62936,26 +65055,63 @@@ don fi - echo "$as_me:$LINENO: result: $ice_cv_have_vsnprintf_decl" >&5 - echo "${ECHO_T}$ice_cv_have_vsnprintf_decl" >&6 - if test "$ice_cv_have_vsnprintf_decl" = yes; then + { echo "$as_me:$LINENO: result: $ice_cv_have_remove_decl" >&5 + echo "${ECHO_T}$ice_cv_have_remove_decl" >&6; } + if test "$ice_cv_have_remove_decl" = yes; then cat >>confdefs.h <<_ACEOF - #define HAVE_VSNPRINTF_DECL 1 - _ACEOF - - fi - fi - - - echo "$as_me:$LINENO: checking for setpgid" >&5 - echo $ECHO_N "checking for setpgid... $ECHO_C" >&6 - if test "${ac_cv_func_setpgid+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define setpgid to an innocuous variant, in case declares setpgid. - For example, HP-UX 11i declares gettimeofday. */ - #define setpgid innocuous_setpgid - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char setpgid (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include - #else - # include - #endif - - #undef setpgid - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - { - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char setpgid (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_setpgid) || defined (__stub___setpgid) - choke me - #else - char (*f) () = setpgid; - #endif - #ifdef __cplusplus - } - #endif - - int - main () - { - return f != setpgid; - ; - return 0; - } + #define HAVE_REMOVE_DECL 1 _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_setpgid=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_setpgid=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_setpgid" >&5 +echo "${ECHO_T}$ac_cv_func_setpgid" >&6 +if test $ac_cv_func_setpgid = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SETPGID 1 +_ACEOF - ice_have_setpgid=no + ice_have_rename=no - for ac_func in setpgid + for ac_func in rename do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -56985,16 -63139,15 +65295,15 @@@ cat >>conftest.$ac_ext <<_ACEO # include #endif -#undef $ac_func +#undef setpgrp - /* Override any gcc2 internal prototype to avoid an error. */ + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" - { #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char setpgrp (); + char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@@ -57066,50 -63221,47 +65377,60 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$header> +#if HAVE_UNISTD_H +# include +#endif +int +main () +{ +/* If this system has a BSD-style setpgrp which takes arguments, + setpgrp(1, 1) will fail with ESRCH and return -1, in that case + exit successfully. */ + exit (setpgrp (1,1) == -1 ? 0 : 1); + ; + return 0; +} _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_setpgrp_void=no - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}rewind[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_rewind_decl=yes + fi + rm -f conftest* - ( exit $ac_status ) - ac_cv_func_setpgrp_void=yes + if test "$ice_cv_have_rewind_decl" = yes; then + break fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + # Check for "fixed" declaration like "getpid _PARAMS((int))" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}rewind[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_rewind_decl=yes + fi + rm -f conftest* + + if test "$ice_cv_have_rewind_decl" = yes; then + break fi -done - fi +echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6 +if test $ac_cv_func_setpgrp_void = yes; then - cat >>confdefs.h <<\_ACEOF - #define SETPGRP_VOID 1 + { echo "$as_me:$LINENO: result: $ice_cv_have_rewind_decl" >&5 + echo "${ECHO_T}$ice_cv_have_rewind_decl" >&6; } + if test "$ice_cv_have_rewind_decl" = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_REWIND_DECL 1 _ACEOF fi @@@ -58574,28 -64717,15 +66938,28 @@@ if test "$ice_cv_have_socket_decl" = ye fi done +fi + +echo "$as_me:$LINENO: result: $ice_cv_have_socket_decl" >&5 +echo "${ECHO_T}$ice_cv_have_socket_decl" >&6 +if test "$ice_cv_have_socket_decl" = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET_DECL 1 +_ACEOF + +fi +fi + - ice_have_socketpair=no + ice_have_snprintf=no - for ac_func in socketpair + for ac_func in snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -59704,17 -65860,17 +68094,17 @@@ if test `eval echo '${'$as_ac_var'}'` _ACEOF fi -done +fi - ice_have_syslog=no + ice_have_socket=no - for ac_func in syslog + for ac_func in socket do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -60657,10 -66770,10 +69004,10 @@@ if test "${ice_cv_have_strftime_decl+se echo $ECHO_N "(cached) $ECHO_C" >&6 else - ice_cv_have_ungetc_decl=no + ice_cv_have_strftime_decl=no ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' ice_re_word='(^|[^a-zA-Z0-9_])' -for header in time.h sys/time.h; do +for header in stdio.h; do # Check for ordinary declaration cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -60824,106 -66941,61 +69175,87 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$header> +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif - #undef _doprnt + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}strncasecmp[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_strncasecmp_decl=yes + fi + rm -f conftest* - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - { - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char _doprnt (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub__doprnt) || defined (__stub____doprnt) - choke me - #else - char (*f) () = _doprnt; - #endif - #ifdef __cplusplus - } - #endif + if test "$ice_cv_have_strncasecmp_decl" = yes; then + break + fi + # Check for "fixed" declaration like "getpid _PARAMS((int))" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> +int +main () +{ +return f != _doprnt; + ; + return 0; +} _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func__doprnt=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}strncasecmp[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_strncasecmp_decl=yes + fi + rm -f conftest* - ac_cv_func__doprnt=no + if test "$ice_cv_have_strncasecmp_decl" = yes; then + break fi -done - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6 +if test $ac_cv_func__doprnt = yes; then - cat >>confdefs.h <<\_ACEOF - #define HAVE_DOPRNT 1 + { echo "$as_me:$LINENO: result: $ice_cv_have_strncasecmp_decl" >&5 + echo "${ECHO_T}$ice_cv_have_strncasecmp_decl" >&6; } + if test "$ice_cv_have_strncasecmp_decl" = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRNCASECMP_DECL 1 _ACEOF fi + fi +done + - ice_have_vfprintf=no + ice_have_syslog=no - for ac_func in vfprintf + for ac_func in syslog do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -61408,118 -67456,26 +69716,54 @@@ don fi - echo "$as_me:$LINENO: result: $ice_cv_have_vsprintf_decl" >&5 - echo "${ECHO_T}$ice_cv_have_vsprintf_decl" >&6 - if test "$ice_cv_have_vsprintf_decl" = yes; then + { echo "$as_me:$LINENO: result: $ice_cv_have_time_decl" >&5 + echo "${ECHO_T}$ice_cv_have_time_decl" >&6; } + if test "$ice_cv_have_time_decl" = yes; then cat >>confdefs.h <<_ACEOF - #define HAVE_VSPRINTF_DECL 1 - _ACEOF - - fi - fi - - echo "$as_me:$LINENO: checking for wait4" >&5 - echo $ECHO_N "checking for wait4... $ECHO_C" >&6 - if test "${ac_cv_func_wait4+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - /* Define wait4 to an innocuous variant, in case declares wait4. - For example, HP-UX 11i declares gettimeofday. */ - #define wait4 innocuous_wait4 - - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait4 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - - #ifdef __STDC__ - # include - #else - # include - #endif - - #undef wait4 - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus - extern "C" - { - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ - char wait4 (); - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ - #if defined (__stub_wait4) || defined (__stub___wait4) - choke me - #else - char (*f) () = wait4; - #endif - #ifdef __cplusplus - } - #endif - - int - main () - { - return f != wait4; - ; - return 0; - } + #define HAVE_TIME_DECL 1 _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_wait4=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_func_wait4=no fi - rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_func_wait4" >&5 - echo "${ECHO_T}$ac_cv_func_wait4" >&6 +#AC_REPLACE_FUNCS(writev) - ice_have_writev=no + ice_have_tolower=no - for ac_func in writev + for ac_func in tolower do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` - echo "$as_me:$LINENO: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@@ -62059,130 -67901,62 +70189,92 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$header> + +#undef ASSERTIONS +#define CONFIGURE_TEST +#define USE_POSIX_FCNTL +#include "${srcdir-.}/common-src/amflock.c" _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - amanda_cv_posix_filelocking=yes - - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ( exit $ac_status ) - - amanda_cv_posix_filelocking="no" - - fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - rm -f /tmp/conftest.lock - + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}ungetc[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_ungetc_decl=yes fi -rm -f conftest* +echo "$as_me:$LINENO: result: $amanda_cv_posix_filelocking" >&5 +echo "${ECHO_T}$amanda_cv_posix_filelocking" >&6 +if test "x$amanda_cv_posix_filelocking" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define USE_POSIX_FCNTL 1 +_ACEOF - HAS_WORKING_FILE_LOCK=1 + if test "$ice_cv_have_ungetc_decl" = yes; then + break fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -cat >conftest.$ac_ext <<_ACEOF + +if test -z "$HAS_WORKING_FILE_LOCK"; then + echo "$as_me:$LINENO: checking whether flock locking works" >&5 +echo $ECHO_N "checking whether flock locking works... $ECHO_C" >&6 +if test "${amanda_cv_flock_filelocking+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + amanda_cv_flock_filelocking="no (cannot run test)" + +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$header> + +#undef ASSERTIONS +#define CONFIGURE_TEST +#define USE_FLOCK +#include "${srcdir-.}/common-src/amflock.c" _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - amanda_cv_flock_filelocking="yes" - - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ( exit $ac_status ) - - amanda_cv_flock_filelocking="no" - + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}ungetc[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_ungetc_decl=yes fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + rm -f conftest* + + if test "$ice_cv_have_ungetc_decl" = yes; then + break fi -done + rm -f /tmp/conftest.lock fi +echo "$as_me:$LINENO: result: $amanda_cv_flock_filelocking" >&5 +echo "${ECHO_T}$amanda_cv_flock_filelocking" >&6 + if test "x$amanda_cv_flock_filelocking" = xyes; then - cat >>confdefs.h <<\_ACEOF - #define USE_FLOCK 1 + { echo "$as_me:$LINENO: result: $ice_cv_have_ungetc_decl" >&5 + echo "${ECHO_T}$ice_cv_have_ungetc_decl" >&6; } + if test "$ice_cv_have_ungetc_decl" = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_UNGETC_DECL 1 _ACEOF -fi + HAS_WORKING_FILE_LOCK=1 + fi fi - if test -z "$HAS_WORKING_FILE_LOCK"; then - echo "$as_me:$LINENO: checking whether lockf locking works" >&5 - echo $ECHO_N "checking whether lockf locking works... $ECHO_C" >&6 - if test "${amanda_cv_lockf_filelocking+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - if test "$cross_compiling" = yes; then - amanda_cv_lockf_filelocking="no (cannot run test)" + ice_have_vfprintf=no + for ac_func in vfprintf + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@@ -62190,58 -67964,89 +70282,74 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - #undef ASSERTIONS - #define CONFIGURE_TEST - #define USE_LOCKF - #include "${srcdir-.}/common-src/amflock.c" + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me + #endif + int + main () + { + return $ac_func (); + ; + return 0; + } _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - amanda_cv_lockf_filelocking="yes" - + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) + + amanda_cv_lockf_filelocking="no" + + eval "$as_ac_var=no" fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - rm -f /tmp/conftest.lock + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $amanda_cv_lockf_filelocking" >&5 - echo "${ECHO_T}$amanda_cv_lockf_filelocking" >&6 - if test "x$amanda_cv_lockf_filelocking" = xyes; then - - cat >>confdefs.h <<\_ACEOF - #define USE_LOCKF 1 + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - - HAS_WORKING_FILE_LOCK=1 - fi + ice_have_vfprintf=yes fi -done - if test -z "$HAS_WORKING_FILE_LOCK"; then - echo "$as_me:$LINENO: checking whether lnlock locking works" >&5 - echo $ECHO_N "checking whether lnlock locking works... $ECHO_C" >&6 - if test "${amanda_cv_lnlock_filelocking+set}" = set; then + if test "${ice_have_vfprintf}" = yes; then + { echo "$as_me:$LINENO: checking for vfprintf declaration in stdio.h stdlib.h" >&5 + echo $ECHO_N "checking for vfprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6; } + if test "${ice_cv_have_vfprintf_decl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@ -62256,443 -68061,394 +70364,509 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #undef ASSERTIONS - #define CONFIGURE_TEST - #define USE_LNLOCK - #include "${srcdir-.}/common-src/amflock.c" - #include "${srcdir-.}/common-src/alloc.c" - #include "${srcdir-.}/common-src/error.c" - #include "${srcdir-.}/common-src/snprintf.c" + #include <$header> _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - amanda_cv_lnlock_filelocking="yes" - - else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - ( exit $ac_status ) - - amanda_cv_lnlock_filelocking="no" - - fi - rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}vfprintf[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_vfprintf_decl=yes fi - rm -f /tmp/conftest.lock + rm -f conftest* + if test "$ice_cv_have_vfprintf_decl" = yes; then + break fi - echo "$as_me:$LINENO: result: $amanda_cv_lnlock_filelocking" >&5 - echo "${ECHO_T}$amanda_cv_lnlock_filelocking" >&6 - if test "x$amanda_cv_lnlock_filelocking" = xyes; then - - cat >>confdefs.h <<\_ACEOF - #define USE_LNLOCK 1 + # Check for "fixed" declaration like "getpid _PARAMS((int))" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> - HAS_WORKING_FILE_LOCK=1 - fi + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}vfprintf[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_vfprintf_decl=yes fi + rm -f conftest* - if test -z "$HAS_WORKING_FILE_LOCK"; then - { echo "$as_me:$LINENO: WARNING: *** No working file locking capability found!" >&5 - echo "$as_me: WARNING: *** No working file locking capability found!" >&2;} - { echo "$as_me:$LINENO: WARNING: *** Be VERY VERY careful." >&5 - echo "$as_me: WARNING: *** Be VERY VERY careful." >&2;} + if test "$ice_cv_have_vfprintf_decl" = yes; then + break fi -done - - - - - - - - - if test x"$NO_CLIENT_MODE" != x"true"; then - WANT_CLIENT_TRUE= - WANT_CLIENT_FALSE='#' - else - WANT_CLIENT_TRUE='#' - WANT_CLIENT_FALSE= fi + { echo "$as_me:$LINENO: result: $ice_cv_have_vfprintf_decl" >&5 + echo "${ECHO_T}$ice_cv_have_vfprintf_decl" >&6; } + if test "$ice_cv_have_vfprintf_decl" = yes; then + cat >>confdefs.h <<_ACEOF + #define HAVE_VFPRINTF_DECL 1 + _ACEOF - if test ! -z "$SAMBA_CLIENT"; then - WANT_SAMBA_TRUE= - WANT_SAMBA_FALSE='#' - else - WANT_SAMBA_TRUE='#' - WANT_SAMBA_FALSE= fi - - - - if test x"$NO_RESTORE_MODE" != x"true"; then - WANT_RESTORE_TRUE= - WANT_RESTORE_FALSE='#' - else - WANT_RESTORE_TRUE='#' - WANT_RESTORE_FALSE= fi + ice_have_vprintf=no - if test x"$NO_SERVER_MODE" != x"true"; then - WANT_SERVER_TRUE= - WANT_SERVER_FALSE='#' + for ac_func in vprintf + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + WANT_SERVER_TRUE='#' + WANT_SERVER_FALSE= +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func +if test x"$NO_RECOVER_MODE" != x"true" && test x"$NO_CLIENT_MODE" != x"true"; then + WANT_RECOVER_TRUE= + WANT_RECOVER_FALSE='#' +else + WANT_RECOVER_TRUE='#' + WANT_RECOVER_FALSE= +fi + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me + #endif - if test x"$NO_SERVER_MODE" != x"true" || test x"$NO_RESTORE_MODE" != x"true"; then - WANT_TAPE_TRUE= - WANT_TAPE_FALSE='#' + int + main () + { + return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + WANT_TAPE_TRUE='#' + WANT_TAPE_FALSE= +fi + + - if test x"$NO_AMPLOT_MODE" != x"true"; then - WANT_AMPLOT_TRUE= - WANT_AMPLOT_FALSE='#' - else - WANT_AMPLOT_TRUE='#' - WANT_AMPLOT_FALSE= + eval "$as_ac_var=no" fi - - - if test x"$NO_SCSI_CHANGER_MODE" != x"true"; then - WANT_CHG_SCSI_TRUE= - WANT_CHG_SCSI_FALSE='#' - else - WANT_CHG_SCSI_TRUE='#' - WANT_CHG_SCSI_FALSE= + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - - - - if test x"$NO_CHIO_CHANGER_MODE" != x"true"; then - WANT_CHIO_SCSI_TRUE= - WANT_CHIO_SCSI_FALSE='#' - else - WANT_CHIO_SCSI_TRUE='#' - WANT_CHIO_SCSI_FALSE= + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + ice_have_vprintf=yes fi -done - - - if test x"$NEED_RUNTIME_PSEUDO_RELOC" = x"true"; then - WANT_RUNTIME_PSEUDO_RELOC_TRUE= - WANT_RUNTIME_PSEUDO_RELOC_FALSE='#' + if test "${ice_have_vprintf}" = yes; then + { echo "$as_me:$LINENO: checking for vprintf declaration in stdio.h stdlib.h" >&5 + echo $ECHO_N "checking for vprintf declaration in stdio.h stdlib.h... $ECHO_C" >&6; } + if test "${ice_cv_have_vprintf_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else + WANT_RUNTIME_PSEUDO_RELOC_TRUE='#' + WANT_RUNTIME_PSEUDO_RELOC_FALSE= +fi + + ice_cv_have_vprintf_decl=no + ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' + ice_re_word='(^|[^a-zA-Z0-9_])' + for header in stdio.h stdlib.h; do + # Check for ordinary declaration + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> - if test x"$NEED_SETUID_CLIENT" != x"false"; then - WANT_SETUID_CLIENT_TRUE= - WANT_SETUID_CLIENT_FALSE='#' - else - WANT_SETUID_CLIENT_TRUE='#' - WANT_SETUID_CLIENT_FALSE= + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}vprintf[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_vprintf_decl=yes fi -rm -f conftest* - - - if test x"$SSH_SECURITY_SET" = x"true"; then - WANT_SSH_SECURITY_TRUE= - WANT_SSH_SECURITY_FALSE='#' - else - WANT_SSH_SECURITY_TRUE='#' - WANT_SSH_SECURITY_FALSE= + if test "$ice_cv_have_vprintf_decl" = yes; then + break fi -# Check for "fixed" declaration like "getpid _PARAMS((int))" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + +case "${FORCE_USE_RUNDUMP-${USE_RUNDUMP}}" in +y | ye | yes) +cat >>confdefs.h <<\_ACEOF +#define USE_RUNDUMP 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$header> +;; +esac + +# This is necessary so that .o files in LIBOBJS are also built via +# the ANSI2KNR-filtering rules. +LIBOBJS=`echo "$LIBOBJS" | + sed 's,\.[^.]* ,$U&,g;s,\.[^.]*$,$U&,'` +LTLIBOBJS=`echo "$LIBOBJS" | + sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'` + + +LTALLOCA=`echo "$ALLOCA" | sed 's/\.'"${ac_objext}"'/\.lo/g'` + + +## This stuff is needed for the documentation. +DOC_BUILD_DATE=`date '+%d-%m-%Y'` + + +# Check whether --enable-manpage-build or --disable-manpage-build was given. +if test "${enable_manpage_build+set}" = set; then + enableval="$enable_manpage_build" + ENABLE_MANPAGE_BUILD=$enableval +else + ENABLE_MANPAGE_BUILD=no +fi; + + +XSLTPROC_FLAGS="--nonet" + + +# The (lack of) whitespace and overquoting here are all necessary for +# proper formatting. + +# Check whether --with-xsltproc or --without-xsltproc was given. +if test "${with_xsltproc+set}" = set; then + withval="$with_xsltproc" + ac_with_xsltproc=$withval; +else + ac_with_xsltproc=maybe; +fi; + + +# Check whether --with-xsltproc-flags or --without-xsltproc-flags was given. +if test "${with_xsltproc_flags+set}" = set; then + withval="$with_xsltproc_flags" + if test "x$withval" == "xno"; then + XSLTPROC_FLAGS='' + else + if test "x$withval" != "xyes"; then + XSLTPROC_FLAGS="$withval" + fi + fi + +fi; + +# search for xsltproc if it wasn't specified +if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then + for ac_prog in xsltproc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XSLTPROC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $LOCSYSPATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done - ;; - esac + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}vprintf[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_vprintf_decl=yes fi -rm -f conftest* +XSLTPROC=$ac_cv_path_XSLTPROC - if test -n "$XSLTPROC"; then - echo "$as_me:$LINENO: result: $XSLTPROC" >&5 - echo "${ECHO_T}$XSLTPROC" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 + if test "$ice_cv_have_vprintf_decl" = yes; then + break fi + + test -n "$XSLTPROC" && break +done + +else + if test "$ac_with_xsltproc" != "no"; then + if test -x "$ac_with_xsltproc"; then + XSLTPROC="$ac_with_xsltproc"; + else + { echo "$as_me:$LINENO: WARNING: Specified xsltproc of $ac_with_xsltproc isn't" >&5 +echo "$as_me: WARNING: Specified xsltproc of $ac_with_xsltproc isn't" >&2;} + { echo "$as_me:$LINENO: WARNING: executable; searching for an alternative." >&5 +echo "$as_me: WARNING: executable; searching for an alternative." >&2;} + for ac_prog in xsltproc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XSLTPROC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XSLTPROC in + [\\/]* | ?:[\\/]*) + ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $LOCSYSPATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done + ;; +esac fi +XSLTPROC=$ac_cv_path_XSLTPROC - if test -n "$XSLTPROC"; then - echo "$as_me:$LINENO: result: $XSLTPROC" >&5 - echo "${ECHO_T}$XSLTPROC" >&6 - else - echo "$as_me:$LINENO: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi + { echo "$as_me:$LINENO: result: $ice_cv_have_vprintf_decl" >&5 + echo "${ECHO_T}$ice_cv_have_vprintf_decl" >&6; } + if test "$ice_cv_have_vprintf_decl" = yes; then - test -n "$XSLTPROC" && break - done + cat >>confdefs.h <<_ACEOF + #define HAVE_VPRINTF_DECL 1 + _ACEOF -fi + fi + fi fi - - - - - - - - - echo "$as_me:$LINENO: checking for Docbook XSLT version 1.72.0" >&5 - echo $ECHO_N "checking for Docbook XSLT version 1.72.0... $ECHO_C" >&6 - if test "${ac_cv_docbook_xslt_1_72_0+set}" = set; then + { echo "$as_me:$LINENO: checking for wait4" >&5 + echo $ECHO_N "checking for wait4... $ECHO_C" >&6; } + if test "${ac_cv_func_wait4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define wait4 to an innocuous variant, in case declares wait4. + For example, HP-UX 11i declares gettimeofday. */ + #define wait4 innocuous_wait4 - ac_cv_docbook_xslt_1_72_0=no - if test -n "$XSLTPROC"; then - echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl'" >&5 - $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/1.72.0/xhtml/docbook.xsl >&5 2>&1 - - if test "$?" = 0; then - ac_cv_docbook_xslt_1_72_0=yes - fi - fi - - fi - echo "$as_me:$LINENO: result: $ac_cv_docbook_xslt_1_72_0" >&5 - echo "${ECHO_T}$ac_cv_docbook_xslt_1_72_0" >&6 - - HAVE_DOCBOOK_XSLT_1_72_0="$ac_cv_docbook_xslt_1_72_0" - HAVE_DOCBOOK_XSLT=HAVE_DOCBOOK_XSLT_1_72_0 - - - - - - + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char wait4 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + #undef wait4 + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char wait4 (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_wait4 || defined __stub___wait4 + choke me + #endif - echo "$as_me:$LINENO: checking for Docbook DTD version 4.1.2" >&5 - echo $ECHO_N "checking for Docbook DTD version 4.1.2... $ECHO_C" >&6 - if test "${ac_cv_docbook_dtd_4_1_2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + int + main () + { + return wait4 (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_wait4=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_docbook_dtd_4_1_2=no - if test -n "$XSLTPROC"; then - MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g` - cat <conftest.xml - - - - - EOF - echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&5 - $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1 - if test "$?" = 0; then - # failing to load the DTD is just a warning, so check for it in the output. - if grep 'warning: failed to load external entity' conftest_out >/dev/null 2>&1; then - : # no good.. - else - ac_cv_docbook_dtd_4_1_2=yes - fi - fi - cat conftest.out >&5 - - rm -f conftest.xml conftest.out - fi + ac_cv_func_wait4=no + fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $ac_cv_docbook_dtd_4_1_2" >&5 - echo "${ECHO_T}$ac_cv_docbook_dtd_4_1_2" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_func_wait4" >&5 + echo "${ECHO_T}$ac_cv_func_wait4" >&6; } - HAVE_DOCBOOK_DTD_4_1_2="$ac_cv_docbook_dtd_4_1_2" - HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_4_1_2 + ice_have_writev=no + for ac_func in writev + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } + if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ + #define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + #ifdef __STDC__ + # include + #else + # include + #endif + #undef $ac_func + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me + #endif + int + main () + { + return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" + fi + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + ice_have_writev=yes + fi + done - echo "$as_me:$LINENO: checking for Docbook DTD version 4.2" >&5 - echo $ECHO_N "checking for Docbook DTD version 4.2... $ECHO_C" >&6 - if test "${ac_cv_docbook_dtd_4_2+set}" = set; then + if test "${ice_have_writev}" = yes; then + { echo "$as_me:$LINENO: checking for writev declaration in unistd.h sys/uio.h" >&5 + echo $ECHO_N "checking for writev declaration in unistd.h sys/uio.h... $ECHO_C" >&6; } + if test "${ice_cv_have_writev_decl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@@ -62775,151 -68526,152 +70944,155 @@@ _ACEO cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - #ifdef HAVE_SYS_SOCKET_H - #include + /* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ + #define $ac_func innocuous_$ac_func + + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + + #ifdef __STDC__ + # include + #else + # include #endif - #ifdef HAVE_NETINET_IN_H - #include + + #undef $ac_func + + /* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" #endif - #ifdef HAVE_WINSOCK2_H - #include + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined __stub_$ac_func || defined __stub___$ac_func + choke me #endif - #include - #include - #include - main() + int + main () { - int aa; - aa = socket(AF_INET6, SOCK_STREAM, 0); - if (aa > 0) return 0; - return aa; + return $ac_func (); + ; + return 0; } _ACEOF - rm -f conftest$ac_exeext - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + rm -f conftest.$ac_objext conftest$ac_exeext + if { (ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - amanda_working_ipv6=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" else - echo "$as_me: program exited with status $ac_status" >&5 - echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ( exit $ac_status ) - amanda_working_ipv6=no + eval "$as_ac_var=no" fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - echo "$as_me:$LINENO: result: $amanda_working_ipv6" >&5 - echo "${ECHO_T}$amanda_working_ipv6" >&6 - - if test "$BROKEN_IPV6" = true; then - amanda_working_ipv6=no; + ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 + echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + ice_have_strcasecmp=yes fi + done - if test "$amanda_working_ipv6" = yes; then - if test "$amanda_ipv6" != false; then + if test "${ice_have_strcasecmp}" = yes; then + { echo "$as_me:$LINENO: checking for strcasecmp declaration in string.h strings.h" >&5 + echo $ECHO_N "checking for strcasecmp declaration in string.h strings.h... $ECHO_C" >&6; } + if test "${ice_cv_have_strcasecmp_decl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else - cat >>confdefs.h <<\_ACEOF - #define WORKING_IPV6 1 + ice_cv_have_strcasecmp_decl=no + ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*' + ice_re_word='(^|[^a-zA-Z0-9_])' + for header in string.h strings.h; do + # Check for ordinary declaration + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> - fi - else - if test "$amanda_ipv6" = true; then - { { echo "$as_me:$LINENO: error: Asked for IPv6 but it is not working." >&5 - echo "$as_me: error: Asked for IPv6 but it is not working." >&2;} - { (exit 1); exit 1; }; } - fi + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}strcasecmp[ ]*\(" >/dev/null 2>&1; then + ice_cv_have_strcasecmp_decl=yes fi + rm -f conftest* - - - if test "x$CC" = "xgcc"; then - GCC_COMPILER_TRUE= - GCC_COMPILER_FALSE='#' - else - GCC_COMPILER_TRUE='#' - GCC_COMPILER_FALSE= + if test "$ice_cv_have_strcasecmp_decl" = yes; then + break fi + # Check for "fixed" declaration like "getpid _PARAMS((int))" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$header> + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "${ice_re_word}strcasecmp[ ]*$ice_re_params\(\(" >/dev/null 2>&1; then + ice_cv_have_strcasecmp_decl=yes + fi + rm -f conftest* - #### Enforce amanda code cleanliness rules. - #### Done here to allow configuration code to remain intact. - if test "x$CC" = "xgcc"; then - AM_CFLAGS="$AM_CFLAGS -Wall" - $CC -v --help 2>&1 | $GREP -- '-Wextra ' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wextra" - else - AM_CFLAGS="$AM_CFLAGS -W" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wparentheses' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wparentheses" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wdeclaration-after-statement' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wdeclaration-after-statement" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wmissing-prototypes ' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wmissing-prototypes" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wstrict-prototypes ' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wstrict-prototypes" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wmissing-declarations ' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wmissing-declarations" - fi - - $CC -v --help 2>&1 | $GREP -- '-Wformat' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wformat" - fi + if test "$ice_cv_have_strcasecmp_decl" = yes; then + break + fi + done - $CC -v --help 2>&1 | $GREP -- '-Wsign-compare' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wsign-compare" - fi + fi - $CC -v --help 2>&1 | $GREP -- '-fno-strict-aliasing' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -fno-strict-aliasing" - fi + { echo "$as_me:$LINENO: result: $ice_cv_have_strcasecmp_decl" >&5 + echo "${ECHO_T}$ice_cv_have_strcasecmp_decl" >&6; } + if test "$ice_cv_have_strcasecmp_decl" = yes; then - $CC -v --help 2>&1 | $GREP -- '-Wfloat-equal' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wfloat-equal" - fi + cat >>confdefs.h <<_ACEOF + #define HAVE_STRCASECMP_DECL 1 + _ACEOF - $CC -v --help 2>&1 | $GREP -- '-Wold-style-definition' 2>&1 > /dev/null - if test $? -eq 0; then - AM_CFLAGS="$AM_CFLAGS -Wold-style-definition" - fi fi + fi + - ac_config_files="$ac_config_files gnulib/Makefile amplot/amcat.awk amplot/amplot.sh amplot/Makefile amandad-src/Makefile changer-src/chg-manual.sh changer-src/chg-multi.sh changer-src/chg-mtx.sh changer-src/chg-chs.sh changer-src/chg-rth.pl changer-src/chg-chio.pl changer-src/chg-zd-mtx.sh changer-src/Makefile changer-src/chg-juke.sh changer-src/chg-rait.sh changer-src/chg-null.sh changer-src/chg-mcutil.sh changer-src/chg-disk.sh changer-src/chg-iomega.pl changer-src/chg-lib.sh client-src/patch-system.sh client-src/Makefile dumper-src/amgtar.pl dumper-src/generic-dumper.pl dumper-src/Makefile common-src/versuff.c common-src/Makefile example/amanda.conf example/Makefile example/chg-mcutil.conf example/amanda-client.conf man/Makefile docs/Makefile recover-src/Makefile oldrecover-src/Makefile restore-src/Makefile server-src/amcheckdb.sh server-src/amcleanup.sh server-src/amdump.sh server-src/amfreetapes.sh server-src/amoverview.pl server-src/amrmtape.sh server-src/amtoc.pl server-src/amverify.sh server-src/Makefile server-src/amstatus.pl server-src/amverifyrun.sh server-src/amcrypt.sh server-src/amaespipe.sh server-src/amcrypt-ossl.sh server-src/amcrypt-ossl-asym.sh tape-src/Makefile config/Makefile Makefile" + ac_config_files="$ac_config_files Makefile amandad-src/Makefile amplot/Makefile changer-src/Makefile client-src/Makefile common-src/Makefile common-src/versuff.c config/Makefile device-src/Makefile device-src/tests/Makefile dumper-src/Makefile example/Makefile example/amanda-client.conf example/amanda.conf example/chg-mcutil.conf example/template.d/amanda-S3.conf example/template.d/advanced.conf example/template.d/amanda-harddisk.conf example/template.d/amanda-single-tape.conf example/template.d/amanda-tape-changer.conf gnulib/Makefile installcheck/Makefile man/Makefile oldrecover-src/Makefile packaging/Makefile perl/Makefile po/Makefile recover-src/Makefile restore-src/Makefile server-src/Makefile tape-src/Makefile" cat >confcache <<\_ACEOF diff --cc example/Makefile.in index 1144b74,f866f46..a270515 --- a/example/Makefile.in +++ b/example/Makefile.in @@@ -85,12 -191,23 +191,24 @@@ am__configure_deps = $(am__aclocal_m4_d $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config/config.h - CONFIG_CLEAN_FILES = amanda.conf chg-mcutil.conf amanda-client.conf + CONFIG_CLEAN_FILES = amanda-client.conf amanda.conf chg-mcutil.conf SOURCES = DIST_SOURCES = - DATA = $(noinst_DATA) + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; + am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; + am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(lbltempldir)" \ + "$(DESTDIR)$(templatedir)" + dist_exampleDATA_INSTALL = $(INSTALL_DATA) + dist_lbltemplDATA_INSTALL = $(INSTALL_DATA) + dist_templateDATA_INSTALL = $(INSTALL_DATA) + DATA = $(dist_example_DATA) $(dist_lbltempl_DATA) \ + $(dist_template_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@@ -201,10 -432,9 +434,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc gnulib/regenerate/getaddrinfo-cygwin.patch index 7a384cc,0971d47..1577b03 --- a/gnulib/regenerate/getaddrinfo-cygwin.patch +++ b/gnulib/regenerate/getaddrinfo-cygwin.patch @@@ -1,15 -1,15 +1,27 @@@ ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +--- gnulib/getaddrinfo.c 2007-03-06 13:17:25.733225500 -0600 ++++ gnulib/getaddrinfo.c 2007-03-06 13:17:32.345638750 -0600 +@@ -40,6 +40,8 @@ + #include "inet_ntop.h" + #include "snprintf.h" ++======= + --- gnulib/getaddrinfo.c.orig 2007-10-25 16:46:34.728843739 -0500 + +++ gnulib/getaddrinfo.c 2007-10-25 16:47:17.395395249 -0500 + @@ -42,6 +42,8 @@ + + #include "inet_ntop.h" ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch +extern int h_errno; + /* BeOS has AF_INET, but not PF_INET. */ #ifndef PF_INET # define PF_INET AF_INET ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +@@ -147,25 +149,29 @@ ++======= + @@ -149,25 +151,29 @@ ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch return getaddrinfo_ptr (nodename, servname, hints, res); #endif @@@ -46,25 -46,7 +58,29 @@@ #else nodename = "0.0.0.0"; #endif ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +@@ -175,11 +181,13 @@ + { + struct servent *se = NULL; + const char *proto = +- (hints && hints->ai_socktype == SOCK_DGRAM) ? "udp" : "tcp"; ++ (hints && (hints->ai_socktype == SOCK_DGRAM)) ? "udp" : "tcp"; + +- if (!(hints->ai_flags & AI_NUMERICSERV)) +- /* FIXME: Use getservbyname_r if available. */ +- se = getservbyname (servname, proto); ++ if ((hints == NULL) || !(hints->ai_flags & AI_NUMERICSERV)) ++ { ++ /* FIXME: Use getservbyname_r if available. */ ++ se = getservbyname (servname, proto); ++ } + + if (!se) + { +@@ -196,7 +204,7 @@ ++======= + @@ -198,7 +204,7 @@ ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch } /* FIXME: Use gethostbyname_r if available. */ @@@ -73,7 -55,7 +89,11 @@@ if (!he || he->h_addr_list[0] == NULL) return EAI_NONAME; ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +@@ -277,7 +285,7 @@ ++======= + @@ -279,7 +285,7 @@ ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch return EAI_NODATA; } @@@ -82,7 -64,7 +102,11 @@@ { const char *cn; if (he->h_name) ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +@@ -341,9 +349,7 @@ ++======= + @@ -343,9 +349,7 @@ ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch #endif /* FIXME: Support other flags. */ @@@ -93,7 -75,7 +117,11 @@@ return EAI_BADFLAGS; if (sa == NULL || salen < sizeof (sa->sa_family)) ++<<<<<<< HEAD:gnulib/regenerate/getaddrinfo-cygwin.patch +@@ -367,34 +373,89 @@ ++======= + @@ -369,34 +373,89 @@ ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/getaddrinfo-cygwin.patch return EAI_FAMILY; } diff --cc gnulib/regenerate/no-error.patch index 411d948,a12e7d2..ebe43e4 --- a/gnulib/regenerate/no-error.patch +++ b/gnulib/regenerate/no-error.patch @@@ -7,7 -7,7 +7,11 @@@ Index: gnulib/Makefile.a AM_CPPFLAGS = +if GCC_COMPILER ++<<<<<<< HEAD:gnulib/regenerate/no-error.patch ++ AM_CFLAGS += -Wno-error ++======= + + AM_CFLAGS = -Wno-error -Wno-sign-compare ++>>>>>>> fb2bd066c2f8b34addafe48d62550e3033a59431:gnulib/regenerate/no-error.patch +endif noinst_LTLIBRARIES += libgnu.la diff --cc gnulib/regenerate/regenerate index 0265ca2,a32ab34..a32ab34 mode 100644,100755..100644 --- a/gnulib/regenerate/regenerate +++ b/gnulib/regenerate/regenerate diff --cc man/Makefile.in index 4fcf374,80f0d8f..e5e805d --- a/man/Makefile.in +++ b/man/Makefile.in @@@ -202,10 -384,9 +386,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc recover-src/Makefile.in index a317695,1494a1a..7936f29 --- a/recover-src/Makefile.in +++ b/recover-src/Makefile.in @@@ -234,10 -460,9 +462,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc recover-src/amrecover.c index 7752ee6,0f103dc..fc4d36d --- a/recover-src/amrecover.c +++ b/recover-src/amrecover.c @@@ -330,17 -336,9 +336,17 @@@ main dbopen(DBG_SUBDIR_CLIENT); +#ifndef IGNORE_UID_CHECK + if (geteuid() != 0) { + erroutput_type |= ERR_SYSLOG; + error("amrecover must be run by root"); + /*NOTREACHED*/ + } +#endif + localhost = alloc(MAX_HOSTNAME_LENGTH+1); if (gethostname(localhost, MAX_HOSTNAME_LENGTH) != 0) { - error("cannot determine local host name\n"); + error(_("cannot determine local host name\n")); /*NOTREACHED*/ } localhost[MAX_HOSTNAME_LENGTH] = '\0'; diff --cc recover-src/uscan.c index 2b8045f,49a3a3c..07965af --- a/recover-src/uscan.c +++ b/recover-src/uscan.c @@@ -892,15 -1005,12 +1005,15 @@@ YY_RULE_SETU case 28: YY_RULE_SETUP #line 98 "uscan.l" - { return MODE; } + { return SMB; } YY_BREAK + + /* dates */ + case 29: YY_RULE_SETUP - #line 104 "uscan.l" - { return ll_parse_date(1, yytext); } + #line 99 "uscan.l" + { return TAR; } YY_BREAK case 30: YY_RULE_SETUP @@@ -1859,26 -2098,17 +2101,25 @@@ void *yyrealloc (void * ptr, yy_size_ * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); - } + } - #ifdef YY_USE_PROTOS - static void yy_flex_free( void *ptr ) - #else - static void yy_flex_free( ptr ) - void *ptr; - #endif - { - free( ptr ); - } + void yyfree (void * ptr ) + { + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + } + + #define YYTABLES_NAME "yytables" + + #line 167 "uscan.l" +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 165 "uscan.l" int diff --cc restore-src/Makefile.in index ec68cbe,f092f9d..3f73d54 --- a/restore-src/Makefile.in +++ b/restore-src/Makefile.in @@@ -258,10 -483,9 +485,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc restore-src/amidxtaped.c index 2e7492c,b83b8e0..7b82c68 --- a/restore-src/amidxtaped.c +++ b/restore-src/amidxtaped.c @@@ -476,29 -435,15 +454,23 @@@ main } amfree(buf); + if(!tapes && rst_flags->alt_tapedev){ + dbprintf(("%s: Looks like we're restoring from a holding file...\n", debug_prefix_time(NULL))); + tapes = unmarshal_tapelist_str(rst_flags->alt_tapedev); + tapes->isafile = 1; + amfree(rst_flags->alt_tapedev); + rst_flags->alt_tapedev = NULL; + } + if(re_config) { - char *conffile; - config_dir = vstralloc(CONFIG_DIR, "/", re_config, "/", NULL); - conffile = stralloc2(config_dir, CONFFILE_NAME); - if (read_conffile(conffile)) { - dbprintf(("%s: config '%s' not found\n", - debug_prefix_time(NULL), re_config)); - amfree(re_config); - re_config = NULL; - } - amfree(conffile); - - dbrename(config_name, DBG_SUBDIR_SERVER); + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, re_config); + dbrename(re_config, DBG_SUBDIR_SERVER); + } else { + config_init(0, NULL); } + check_running_as(RUNNING_AS_DUMPUSER_PREFERRED); + if(tapes && (!rst_flags->alt_tapedev || (re_config && ( strcmp(rst_flags->alt_tapedev, diff --cc server-src/Makefile.in index 1b30e78,4533c0b..0651b1a --- a/server-src/Makefile.in +++ b/server-src/Makefile.in @@@ -456,10 -692,9 +694,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@ diff --cc server-src/amcheck.c index 4498cd7,fdbd8cf..fa2a8aa --- a/server-src/amcheck.c +++ b/server-src/amcheck.c @@@ -141,13 -149,10 +149,14 @@@ main server_probs = client_probs = 0; tempfd = mainfd = -1; + parse_conf(argc, argv, &new_argc, &new_argv); + my_argc = new_argc; + my_argv = new_argv; + /* process arguments */ - while((opt = getopt(my_argc, my_argv, "M:mawsclt")) != EOF) { + cfg_ovr = new_config_overwrites(argc/2); + while((opt = getopt(argc, argv, "M:mawsclto:")) != EOF) { switch(opt) { case 'M': mailto=stralloc(optarg); if(!validate_mailto(mailto)){ diff --cc server-src/amlabel.c index 1ead3ae,0eda70b..651e6b6 --- a/server-src/amlabel.c +++ b/server-src/amlabel.c @@@ -98,13 -105,11 +105,13 @@@ main /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); + malloc_size_1 = malloc_inuse(&malloc_hist_1); + erroutput_type = ERR_INTERACTIVE; - parse_conf(argc, argv, &new_argc, &new_argv); + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); - if(new_argc > 1 && strcmp(new_argv[1],"-f") == 0) + if(argc > 1 && strcmp(argv[1],"-f") == 0) force=1; else force=0; @@@ -202,42 -175,11 +177,13 @@@ /*NOTREACHED*/ } else { if(changer_loadslot(slotstr, &outslot, &tapename)) { - error("could not load slot \"%s\": %s", slotstr, changer_resultstr); - /*NOTREACHED*/ - } - - printf("labeling tape in slot %s (%s):\n", outslot, tapename); - } - - #ifdef HAVE_LINUX_ZFTAPE_H - isa_zftape = is_zftape(tapename); - if (isa_zftape) { - if((fd = tape_open(tapename, O_WRONLY)) == -1) { - errstr = newstralloc2(errstr, "amlabel: ", - (errno == EACCES) ? "tape is write-protected" - : strerror(errno)); - error(errstr); + error(_("could not load slot \"%s\": %s"), slotstr, changer_resultstr); /*NOTREACHED*/ } + } +#endif /* HAVE_LINUX_ZFTAPE_H */ - printf("rewinding"); fflush(stdout); - - #ifdef HAVE_LINUX_ZFTAPE_H - if (isa_zftape) { - if(tapefd_rewind(fd) == -1) { - putchar('\n'); - error(strerror(errno)); - /*NOTREACHED*/ - } - } - else - #endif /* HAVE_LINUX_ZFTAPE_H */ - if((errstr = tape_rewind(tapename)) != NULL) { - putchar('\n'); - error(errstr); - /*NOTREACHED*/ + g_printf(_("labeling tape in slot %s (%s):\n"), outslot, tapename); } tape_ok=1; diff --cc server-src/amtape.c index 4075ea4,fed07ef..11d0022 --- a/server-src/amtape.c +++ b/server-src/amtape.c @@@ -138,21 -135,16 +135,18 @@@ main dbopen(DBG_SUBDIR_SERVER); + malloc_size_1 = malloc_inuse(&malloc_hist_1); + erroutput_type = ERR_INTERACTIVE; - parse_conf(argc, argv, &new_argc, &new_argv); - if(new_argc < 3) usage(); + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); + if(argc < 3) usage(); - config_name = new_argv[1]; + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL, + argv[1]); + apply_config_overwrites(cfg_ovr); - config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL); - conffile = stralloc2(config_dir, CONFFILE_NAME); - if (read_conffile(conffile)) { - error("errors processing config file \"%s\"", conffile); - /*NOTREACHED*/ - } + check_running_as(RUNNING_AS_DUMPUSER); dbrename(config_name, DBG_SUBDIR_SERVER); @@@ -224,19 -184,14 +186,17 @@@ /* ---------------------------- */ - void - reset_changer( - int argc, - char ** argv) - { + static void + reset_changer(G_GNUC_UNUSED int argc, + G_GNUC_UNUSED char ** argv) { char *slotstr = NULL; + (void)argc; /* Quiet unused parameter warning */ + (void)argv; /* Quiet unused parameter warning */ + switch(changer_reset(&slotstr)) { case 0: - fprintf(stderr, "%s: changer is reset, slot %s is loaded.\n", + g_fprintf(stderr, _("%s: changer is reset, slot %s is loaded.\n"), get_pname(), slotstr); break; case 1: @@@ -252,20 -207,15 +212,18 @@@ /* ---------------------------- */ - void - clean_tape( - int argc, - char ** argv) - { + static void + clean_tape(G_GNUC_UNUSED int argc, + G_GNUC_UNUSED char ** argv) { char *devstr = NULL; + (void)argc; /* Quiet unused parameter warning */ + (void)argv; /* Quiet unused parameter warning */ + if(changer_clean(&devstr) == 0) { - fprintf(stderr, "%s: device %s is clean.\n", get_pname(), devstr); + g_fprintf(stderr, _("%s: device %s is clean.\n"), get_pname(), devstr); } else { - fprintf(stderr, "%s: device %s not clean: %s\n", + g_fprintf(stderr, _("%s: device %s not clean: %s\n"), get_pname(), devstr ? devstr : "??", changer_resultstr); } amfree(devstr); @@@ -273,20 -223,15 +231,18 @@@ /* ---------------------------- */ - void - eject_tape( - int argc, - char ** argv) - { + static void + eject_tape(G_GNUC_UNUSED int argc, + G_GNUC_UNUSED char ** argv) { char *slotstr = NULL; + (void)argc; /* Quiet unused parameter warning */ + (void)argv; /* Quiet unused parameter warning */ + if(changer_eject(&slotstr) == 0) { - fprintf(stderr, "%s: slot %s is ejected.\n", get_pname(), slotstr); + g_fprintf(stderr, _("%s: slot %3s is ejected.\n"), get_pname(), slotstr); } else { - fprintf(stderr, "%s: slot %s not ejected: %s\n", + g_fprintf(stderr, _("%s: slot %3s not ejected: %s\n"), get_pname(), slotstr ? slotstr : "??", changer_resultstr); } amfree(slotstr); diff --cc server-src/amtrmidx.c index e30a1d5,76c17c7..f5be826 --- a/server-src/amtrmidx.c +++ b/server-src/amtrmidx.c @@@ -82,20 -89,18 +89,18 @@@ main signal(SIGPIPE, SIG_IGN); dbopen(DBG_SUBDIR_SERVER); - dbprintf(("%s: version %s\n", argv[0], version())); + dbprintf(_("%s: version %s\n"), argv[0], version()); - parse_conf(argc, argv, &new_argc, &new_argv); - my_argc = new_argc; - my_argv = new_argv; + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); - if (argc > 1 && strcmp(argv[1], "-t") == 0) { + if (my_argc > 1 && strcmp(my_argv[1], "-t") == 0) { amtrmidx_debug = 1; - argc--; - argv++; + my_argc--; + my_argv++; } - if (my_argc < 2) { - fprintf(stderr, "Usage: %s [-t] [-o configoption]*\n", my_argv[0]); + if (argc < 2) { + g_fprintf(stderr, _("Usage: %s [-t] [-o configoption]*\n"), argv[0]); return 1; } diff --cc server-src/amtrmlog.c index 691eb9e,460a354..8bce5df --- a/server-src/amtrmlog.c +++ b/server-src/amtrmlog.c @@@ -80,18 -84,16 +84,16 @@@ main /* Don't die when child closes pipe */ signal(SIGPIPE, SIG_IGN); - parse_conf(argc, argv, &new_argc, &new_argv); - my_argc = new_argc; - my_argv = new_argv; + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); - if (my_argc > 1 && strcmp(my_argv[1], "-t") == 0) { + if (argc > 1 && strcmp(argv[1], "-t") == 0) { amtrmidx_debug = 1; - argc--; - argv++; + my_argc--; + my_argv++; } - if (my_argc < 2) { - fprintf(stderr, "Usage: %s [-t] [-o configoption]*\n", my_argv[0]); + if (argc < 2) { + g_fprintf(stderr, _("Usage: %s [-t] [-o configoption]*\n"), argv[0]); return 1; } diff --cc server-src/driver.c index d5f265c,e9504ed..3bdd572 --- a/server-src/driver.c +++ b/server-src/driver.c @@@ -492,22 -535,13 +537,14 @@@ main amfree(newdir); check_unfree_serial(); - printf("driver: FINISHED time %s\n", walltime_str(curclock())); + g_printf(_("driver: FINISHED time %s\n"), walltime_str(curclock())); fflush(stdout); - log_add(L_FINISH,"date %s time %s", driver_timestamp, walltime_str(curclock())); + log_add(L_FINISH,_("date %s time %s"), driver_timestamp, walltime_str(curclock())); amfree(driver_timestamp); + free_new_argv(new_argc, new_argv); amfree(dumper_program); amfree(taper_program); - amfree(config_dir); - amfree(config_name); - - malloc_size_2 = malloc_inuse(&malloc_hist_2); - - if(malloc_size_1 != malloc_size_2) { - malloc_list(fileno(stderr), malloc_hist_1, malloc_hist_2); - } dbclose(); @@@ -1053,14 -1118,9 +1121,14 @@@ start_degraded_mode off_t est_full_size; char *qname; + if (taper_ev_read != NULL) { + event_release(taper_ev_read); + taper_ev_read = NULL; + } + newq.head = newq.tail = 0; - dump_schedule(queuep, "before start degraded mode"); + dump_schedule(queuep, _("before start degraded mode")); est_full_size = (off_t)0; while(!empty(*queuep)) { @@@ -2707,16 -2966,9 +2974,9 @@@ dump_to_tape disk_t * dp) { dumper_t *dumper; - int failed = 0; - off_t filenum; - off_t origsize = (off_t)0; - off_t dumpsize = (off_t)0; - time_t dumptime = (time_t)0; - double tapetime = 0.0; cmd_t cmd; - int result_argc; + int result_argc, rc; char *result_argv[MAX_ARGS+1]; - int dumper_tryagain = 0; char *qname; qname = quote_string(dp->name); diff --cc server-src/dumper.c index 49982b2,18384c7..1c40d4b --- a/server-src/dumper.c +++ b/server-src/dumper.c @@@ -304,27 -297,13 +299,27 @@@ main dbrename(config_name, DBG_SUBDIR_SERVER); - our_features = am_init_feature_set(); - our_feature_string = am_feature_to_string(our_features); + report_bad_conf_arg(); + /* + * Make our effective uid nonprivlidged, keeping save uid as root + * in case we need to get back (to bind privlidged ports, etc). + */ + ruid = getuid(); + if(geteuid() == 0) { + seteuid(ruid); + setgid(getgid()); + } +#if defined BSD_SECURITY && !defined SSH_SECURITY + else { + error("must be run setuid root to communicate correctly"); + /*NOTREACHED*/ + } +#endif - fprintf(stderr, - "%s: pid %ld executable %s version %s\n", + g_fprintf(stderr, + _("%s: pid %ld executable %s version %s\n"), get_pname(), (long) getpid(), - my_argv[0], version()); + argv[0], version()); fflush(stderr); /* now, make sure we are a valid user */ diff --cc server-src/getconf.c index 9d8394d,fb90b37..27d02dd --- a/server-src/getconf.c +++ b/server-src/getconf.c @@@ -426,20 -426,26 +440,26 @@@ main int i; int asklist; char number[NUM_STR_SIZE]; - int new_argc, my_argc; - char **new_argv, **my_argv; int myarg; + config_overwrites_t *cfg_ovr = NULL; + char *cfg_opt = NULL; + gboolean cfg_ok; - safe_fd(-1, 0); + /* + * Configure program for internationalization: + * 1) Only set the message locale for now. + * 2) Set textdomain for all amanda related programs to "amanda" + * We don't want to be forced to support dozens of message catalogs. + */ + setlocale(LC_MESSAGES, "C"); + textdomain("amanda"); - malloc_size_1 = malloc_inuse(&malloc_hist_1); + safe_fd(-1, 0); - parse_conf(argc, argv, &new_argc, &new_argv); - my_argc = new_argc; - my_argv = new_argv; + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); - if((pgm = strrchr(argv[0], '/')) == NULL) { - pgm = argv[0]; + if((pgm = strrchr(my_argv[0], '/')) == NULL) { + pgm = my_argv[0]; } else { pgm++; } diff --cc server-src/infofile.c index 6ceca7e,b7db7a8..7454382 --- a/server-src/infofile.c +++ b/server-src/infofile.c @@@ -983,12 -730,9 +730,11 @@@ main dbopen(DBG_SUBDIR_SERVER); + malloc_size_1 = malloc_inuse(&malloc_hist_1); + for(i = 1; i < argc; ++i) { - #ifdef TEXTDB if(i+1 >= argc) { - fprintf(stderr,"usage: %s host disk [host disk ...]\n",argv[0]); + g_fprintf(stderr,_("usage: %s host disk [host disk ...]\n"),argv[0]); return 1; } open_infofile("curinfo"); diff --cc server-src/planner.c index c0f7fc6,1c612e4..2f3c378 --- a/server-src/planner.c +++ b/server-src/planner.c @@@ -1947,20 -1918,20 +1941,21 @@@ static void handle_result error_return: i = 0; for(dp = hostp->disks; dp != NULL; dp = dp->hostnext) { - if(est(dp)->state != DISK_ACTIVE) continue; - qname = quote_string(dp->name); - est(dp)->state = DISK_DONE; - if(est(dp)->state == DISK_ACTIVE) { - est(dp)->state = DISK_DONE; - remove_disk(&waitq, dp); - enqueue_disk(&failq, dp); - i++; + if (dp->todo) { + if(est(dp)->state == DISK_ACTIVE) { + qname = quote_string(dp->name); + est(dp)->state = DISK_DONE; + remove_disk(&waitq, dp); + enqueue_disk(&failq, dp); + i++; - est(dp)->errstr = stralloc(errbuf); - fprintf(stderr, "error result for host %s disk %s: %s\n", - dp->host->hostname, qname, errbuf); + est(dp)->errstr = stralloc(errbuf); + g_fprintf(stderr, _("error result for host %s disk %s: %s\n"), + dp->host->hostname, qname, errbuf); + amfree(qname); + } } + amfree(qname); } if(i == 0) { /* diff --cc server-src/taper.c index 3a10efe,d5b72af..71fba25 --- a/server-src/taper.c +++ b/server-src/taper.c @@@ -2266,1033 -123,1095 +123,1097 @@@ static void validate_args(cmd_t cmd, st } } - void - write_file(void) - { - buffer_t *bp; - int full_buffers, i, bufnum; - int tok; - char number[NUM_STR_SIZE]; - char *rdwait_str, *wrwait_str, *fmwait_str; - int tmpint; + /* Open a socket to the dumper. Returns TRUE if everything is happy, FALSE + otherwise. */ + static gboolean open_read_socket(dump_info_t * info, char * split_diskbuffer, + guint64 splitsize, guint64 fallback_splitsize) { + in_port_t port = 0; + int socket; + int fd; + int result; + struct addrinfo *res; + + if ((result = resolve_hostname("localhost", 0, &res, NULL) != 0)) { + char *m; + char *q; + int save_errno = errno; + char *qdiskname = quote_string(info->diskname); + + m = vstralloc("[localhost resolve failure: ", + strerror(save_errno), + "]", + NULL); + q = squote(m); + putresult(TAPE_ERROR, "%s %s\n", info->handle, q); + log_add(L_FAIL, "%s %s %s %d %s", + info->hostname, qdiskname, info->timestamp, + info->level, q); + amfree(qdiskname); + amfree(m); + amfree(q); + return FALSE; + } + + socket = stream_server(res->ai_family, &port, 0, STREAM_BUFSIZE, 0); + freeaddrinfo(res); + + if (socket < 0) { + char *m; + char *q; + int save_errno = errno; + char *qdiskname = quote_string(info->diskname); - rdwait = wrwait = times_zero; - total_writes = 0; + m = vstralloc("[port create failure: ", + strerror(save_errno), + "]", + NULL); + q = squote(m); + putresult(TAPE_ERROR, "%s %s\n", info->handle, q); + log_add(L_FAIL, "%s %s %s %d %s", + info->hostname, qdiskname, info->timestamp, + info->level, q); + amfree(qdiskname); + amfree(m); + amfree(q); + return FALSE; + } - bp = buftable; - full_buffers = 0; - tok = '?'; + putresult(PORT, "%d\n", port); - taper_debug(1, ("taper: w: start file\n")); + fd = stream_accept(socket, CONNECT_TIMEOUT, 0, STREAM_BUFSIZE); - /* - * Tell the reader that the tape is open, and give it all the buffers. - */ - if (syncpipe_put('O', 0) == -1) { - error("writer: Syncpipe failure starting write sequence"); - /*NOTREACHED*/ - } - for (i = 0; i < conf_tapebufs; i++) { - taper_debug(1, ("taper: w: put R%d\n", i)); - if (syncpipe_put('R', i) == -1) { - error("writer: Syncpipe failure readying write buffers"); - /*NOTREACHED*/ - } + if (fd < 0) { + char *m, *q; + int save_errno = errno; + char *qdiskname = quote_string(info->diskname); + m = vstralloc("[port connect failure: ", + strerror(save_errno), + "]", + NULL); + q = squote(m); + putresult(TAPE_ERROR, "%s %s\n", info->handle, q); + log_add(L_FAIL, "%s %s %s %d %s", + info->hostname, qdiskname, info->timestamp, + info->level, q); + amfree(qdiskname); + aclose(socket); + amfree(m); + amfree(q); + return FALSE; + } else { + aclose(socket); } - /* - * We write the filemark at the start of the file rather than at the end, - * so that it can proceed in parallel with the reader's initial filling - * up of the buffers. - */ - - startclock(); - if (!write_filemark()) - goto tape_error; - fmwait = stopclock(); - - filenum += 1; - - do { - - /* - * STOPPED MODE - * - * At the start of the file, or if the input can't keep up with the - * tape, we enter STOPPED mode, which waits for most of the buffers - * to fill up before writing to tape. This maximizes the amount of - * data written in chunks to the tape drive, minimizing the number - * of starts/stops, which in turn saves tape and time. - */ - - if (interactive) - fputs("[WS]", stderr); - startclock(); - while (full_buffers < conf_tapebufs - THRESHOLD) { - if ((tok = syncpipe_get(&bufnum)) == -1) { - error("writer: Syncpipe failure during buffer advance"); - /*NOTREACHED*/ - } - if (tok != 'W') - break; - taper_debug(1, ("taper: w: got W%d\n",bufnum)); - full_buffers++; - } - rdwait = timesadd(rdwait, stopclock()); - - /* - * STARTING MODE - * - * We start output when sufficient buffers have filled up, or at - * end-of-file, whichever comes first. Here we drain all the buffers - * that were waited on in STOPPED mode. If more full buffers come - * in, then we will be STREAMING. - */ - - while (full_buffers) { - if (tt_file_pad && bp->size < (ssize_t)tt_blocksize) { - memset(bp->buffer+bp->size, 0, tt_blocksize - bp->size); - bp->size = (ssize_t)tt_blocksize; - } - if (!write_buffer(bp)) - goto tape_error; - full_buffers--; - bp = nextbuf(bp); - } - - /* - * STREAMING MODE - * - * With any luck, the input source is faster than the tape drive. In - * this case, full buffers will appear in the circular queue faster - * than we can write them, so the next buffer in the queue will always - * be marked FULL by the time we get to it. If so, we'll stay in - * STREAMING mode. - * - * On the other hand, if we catch up to the input and thus would have - * to wait for buffers to fill, we are then STOPPED again. - */ - - while (tok == 'W' && bp->status == FULL) { - if ((tok = syncpipe_get(&bufnum)) == -1) { - error("writer: Syncpipe failure advancing buffer"); - /*NOTREACHED*/ - } - - if (tok == 'W') { - taper_debug(1, ("taper: w: got W%d\n",bufnum)); - if(bufnum != (int)(bp - buftable)) { - fprintf(stderr, - "taper: tape-writer: my buf %d reader buf %d\n", - (int)(bp-buftable), bufnum); - fflush(stderr); - if (syncpipe_put('E', 0) == -1) { - error("writer: Syncpipe failure putting error token"); - /*NOTREACHED*/ - } - if (syncpipe_putstr("writer-side buffer mismatch") == -1) { - error("writer: Syncpipe failure putting error messgae"); - /*NOTREACHED*/ - } - goto error_ack; - } - if (tt_file_pad && bp->size < (ssize_t)tt_blocksize) { - memset(bp->buffer+bp->size, 0, tt_blocksize - bp->size); - bp->size = (ssize_t)tt_blocksize; - } - if (!write_buffer(bp)) - goto tape_error; - bp = nextbuf(bp); - } else if (tok == 'Q') { - return; - } else if (tok == 'X') { - goto reader_buffer_snafu; - } else { - error("writer-side not expecting token: %c", tok); - /*NOTREACHED*/ - } - } - } while (tok == 'W'); + info->source = taper_source_new(info->handle, PORT_WRITE, NULL, fd, + split_diskbuffer, splitsize, + fallback_splitsize); + /* FIXME: This should be handled properly. */ + g_assert(info->source != NULL); + return TRUE; + } - /* got close signal from reader, acknowledge it */ + typedef struct { + ConsumerFunctor next_consumer; + gpointer next_consumer_data; + guint64 bytes_written; + } CountingConsumerData; - if (tok == 'X') - goto reader_buffer_snafu; + /* A ConsumerFunctor. This consumer just passes its arguments on to a + second consumer, but counts the number of bytes successfully + written. */ + static int counting_consumer(gpointer user_data, queue_buffer_t * buffer) { + int result; + CountingConsumerData * data = user_data; - assert(tok == 'C'); - if (syncpipe_put('C', 0) == -1) { - error("writer: Syncpipe failure putting close"); - /*NOTREACHED*/ + result = data->next_consumer(data->next_consumer_data, buffer); + + if (result > 0) { + data->bytes_written += result; } - /* tell reader the tape and file number */ + return result; + } - if (syncpipe_putstr(label) == -1) { - error("writer: Syncpipe failure putting label"); - /*NOTREACHED*/ - } - snprintf(number, SIZEOF(number), "%d", filenum); - if (syncpipe_putstr(number) == -1) { - error("writer: Syncpipe failure putting filenum"); - /*NOTREACHED*/ + static gboolean boolean_prolong(void * data) { + if (data == NULL) { + return TRUE; /* Do not interrupt. */ + } else { + return *(gboolean*)data; } + } + + /* A (simpler) wrapper around taper_scan(). */ + static gboolean simple_taper_scan(taper_state_t * state, + gboolean* prolong, char ** error_message) { + char ** label = &(state->next_tape_label); + char ** device = &(state->next_tape_device); + char *timestamp = NULL; + int result; + result = taper_scan(NULL, label, ×tamp, device, + state->taper_scan_tracker, + CHAR_taperscan_output_callback, + error_message, boolean_prolong, prolong); + if (prolong != NULL && !*prolong) { + g_fprintf(stderr, _("Cancelled taper scan.\n")); + return FALSE; + } else if (result < 0) { + g_fprintf(stderr, _("Failed taper scan: %s\n"), (*error_message)?(*error_message):_("(no error message)")); + amfree(timestamp); + return FALSE; + } else { + g_fprintf(stderr, _("taper: using label `%s' date `%s'\n"), *label, + state->driver_start_time); + if (result == 3) { + log_add(L_INFO, + _("Will write new label `%s' to new (previously non-amanda) tape"), + *label); + } - snprintf(number, SIZEOF(number), "%lu", total_writes); - rdwait_str = stralloc(walltime_str(rdwait)); - wrwait_str = stralloc(walltime_str(wrwait)); - fmwait_str = stralloc(walltime_str(fmwait)); - errstr = newvstralloc(errstr, - "{wr:", - " writers ", number, - " rdwait ", rdwait_str, - " wrwait ", wrwait_str, - " filemark ", fmwait_str, - "}", - NULL); - amfree(rdwait_str); - amfree(wrwait_str); - amfree(fmwait_str); - if (syncpipe_putstr(errstr) == -1) { - error("writer: Syncpipe failure putting '%s'", errstr); - /*NOTREACHED*/ } + amfree(timestamp); + return TRUE; + } - /* XXX go to next tape if past tape size? */ + typedef struct { + taper_state_t * state; + gboolean prolong; /* scan stops when this is FALSE. */ + char *errmsg; + } tape_search_request_t; - return; + /* A GThread that runs taper_scan. */ + static gpointer tape_search_thread(gpointer data) { + tape_search_request_t * request = data; - tape_error: - if (errstr) - dbprintf(("tape_error: %s\n", errstr)); - /* got tape error */ - if (next_tape(1)) { - if (syncpipe_put('T', 0) == -1) { /* next tape in place, try again */ - error("writer: Syncpipe failure during tape advance"); - /*NOTREACHED*/ - } + if (request->state->next_tape_label != NULL && + request->state->next_tape_device != NULL) { + return GINT_TO_POINTER(TRUE); } else { - if (syncpipe_put('E', 0) == -1) { /* no more tapes, fail */ - error("writer: Syncpipe failure during tape error"); - /*NOTREACHED*/ - } - } - if (syncpipe_putstr(errstr) == -1) { - error("writer: Syncpipe failure putting '%s'", errstr); - /*NOTREACHED*/ + amfree(request->state->next_tape_label); + amfree(request->state->next_tape_device); } - error_ack: - /* wait for reader to acknowledge error */ - do { - if ((tok = syncpipe_get(&tmpint)) == -1) { - error("writer: syncpipe failure waiting for error ack"); - /*NOTREACHED*/ - } - - if (tok != 'W' && tok != 'C' && tok != 'e') { - error("writer: got '%c' unexpectedly after error", tok); - /*NOTREACHED*/ - } - } while (tok != 'e'); - return; - - reader_buffer_snafu: - if (syncpipe_put('x', 0) == -1) { - error("writer: syncpipe failure putting buffer snafu"); - /*NOTREACHED*/ - } - return; + return GINT_TO_POINTER + (simple_taper_scan(request->state, + &(request->prolong), + &(request->errmsg))); } - int - write_buffer( - buffer_t *bp) - { - ssize_t rc; - - assert(bp->status == FULL); - - startclock(); - rc = tapefd_write(tape_fd, bp->buffer, (size_t)bp->size); - if (rc == (ssize_t)bp->size) { - #if defined(NEED_RESETOFS) - static double tape_used_modulus_2gb = 0; - - /* - * If the next write will go over the 2 GByte boundary, reset - * the kernel concept of where we are to make sure it does not - * go silly on us. - */ - tape_used_modulus_2gb += (double)rc; - if (tape_used_modulus_2gb + (double)rc > (double)0x7fffffff) { - tape_used_modulus_2gb = 0; - tapefd_resetofs(tape_fd); - } - #endif - wrwait = timesadd(wrwait, stopclock()); - total_writes += 1; - total_tape_used += (off_t)rc; - bp->status = EMPTY; - if (interactive || debug_taper >= 1) - dumpstatus(bp); - if (interactive) - fputs("W", stderr); - - taper_debug(1, ("taper: w: put R%d\n", (int)(bp-buftable))); - if (syncpipe_put('R', (int)(bp-buftable)) == -1) { - error("writer: Syncpipe failure during advancing write bufffer"); - /*NOTREACHED*/ - } - return 1; - } else { - errstr = newvstralloc(errstr, - "writing file: ", - (rc != -1) ? "short write" : strerror(errno), - NULL); - wrwait = timesadd(wrwait, stopclock()); - if (interactive) - fputs("[WE]", stderr); - return 0; + static void log_taper_scan_errmsg(char * errmsg) { + char *c, *c1; + if (errmsg == NULL) + return; + + c = c1 = errmsg; + while (*c != '\0') { + if (*c == '\n') { + *c = '\0'; + log_add(L_WARNING,"%s", c1); + c1 = c+1; + } + c++; } + if (strlen(c1) > 1 ) + log_add(L_WARNING,"%s", c1); + amfree(errmsg); } + /* If handle is NULL, then this function assumes that we are in startup mode. + * In that case it will wait for a command from driver. If handle is not NULL, + * this this function will ask for permission with REQUEST-NEW-TAPE. */ + static gboolean find_new_tape(taper_state_t * state, dump_info_t * dump) { + GThread * tape_search = NULL; + tape_search_request_t search_request; + gboolean use_threads; + cmd_t cmd; + struct cmdargs args; - static void - cleanup(void) - { - REMOVE_SHARED_MEMORY(); - } - + if (state->device != NULL) { + return TRUE; + } - /* - * Cleanup shared memory segments - */ - static void - signal_handler( - int signum) - { - log_add(L_INFO, "Received signal %d", signum); + /* We save the value here in case it changes while we're running. */ + use_threads = g_thread_supported(); - exit(1); + search_request.state = state; + search_request.prolong = TRUE; + search_request.errmsg = NULL; + if (use_threads) { + tape_search = g_thread_create(tape_search_thread, + &search_request, TRUE, NULL); + } + + putresult(REQUEST_NEW_TAPE, "%s\n", dump->handle); + cmd = getcmd(&args); + switch (cmd) { + default: + g_fprintf(stderr, "taper: Got odd message from driver, expected NEW-TAPE or NO-NEW-TAPE.\n"); + /* FALLTHROUGH. */ + case NEW_TAPE: { + gboolean search_result; + if (use_threads) { + search_result = GPOINTER_TO_INT(g_thread_join(tape_search)); + } else { + search_result = + GPOINTER_TO_INT(tape_search_thread(&search_request)); + } + if (search_result) { + /* We don't say NEW_TAPE until we actually write the label. */ + amfree(search_request.errmsg); + return TRUE; + } else { + putresult(NO_NEW_TAPE, "%s\n", dump->handle); + log_taper_scan_errmsg(search_request.errmsg); + return FALSE; + } + } + case NO_NEW_TAPE: + search_request.prolong = FALSE; + if (use_threads) { + g_thread_join(tape_search); + } + return FALSE; + } } + /* Returns TRUE if the old volume details are not the same as the new ones. */ + static gboolean check_volume_changed(Device * device, + char * old_label, char * old_timestamp) { + /* If one is NULL and the other is not, something changed. */ + if ((old_label == NULL) != (device->volume_label == NULL)) + return TRUE; + if ((old_timestamp == NULL) != (device->volume_time == NULL)) + return TRUE; + /* If details were not NULL and is now different, we have a difference. */ + if (old_label != NULL && strcmp(old_label, device->volume_label) != 0) + return TRUE; + if (old_timestamp != NULL && + strcmp(old_timestamp, device->volume_time) != 0) + return TRUE; + + /* If we got here, everything is cool. */ + return FALSE; + } - /* - * Installing signal handlers for signal whose default action is - * process termination so that we can clean up shared memory - * segments - */ static void - install_signal_handlers(void) + update_tapelist( + taper_state_t *state) { - struct sigaction act; - - act.sa_handler = signal_handler; - act.sa_flags = 0; - sigemptyset(&act.sa_mask); - - signal(SIGPIPE, SIG_IGN); + char *tapelist_name = NULL; + char *tapelist_name_old = NULL; - if (sigaction(SIGINT, &act, NULL) != 0) { - error("taper: couldn't install SIGINT handler [%s]", strerror(errno)); - /*NOTREACHED*/ + tapelist_name = config_dir_relative(getconf_str(CNF_TAPELIST)); + if (state->cur_tape == 0) { + tapelist_name_old = stralloc2(tapelist_name, ".yesterday"); + } else { + char cur_str[NUM_STR_SIZE]; + g_snprintf(cur_str, SIZEOF(cur_str), "%d", state->cur_tape - 1); + tapelist_name_old = vstralloc(tapelist_name, + ".today.", cur_str, NULL); } - if (sigaction(SIGHUP, &act, NULL) != 0) { - error("taper: couldn't install SIGHUP handler [%s]", strerror(errno)); - /*NOTREACHED*/ - } - - if (sigaction(SIGTERM, &act, NULL) != 0) { - error("taper: couldn't install SIGTERM handler [%s]", strerror(errno)); + if (write_tapelist(tapelist_name_old)) { + error("could not write tapelist: %s", strerror(errno)); /*NOTREACHED*/ } + amfree(tapelist_name_old); - if (sigaction(SIGUSR1, &act, NULL) != 0) { - error("taper: couldn't install SIGUSR1 handler [%s]", strerror(errno)); + remove_tapelabel(state->device->volume_label); + add_tapelabel(state->driver_start_time, + state->device->volume_label); + if (write_tapelist(tapelist_name)) { + error("could not write tapelist: %s", strerror(errno)); /*NOTREACHED*/ } + amfree(tapelist_name); + } - if (sigaction(SIGUSR2, &act, NULL) != 0) { - error("taper: couldn't install SIGUSR2 handler [%s]", strerror(errno)); - /*NOTREACHED*/ + /* Find and label a new tape, if one is not already open. Returns TRUE + * if a tape could be written. */ + static gboolean find_and_label_new_tape(taper_state_t * state, + dump_info_t * dump_info) { + if (state->device != NULL) { + return TRUE; } - - if (sigaction(SIGALRM, &act, NULL) != 0) { - error("taper: couldn't install SIGALRM handler [%s]", strerror(errno)); - /*NOTREACHED*/ + + if (!find_new_tape(state, dump_info)) { + return FALSE; } - } - - /* - * ======================================================================== - * SHARED-MEMORY BUFFER SUBSYSTEM - * - */ + return label_new_tape(state, dump_info); + } - #ifdef HAVE_SYSVSHM + static gboolean label_new_tape(taper_state_t * state, dump_info_t * dump_info) { + char *old_volume_name = NULL; + char *old_volume_time = NULL; + tape_search_request_t request; + gboolean search_result; + ReadLabelStatusFlags status; + + /* If we got here, it means that we have found a tape to label and + * have gotten permission from the driver to write it. But we + * still can say NO-NEW-TAPE if a problem shows up, and must still + * say NEW-TAPE if one doesn't. */ + + state->device = device_open(state->next_tape_device); + amfree(state->next_tape_device); + if (state->device == NULL) + goto skip_volume; + + device_set_startup_properties_from_config(state->device); + + /* if we have an error, and are sure it isn't just an unlabeled volume, + * then skip this volume */ + status = device_read_label(state->device); + if ((status & ~READ_LABEL_STATUS_VOLUME_UNLABELED) && + !(status & READ_LABEL_STATUS_VOLUME_UNLABELED)) + goto skip_volume; + + old_volume_name = g_strdup(state->device->volume_label); + old_volume_time = g_strdup(state->device->volume_time); + + if (!device_start(state->device, ACCESS_WRITE, state->next_tape_label, + state->driver_start_time)) { + gboolean tape_used; + + /* Something broke, see if we can tell if the volume was erased or + * not. */ + g_fprintf(stderr, "taper: Error writing label %s to device %s.\n", + state->next_tape_label, state->device->device_name); + + if (!device_finish(state->device)) + goto request_new_volume; + + /* This time, if we can't read the label, assume we've overwritten + * the volume or otherwise corrupted it */ + status = device_read_label(state->device); + if ((status & ~READ_LABEL_STATUS_VOLUME_UNLABELED) && + !(status & READ_LABEL_STATUS_VOLUME_UNLABELED)) + goto request_new_volume; + + tape_used = check_volume_changed(state->device, old_volume_name, + old_volume_time); + if (tape_used) { + goto request_new_volume; + } else { + goto skip_volume; + } + } - int shmid = -1; + amfree(old_volume_name); + amfree(old_volume_time); + amfree(state->next_tape_label); - char * - attach_buffers( - size_t size) - { - char *result; + update_tapelist(state); + state->cur_tape++; - shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0700); - if (shmid == -1) { - return NULL; + log_add(L_START, "datestamp %s label %s tape %d", + state->driver_start_time, state->device->volume_label, + state->cur_tape); + putresult(NEW_TAPE, "%s %s\n", dump_info->handle, + state->device->volume_label); + + return TRUE; + + request_new_volume: + /* Tell the driver we overwrote this volume, even if it was empty, and request + * a new volume. */ + if (state->device) { + g_object_unref(state->device); + state->device = NULL; + } + + putresult(NEW_TAPE, "%s %s\n", dump_info->handle, + state->next_tape_label); + if (old_volume_name) { + log_add(L_WARNING, "Problem writing label '%s' to volume %s, " + "volume may be erased.\n", + state->next_tape_label, old_volume_name); + } else { + log_add(L_WARNING, "Problem writing label '%s' to new volume, " + "volume may be erased.\n", state->next_tape_label); } - result = (char *)shmat(shmid, (SHM_ARG_TYPE *)NULL, 0); + amfree(state->next_tape_label); + amfree(old_volume_name); + amfree(old_volume_time); - if (result == (char *)-1) { - int save_errno = errno; + return find_and_label_new_tape(state, dump_info); - destroy_buffers(); - errno = save_errno; - error("shmat: %s", strerror(errno)); - /*NOTREACHED*/ + skip_volume: + /* grab a new volume without talking to the driver again -- we do this if we're + * confident we didn't overwrite the last tape we got. */ + if (state->device) { + g_object_unref(state->device); + state->device = NULL; } - return result; - } + if (old_volume_name) { + log_add(L_WARNING, "Problem writing label '%s' to volume '%s', " + "old volume data intact\n", + state->next_tape_label, old_volume_name); + } else { + log_add(L_WARNING, "Problem writing label '%s' to new volume, " + "old volume data intact\n", state->next_tape_label); + } + amfree(state->next_tape_label); + amfree(old_volume_name); + amfree(old_volume_time); - void - detach_buffers( - char *bufp) - { - if ((bufp != NULL) && - (shmdt((SHM_ARG_TYPE *)bufp) == -1)) { - error("shmdt: %s", strerror(errno)); - /*NOTREACHED*/ + request.state = state; + request.prolong = TRUE; + request.errmsg = NULL; + search_result = GPOINTER_TO_INT(tape_search_thread(&request)); + if (search_result) { + amfree(request.errmsg); + return label_new_tape(state, dump_info); + } else { + /* Problem finding a new tape! */ + log_taper_scan_errmsg(request.errmsg); + putresult(NO_NEW_TAPE, "%s\n", dump_info->handle); + return FALSE; + } -} + + /* Find out if the dump is PARTIAL or not, and set the proper driver + and logfile tags for the dump. */ + static void find_completion_tags(dump_info_t * dump_info, /* IN */ + cmd_t * result_cmd, /* OUT */ + logtype_t * result_log /* OUT */) { + if (taper_source_is_partial(dump_info->source)) { + *result_cmd = PARTIAL; + *result_log = L_PARTIAL; + } else { + *result_cmd = DONE; + *result_log = L_DONE; } - } + - void - destroy_buffers(void) - { - if (shmid == -1) - return; /* nothing to destroy */ - if (shmctl(shmid, IPC_RMID, NULL) == -1) { - error("shmctl: %s", strerror(errno)); - /*NOTREACHED*/ - } ++ memcpy(intp, &buf[1], SIZEOF(int)); ++ return (int)buf[0]; } - #else - #ifdef HAVE_MMAP + /* Put an L_PARTIAL message to the logfile. */ + static void put_partial_log(dump_info_t * dump_info, double dump_time, + guint64 dump_kbytes) { + char * qdiskname = quote_string(dump_info->diskname); + + log_add(L_PARTIAL, "%s %s %s %d %d [sec %f kb %ju kps %f] \"\"", + dump_info->hostname, qdiskname, dump_info->timestamp, + dump_info->current_part, dump_info->level, dump_time, + (uintmax_t)dump_kbytes, dump_kbytes / dump_time); + amfree(qdiskname); + } - #ifdef HAVE_SYS_MMAN_H - #include - #endif + /* Figure out what to do after a part attempt. Returns TRUE if another + attempt should proceed for this dump; FALSE if we are done. */ + static gboolean finish_part_attempt(taper_state_t * taper_state, + dump_info_t * dump_info, + queue_result_flags queue_result, + GTimeVal run_time, guint64 run_bytes) { + double part_time = g_timeval_to_double(run_time); + guint64 part_kbytes = run_bytes / 1024; + double part_kbps = run_bytes / (1024 * part_time); + + char * qdiskname = quote_string(dump_info->diskname); + + if (queue_result == QUEUE_SUCCESS) { + dump_info->total_time = timesadd(run_time, dump_info->total_time); + dump_info->total_bytes += run_bytes; + + log_add(L_PART, "%s %d %s %s %s %d/%d %d [sec %f kb %ju kps %f]", + taper_state->device->volume_label, + taper_state->device->file, dump_info->hostname, qdiskname, + dump_info->timestamp, dump_info->current_part, + taper_source_predict_parts(dump_info->source), + dump_info->level, part_time, (uintmax_t)part_kbytes, part_kbps); + putresult(PARTDONE, "%s %s %d %ju \"[sec %f kb %ju kps %f]\"\n", + dump_info->handle, taper_state->device->volume_label, + taper_state->device->file, (uintmax_t)part_kbytes, part_time, + (uintmax_t)part_kbytes, part_kbps); + + if (taper_source_get_end_of_data(dump_info->source)) { + cmd_t result_cmd; + logtype_t result_log; + double dump_time = g_timeval_to_double(dump_info->total_time); + guint64 dump_kbytes = dump_info->total_bytes / 1024; + double dump_kbps = dump_info->total_bytes / (1024 * dump_time); + + find_completion_tags(dump_info, &result_cmd, &result_log); + + g_object_unref(dump_info->source); + dump_info->source = NULL; + + log_add(result_log, "%s %s %s %d %d [sec %f kb %ju kps %f]", + dump_info->hostname, qdiskname, dump_info->timestamp, + dump_info->current_part, dump_info->level, dump_time, + (uintmax_t)dump_kbytes, dump_kbps); + putresult(result_cmd, "%s INPUT-GOOD TAPE-GOOD " + "\"[sec %f kb %ju kps %f]\" \"\" \"\"\n", + dump_info->handle, dump_time, (uintmax_t)dump_kbytes, + dump_kbps); + + amfree(qdiskname); + return FALSE; + } else if (taper_source_get_end_of_part(dump_info->source)) { + taper_source_start_new_part(dump_info->source); + dump_info->current_part ++; + amfree(qdiskname); + return TRUE; + } + /* If we didn't read EOF or EOP, then an error + occured. But we read QUEUE_SUCCESS, so something is + b0rked. */ + g_assert_not_reached(); + } else { + char * volume_label = strdup(taper_state->device->volume_label); + int file_number = taper_state->device->file; + double dump_time, dump_kbps; + guint64 dump_kbytes; + + /* A problem occured. */ + if (queue_result & QUEUE_CONSUMER_ERROR) { + /* Close the device. */ + device_finish(taper_state->device); + g_object_unref(taper_state->device); + taper_state->device = NULL; + } + + log_add(L_PARTPARTIAL, + "%s %d %s %s %s %d/%d %d [sec %f kb %ju kps %f] \"\"", + volume_label, file_number, dump_info->hostname, qdiskname, + dump_info->timestamp, dump_info->current_part, + taper_source_predict_parts(dump_info->source), + dump_info->level, part_time, (uintmax_t)part_kbytes, part_kbps); + amfree(volume_label); + + if ((queue_result & QUEUE_CONSUMER_ERROR) && + (!(queue_result & QUEUE_PRODUCER_ERROR)) && + taper_source_seek_to_part_start(dump_info->source)) { + /* It is recoverable. */ + log_add(L_INFO, "Will request retry of failed split part."); + if (find_and_label_new_tape(taper_state, dump_info)) { + /* dump_info->current_part is unchanged. */ + amfree(qdiskname); + return TRUE; + } + } - #ifndef MAP_ANON - # ifdef MAP_ANONYMOUS /* OSF/1-style */ - # define MAP_ANON MAP_ANONYMOUS - # else /* SunOS4-style */ - # define MAP_ANON 0 - # define ZERO_FILE "/dev/zero" - # endif - #endif + dump_info->total_time = timesadd(run_time, dump_info->total_time); + dump_info->total_bytes += run_bytes; + dump_time = g_timeval_to_double(dump_info->total_time); + dump_kbytes = dump_info->total_bytes / 1024; + dump_kbps = dump_info->total_bytes / (1024 * dump_time); + + putresult(PARTIAL, + "%s INPUT-%s TAPE-%s " + "\"[sec %f kb %ju kps %f]\" \"\" \"\"\n", + dump_info->handle, + (queue_result & QUEUE_PRODUCER_ERROR) ? "ERROR" : "GOOD", + (queue_result & QUEUE_CONSUMER_ERROR) ? "ERROR" : "GOOD", + dump_time, (uintmax_t)dump_kbytes, dump_kbps); + put_partial_log(dump_info, dump_time, dump_kbytes); + } + + amfree(qdiskname); + return FALSE; + } - int shmfd = -1; - size_t saved_size; + /* Generate the actual header structure to write to tape. This means dropping + * bits related to the holding disk, and adding bits for split dumps. */ + static dumpfile_t * munge_headers(dump_info_t * dump_info) { + dumpfile_t * rval; + int expected_splits; + + rval = taper_source_get_first_header(dump_info->source); - char * - attach_buffers( - size_t size) - { - char *shmbuf; - - #ifdef ZERO_FILE - shmfd = open(ZERO_FILE, O_RDWR); - if (shmfd == -1) { - error("attach_buffers: could not open %s: %s", - ZERO_FILE, - strerror(errno)); - /*NOTREACHED*/ + if (rval == NULL) { + return NULL; } - #endif - saved_size = size; - shmbuf = (char *) mmap((void *) 0, - size, - PROT_READ|PROT_WRITE, - MAP_ANON|MAP_SHARED, - shmfd, 0); + rval->cont_filename[0] = '\0'; - return shmbuf; - } + expected_splits = taper_source_predict_parts(dump_info->source); - void - detach_buffers( - char *bufp) - { - if ((bufp != NULL) && - (munmap((void *)bufp, saved_size) == -1)) { - error("detach_buffers: munmap: %s", strerror(errno)); - /*NOTREACHED*/ + if (expected_splits != 1) { + rval->type = F_SPLIT_DUMPFILE; + rval->partnum = dump_info->current_part; + rval->totalparts = expected_splits; } - if (shmfd != -1) - aclose(shmfd); + return rval; } - void - destroy_buffers(void) - { + /* We call this when we can't find a tape to write data to. This could + happen with the first (or only) part of a file, but it could also + happen with an intermediate part of a split dump. dump_bytes + is 0 if this is the first part of a dump. */ + static void bail_no_volume(dump_info_t * dump_info) { + if (dump_info->total_bytes > 0) { + /* Second or later part of a split dump, so PARTIAL message. */ + double dump_time = g_timeval_to_double(dump_info->total_time); + guint64 dump_kbytes = dump_info->total_bytes / 1024; + double dump_kbps = dump_kbytes / dump_time; + putresult(PARTIAL, + "%s INPUT-GOOD TAPE-ERROR " + "\"[sec %f kb %ju kps %f]\" \"\" \"no new tape\"\n", + dump_info->handle, + dump_time, (uintmax_t)dump_kbytes, dump_kbps); + put_partial_log(dump_info, dump_time, dump_kbytes); + } else { + char * qdiskname = quote_string(dump_info->diskname); + putresult(FAILED, + "%s INPUT-GOOD TAPE-ERROR \"\" \"No new tape.\"\n", + dump_info->handle); + log_add(L_FAIL, "%s %s %s %d \"No new tape.\"", + dump_info->hostname, qdiskname, dump_info->timestamp, + dump_info->level); + amfree(qdiskname); + } } - #else - #error: must define either HAVE_SYSVSHM or HAVE_MMAP! - #endif - #endif - - + /* Link up the TaperSource with the Device, including retries etc. */ + static void run_device_output(taper_state_t * taper_state, + dump_info_t * dump_info) { + GValue val; + guint file_number; + dump_info->current_part = 1; + dump_info->total_time.tv_sec = 0; + dump_info->total_time.tv_usec = 0; + dump_info->total_bytes = 0; + + for (;;) { + GTimeVal start_time, end_time, run_time; + StreamingRequirement streaming_mode; + queue_result_flags queue_result; + CountingConsumerData consumer_data; + dumpfile_t *this_header; + size_t max_memory; + + this_header = munge_headers(dump_info); + if (this_header == NULL) { + char * qdiskname = quote_string(dump_info->diskname); + putresult(FAILED, + "%s INPUT-ERROR TAPE-GOOD \"Failed reading dump header.\" \"\"\n", + dump_info->handle); + log_add(L_FAIL, "%s %s %s %d \"Failed reading dump header.\"", + dump_info->hostname, qdiskname, dump_info->timestamp, + dump_info->level); + amfree(qdiskname); + return; + } + + if (!find_and_label_new_tape(taper_state, dump_info)) { + bail_no_volume(dump_info); + amfree(this_header); + return; + } - /* - * ======================================================================== - * SYNC-PIPE SUBSYSTEM - * - */ + if (!device_start_file(taper_state->device, this_header)) { + bail_no_volume(dump_info); + amfree(this_header); + return; + } + amfree(this_header); + + bzero(&val, sizeof(val)); + if (!device_property_get(taper_state->device, PROPERTY_STREAMING, &val) + || !G_VALUE_HOLDS(&val, STREAMING_REQUIREMENT_TYPE)) { + g_fprintf(stderr, "taper: Couldn't get streaming type!\n"); + streaming_mode = STREAMING_REQUIREMENT_REQUIRED; + } else { + streaming_mode = g_value_get_enum(&val); + } + + file_number = taper_state->device->file; + + consumer_data.next_consumer = device_write_consumer; + consumer_data.next_consumer_data = taper_state->device; + consumer_data.bytes_written = 0; + + g_get_current_time(&start_time); + + if (getconf_seen(CNF_DEVICE_OUTPUT_BUFFER_SIZE)) { + max_memory = getconf_size(CNF_DEVICE_OUTPUT_BUFFER_SIZE); + if (getconf_seen(CNF_TAPEBUFS)) { + g_fprintf(stderr, + "Configuration directives 'device_output_buffer_size' " + "and \n" + "'tapebufs' are incompatible; using former.\n"); + } + } else if (getconf_seen(CNF_TAPEBUFS)) { + max_memory = getconf_int(CNF_TAPEBUFS) * + device_write_max_size(taper_state->device); + } else { + /* Use default. */ + max_memory = getconf_size(CNF_DEVICE_OUTPUT_BUFFER_SIZE); + } - int getpipe, putpipe; + queue_result = do_consumer_producer_queue_full + (taper_source_producer, + dump_info->source, + counting_consumer, + &consumer_data, + device_write_max_size(taper_state->device), max_memory, + streaming_mode); + + g_get_current_time(&end_time); + run_time = timesub(end_time, start_time); + + /* The device_write_consumer may have closed the file with a short + * write, so we only finish here if it needs it. */ + if (taper_state->device->in_file && + !device_finish_file(taper_state->device)) { + queue_result = queue_result | QUEUE_CONSUMER_ERROR; + } - void - syncpipe_init( - int rd, - int wr) - { - getpipe = rd; - putpipe = wr; + if (!finish_part_attempt(taper_state, dump_info, queue_result, + run_time, consumer_data.bytes_written)) { + break; + } + } } - void - syncpipe_read_error( - ssize_t rc, - ssize_t expected) - { - char buf[sizeof(char) + sizeof(int)]; - - if (rc == 0) { - dbprintf(("syncpipe_get %s halting: Unexpected read EOF\n", procname)); - fprintf(stderr, "syncpipe_get %s halting: Unexpected read EOF\n", procname); - } else if (rc < 0) { - dbprintf(("syncpipe_get %s halting: Read error - %s\n", - procname, strerror(errno))); - fprintf(stderr, "syncpipe_get %s halting: Read error - %s\n", - procname, strerror(errno)); - } else { - dbprintf(("syncpipe_get %s halting: Read " - SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n", - procname, (SSIZE_T_FMT_TYPE)(rc - expected), - (SSIZE_T_FMT_TYPE)expected)); - fprintf(stderr, "syncpipe_get %s halting: Read " - SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n", - procname, (SSIZE_T_FMT_TYPE)(rc - expected), - (SSIZE_T_FMT_TYPE)expected); + /* Handle a PORT_WRITE command. */ + static void process_port_write(taper_state_t * state, + struct cmdargs * cmdargs) { + dump_info_t dump_state; + guint64 splitsize; + guint64 fallback_splitsize; + char * split_diskbuffer; + char * argnames[] = {"command", /* 1 */ + "handle", /* 2 */ + "hostname", /* 3 */ + "diskname", /* 4 */ + "level", /* 5 */ + "datestamp", /* 6 */ + "splitsize", /* 7 */ + "split_diskbuffer", /* 8 */ + "fallback_splitsize", /* 9 */ + NULL }; + + validate_args(PORT_WRITE, cmdargs, argnames); + + dump_state.handle = g_strdup(cmdargs->argv[2]); + dump_state.hostname = g_strdup(cmdargs->argv[3]); + dump_state.diskname = unquote_string(cmdargs->argv[4]); + + errno = 0; + dump_state.level = strtol(cmdargs->argv[5], NULL, 10); + if (errno != 0) { + error("error [taper PORT-WRITE: Invalid dump level %s]", + cmdargs->argv[5]); + g_assert_not_reached(); } - /* Halt the other side if it's still alive */ - buf[0] = 'H'; - memset(&buf[1], 0, SIZEOF(int)); - if (write(putpipe, buf, SIZEOF(buf))) - return; - } + + dump_state.timestamp = strdup(cmdargs->argv[6]); - void - syncpipe_write_error( - ssize_t rc, - ssize_t expected) - { - char buf[sizeof(char) + sizeof(int)]; - - if (rc == 0) { /* EOF */ - dbprintf(("syncpipe %s halting: Write EOF\n", procname)); - fprintf(stderr, "syncpipe %s halting: Write EOF\n", procname); - } else if (rc < 0) { - dbprintf(("syncpipe %s halting: Write error - %s\n", - procname, strerror(errno))); - fprintf(stderr, "syncpipe %s halting: Write error - %s\n", - procname, strerror(errno)); + errno = 0; + splitsize = g_ascii_strtoull(cmdargs->argv[7], NULL, 10); + if (errno != 0) { + error("error [taper PORT-WRITE: Invalid splitsize %s]", + cmdargs->argv[7]); + g_assert_not_reached(); + } + + if (strcmp(cmdargs->argv[8], "NULL") == 0) { + split_diskbuffer = NULL; } else { - dbprintf(("syncpipe %s halting: Write " - SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n", - procname, (SSIZE_T_FMT_TYPE)(rc - expected), - (SSIZE_T_FMT_TYPE)expected)); - fprintf(stderr, "syncpipe %s halting: Write " - SSIZE_T_FMT " bytes short of " SSIZE_T_FMT "\n", - procname, (SSIZE_T_FMT_TYPE)(rc - expected), - (SSIZE_T_FMT_TYPE)expected); + split_diskbuffer = g_strdup(cmdargs->argv[8]); } - /* Halt the other side if it's still alive */ - buf[0] = 'H'; - memset(&buf[1], 0, SIZEOF(int)); - if (write(putpipe, buf, SIZEOF(buf))) - return; - } - - int - syncpipe_get( - int *intp) - { - ssize_t rc; - char buf[SIZEOF(char) + SIZEOF(int)]; - - memset(buf, 0, sizeof(buf)); - rc = fullread(getpipe, buf, SIZEOF(buf)); - if (rc != (ssize_t)sizeof(buf)) { - syncpipe_read_error(rc, (ssize_t)sizeof(buf)); - return (-1); + + errno = 0; + fallback_splitsize = g_ascii_strtoull(cmdargs->argv[9], NULL, 10); + if (errno != 0) { + error("error [taper PORT-WRITE: Invalid fallback_splitsize %s]", + cmdargs->argv[9]); + g_assert_not_reached(); } - if (debug_taper >= 1 && *buf != 'R' && *buf != 'W') { - taper_debug(1, ("taper: %c: getc %c\n", *procname, *buf)); + dump_state.id_string = g_strdup_printf("%s:%s.%d", dump_state.hostname, + dump_state.diskname, + dump_state.level); + + if (!open_read_socket(&dump_state, split_diskbuffer, splitsize, + fallback_splitsize)) { + free(split_diskbuffer); + return; } + free(split_diskbuffer); - memcpy(intp, &buf[1], SIZEOF(int)); - return (int)buf[0]; - } - - int - syncpipe_getint(void) - { - ssize_t rc; - int i = 0; - - rc = fullread(getpipe, &i, SIZEOF(i)); - if (rc != (ssize_t)sizeof(i)) { - syncpipe_read_error(rc, (ssize_t)sizeof(i)); - return (-1); - } + run_device_output(state, &dump_state); - return (i); + free_dump_info(&dump_state); } - - char * - syncpipe_getstr(void) - { - ssize_t rc; - int len; - char *str; - - if ((len = syncpipe_getint()) <= 0) { - fprintf(stderr, "syncpipe %s halting: Protocol error - " - "Invalid string length (%d)\n", procname, len); - syncpipe_put('H', 0); /* Halt the other side */ - exit(1); - /*NOTREACHED*/ + /* Handle a FILE_WRITE command. */ + static void process_file_write(taper_state_t * state, + struct cmdargs * cmdargs) { + dump_info_t dump_state; + char * holding_disk_file; + guint64 splitsize; + char * argnames[] = {"command", /* 1 */ + "handle", /* 2 */ + "filename", /* 3 */ + "hostname", /* 4 */ + "diskname", /* 5 */ + "level", /* 6 */ + "datestamp", /* 7 */ + "splitsize", /* 8 */ + NULL }; + + validate_args(FILE_WRITE, cmdargs, argnames); + + dump_state.handle = g_strdup(cmdargs->argv[2]); + holding_disk_file = unquote_string(cmdargs->argv[3]); + dump_state.hostname = g_strdup(cmdargs->argv[4]); + dump_state.diskname = unquote_string(cmdargs->argv[5]); + + errno = 0; + dump_state.level = strtol(cmdargs->argv[6], NULL, 10); + if (errno != 0) { + error("error [taper FILE-WRITE: Invalid dump level %s]", + cmdargs->argv[5]); + g_assert_not_reached(); } + + dump_state.timestamp = strdup(cmdargs->argv[7]); - str = alloc((size_t)len); - - rc = fullread(getpipe, str, (size_t)len); - if (rc != (ssize_t)len) { - syncpipe_read_error(rc, (ssize_t)len); - return (NULL); + errno = 0; + splitsize = g_ascii_strtoull(cmdargs->argv[8], NULL, 10); + if (errno != 0) { + error("error [taper FILE-WRITE: Invalid splitsize %s]", + cmdargs->argv[8]); + g_assert_not_reached(); } - return (str); - } - - int - syncpipe_put( - int chi, - int intval) - { - char buf[sizeof(char) + sizeof(int)]; - ssize_t rc; + dump_state.id_string = g_strdup_printf("%s:%s.%d", dump_state.hostname, + dump_state.diskname, + dump_state.level); + + dump_state.source = taper_source_new(dump_state.handle, FILE_WRITE, + holding_disk_file, -1, + NULL, splitsize, -1); + /* FIXME: This should be handled properly. */ + g_assert(dump_state.source != NULL); - buf[0] = (char)chi; - memcpy(&buf[1], &intval, SIZEOF(int)); - if (debug_taper >= 1 && buf[0] != 'R' && buf[0] != 'W') { - taper_debug(1, ("taper: %c: putc %c\n",*procname,buf[0])); - } + run_device_output(state, &dump_state); - rc = fullwrite(putpipe, buf, SIZEOF(buf)); - if (rc != (ssize_t)sizeof(buf)) { - syncpipe_write_error(rc, (ssize_t)sizeof(buf)); - return (-1); - } - return (0); + free_dump_info(&dump_state); + amfree(holding_disk_file); } - int - syncpipe_putint( - int i) - { - ssize_t rc; - - rc = fullwrite(putpipe, &i, SIZEOF(i)); - if (rc != (ssize_t)sizeof(i)) { - syncpipe_write_error(rc, (ssize_t)sizeof(i)); - return (-1); - /* NOTREACHED */ - } - return (0); + /* Send QUITTING message to driver and associated logging. Always + returns false. */ + static gboolean send_quitting(taper_state_t * state) { + putresult(QUITTING, "\n"); + g_fprintf(stderr,"taper: DONE\n"); + cleanup(state); + return FALSE; } - int - syncpipe_putstr( - const char *str) - { - ssize_t n, rc; - - if(!str) - str = "UNKNOWN syncpipe_putstr STRING"; + /* This function recieves the START_TAPER command from driver, and + returns the attached timestamp. */ + static gboolean find_first_tape(taper_state_t * state) { + cmd_t cmd; + /* Note: cmdargs.argv is never freed. In the entire Amanda codebase. */ + struct cmdargs cmdargs; + tape_search_request_t search_request; + GThread * tape_search = NULL; + gboolean use_threads; - n = (ssize_t)strlen(str) + 1; /* send '\0' as well */ - syncpipe_putint((int)n); + /* We save the value here in case it changes while we're running. */ + use_threads = g_thread_supported(); - rc = fullwrite(putpipe, str, (size_t)n); - if (rc != n) { - syncpipe_write_error(rc, n); - return (-1); - } - return (0); - } - - /* - * ======================================================================== - * TAPE MANIPULATION SUBSYSTEM - * - */ - int label_tape(void); - - /* local functions */ - - /* return 0 on success */ - /* return 1 on error and set errstr */ - int - label_tape(void) - { - char *conf_tapelist_old = NULL; - char *result; - static int first_call = 1; - char *timestamp; - char *error_msg = NULL; - char *s, *r; - int slot = -1; - int scan_result; - - amfree(label); - amfree(tapedev); - if ((scan_result = taper_scan(NULL, &label, ×tamp, &tapedev, CHAR_taperscan_output_callback, &error_msg)) < 0) { - fprintf(stderr, "%s\n", error_msg); - errstr = error_msg; - error_msg = NULL; - amfree(timestamp); - return 0; + search_request.state = state; + search_request.prolong = TRUE; + search_request.errmsg = NULL; + + if (use_threads) { + tape_search = g_thread_create(tape_search_thread, + &search_request, TRUE, NULL); } - amfree(timestamp); - if(error_msg) { - s = error_msg; r = NULL; - while((s=strstr(s,"slot "))) { s += 5; r=s; }; - if(r) { - slot = atoi(r); - } - amfree(error_msg); + cmd = getcmd(&cmdargs); + + switch (cmd) { + case START_TAPER: { + gboolean search_result; + state->driver_start_time = strdup(cmdargs.argv[2]); + if (use_threads) { + search_result = GPOINTER_TO_INT(g_thread_join(tape_search)); + } else { + search_result = + GPOINTER_TO_INT(tape_search_thread(&search_request)); + } + if (search_result) { + putresult(TAPER_OK, "\n"); + } else { + putresult(TAPE_ERROR, "Could not find a tape to use.\n"); + log_add(L_ERROR, "no-tape [%s]", "Could not find a tape to use"); + if (search_request.errmsg != NULL) { + char *c, *c1; + c = c1 = search_request.errmsg; + while (*c != '\0') { + if (*c == '\n') { + *c = '\0'; + log_add(L_WARNING,"%s", c1); + c1 = c+1; + } + c++; + } + if (strlen(c1) > 1 ) + log_add(L_WARNING,"%s", c1); + } + } + amfree(search_request.errmsg); + return TRUE; } - if ((tape_fd = tape_open(tapedev, O_WRONLY)) == -1) { - if (errno == EACCES) { - errstr = newstralloc2(errstr, - "writing label: tape is write protected or I don't have write permission on ", tapedev); - } else { - errstr = newstralloc2(errstr, - "writing label: ", strerror(errno)); - } - return 0; + case QUIT: + search_request.prolong = FALSE; + if (use_threads) { + g_thread_join(tape_search); + } + return send_quitting(state); + default: + error("error [file_reader_side cmd %d argc %d]", cmd, cmdargs.argc); } - tapefd_setinfo_length(tape_fd, tapetype_get_length(tt)); - - tapefd_setinfo_datestamp(tape_fd, taper_timestamp); - tapefd_setinfo_disk(tape_fd, label); - result = tapefd_wrlabel(tape_fd, taper_timestamp, label, tt_blocksize); - if (result != NULL) { - errstr = newstralloc(errstr, result); - return 0; - } + g_assert_not_reached(); + } - /* Output a description of what we just did. A result of '3' from taper_scan - * means that a new tape was found and will be labeled. */ - if (slot > -1) { - fprintf(stderr, _("taper: slot: %d wrote label `%s' date `%s'\n"), slot, label, taper_timestamp); - if (scan_result == 3) - log_add(L_INFO, _("Wrote new label `%s' to new (non-amanda) tape in slot %d"), label, slot); - } else { - fprintf(stderr, _("taper: wrote label `%s' date `%s'\n"), label, taper_timestamp); - if (scan_result == 3) - log_add(L_INFO, _("Wrote new label `%s' to new (non-amanda) tape"), label); - } - fflush(stderr); - - #ifdef HAVE_LIBVTBLC - /* store time for the first volume entry */ - time(&raw_time); - tape_timep = localtime(&raw_time); - strftime(start_datestr, 20, "%T %D", tape_timep); - fprintf(stderr, "taper: got vtbl start time: %s\n", start_datestr); - fflush(stderr); - #endif /* HAVE_LIBVTBLC */ - - if (strcmp(label, FAKE_LABEL) != 0) { - if (cur_tape == 0) { - conf_tapelist_old = stralloc2(conf_tapelist, ".yesterday"); - } else { - char cur_str[NUM_STR_SIZE]; - - snprintf(cur_str, SIZEOF(cur_str), "%d", cur_tape - 1); - conf_tapelist_old = vstralloc(conf_tapelist, - ".today.", cur_str, NULL); - } - - if (write_tapelist(conf_tapelist_old)) { - error("could not write tapelist: %s", strerror(errno)); - /*NOTREACHED*/ - } - amfree(conf_tapelist_old); - - remove_tapelabel(label); - add_tapelabel(taper_timestamp, label); - if (write_tapelist(conf_tapelist)) { - error("could not write tapelist: %s", strerror(errno)); - /*NOTREACHED*/ - } - } + /* In running mode (not startup mode), get a command from driver and + deal with it. */ + static gboolean process_driver_command(taper_state_t * state) { + cmd_t cmd; + struct cmdargs cmdargs; + char * q; - log_add(L_START, "datestamp %s label %s tape %d", - taper_timestamp, label, cur_tape); - if (first_call && strcmp(label, FAKE_LABEL) == 0) { - first_call = 0; - log_add(L_WARNING, "tapedev is %s, dumps will be thrown away", tapedev); + /* This will return QUIT if driver has died. */ + cmd = getcmd(&cmdargs); + switch (cmd) { + case PORT_WRITE: + /* + * PORT-WRITE + * handle + * hostname + * features + * diskname + * level + * datestamp + * splitsize + * split_diskbuffer + */ + process_port_write(state, &cmdargs); + break; + + case FILE_WRITE: + /* + * FILE-WRITE + * handle + * filename + * hostname + * features + * diskname + * level + * datestamp + * splitsize + */ + process_file_write(state, &cmdargs); + break; + + case QUIT: + return send_quitting(state); + default: + if (cmdargs.argc >= 1) { + q = squote(cmdargs.argv[1]); + } else if (cmdargs.argc >= 0) { + q = squote(cmdargs.argv[0]); + } else { + q = stralloc("(no input?)"); + } + putresult(BAD_COMMAND, "%s\n", q); + amfree(q); + break; } - total_tape_used=(off_t)0; - total_tape_fm = 0; - - return 1; + return TRUE; } - /* return 0 on error and set errstr */ - /* return 1 on success */ - int - first_tape( - char *new_datestamp) - { - if ((have_changer = changer_init()) < 0) { - error("changer initialization failed: %s", strerror(errno)); - /*NOTREACHED*/ - } - changer_debug = 1; + int main(int argc, char ** argv) { + char * tapelist_name; + int have_changer; + taper_state_t state; + config_overwrites_t *cfg_ovr = NULL; + char *cfg_opt = NULL; - taper_timestamp = newstralloc(taper_timestamp, new_datestamp); + /* + * Configure program for internationalization: + * 1) Only set the message locale for now. + * 2) Set textdomain for all amanda related programs to "amanda" + * We don't want to be forced to support dozens of message catalogs. + */ + setlocale(LC_MESSAGES, "C"); + textdomain("amanda"); + + safe_fd(-1, 0); + set_pname("taper"); - if (!label_tape()) - return 0; + dbopen("server"); - filenum = 0; - return 1; - } + device_api_init(); + init_taper_state(&state); - int - next_tape( - int writerror) - { - end_tape(writerror); + /* Don't die when child closes pipe */ + signal(SIGPIPE, SIG_IGN); - if (++cur_tape >= runtapes) - return 0; + g_fprintf(stderr, _("%s: pid %ld executable %s version %s\n"), + get_pname(), (long) getpid(), argv[0], version()); + dbprintf(_("%s: pid %ld executable %s version %s\n"), + get_pname(), (long) getpid(), argv[0], version()); - if (!label_tape()) { - return 0; - } + /* Process options */ - filenum = 0; - return 1; - } + cfg_ovr = extract_commandline_config_overwrites(&argc, &argv); + if(argc > 2) { + error("Too many arguments!\n"); + g_assert_not_reached(); + } + if (argc > 1) + cfg_opt = argv[1]; + config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD | CONFIG_INIT_FATAL, + cfg_opt); + apply_config_overwrites(cfg_ovr); - int - end_tape( - int writerror) - { - char *result; - int rc = 0; - - if (tape_fd >= 0) { - log_add(L_INFO, "tape %s kb " OFF_T_FMT " fm %d %s", - label, - (OFF_T_FMT_TYPE)((total_tape_used+(off_t)1023) / (off_t)1024), - total_tape_fm, - writerror? errstr : "[OK]"); - - fprintf(stderr, "taper: writing end marker. [%s %s kb " - OFF_T_FMT " fm %d]\n", label, - writerror? "ERR" : "OK", - (OFF_T_FMT_TYPE)((total_tape_used+(off_t)1023) / (off_t)1024), - total_tape_fm); - fflush(stderr); - if (! writerror) { - if (! write_filemark()) { - rc = 1; - goto common_exit; - } + safe_cd(); - result = tapefd_wrendmark(tape_fd, taper_timestamp, tt_blocksize); - if (result != NULL) { - errstr = newstralloc(errstr, result); - rc = 1; - goto common_exit; - } - } - } + set_logerror(logerror); - #ifdef HAVE_LINUX_ZFTAPE_H - if (tape_fd >= 0 && is_zftape(tapedev) == 1) { - /* rewind the tape */ - - if (tapefd_rewind(tape_fd) == -1 ) { - errstr = newstralloc2(errstr, "rewinding tape: ", strerror(errno)); - rc = 1; - goto common_exit; - } - /* close the tape */ - - if (tapefd_close(tape_fd) == -1) { - errstr = newstralloc2(errstr, "closing tape: ", strerror(errno)); - rc = 1; - goto common_exit; - } - tape_fd = -1; - - #ifdef HAVE_LIBVTBLC - /* update volume table */ - fprintf(stderr, "taper: updating volume table ...\n"); - fflush(stderr); - - if ((tape_fd = raw_tape_open(rawtapedev, O_RDWR)) == -1) { - if (errno == EACCES) { - errstr = newstralloc(errstr, - "updating volume table: tape is write protected"); - } else { - errstr = newstralloc2(errstr, - "updating volume table: ", - strerror(errno)); - } - rc = 1; - goto common_exit; - } - /* read volume table */ - if ((num_volumes = read_vtbl(tape_fd, volumes, vtbl_buffer, - &first_seg, &last_seg)) == -1 ) { - errstr = newstralloc2(errstr, - "reading volume table: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - /* set volume label and date for first entry */ - vtbl_no = 0; - if (set_label(label, volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting label for entry 1: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - /* date of start writing this tape */ - if (set_date(start_datestr, volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting date for entry 1: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - /* set volume labels and dates for backup files */ - for (vtbl_no = 1; vtbl_no <= num_volumes - 2; vtbl_no++) { - fprintf(stderr,"taper: label %i: %s, date %s\n", - vtbl_no, - vtbl_entry[vtbl_no].label, - vtbl_entry[vtbl_no].date); - fflush(stderr); - if (set_label(vtbl_entry[vtbl_no].label, - volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting label for entry i: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - if (set_date(vtbl_entry[vtbl_no].date, - volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting date for entry i: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - } - /* set volume label and date for last entry */ - vtbl_no = num_volumes - 1; - if (set_label("AMANDA Tape End", volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting label for last entry: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - datestr = NULL; /* take current time */ - if (set_date(datestr, volumes, num_volumes, vtbl_no)) { - errstr = newstralloc2(errstr, - "setting date for last entry 1: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - /* write volume table back */ - if (write_vtbl(tape_fd, volumes, vtbl_buffer, num_volumes, first_seg, - op_mode == trunc)) { - errstr = newstralloc2(errstr, - "writing volume table: ", - strerror(errno)); - rc = 1; - goto common_exit; - } - - fprintf(stderr, "taper: updating volume table: done.\n"); - fflush(stderr); - #endif /* HAVE_LIBVTBLC */ - } - #endif /* !HAVE_LINUX_ZFTAPE_H */ + check_running_as(RUNNING_AS_DUMPUSER); - /* close the tape and let the OS write the final filemarks */ + dbrename(config_name, DBG_SUBDIR_SERVER); - common_exit: + tapelist_name = config_dir_relative(getconf_str(CNF_TAPELIST)); - if (tape_fd >= 0 && tapefd_close(tape_fd) == -1 && ! writerror) { - errstr = newstralloc2(errstr, "closing tape: ", strerror(errno)); - rc = 1; + if (read_tapelist(tapelist_name) != 0) { + error("could not load tapelist \"%s\"", tapelist_name); + g_assert_not_reached(); } - tape_fd = -1; - amfree(label); - - return rc; - } + amfree(tapelist_name); + have_changer = changer_init(); + if (have_changer < 0) { + error("changer initialization failed: %s", strerror(errno)); + g_assert_not_reached(); + } - int - write_filemark(void) - { - if (tapefd_weof(tape_fd, (off_t)1) == -1) { - errstr = newstralloc2(errstr, "writing filemark: ", strerror(errno)); - return 0; + state.next_tape_label = NULL; + state.next_tape_device = NULL; + state.cur_tape = 0; + + if (!find_first_tape(&state)) { + return EXIT_SUCCESS; } - total_tape_fm++; - return 1; + + while (process_driver_command(&state)); + return EXIT_SUCCESS; } diff --cc tape-src/Makefile.in index acdcd45,4a0c8ac..3418164 --- a/tape-src/Makefile.in +++ b/tape-src/Makefile.in @@@ -258,10 -443,9 +445,11 @@@ LIBS = @LIBS LIBTHREAD = @LIBTHREAD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ +LL_FMT = @LL_FMT@ +LL_RFMT = @LL_RFMT@ LN_S = @LN_S@ - LTALLOCA = @LTALLOCA@ + LTLIBICONV = @LTLIBICONV@ + LTLIBINTL = @LTLIBINTL@ LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTH = @LTLIBPTH@