From 51c2cfa5006106a716040864f874f90f9ebe1b46 Mon Sep 17 00:00:00 2001 From: Cengiz Karakoyunlu Date: Tue, 10 Jul 2012 22:52:15 -0500 Subject: [PATCH] Updated to OrangeFS 2.8.6 --- ChangeLog | 66 + Makefile.in | 184 +- config.save | 1948 +- configure | 30013 +++++++++++----- configure.in | 381 +- include/pvfs2-hint.h | 28 +- include/pvfs2-types.h | 8 +- include/pvfs2.h | 2 +- maint/config/kernel.m4 | 209 +- maint/config/openssl.m4 | 2 + prepare | 2 +- pvfs2-config.h.in | 141 +- src/apps/admin/pvfs2-ls.c | 6 +- src/apps/admin/pvfs2-migrate-collection.c | 2 +- src/apps/devel/pvfs2-db-display.c | 62 +- src/apps/fuse/pvfs2fuse.c | 6 +- src/apps/kernel/linux/pvfs2-client-core.c | 49 +- src/apps/kernel/linux/pvfs2-client.c | 4 +- src/apps/user/getmattr.c | 19 + src/apps/user/setmattr.c | 19 + src/client/sysint/acache.c | 435 +- src/client/sysint/acache.h | 3 +- src/client/sysint/client-state-machine.c | 5 +- src/client/sysint/client-state-machine.h | 5 +- src/client/sysint/finalize.c | 2 +- src/client/sysint/fs-add.sm | 3 +- src/client/sysint/mgmt-noop.sm | 2 +- src/client/sysint/remove.sm | 31 +- src/client/sysint/server-get-config.sm | 9 +- src/client/sysint/sys-create.sm | 59 +- src/client/sysint/sys-getattr.sm | 44 +- src/client/sysint/sys-io.sm | 17 +- src/client/sysint/sys-lookup.sm | 5 +- src/client/sysint/sys-mkdir.sm | 9 +- src/client/sysint/sys-setattr.sm | 3 +- src/client/usrint/iocommon.c | 1228 +- src/client/usrint/iocommon.h | 189 +- src/client/usrint/openfile-util.c | 932 +- src/client/usrint/openfile-util.h | 39 +- src/client/usrint/posix-pvfs.c | 521 +- src/client/usrint/posix-pvfs.h | 243 +- src/client/usrint/posix.c | 339 +- src/client/usrint/stdio-pvfs.h | 8 +- src/client/usrint/stdio.c | 640 +- src/client/usrint/usrint.h | 168 +- src/common/gen-locks/gen-locks.h | 28 + src/common/misc/digest.c | 2 + src/common/misc/extent-utils.c | 2 +- src/common/misc/msgpairarray.h | 7 +- src/common/misc/pint-cached-config.c | 623 +- src/common/misc/pint-cached-config.h | 10 +- src/common/misc/pint-hint.c | 82 +- src/common/misc/pint-hint.h | 7 +- src/common/misc/pvfs2-util.c | 14 +- src/common/misc/realpath.c | 27 +- src/common/misc/server-config-mgr.c | 6 +- src/common/misc/server-config.c | 108 +- src/common/misc/server-config.h | 14 +- src/common/misc/state-machine-fns.c | 7 +- src/common/statecomp/scanner.l | 1 - src/io/bmi/bmi.c | 40 +- src/io/bmi/bmi_ib/ib.c | 30 +- src/io/bmi/bmi_ib/openib.c | 181 +- src/io/dev/pint-dev.c | 3 +- src/io/job/job-time-mgr.c | 4 +- src/io/job/job.c | 7 +- src/io/trove/trove-dbpf/dbpf-bstream-direct.c | 17 +- src/io/trove/trove-dbpf/dbpf-dspace.c | 13 +- src/io/trove/trove-dbpf/dbpf-op-queue.c | 1 - src/io/trove/trove-dbpf/dbpf-open-cache.c | 10 + .../trove-handle-mgmt/trove-extentlist.c | 4 +- .../trove-handle-mgmt/trove-handle-mgmt.c | 5 +- src/io/trove/trove-mgmt.c | 2 +- src/kernel/linux-2.6/Makefile.in | 1 + src/kernel/linux-2.6/acl.c | 87 +- src/kernel/linux-2.6/devpvfs2-req.c | 7 +- src/kernel/linux-2.6/dir.c | 417 +- src/kernel/linux-2.6/file.c | 201 +- src/kernel/linux-2.6/inode.c | 2 +- src/kernel/linux-2.6/namei.c | 4 +- src/kernel/linux-2.6/pvfs2-bufmap.c | 40 + src/kernel/linux-2.6/pvfs2-bufmap.h | 2 + src/kernel/linux-2.6/pvfs2-kernel.h | 45 + src/kernel/linux-2.6/pvfs2-utils.c | 2 +- src/kernel/linux-2.6/super.c | 2 +- src/kernel/linux-2.6/upcall.h | 1 + src/kernel/linux-2.6/waitqueue.c | 102 +- src/proto/PINT-le-bytefield.c | 5 +- src/proto/PINT-reqproto-encode.c | 2 +- src/proto/pvfs2-attr.h | 2 +- src/proto/pvfs2-req-proto.h | 6 +- src/server/create.sm | 55 +- src/server/final-response.sm | 3 +- src/server/get-attr.sm | 9 +- src/server/list-attr.sm | 8 +- src/server/mkdir.sm | 8 +- src/server/module.mk.in | 1 + src/server/prelude.sm | 3 +- src/server/pvfs2-server.c | 98 +- src/server/pvfs2-server.h | 2 +- src/server/set-attr.sm | 3 +- src/server/statfs.sm | 1 + src/server/tree-communicate.sm | 12 +- src/server/unexpected.sm | 4 +- test/configure | 7249 ++-- test/pvfs2-test-config.h.in | 3 + test/server/showconfig.c | 2 +- 107 files changed, 32335 insertions(+), 15399 deletions(-) diff --git a/ChangeLog b/ChangeLog index 279d445..8b164f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,72 @@ ----------------------- OrangeFS Release ChangeLog ----------------------- + +orangefs-2.8.6 + +* New Feature: users can now specify at configure time how they want the +* kernel module to handle the file pointer when an error occurs. The +* default behavior is to leave the file pointer alone, i.e., the file +* pointer will always represent the position of the last byte written, +* even though the user's entire request is not totally satisfied. In +* this case, a the actual number of bytes written is returned to the user. +* The new feature will change this default behavior such that the file pointer +* is repositioned to the byte just prior to the user's write request, a +* -1 is returned to the user's call, and errno is appropriately set. To +* enable this feature, add --enable-reset-file-pos on the configure +* command line when your OrangeFS system is configured. + +* Bug fix: modified pvfs2_readdir, which is executed by the kernel module +* on behalf of an "ls", to properly retry or quit when pvfs2-client-core +* aborts/restarts or when pvfs2-client terminates. Prior to these +* changes, pvfs2_readdir could possibly corrupt another process's "ls" +* command by releasing access to a shared memory buffer index that may +* be legitimately in use. + +* Bug fix: modified the kernel code to re-post data to the shared memory +* system (for I/O requests) whenever pvfs2-client-core aborts. Because the +* data was not re-posted prior to these changes, the resulting file contained +* corrupted data. + +* New Feature: added hint support to pvfs_open() to allow user to +* provide various things like the number of servers to use, the +* distribution to use, the layout to use, as well as tags that can be +* used to trace requests. + +* New Feature: added new layout LOCAL which puts a file on the server on +* the same node as the client, if there is one. Otherwise defaults to +* ROUND_ROBIN + +* Bug Fix: repaired a bug in the layout processing + +* Bug Fix: fixed some problems with void pointers and replaced a missing +* function prototype + +* Bug Fix: Corrected a long time bug: if the number of unexpected requests +defined in the config file is greater than 64, then the code inadvertently +used invalid job_status_s addresses when calling +server_post_unexpected_recv(). If a failure occurs, the error code in the +status structure is updated with the error value. In this case, the code would +NOT segfault, because the address is actually within valid address space on +the heap; however, the code would be overwriting other global structures, like +the known_method_table, etc. To correct this problem, I use a local +job_status_s structure inside the server_post_unexpected_recv(). Please read +the comments in that function to understand why this works. + SVN: Change #9272 + +* New Feature: added usrint and ucache code allows programs to link +* directly bypassing kernel + +* Bug Fix: rewrote layout algorithms for RANDOM and ROUND_ROBIN which +* did not perform as advertized. Still a question if metadata +* selection works correctly or stuffed file allocation. + +* Enhancement: pvfs2-ls.c - modified the display of handles from 16 characters +to 20 characters. + +* Bug Fix: uninitialized variable could cause seg fault when file system +* cannot be initialized. + orangefs-2.8.5 SVN changes can be seen at diff --git a/Makefile.in b/Makefile.in index 565012e..bebdd0d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,8 @@ # docsclean cleans up documentation files # publish copy over documents to the PVFS.org web pags # admintools builds admin tools -# usertools builds user tools +# usertools builds user tools +# ucachedtools builds ucached tools # kernapps builds userland helper programs for kernel driver # cscope generates information for cscope utility # tags generates tags file for use by editors @@ -64,6 +65,7 @@ mandir = $(DESTDIR)@mandir@ sbindir = $(DESTDIR)@sbindir@ bindir = $(DESTDIR)@bindir@ libdir = $(DESTDIR)@libdir@ +sysconfdir = $(DESTDIR)@sysconfdir@ VPATH = $(srcdir) SHELL = @SHELL@ @@ -82,10 +84,13 @@ BUILD_PORTALS = @BUILD_PORTALS@ BUILD_ZOID = @BUILD_ZOID@ BUILD_VIS = @BUILD_VIS@ BUILD_KARMA = @BUILD_KARMA@ +BUILD_USRINT = @BUILD_USRINT@ +BUILD_UCACHE = @BUILD_UCACHE@ BUILD_FUSE = @BUILD_FUSE@ BUILD_SERVER = @BUILD_SERVER@ BUILD_TAU = @BUILD_TAU@ BUILD_KERNEL = @BUILD_KERNEL@ +ENABLE_SECURITY = @ENABLE_SECURITY@ NEEDS_LIBRT = @NEEDS_LIBRT@ TARGET_OS_DARWIN = @TARGET_OS_DARWIN@ TARGET_OS_LINUX = @TARGET_OS_LINUX@ @@ -122,7 +127,7 @@ build_static = @build_static@ # of a file that has the same name as the target. Listing them # here keeps make from accidentally doing too much work (see GNU # make manual). -.PHONY: all clean develtools dist distclean docs docsclean publish cscope tags codecheck admintools kernapps usertools +.PHONY: all clean develtools dist distclean docs docsclean publish cscope tags codecheck admintools kernapps usertools ucachedtools ################################################################ # Find project subdirectories @@ -158,6 +163,7 @@ INCLUDES := \ src/common/gossip \ src/common/gen-locks \ src/common/events \ + src/common/security \ src/client/usrint \ src/io/trove \ src/io/bmi \ @@ -189,13 +195,15 @@ LDFLAGS += @LDFLAGS@ SERVER_LDFLAGS = -L@BUILD_ABSOLUTE_TOP@/lib SERVER_LDFLAGS += @SERVER_LDFLAGS@ DB_CFLAGS = @DB_CFLAGS@ -LDSHARED = $(CC) -shared +LDSHARED = $(CC) -shared -L@BUILD_ABSOLUTE_TOP@/lib PICFLAGS = -fPIC LIBS += -lpvfs2 @LIBS@ LIBS_THREADED += -lpvfs2-threaded @LIBS@ # need to include external dependency libs when building shared libraries DEPLIBS := @LIBS@ +ULIBDEPLIBS := -lpvfs2 MMAP_RA_CACHE = @MMAP_RA_CACHE@ +RESET_FILE_POS = @RESET_FILE_POS@ TRUSTED_CONNECTIONS = @TRUSTED_CONNECTIONS@ REDHAT_RELEASE = @REDHAT_RELEASE@ NPTL_WORKAROUND = @NPTL_WORKAROUND@ @@ -226,6 +234,9 @@ CFLAGS += $(patsubst %,-I$(builddir)/%,$(GENINCLUDES)) # add package version information CFLAGS += -DPVFS2_VERSION="\"@PVFS2_VERSION@\"" + # make bindir and sysconfdir available to source files +CFLAGS += -DBINDIR='"$(bindir)"' -DSYSCONFDIR='"$(sysconfdir)"' + # always want these gcc flags GCC_CFLAGS := -pipe -Wall -Wstrict-prototypes @@ -240,6 +251,13 @@ ifneq (,$(STRICT_CFLAGS)) #GCC_CFLAGS += -Wcast-qual #GCC_CFLAGS += -Wshadow #GCC_CFLAGS += -Wwrite-strings +else + # these are noisy but come with Wall + # use strict if you want them on + #GCC_CFLAGS += -Wno-unused-value + #GCC_CFLAGS += -Wno-unused-result + #GCC_CFLAGS += -Wno-unused-but-set-variable + #GCC_CFLAGS += -Wno-unused-but-set-parameter endif # Intel cc options, enable all warnings, then disable some @@ -318,12 +336,15 @@ SERVERCFLAGS = @CFLAGS@ -D__GEN_POSIX_LOCKING__ -D__PVFS2_JOB_THREADED__ \ # server side flow protocol connecting BMI with NCAC cache SERVERCFLAGS += -D__STATIC_FLOWPROTO_BMI_CACHE__ -SERVERLIBS = -lpvfs2-server @LIBS@ @DB_LIB@ -lpthread +SERVERLIBS = -lpvfs2-server @LIBS@ @DB_LIB@ ifdef NEEDS_LIBRT SERVERLIBS += -lrt endif +# must be after -lrt because -lrt may use -lpthread +SERVERLIBS += -lpthread + # you can optionally disable thread safety support in the client # though it's not recommended unless *required*. # @@ -414,6 +435,13 @@ ifdef MMAP_RA_CACHE CFLAGS += @MMAP_RA_CACHE@ endif +# reset the file position pointer when a write call encounters errors (kernel only) +# by default, this feature is disabled. Default behavior is to increment the file +# position pointer as bytes are written. +ifdef RESET_FILE_POS +CFLAGS += @RESET_FILE_POS@ +endif + # enable trusted connections (unless disabled by configure) ifdef TRUSTED_CONNECTIONS CFLAGS += @TRUSTED_CONNECTIONS@ @@ -449,8 +477,10 @@ ADMINSRC_SERVER := USERSRC := # LIBSRC is source code for libpvfs2 LIBSRC := -# ULIBSRC is source code for libpvfs2 +# ULIBSRC is source code for libofs ULIBSRC := +# UCACHEDSRC is source code for ucached programs +UCACHEDSRC := # SERVERSRC is souce code for the pvfs2 server SERVERSRC := ifdef BUILD_BMI_ONLY @@ -493,30 +523,38 @@ SERVER := src/server/pvfs2-server endif # LIBRARIES is a list of the pvfs2 client libraries that will be installed -LIBRARIES := -ifdef BUILD_BMI_ONLY -BMILIBRARIES := -endif -LIBRARIES_THREADED := -ifeq ($(build_shared),yes) +LIBRARIES_STATIC := lib/libpvfs2.a lib/liborange.a +LIBRARIES_SHARED := lib/libpvfs2.so lib/liborange.so +LIBRARIES_THREADED_STATIC := lib/libpvfs2-threaded.a +LIBRARIES_THREADED_SHARED := lib/libpvfs2-threaded.so + ifdef BUILD_BMI_ONLY -BMILIBRARIES := lib/libbmi.so +LIBRARIES_STATIC += lib/libbmi.a +LIBRARIES_SHARED += lib/libbmi.so +BMILIBRARIES := lib/libbmi.a lib/libbmi.so endif -LIBRARIES_SHARED = lib/libpvfs2.so lib/libofs.so -LIBRARIES += $(LIBRARIES_SHARED) -LIBRARIES_THREADED_SHARED += lib/libpvfs2-threaded.so lib/libofs-threaded.so -LIBRARIES_THREADED += $(LIBRARIES_THREADED_SHARED) + +ifdef BUILD_USRINT +LIBRARIES_STATIC += lib/libofs.a lib/liborangeposix.a +LIBRARIES_SHARED += lib/libofs.so lib/liborangeposix.so +LIBRARIES_THREADED_STATIC += lib/libofs-threaded.a +LIBRARIES_THREADED_SHARED += lib/libofs-threaded.so endif -ifeq ($(build_static),yes) -ifdef BUILD_BMI_ONLY -BMILIBRARIES += lib/libbmi.a + +ifneq ($(build_static),yes) +LIBRARIES_STATIC := +LIBRARIES_THREADED_STATIC := endif -LIBRARIES_STATIC = lib/libpvfs2.a lib/libofs.a -LIBRARIES += $(LIBRARIES_STATIC) -LIBRARIES_THREADED_STATIC += lib/libpvfs2-threaded.a lib/libofs-threaded.a -LIBRARIES_THREADED += $(LIBRARIES_THREADED_STATIC) + +ifneq ($(build_shared),yes) +LIBRARIES_SHARED := +LIBRARIES_THREADED_SHARED := endif +LIBRARIES_THREADED := $(LIBRARIES_THREADED_STATIC) $(LIBRARIES_THREADED_SHARED) +LIBRARIES := $(LIBRARIES_SHARED) $(LIBRARIES_STATIC) $(LIBRARIES_THREADED) + + ################################################################ # Default target forward pointer, to avoid other targets in make stubs all:: @@ -539,10 +577,16 @@ include $(patsubst %, %/module.mk, $(MODULES)) # LIBOBJS is a list of objects to put in the client lib LIBOBJS := $(patsubst %.c,%.o, $(filter %.c,$(LIBSRC))) +# ULIBOBJS is a list of objects to put in the ofs lib +ULIBOBJS := $(patsubst %.c,%.o, $(filter %.c,$(ULIBSRC))) # LIBPICOBJS are the same, but compiled for use in a shared library LIBPICOBJS := $(patsubst %.c,%.po, $(filter %.c,$(LIBSRC))) +# ULIBPICOBJS are the same, but compiled for use in a shared library +ULIBPICOBJS := $(patsubst %.c,%.po, $(filter %.c,$(ULIBSRC))) # LIBDEPENDS is a list of dependency files for the client lib LIBDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(LIBSRC))) +# ULIBDEPENDS is a list of dependency files for the client lib +ULIBDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(ULIBSRC))) ifdef BUILD_BMI_ONLY # LIBBMIOBJS is a list of objects to put in the bmi lib @@ -557,14 +601,17 @@ endif LIBTHREADEDOBJS := $(patsubst %.c,%-threaded.o, $(filter %.c,$(LIBSRC))) # ULIBTHREADEDOBJS is a list of objects to put in the multithreaded ofs lib ULIBTHREADEDOBJS := $(patsubst %.c,%-threaded.o, $(filter %.c,$(ULIBSRC))) + # LIBTHREADEDPICOBJS are the same, but compiled for use in a shared library LIBTHREADEDPICOBJS := $(patsubst %.c,%-threaded.po, $(filter %.c,$(LIBSRC))) # ULIBTHREADEDPICOBJS are the same, but compiled for use in a shared ofs library ULIBTHREADEDPICOBJS := $(patsubst %.c,%-threaded.po, $(filter %.c,$(ULIBSRC))) + # LIBTHREADEDDEPENDS is a list of dependency files for the multithreaded client lib LIBTHREADEDDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(LIBSRC))) # ULIBTHREADEDDEPENDS is a list of dependency files for the # multithreaded ofs lib ULIBTHREADEDDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(ULIBSRC))) + # ADMINOBJS is a list of admin program objects ADMINOBJS := $(patsubst %.c,%.o, $(filter %.c,$(ADMINSRC))) # ADMINTOOLS is a list of admin program executables @@ -579,6 +626,13 @@ USERTOOLS := $(patsubst %.c,%, $(filter %.c, $(USERSRC))) # USERDEPENDS is a list of dependency files for user programs USERDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(USERSRC))) +# UCACHEDOBJS is a list of ucached program objects +UCACHEDOBJS := $(patsubst %.c,%.o, $(filter %.c,$(UCACHEDSRC))) +# UCACHEDTOOLS is a list of ucached program executables +UCACHEDTOOLS := $(patsubst %.c,%, $(filter %.c, $(UCACHEDSRC))) +# UCACHEDDEPENDS is a list of dependency files for ucached programs +UCACHEDDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(UCACHEDSRC))) + ifdef BUILD_SERVER ADMINOBJS_SERVER := $(patsubst %.c,%.o, $(filter %.c,$(ADMINSRC_SERVER))) ADMINTOOLS_SERVER := $(patsubst %.c,%, $(filter %.c, $(ADMINSRC_SERVER))) @@ -663,10 +717,11 @@ DEVELDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(DEVELSRC))) ifdef BUILD_BMI_ONLY DEPENDS := $(sort $(LIBBMIDEPENDS)) else -DEPENDS := $(sort $(LIBDEPENDS) $(SERVERDEPENDS) $(SERVERBINDEPENDS) \ - $(MISCDEPENDS) $(USERDEPENDS) \ - $(ADMINDEPENDS) $(ADMINDEPENDS_SERVER) $(KERNAPPDEPENDS) $(VISDEPENDS) \ - $(VISMISCDEPENDS) $(KARMADEPENDS) $(STATECOMPDEPS) $(FUSEDEPENDS)) +DEPENDS := $(sort $(LIBDEPENDS) $(SERVERDEPENDS) \ + $(SERVERBINDEPENDS) $(MISCDEPENDS) $(USERDEPENDS) \ + $(ADMINDEPENDS) $(ADMINDEPENDS_SERVER) $(KERNAPPDEPENDS) \ + $(VISDEPENDS) $(VISMISCDEPENDS) $(KARMADEPENDS) \ + $(STATECOMPDEPS) $(FUSEDEPENDS) $(UCACHEDDEPENDS) ) endif #################################################################### @@ -676,7 +731,7 @@ endif ifdef BUILD_BMI_ONLY all:: $(BMILIBRARIES) else -all:: $(SERVER) $(KARMA) $(LIBRARIES) admintools usertools $(VISS) $(KARMA) $(FUSE) +all:: $(SERVER) $(KARMA) $(LIBRARIES) admintools usertools ucachedtools $(VISS) $(KARMA) $(FUSE) endif # target for building admin tools @@ -685,6 +740,9 @@ admintools: $(ADMINTOOLS) $(ADMINTOOLS_SERVER) #target for building user tools usertools: $(USERTOOLS) +# target for building ucached tools +ucachedtools: $(UCACHEDTOOLS) + # target for building kernel driver userland programs kernapps: $(KERNAPPS) $(KERNAPPSTHR) @@ -773,13 +831,13 @@ lib/libpvfs2-threaded.a: $(LIBTHREADEDOBJS) $(E)$(INSTALL) -d lib $(E)ar rcs $@ $(LIBTHREADEDOBJS) -# rule for building the pvfs2 library +# rule for building the shared pvfs2 library lib/libpvfs2.so: $(LIBPICOBJS) $(Q) " LDSO $@" $(E)$(INSTALL) -d lib $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS) $(DEPLIBS) -# rule for building the pvfs2 _multithreaded_ library +# rule for building the shared pvfs2 _multithreaded_ library lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS) $(Q) " LDSO $@" $(E)$(INSTALL) -d lib @@ -797,17 +855,34 @@ lib/libofs-threaded.a: $(ULIBTHREADEDOBJS) $(E)$(INSTALL) -d lib $(E)ar rcs $@ $(ULIBTHREADEDOBJS) -# rule for building the ofs library +# rule for building the shared ofs library lib/libofs.so: $(ULIBPICOBJS) $(Q) " LDSO $@" $(E)$(INSTALL) -d lib - $(E)$(LDSHARED) -Wl,-soname,libofs.so -o $@ $(ULIBPICOBJS) $(DEPLIBS) + $(E)$(LDSHARED) -Wl,-soname,libofs.so -o $@ $(ULIBPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) -# rule for building the ofs _multithreaded_ library +# rule for building the shared ofs _multithreaded_ library lib/libofs-threaded.so: $(ULIBTHREADEDPICOBJS) $(Q) " LDSO $@" $(E)$(INSTALL) -d lib - $(E)$(LDSHARED) -Wl,-soname,libofs-threaded.so -o $@ $(ULIBTHREADEDPICOBJS) $(DEPLIBS) + $(E)$(LDSHARED) -Wl,-soname,libofs-threaded.so -o $@ $(ULIBTHREADEDPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) + +# rules for building virtual libraries +lib/liborange.a: lib/libpvfs2.a + $(Q) " VLIB $@" + $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborange.a + +lib/liborange.so: lib/libpvfs2.so + $(Q) " VLIB $@" + $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborange.so + +lib/liborangeposix.a: lib/libpvfs2.a + $(Q) " VLIB $@" + $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangeposix.a + +lib/liborangeposix.so: lib/libpvfs2.so + $(Q) " VLIB $@" + $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangeposix.so # rule for building the pvfs2 server library lib/libpvfs2-server.a: $(SERVEROBJS) @@ -924,6 +999,8 @@ $(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a $(USERTOOLS): %: %.o $(LIBRARIES) +$(UCACHEDTOOLS): %: %.o $(LIBRARIES) + $(KERNAPPS): %: %.o $(LIBRARIES) $(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED) $(Q) " LD $@" @@ -988,11 +1065,13 @@ clean:: $(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \ $(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\ $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\ - $(USERTOOLS) $(USEROBJS) \ + $(USERTOOLS) $(USEROBJS) \ + $(UCACHEDTOOLS) $(UCACHEDOBJS) \ $(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \ $(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\ $(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \ - $(STATECOMP) $(STATECOMPOBJS) $(LIBBMIOBJS) $(BMILIBRARIES) $(FUSEOBJS) \ + $(STATECOMP) $(STATECOMPOBJS) $(LIBBMIOBJS) \ + $(BMILIBRARIES) $(FUSEOBJS) \ $(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS)\ $(STATECOMP) $(STATECOMPOBJS) \ src/server/pvfs2-server-server.o \ @@ -1042,7 +1121,8 @@ cleaner: clean # except, don't remove generated .c files if this is a distributed release distclean: cleaner docsclean find . -name "module.mk" -exec rm \{\} \; - rm -f Makefile pvfs2-config.h + rm -f Makefile pvfs2-config.h aclocal.m4 + rm -rf lib rm -f src/server/simple.conf rm -f src/apps/admin/pvfs2-config ifndef DIST_RELEASE @@ -1114,8 +1194,8 @@ install_doc: rm -f ${mandir}/man5/*.gz install -m 644 $(srcdir)/doc/man/*.1 $(mandir)/man1 install -m 644 $(srcdir)/doc/man/*.5 $(mandir)/man5 - gzip ${mandir}/man1/* - gzip ${mandir}/man5/* + gzip -f ${mandir}/man1/*.1 + gzip -f ${mandir}/man5/*.5 ifdef BUILD_BMI_ONLY install:: all @@ -1129,9 +1209,11 @@ else install:: all install_doc install -d $(includedir) install -m 644 $(builddir)/include/pvfs2.h $(includedir) + install -m 644 $(srcdir)/include/orange.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-request.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-debug.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-sysint.h $(includedir) + install -m 644 $(srcdir)/include/pvfs2-usrint.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-types.h $(includedir) install -m 644 $(srcdir)/include/pvfs2-util.h $(includedir) @@ -1145,10 +1227,18 @@ ifneq (,$(LIBRARIES_STATIC)) for i in $(notdir $(LIBRARIES_STATIC)) ; do \ install -m 755 lib/$$i $(libdir) ;\ done -ifneq (,$(KERNAPPSTHR)) +ifdef TARGET_OS_DARWIN +# TOC needs to be regenerated in libs after they get moved + ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES_STATIC)) +endif +endif +ifneq (,$(LIBRARIES_THREADED_STATIC)) for i in $(notdir $(LIBRARIES_THREADED_STATIC)) ; do \ install -m 755 lib/$$i $(libdir) ;\ done +ifdef TARGET_OS_DARWIN +# TOC needs to be regenerated in libs after they get moved + ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES_THREADED_STATIC)) endif endif ifneq (,$(LIBRARIES_SHARED)) @@ -1157,23 +1247,21 @@ ifneq (,$(LIBRARIES_SHARED)) $(LN_S) $$i.$(SO_FULLVER) $(libdir)/$$i.$(SO_VER) ;\ $(LN_S) $$i.$(SO_VER) $(libdir)/$$i ;\ done -ifneq (,$(KERNAPPSTHR)) +endif +ifneq (,$(LIBRARIES_THREADED_SHARED)) for i in $(notdir $(LIBRARIES_THREADED_SHARED)) ; do \ install -m 755 lib/$$i $(libdir)/$$i.$(SO_FULLVER) ;\ $(LN_S) $$i.$(SO_FULLVER) $(libdir)/$$i.$(SO_VER) ;\ $(LN_S) $$i.$(SO_VER) $(libdir)/$$i ;\ done endif -endif - -ifdef TARGET_OS_DARWIN -# TOC needs to be regenerated in libs after they get moved - ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES)) -endif install -d $(bindir) install -m 755 $(ADMINTOOLS) $(bindir) install -m 755 $(USERTOOLS) $(bindir) +ifdef BUILD_UCACHE + install -m 755 $(UCACHEDTOOLS) $(sbindir) +endif # for compatibility in case anyone really wants "lsplus" $(LN_S) pvfs2-ls $(bindir)/pvfs2-lsplus install -m 755 src/apps/admin/pvfs2-config $(bindir) @@ -1187,7 +1275,7 @@ ifdef BUILD_KARMA endif ifdef BUILD_FUSE - install -m 755 $(FUSE) $(prefix)/bin + install -m 755 $(FUSE) $(bindir) endif # install any development tools built diff --git a/config.save b/config.save index 1792ff7..be895d8 100755 --- a/config.save +++ b/config.save @@ -7,251 +7,78 @@ debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -259,123 +86,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - +rm -f conf$$ conf$$.exe conf$$.file -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -384,16 +236,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to + +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -401,31 +268,27 @@ generated by GNU Autoconf 2.68. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +config_files=" include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" config_headers=" pvfs2-config.h" ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -433,85 +296,76 @@ $config_files Configuration headers: $config_headers -Report bugs to the package provider." - -ac_cs_config="'--prefix=/home/cengiz/'" +Report bugs to ." ac_cs_version="\ config.status -configured by ./configure, generated by GNU Autoconf 2.68, - with options \"$ac_cs_config\" +configured by ./configure, generated by GNU Autoconf 2.59, + with options \"\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/cengiz/orangefs-osd' -srcdir='.' -INSTALL='/usr/bin/install -c' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. +srcdir=. +INSTALL="/usr/bin/install -c" +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -525,90 +379,77 @@ if $ac_cs_silent; then fi if $ac_cs_recheck; then - set X '/bin/bash' './configure' '--prefix=/home/cengiz/' $ac_configure_extra_args --no-create --no-recursion - shift - $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" + echo "running /bin/bash ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 + exec /bin/bash ./configure $ac_configure_extra_args --no-create --no-recursion fi -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - - -# Handling of arguments. for ac_config_target in $ac_config_targets do - case $ac_config_target in - "pvfs2-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; - "include/pvfs2.h") CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "module.mk") CONFIG_FILES="$CONFIG_FILES module.mk" ;; - "src/apps/admin/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; - "src/apps/admin/pvfs2-config") CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; - "src/apps/devel/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; - "src/apps/karma/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; - "src/apps/vis/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; - "src/apps/fuse/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; - "src/apps/kernel/linux/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; - "src/apps/user/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; - "src/io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; - "src/io/trove/trove-handle-mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; - "src/io/trove/trove-dbpf/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; - "src/common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; - "src/common/quickhash/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; - "src/common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; - "src/common/dotconf/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; - "src/common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; - "src/common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; - "src/common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; - "src/common/llist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; - "src/common/statecomp/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; - "src/common/events/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; - "src/common/mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; - "src/io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; - "src/io/bmi/bmi_tcp/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; - "src/io/bmi/bmi_gm/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; - "src/io/bmi/bmi_mx/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; - "src/io/bmi/bmi_ib/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; - "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; - "src/io/bmi/bmi_portals/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; - "src/io/bmi/bmi_zoid/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; - "src/io/description/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; - "src/io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; - "src/io/flow/flowproto-bmi-trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; - "src/io/flow/flowproto-template/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; - "src/io/flow/flowproto-dump-offsets/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; - "src/io/flow/flowproto-bmi-cache/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; - "src/io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; - "src/io/job/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; - "src/io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; - "src/proto/module.mk") CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; - "src/server/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; - "src/server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; - "src/client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; - "src/client/usrint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; - "src/kernel/linux-2.6/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; - "src/kernel/linux-2.4/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; - "doc/module.mk") CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; - "doc/coding/module.mk") CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; - "doc/design/module.mk") CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; - "doc/random/module.mk") CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; - "examples/pvfs2-server.rc") CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; - "doc/doxygen/pvfs2-doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + case "$ac_config_target" in + # Handling of arguments. + "include/pvfs2.h" ) CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "module.mk" ) CONFIG_FILES="$CONFIG_FILES module.mk" ;; + "src/apps/admin/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; + "src/apps/admin/pvfs2-config" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; + "src/apps/devel/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; + "src/apps/karma/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; + "src/apps/vis/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; + "src/apps/fuse/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; + "src/apps/ucache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; + "src/apps/kernel/linux/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; + "src/apps/user/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; + "src/io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; + "src/io/trove/trove-handle-mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; + "src/io/trove/trove-dbpf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; + "src/common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; + "src/common/quickhash/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; + "src/common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; + "src/common/dotconf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; + "src/common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; + "src/common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; + "src/common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; + "src/common/llist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; + "src/common/statecomp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; + "src/common/events/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; + "src/common/mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; + "src/io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; + "src/io/bmi/bmi_tcp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; + "src/io/bmi/bmi_gm/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; + "src/io/bmi/bmi_mx/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; + "src/io/bmi/bmi_ib/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; + "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; + "src/io/bmi/bmi_portals/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; + "src/io/bmi/bmi_zoid/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; + "src/io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; + "src/io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; + "src/io/flow/flowproto-bmi-trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; + "src/io/flow/flowproto-template/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; + "src/io/flow/flowproto-dump-offsets/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; + "src/io/flow/flowproto-bmi-cache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; + "src/io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; + "src/io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; + "src/io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; + "src/proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; + "src/server/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; + "src/server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; + "src/client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; + "src/client/usrint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; + "src/kernel/linux-2.6/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; + "src/kernel/linux-2.4/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; + "doc/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; + "doc/coding/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; + "doc/design/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; + "doc/random/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; + "examples/pvfs2-server.rc" ) CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; + "doc/doxygen/pvfs2-doxygen.conf" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; + "pvfs2-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -619,569 +460,718 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["LTLIBOBJS"]="" -S["LIBOBJS"]="" -S["VISLIBS"]="" -S["VISCFLAGS"]="" -S["BUILD_VIS"]="" -S["GOSSIP_ENABLE_BACKTRACE"]="1" -S["SERVER_LDFLAGS"]=" -rdynamic" -S["ZOID_SRCDIR"]="" -S["BUILD_ZOID"]="" -S["PORTALS_LIBS"]="" -S["PORTALS_INCS"]="" -S["BUILD_PORTALS"]="" -S["OPENIB_LIBDIR"]="" -S["OPENIB_INCDIR"]="" -S["BUILD_OPENIB"]="" -S["IB_LIBDIR"]="" -S["IB_INCDIR"]="" -S["BUILD_IB"]="" -S["MX_LIBDIR"]="" -S["MX_INCDIR"]="" -S["BUILD_MX"]="" -S["GM_LIBDIR"]="" -S["GM_INCDIR"]="" -S["BUILD_GM"]="" -S["BUILD_BMI_TCP"]="1" -S["TARGET_OS_LINUX"]="1" -S["TARGET_OS_DARWIN"]="" -S["NEEDS_LIBRT"]="1" -S["DB_LIB"]="-ldb" -S["DB_CFLAGS"]="" -S["GNUC"]="1" -S["INTELC"]="" -S["build_shared"]="no" -S["PVFS2_SEGV_BACKTRACE"]="1" -S["BUILD_EPOLL"]="1" -S["QUIET_COMPILE"]="1" -S["STRICT_CFLAGS"]="" -S["ENABLE_COVERAGE"]="" -S["BUILD_FUSE"]="" -S["FUSE_CFLAGS"]="" -S["FUSE_LDFLAGS"]="" -S["SRC_ABSOLUTE_TOP"]="/home/cengiz/orangefs-osd" -S["SRC_RELATIVE_TOP"]="./" -S["BUILD_ABSOLUTE_TOP"]="/home/cengiz/orangefs-osd" -S["LINUX24_KERNEL_MINOR_VER"]="" -S["LINUX24_KERNEL_SRC"]="" -S["LINUX_KERNEL_SRC"]="" -S["THREADED_KMOD_HELPER"]="" -S["BUILD_KERNEL"]="" -S["BUILD_TAU"]="" -S["TAU_INCS"]="" -S["MISC_TROVE_FLAGS"]="-D__PVFS2_TROVE_AIO_THREADED__" -S["NPTL_WORKAROUND"]="" -S["REDHAT_RELEASE"]="" -S["build_static"]="yes" -S["BUILD_KARMA"]="" -S["GTKCFLAGS"]="" -S["GTKLIBS"]="" -S["HAVE_PKGCONFIG"]="yes" -S["TRUSTED_CONNECTIONS"]="" -S["MMAP_RA_CACHE"]="" -S["NEED_BERKELEY_DB"]="yes" -S["BUILD_BMI_ONLY"]="" -S["BUILD_SERVER"]="1" -S["THREAD_LIB"]="-lpthread" -S["LIBCFLAGS"]=" -D__GEN_POSIX_LOCKING__" -S["BUILD_LDFLAGS"]="" -S["BUILD_CFLAGS"]="" -S["BUILD_CC"]="gcc" -S["HAVE_FLEX"]="yes" -S["HAVE_BISON"]="yes" -S["HAVE_FIND"]="yes" -S["HAVE_PERL"]="yes" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["EGREP"]="/bin/grep -E" -S["GREP"]="/bin/grep" -S["CPP"]="gcc -E" -S["OBJEXT"]="o" -S["EXEEXT"]="" -S["ac_ct_CC"]="gcc" -S["CPPFLAGS"]="" -S["LDFLAGS"]=" -rdynamic" -S["CFLAGS"]=" -g -O2" -S["CC"]="gcc" -S["host_os"]="linux-gnu" -S["host_vendor"]="unknown" -S["host_cpu"]="x86_64" -S["host"]="x86_64-unknown-linux-gnu" -S["build_os"]="linux-gnu" -S["build_vendor"]="unknown" -S["build_cpu"]="x86_64" -S["build"]="x86_64-unknown-linux-gnu" -S["PVFS2_VERSION_RELEASE"]="orangefs" -S["PVFS2_VERSION_SUB"]="5" -S["PVFS2_VERSION_MINOR"]="8" -S["PVFS2_VERSION_MAJOR"]="2" -S["PVFS2_VERSION"]="2.8.5-orangefs" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]=" -lcrypto -lssl" -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/home/cengiz" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="" -S["PACKAGE_STRING"]="" -S["PACKAGE_VERSION"]="" -S["PACKAGE_TARNAME"]="" -S["PACKAGE_NAME"]="" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || { - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"\"" -D["PACKAGE_TARNAME"]=" \"\"" -D["PACKAGE_VERSION"]=" \"\"" -D["PACKAGE_STRING"]=" \"\"" -D["PACKAGE_BUGREPORT"]=" \"\"" -D["PACKAGE_URL"]=" \"\"" -D["PVFS2_VERSION_MAJOR"]=" 2" -D["PVFS2_VERSION_MINOR"]=" 8" -D["PVFS2_VERSION_SUB"]=" 5" -D["STDC_HEADERS"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_MEMORY_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_GETPWUID"]=" 1" -D["HAVE_SYS_VFS_H"]=" 1" -D["HAVE_SYS_MOUNT_H"]=" 1" -D["HAVE_FSTAB_H"]=" 1" -D["HAVE_STDARG_H"]=" 1" -D["HAVE_SYS_XATTR_H"]=" 1" -D["SIZEOF_LONG_INT"]=" 8" -D["WITH_OPENSSL"]=" 1" -D["HAVE_OPENSSL_EVP_H"]=" 1" -D["HAVE_OPENSSL_CRYPTO_H"]=" 1" -D["HAVE_AIOCB_ERROR_CODE"]=" 1" -D["HAVE_AIOCB_RETURN_VALUE"]=" 1" -D["SIZEOF_VOID_P"]=" 8" -D["HAVE_SYS_EPOLL_H"]=" 1" -D["HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK"]=" 1" -D["HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK"]=" 1" -D["HAVE_TXNID_PARAMETER_TO_DB_STAT"]=" 1" -D["HAVE_TXNID_PARAMETER_TO_DB_OPEN"]=" 1" -D["HAVE_DB_DIRTY_READ"]=" 1" -D["HAVE_DB_BUFFER_SMALL"]=" 1" -D["HAVE_DB_GET_PAGESIZE"]=" 1" -D["TARGET_OS_LINUX"]=" 1" -D["HAVE_NETDB_H"]=" 1" -D["HAVE_ARPA_INET_H"]=" 1" -D["HAVE_SYS_SOCKET_H"]=" 1" -D["HAVE_GETHOSTBYNAME"]=" 1" -D["HAVE_GETHOSTBYADDR"]=" 1" -D["HAVE_SYSINFO"]=" 1" -D["HAVE_STRNLEN"]=" 1" -D["HAVE_STRTOULL"]=" 1" -D["HAVE_STRSTR"]=" 1" -D["HAVE_FGETXATTR"]=" 1" -D["HAVE_FSETXATTR"]=" 1" -D["HAVE_FGETXATTR_PROTOTYPE"]=" 1" -D["HAVE_GETMNTENT"]=" 1" -D["HAVE_MALLOC_H"]=" 1" -D["HAVE_MNTENT_H"]=" 1" -D["HAVE_EXECINFO_H"]=" 1" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } } -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done +# +# CONFIG_FILES section. +# - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF +s,@SHELL@,/bin/bash,;t t +s,@PATH_SEPARATOR@,:,;t t +s,@PACKAGE_NAME@,,;t t +s,@PACKAGE_TARNAME@,,;t t +s,@PACKAGE_VERSION@,,;t t +s,@PACKAGE_STRING@,,;t t +s,@PACKAGE_BUGREPORT@,,;t t +s,@exec_prefix@,${prefix},;t t +s,@prefix@,/usr/local,;t t +s,@program_transform_name@,s,x,x,,;t t +s,@bindir@,${exec_prefix}/bin,;t t +s,@sbindir@,${exec_prefix}/sbin,;t t +s,@libexecdir@,${exec_prefix}/libexec,;t t +s,@datadir@,${prefix}/share,;t t +s,@sysconfdir@,${prefix}/etc,;t t +s,@sharedstatedir@,${prefix}/com,;t t +s,@localstatedir@,${prefix}/var,;t t +s,@libdir@,${exec_prefix}/lib,;t t +s,@includedir@,${prefix}/include,;t t +s,@oldincludedir@,/usr/include,;t t +s,@infodir@,${prefix}/info,;t t +s,@mandir@,${prefix}/man,;t t +s,@build_alias@,,;t t +s,@host_alias@,,;t t +s,@target_alias@,,;t t +s,@DEFS@,-DHAVE_CONFIG_H,;t t +s,@ECHO_C@,,;t t +s,@ECHO_N@,-n,;t t +s,@ECHO_T@,,;t t +s,@LIBS@, -lcrypto -lssl -ldl,;t t +s,@PVFS2_VERSION@,2.8.6-orangefs-2012-07-03-162939,;t t +s,@PVFS2_VERSION_MAJOR@,2,;t t +s,@PVFS2_VERSION_MINOR@,8,;t t +s,@PVFS2_VERSION_SUB@,6,;t t +s,@build@,x86_64-unknown-linux-gnu,;t t +s,@build_cpu@,x86_64,;t t +s,@build_vendor@,unknown,;t t +s,@build_os@,linux-gnu,;t t +s,@host@,x86_64-unknown-linux-gnu,;t t +s,@host_cpu@,x86_64,;t t +s,@host_vendor@,unknown,;t t +s,@host_os@,linux-gnu,;t t +s,@CC@,gcc,;t t +s,@CFLAGS@, -g -O2,;t t +s,@LDFLAGS@, -rdynamic,;t t +s,@CPPFLAGS@,,;t t +s,@ac_ct_CC@,gcc,;t t +s,@EXEEXT@,,;t t +s,@OBJEXT@,o,;t t +s,@CPP@,gcc -E,;t t +s,@EGREP@,grep -E,;t t +s,@INSTALL_PROGRAM@,${INSTALL},;t t +s,@INSTALL_SCRIPT@,${INSTALL},;t t +s,@INSTALL_DATA@,${INSTALL} -m 644,;t t +s,@HAVE_PERL@,yes,;t t +s,@HAVE_FIND@,yes,;t t +s,@HAVE_BISON@,yes,;t t +s,@HAVE_FLEX@,yes,;t t +s,@BUILD_CC@,gcc,;t t +s,@BUILD_CFLAGS@,,;t t +s,@BUILD_LDFLAGS@,,;t t +s,@LIBCFLAGS@, -D__GEN_POSIX_LOCKING__,;t t +s,@THREAD_LIB@,-lpthread,;t t +s,@BUILD_SERVER@,1,;t t +s,@BUILD_BMI_ONLY@,,;t t +s,@NEED_BERKELEY_DB@,yes,;t t +s,@MMAP_RA_CACHE@,,;t t +s,@RESET_FILE_POS@,,;t t +s,@TRUSTED_CONNECTIONS@,,;t t +s,@HAVE_PKGCONFIG@,yes,;t t +s,@GTKLIBS@,,;t t +s,@GTKCFLAGS@,,;t t +s,@BUILD_KARMA@,,;t t +s,@build_static@,yes,;t t +s,@REDHAT_RELEASE@,,;t t +s,@NPTL_WORKAROUND@,,;t t +s,@MISC_TROVE_FLAGS@,-D__PVFS2_TROVE_AIO_THREADED__,;t t +s,@TAU_INCS@,,;t t +s,@BUILD_TAU@,,;t t +s,@BUILD_KERNEL@,,;t t +s,@THREADED_KMOD_HELPER@,,;t t +s,@LINUX_KERNEL_SRC@,,;t t +s,@LINUX24_KERNEL_SRC@,,;t t +s,@LINUX24_KERNEL_MINOR_VER@,,;t t +s,@BUILD_ABSOLUTE_TOP@,/usr/src/orangefsosd-2.8.6,;t t +s,@SRC_RELATIVE_TOP@,./,;t t +s,@SRC_ABSOLUTE_TOP@,/usr/src/orangefsosd-2.8.6,;t t +s,@FUSE_LDFLAGS@,,;t t +s,@FUSE_CFLAGS@,,;t t +s,@BUILD_FUSE@,,;t t +s,@ENABLE_COVERAGE@,,;t t +s,@STRICT_CFLAGS@,,;t t +s,@QUIET_COMPILE@,1,;t t +s,@BUILD_EPOLL@,1,;t t +s,@PVFS2_SEGV_BACKTRACE@,1,;t t +s,@build_shared@,no,;t t +s,@BUILD_USRINT@,1,;t t +s,@BUILDUSRINT@,,;t t +s,@BUILD_UCACHE@,,;t t +s,@BUILD_ACL_INTERFACE@,0,;t t +s,@INTELC@,,;t t +s,@GNUC@,1,;t t +s,@DB_CFLAGS@,,;t t +s,@DB_LIB@,-ldb,;t t +s,@NEEDS_LIBRT@,1,;t t +s,@TARGET_OS_DARWIN@,,;t t +s,@TARGET_OS_LINUX@,1,;t t +s,@BUILD_BMI_TCP@,1,;t t +s,@BUILD_GM@,,;t t +s,@GM_INCDIR@,,;t t +s,@GM_LIBDIR@,,;t t +s,@BUILD_MX@,,;t t +s,@MX_INCDIR@,,;t t +s,@MX_LIBDIR@,,;t t +s,@BUILD_IB@,,;t t +s,@IB_INCDIR@,,;t t +s,@IB_LIBDIR@,,;t t +s,@BUILD_OPENIB@,,;t t +s,@OPENIB_INCDIR@,,;t t +s,@OPENIB_LIBDIR@,,;t t +s,@BUILD_PORTALS@,,;t t +s,@PORTALS_INCS@,,;t t +s,@PORTALS_LIBS@,,;t t +s,@BUILD_ZOID@,,;t t +s,@ZOID_SRCDIR@,,;t t +s,@SERVER_LDFLAGS@, -rdynamic,;t t +s,@GOSSIP_ENABLE_BACKTRACE@,1,;t t +s,@BUILD_VIS@,,;t t +s,@VISCFLAGS@,,;t t +s,@VISLIBS@,,;t t +s,@LIBOBJS@,,;t t +s,@LTLIBOBJS@,,;t t +CEOF + + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + sed "/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; } :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi + mv $tmp/out $ac_file else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + cat $tmp/out + rm -f $tmp/out fi - ;; +done +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac -done # for ac_tag + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + + # Handle all the #define templates only if necessary. + if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then + # If there are no defines, we may have an empty if/fi + : + cat >$tmp/defines.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + cat >$tmp/defines.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + fi # grep + + # Handle all the #undef templates + cat >$tmp/undefs.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + cat >$tmp/undefs.sed <$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done -as_fn_exit 0 +{ (exit 0); exit 0; } diff --git a/configure b/configure index 9159a5b..e0ba23e 100755 --- a/configure +++ b/configure @@ -1,423 +1,81 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# +# Generated by GNU Autoconf 2.59. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_unset $as_var fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error +done -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi -as_me=`$as_basename -- "$0" || +# Name of the executable. +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -425,107 +83,146 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + as_expr=false fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -534,25 +231,38 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -test -n "$DJDIR" || exec 7<&0 &1 +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= @@ -560,251 +270,51 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= -PACKAGE_URL= ac_unique_file="include/pvfs2-types.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='LTLIBOBJS -LIBOBJS -VISLIBS -VISCFLAGS -BUILD_VIS -GOSSIP_ENABLE_BACKTRACE -SERVER_LDFLAGS -ZOID_SRCDIR -BUILD_ZOID -PORTALS_LIBS -PORTALS_INCS -BUILD_PORTALS -OPENIB_LIBDIR -OPENIB_INCDIR -BUILD_OPENIB -IB_LIBDIR -IB_INCDIR -BUILD_IB -MX_LIBDIR -MX_INCDIR -BUILD_MX -GM_LIBDIR -GM_INCDIR -BUILD_GM -BUILD_BMI_TCP -TARGET_OS_LINUX -TARGET_OS_DARWIN -NEEDS_LIBRT -DB_LIB -DB_CFLAGS -GNUC -INTELC -build_shared -PVFS2_SEGV_BACKTRACE -BUILD_EPOLL -QUIET_COMPILE -STRICT_CFLAGS -ENABLE_COVERAGE -BUILD_FUSE -FUSE_CFLAGS -FUSE_LDFLAGS -SRC_ABSOLUTE_TOP -SRC_RELATIVE_TOP -BUILD_ABSOLUTE_TOP -LINUX24_KERNEL_MINOR_VER -LINUX24_KERNEL_SRC -LINUX_KERNEL_SRC -THREADED_KMOD_HELPER -BUILD_KERNEL -BUILD_TAU -TAU_INCS -MISC_TROVE_FLAGS -NPTL_WORKAROUND -REDHAT_RELEASE -build_static -BUILD_KARMA -GTKCFLAGS -GTKLIBS -HAVE_PKGCONFIG -TRUSTED_CONNECTIONS -MMAP_RA_CACHE -NEED_BERKELEY_DB -BUILD_BMI_ONLY -BUILD_SERVER -THREAD_LIB -LIBCFLAGS -BUILD_LDFLAGS -BUILD_CFLAGS -BUILD_CC -HAVE_FLEX -HAVE_BISON -HAVE_FIND -HAVE_PERL -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -PVFS2_VERSION_RELEASE -PVFS2_VERSION_SUB -PVFS2_VERSION_MINOR -PVFS2_VERSION_MAJOR -PVFS2_VERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PVFS2_VERSION PVFS2_VERSION_MAJOR PVFS2_VERSION_MINOR PVFS2_VERSION_SUB build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX BUILD_CC BUILD_CFLAGS BUILD_LDFLAGS LIBCFLAGS THREAD_LIB BUILD_SERVER BUILD_BMI_ONLY NEED_BERKELEY_DB MMAP_RA_CACHE RESET_FILE_POS TRUSTED_CONNECTIONS HAVE_PKGCONFIG GTKLIBS GTKCFLAGS BUILD_KARMA build_static REDHAT_RELEASE NPTL_WORKAROUND MISC_TROVE_FLAGS TAU_INCS BUILD_TAU BUILD_KERNEL THREADED_KMOD_HELPER LINUX_KERNEL_SRC LINUX24_KERNEL_SRC LINUX24_KERNEL_MINOR_VER BUILD_ABSOLUTE_TOP SRC_RELATIVE_TOP SRC_ABSOLUTE_TOP FUSE_LDFLAGS FUSE_CFLAGS BUILD_FUSE ENABLE_COVERAGE STRICT_CFLAGS QUIET_COMPILE BUILD_EPOLL PVFS2_SEGV_BACKTRACE build_shared BUILD_USRINT BUILDUSRINT BUILD_UCACHE BUILD_ACL_INTERFACE INTELC GNUC DB_CFLAGS DB_LIB NEEDS_LIBRT TARGET_OS_DARWIN TARGET_OS_LINUX BUILD_BMI_TCP BUILD_GM GM_INCDIR GM_LIBDIR BUILD_MX MX_INCDIR MX_LIBDIR BUILD_IB IB_INCDIR IB_LIBDIR BUILD_OPENIB OPENIB_INCDIR OPENIB_LIBDIR BUILD_PORTALS PORTALS_INCS PORTALS_LIBS BUILD_ZOID ZOID_SRCDIR SERVER_LDFLAGS GOSSIP_ENABLE_BACKTRACE BUILD_VIS VISCFLAGS VISLIBS LIBOBJS LTLIBOBJS' ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_thread_safety -enable_server -with_openssl -enable_karma_mem_usage_stats -enable_bmi_only -enable_perf_counters -enable_mmap_racache -enable_trusted_connections -enable_karma -enable_static -enable_redhat24 -enable_nptl_workaround -enable_aio_threaded_callbacks -with_mtrace -with_berkdb_debug -with_tau -with_kernel -with_kernel24 -enable_kernel_aio -enable_kernel_sendfile -enable_threaded_kmod_helper -enable_fast -enable_fuse -enable_strict -enable_verbose_build -enable_epoll -enable_segv_backtrace -enable_shared -with_efence -with_valgrind -with_db -with_bmi_tcp -with_gm -with_gm_includes -with_gm_libs -with_mx -with_mx_includes -with_mx_libs -with_ib -with_ib_includes -with_ib_libs -with_openib -with_openib_includes -with_openib_libs -with_portals -with_portals_includes -with_portals_libs -with_zoid -enable_static_server -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -827,49 +337,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -891,59 +386,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval enable_$ac_useropt=\$ac_optarg ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -970,12 +439,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -1000,16 +463,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -1074,16 +534,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1134,36 +584,26 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; esac - eval with_$ac_useropt=\$ac_optarg ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1183,26 +623,27 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac @@ -1210,36 +651,31 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var - # Remove trailing slashes. + eval ac_val=$`echo $ac_var` case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - # Be sure to have absolute directory names. +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1253,8 +689,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1266,72 +702,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1354,17 +792,20 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1374,25 +815,18 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1408,7 +842,6 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-thread-safety Disables thread safety in the client library @@ -1419,6 +852,7 @@ Optional Features: --disable-perf-counters Disables pvfs2-server performance counters --enable-mmap-racache **EXPERIMENTAL** Enables mmap-readahead in kernel interface + --enable-reset-file-pos Resets file position pointer in kernel interface upon error --enable-trusted-connections **EXPERIMENTAL** Enable connects only from trusted hosts/ports @@ -1447,13 +881,18 @@ Optional Features: --disable-segv-backtrace Disables back traces in segfault signal handler --enable-shared Build shared client library + --disable-usrint Do not build posix and stdio user libraries + --enable-usrint-kmount Assume FS is mounted via kernel + --disable-usrint-cwd Do not enable user interface CWD support + --enable-ucache Do not enable user user interface data cache. --enable-static-server Builds the server static + --enable-visual Enable visualisation tools. (Disabled by default, requires SDL) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openssl= Build with openssl (default=/usr) - --without-openssl Don't build with openssl. + --without-openssl Don't build with openssl. --with-mtrace Use mtrace (must set MALLOC_TRACE to output file) --with-berkdb-debug Use berkeley db error reporting (if detected). --with-tau=path Use TAU trace library installed in "path" @@ -1492,660 +931,158 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to the package provider. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## + $ $0 $@ -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () +_ACEOF { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -} # ac_fn_c_try_compile +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +_ASUNAME -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - 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 - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* 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 $2 (); -/* 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_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done } >&5 @@ -2167,6 +1104,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -2177,13 +1115,13 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2199,115 +1137,104 @@ do -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -2315,137 +1242,112 @@ cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } + . "$ac_site_file" fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2455,45 +1357,58 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + ac_aux_dir= -for ac_dir in maint/config "$srcdir"/maint/config; do - if test -f "$ac_dir/install-sh"; then +for ac_dir in maint/config $srcdir/maint/config; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in maint/config \"$srcdir\"/maint/config" "$LINENO" 5 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint/config $srcdir/maint/config" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in maint/config $srcdir/maint/config" >&2;} + { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"` PVFS2_VERSION_MAJOR=2 PVFS2_VERSION_MINOR=8 -PVFS2_VERSION_SUB=5 -PVFS2_VERSION_RELEASE="orangefs" +PVFS2_VERSION_SUB=6 +#PVFS2_VERSION_RELEASE="orangefs" #PVFS2_PRE="" -#PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" +PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" -PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE +PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE$PVFS2_VERSION_PRE cat >>confdefs.h <<_ACEOF @@ -2514,78 +1429,61 @@ _ACEOF - +#AC_SUBST(PVFS2_VERSION_RELEASE) # Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -2594,7 +1492,7 @@ if test "x$USR_CFLAGS" = "x"; then USR_CFLAGS_SET=no fi -ac_config_headers="$ac_config_headers pvfs2-config.h" + ac_config_headers="$ac_config_headers pvfs2-config.h" ac_ext=c @@ -2605,10 +1503,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2618,37 +1516,35 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 +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. @@ -2658,50 +1554,39 @@ 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 + 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="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2711,37 +1596,77 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2752,19 +1677,18 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2782,25 +1706,24 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2810,41 +1733,39 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 +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. @@ -2854,78 +1775,66 @@ 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 + 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="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done -IFS=$as_save_IFS +done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -cat confdefs.h - <<_ACEOF >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. */ int @@ -2937,108 +1846,112 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } + ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (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 + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3046,90 +1959,38 @@ $as_echo "$ac_try_echo"; } >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -3141,46 +2002,45 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; +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 + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - $as_echo "$as_me: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 +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_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat confdefs.h - <<_ACEOF >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. */ int @@ -3194,49 +2054,55 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_compiler_gnu=yes else - ac_compiler_gnu=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3247,34 +2113,39 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +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_prog_cc_g=yes else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_prog_cc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3290,14 +2161,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >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. */ #include #include @@ -3325,17 +2200,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3350,37 +2220,205 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + 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_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&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" ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +# 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' @@ -3393,15 +2431,15 @@ 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +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 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3415,7 +2453,11 @@ do # 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 confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -3424,34 +2466,78 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 - # Broken: fails on valid input. + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >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. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 # 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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then break fi @@ -3463,8 +2549,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3474,7 +2560,11 @@ do # 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 confdefs.h - <<_ACEOF >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. */ #ifdef __STDC__ # include @@ -3483,40 +2573,85 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 + : else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >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. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +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 # 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 fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c @@ -3526,142 +2661,31 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - 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 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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 - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 +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 $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 - if test -z "$EGREP"; then - 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 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_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 - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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 + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' 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 - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 +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 - cat confdefs.h - <<_ACEOF >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. */ #include #include @@ -3676,23 +2700,51 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +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_stdc=yes else - ac_cv_header_stdc=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 confdefs.h - <<_ACEOF >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. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3702,14 +2754,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >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. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -3719,13 +2775,16 @@ 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 : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >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. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3745,1178 +2804,5189 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (0); } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +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 - ac_cv_header_stdc=no + 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 core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } +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 -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done -ac_fn_c_check_header_mongrel "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" -if test "x$ac_cv_header_pwd_h" = xyes; then : -$as_echo "#define HAVE_GETPWUID 1" >>confdefs.h -fi -ac_fn_c_check_header_mongrel "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_vfs_h" = xyes; then : -$as_echo "#define HAVE_SYS_VFS_H 1" >>confdefs.h +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.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. */ +$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 + eval "$as_ac_Header=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 +fi -ac_fn_c_check_header_mongrel "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mount_h" = xyes; then : +done -$as_echo "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h +if test "${ac_cv_header_pwd_h+set}" = set; then + echo "$as_me:$LINENO: checking for pwd.h" >&5 +echo $ECHO_N "checking for pwd.h... $ECHO_C" >&6 +if test "${ac_cv_header_pwd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi +echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 +echo "${ECHO_T}$ac_cv_header_pwd_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking pwd.h usability" >&5 +echo $ECHO_N "checking pwd.h 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 +_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 - -for ac_header in mntent.h, fstab.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +# Is the header present? +echo "$as_me:$LINENO: checking pwd.h presence" >&5 +echo $ECHO_N "checking pwd.h 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 +_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 -done +# 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: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: pwd.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: pwd.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pwd.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pwd.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: pwd.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pwd.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: pwd.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: pwd.h: 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 pwd.h" >&5 +echo $ECHO_N "checking for pwd.h... $ECHO_C" >&6 +if test "${ac_cv_header_pwd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pwd_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 +echo "${ECHO_T}$ac_cv_header_pwd_h" >&6 +fi +if test $ac_cv_header_pwd_h = yes; then -for ac_header in stdarg.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdarg.h" "ac_cv_header_stdarg_h" "$ac_includes_default" -if test "x$ac_cv_header_stdarg_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDARG_H 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_PWD_H 1 _ACEOF fi -done +if test "${ac_cv_header_features_h+set}" = set; then + echo "$as_me:$LINENO: checking for features.h" >&5 +echo $ECHO_N "checking for features.h... $ECHO_C" >&6 +if test "${ac_cv_header_features_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 +echo "${ECHO_T}$ac_cv_header_features_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking features.h usability" >&5 +echo $ECHO_N "checking features.h 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 +_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 -for ac_header in attr/xattr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_attr_xattr_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ATTR_XATTR_H 1 +# Is the header present? +echo "$as_me:$LINENO: checking features.h presence" >&5 +echo $ECHO_N "checking features.h 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 +_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 -done +# 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: features.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: features.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: features.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: features.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: features.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: features.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: features.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: features.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: features.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: features.h: 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 features.h" >&5 +echo $ECHO_N "checking for features.h... $ECHO_C" >&6 +if test "${ac_cv_header_features_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_features_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 +echo "${ECHO_T}$ac_cv_header_features_h" >&6 -for ac_header in sys/xattr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_xattr_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_XATTR_H 1 +fi +if test $ac_cv_header_features_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FEATURES_H 1 _ACEOF fi -done - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 -$as_echo_n "checking size of long int... " >&6; } -if ${ac_cv_sizeof_long_int+:} false; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_header_fstab_h+set}" = set; then + echo "$as_me:$LINENO: checking for fstab.h" >&5 +echo $ECHO_N "checking for fstab.h... $ECHO_C" >&6 +if test "${ac_cv_header_fstab_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 +echo "${ECHO_T}$ac_cv_header_fstab_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking fstab.h usability" >&5 +echo $ECHO_N "checking fstab.h 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 +_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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : + 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 fstab.h presence" >&5 +echo $ECHO_N "checking fstab.h 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 +_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 - if test "$ac_cv_type_long_int" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long int) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_int=0 - fi + 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5 -$as_echo "$ac_cv_sizeof_long_int" >&6; } +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: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: fstab.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: fstab.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: fstab.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: fstab.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: fstab.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: fstab.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: fstab.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: fstab.h: 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 fstab.h" >&5 +echo $ECHO_N "checking for fstab.h... $ECHO_C" >&6 +if test "${ac_cv_header_fstab_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_fstab_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 +echo "${ECHO_T}$ac_cv_header_fstab_h" >&6 +fi +if test $ac_cv_header_fstab_h = yes; then -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSTAB_H 1 _ACEOF +fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo "$as_me:$LINENO: checking for malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir + # Is the header compilable? +echo "$as_me:$LINENO: checking malloc.h usability" >&5 +echo $ECHO_N "checking malloc.h 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 +_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 - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install +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 malloc.h presence" >&5 +echo $ECHO_N "checking malloc.h 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 +_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 - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL 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. - INSTALL=$ac_install_sh + ac_cpp_err= fi +else + ac_cpp_err=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +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 -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + 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 -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 -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. +# 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: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: malloc.h: 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 malloc.h" >&5 +echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 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_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - + ac_cv_header_malloc_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 + fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test $ac_cv_header_malloc_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC_H 1 +_ACEOF + fi +if test "${ac_cv_header_memory_h+set}" = set; then + echo "$as_me:$LINENO: checking for memory.h" >&5 +echo $ECHO_N "checking for memory.h... $ECHO_C" >&6 +if test "${ac_cv_header_memory_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 +echo "${ECHO_T}$ac_cv_header_memory_h" >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking memory.h usability" >&5 +echo $ECHO_N "checking memory.h 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 +_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 -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_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -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 - if test "x$ac_ct_CC" = x; then - CC="" +# Is the header present? +echo "$as_me:$LINENO: checking memory.h presence" >&5 +echo $ECHO_N "checking memory.h 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 +_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 - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC + ac_cpp_err= fi else - CC="$ac_cv_prog_CC" + ac_cpp_err=yes fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes 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_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +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: memory.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: memory.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: memory.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: memory.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: memory.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: memory.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: memory.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: memory.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: memory.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: memory.h: 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 memory.h" >&5 +echo $ECHO_N "checking for memory.h... $ECHO_C" >&6 +if test "${ac_cv_header_memory_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_memory_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 +echo "${ECHO_T}$ac_cv_header_memory_h" >&6 +fi +if test $ac_cv_header_memory_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MEMORY_H 1 +_ACEOF - fi fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 + + +if test "${ac_cv_header_mntent_h+set}" = set; then + echo "$as_me:$LINENO: checking for mntent.h" >&5 +echo $ECHO_N "checking for mntent.h... $ECHO_C" >&6 +if test "${ac_cv_header_mntent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 +echo "${ECHO_T}$ac_cv_header_mntent_h" >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking mntent.h usability" >&5 +echo $ECHO_N "checking mntent.h 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 +_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 - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi +ac_header_compiler=no fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +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 mntent.h presence" >&5 +echo $ECHO_N "checking mntent.h 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 +_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +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: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: mntent.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: mntent.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: mntent.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: mntent.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: mntent.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: mntent.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: mntent.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: mntent.h: 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 mntent.h" >&5 +echo $ECHO_N "checking for mntent.h... $ECHO_C" >&6 +if test "${ac_cv_header_mntent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_mntent_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 +echo "${ECHO_T}$ac_cv_header_mntent_h" >&6 + fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test $ac_cv_header_mntent_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MNTENT_H 1 +_ACEOF + fi - test -n "$CC" && break - done +if test "${ac_cv_header_netdb_h+set}" = set; then + echo "$as_me:$LINENO: checking for netdb.h" >&5 +echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 +if test "${ac_cv_header_netdb_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 +echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking netdb.h usability" >&5 +echo $ECHO_N "checking netdb.h 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 +_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 -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_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +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 netdb.h presence" >&5 +echo $ECHO_N "checking netdb.h 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 +_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; +# 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: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: netdb.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: netdb.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: netdb.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: netdb.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: netdb.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: netdb.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: netdb.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: netdb.h: 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 - CC=$ac_ct_CC - fi +echo "$as_me:$LINENO: checking for netdb.h" >&5 +echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 +if test "${ac_cv_header_netdb_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_netdb_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 +echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 fi +if test $ac_cv_header_netdb_h = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_NETDB_H 1 +_ACEOF -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_header_stdarg_h+set}" = set; then + echo "$as_me:$LINENO: checking for stdarg.h" >&5 +echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdarg_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking stdarg.h usability" >&5 +echo $ECHO_N "checking stdarg.h 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 +_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 -int -main () -{ -#ifndef __GNUC__ - choke me -#endif +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 - ; - return 0; -} +# Is the header present? +echo "$as_me:$LINENO: checking stdarg.h presence" >&5 +echo $ECHO_N "checking stdarg.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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_compiler_gnu=no + ac_cpp_err=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes +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: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: stdarg.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: stdarg.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: stdarg.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: stdarg.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: stdarg.h: 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 stdarg.h" >&5 +echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdarg_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - GCC= + ac_cv_header_stdarg_h=$ac_header_preproc fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 -int -main () -{ +fi +if test $ac_cv_header_stdarg_h = yes; then - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDARG_H 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes + +fi + + +if test "${ac_cv_header_stdint_h+set}" = set; then + echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdint_h" >&6 else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking stdint.h usability" >&5 +echo $ECHO_N "checking stdint.h 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 +_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 -int -main () -{ +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 - ; - return 0; -} +# Is the header present? +echo "$as_me:$LINENO: checking stdint.h presence" >&5 +echo $ECHO_N "checking stdint.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: stdint.h: 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 stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_cv_header_stdint_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdint_h" >&6 -int -main () -{ +fi +if test $ac_cv_header_stdint_h = yes; then - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDINT_H 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h 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 +_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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" +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 stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h 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 +_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 - CFLAGS="-g" + ac_cpp_err= fi else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi + ac_cpp_err=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&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: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: stdlib.h: 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 -if test "x$ac_cv_prog_cc_c89" != xno; then : - +echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_stdlib_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 -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 +fi +if test $ac_cv_header_stdlib_h = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for required gcc" >&5 -$as_echo_n "checking for required gcc... " >&6; } -if test "x$GCC" = "x"; then - as_fn_error $? "no" "$LINENO" 5 fi -CFLAGS=$USR_CFLAGS -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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= +if test "${ac_cv_header_strings_h+set}" = set; then + echo "$as_me:$LINENO: checking for strings.h" >&5 +echo $ECHO_N "checking for strings.h... $ECHO_C" >&6 +if test "${ac_cv_header_strings_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 +echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 +echo "${ECHO_T}$ac_cv_header_strings_h" >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_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 confdefs.h - <<_ACEOF >conftest.$ac_ext + # Is the header compilable? +echo "$as_me:$LINENO: checking strings.h usability" >&5 +echo $ECHO_N "checking strings.h 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. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +$ac_includes_default +#include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 - # Broken: fails on valid input. -continue + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +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 - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking strings.h presence" >&5 +echo $ECHO_N "checking strings.h 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 +#include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +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 - # Passes both tests. -ac_preproc_ok=: -break + ac_cpp_err=yes fi -rm -f conftest.err conftest.i conftest.$ac_ext +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 -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break + 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 - done - ac_cv_prog_CPP=$CPP +# 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: strings.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: strings.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: strings.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: strings.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: strings.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: strings.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: strings.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: strings.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: strings.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: strings.h: 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 strings.h" >&5 +echo $ECHO_N "checking for strings.h... $ECHO_C" >&6 +if test "${ac_cv_header_strings_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_strings_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 +echo "${ECHO_T}$ac_cv_header_strings_h" >&6 fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP +if test $ac_cv_header_strings_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRINGS_H 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_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 confdefs.h - <<_ACEOF >conftest.$ac_ext + + +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +echo $ECHO_N "checking stdlib.h 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. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +$ac_includes_default +#include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +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 - # Broken: fails on valid input. -continue + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +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 - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +echo $ECHO_N "checking stdlib.h 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 +#include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +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 - # Passes both tests. -ac_preproc_ok=: -break + ac_cpp_err=yes fi -rm -f conftest.err conftest.i conftest.$ac_ext +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 -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + 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: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: stdlib.h: 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 stdlib.h" >&5 +echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + ac_cv_header_stdlib_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 -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 +fi +if test $ac_cv_header_stdlib_h = yes; then -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_PERL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_PERL"; then - ac_cv_prog_HAVE_PERL="$HAVE_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_HAVE_PERL="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF - test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" -fi -fi -HAVE_PERL=$ac_cv_prog_HAVE_PERL -if test -n "$HAVE_PERL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PERL" >&5 -$as_echo "$HAVE_PERL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -if test $HAVE_PERL = "no"; then - as_fn_error $? "\"perl required in PATH to complete build\"" "$LINENO" 5 -fi -# Extract the first word of "find", so it can be a program name with args. -set dummy find; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_FIND+:} false; then : - $as_echo_n "(cached) " >&6 +if test "${ac_cv_header_linux_types_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/types.h" >&5 +echo $ECHO_N "checking for linux/types.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_types_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_types_h" >&6 else - if test -n "$HAVE_FIND"; then - ac_cv_prog_HAVE_FIND="$HAVE_FIND" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/types.h usability" >&5 +echo $ECHO_N "checking linux/types.h 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 +_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 -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_HAVE_FIND="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" +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 linux/types.h presence" >&5 +echo $ECHO_N "checking linux/types.h 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 +_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 -HAVE_FIND=$ac_cv_prog_HAVE_FIND -if test -n "$HAVE_FIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_FIND" >&5 -$as_echo "$HAVE_FIND" >&6; } +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/types.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/types.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/types.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/types.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/types.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/types.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/types.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/types.h: 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 linux/types.h" >&5 +echo $ECHO_N "checking for linux/types.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_types_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_types_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_types_h" >&6 -if test $HAVE_FIND = "no"; then - as_fn_error $? "\"find required in PATH complete build\"" "$LINENO" 5 fi +if test $ac_cv_header_linux_types_h = yes; then -# Extract the first word of "bison", so it can be a program name with args. -set dummy bison; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_BISON+:} false; then : - $as_echo_n "(cached) " >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX_TYPES_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/malloc.h" >&5 +echo $ECHO_N "checking for linux/malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_malloc_h" >&6 else - if test -n "$HAVE_BISON"; then - ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/malloc.h usability" >&5 +echo $ECHO_N "checking linux/malloc.h 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 +_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 -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_HAVE_BISON="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" +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 linux/malloc.h presence" >&5 +echo $ECHO_N "checking linux/malloc.h 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 +_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 -HAVE_BISON=$ac_cv_prog_HAVE_BISON -if test -n "$HAVE_BISON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_BISON" >&5 -$as_echo "$HAVE_BISON" >&6; } +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: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/malloc.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/malloc.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/malloc.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/malloc.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/malloc.h: 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 linux/malloc.h" >&5 +echo $ECHO_N "checking for linux/malloc.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_linux_malloc_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_malloc_h" >&6 +fi +if test $ac_cv_header_linux_malloc_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX_MALLOC_H 1 +_ACEOF -if test $HAVE_BISON = "no"; then - as_fn_error $? "\"bison required in PATH to complete build\"" "$LINENO" 5 fi -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_FLEX+:} false; then : - $as_echo_n "(cached) " >&6 + + + +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/vfs.h" >&5 +echo $ECHO_N "checking for sys/vfs.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_vfs_h" >&6 else - if test -n "$HAVE_FLEX"; then - ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test. + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/vfs.h usability" >&5 +echo $ECHO_N "checking sys/vfs.h 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 +_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 -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_HAVE_FLEX="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" +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 sys/vfs.h presence" >&5 +echo $ECHO_N "checking sys/vfs.h 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 +_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 -HAVE_FLEX=$ac_cv_prog_HAVE_FLEX -if test -n "$HAVE_FLEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_FLEX" >&5 -$as_echo "$HAVE_FLEX" >&6; } +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: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/vfs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/vfs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/vfs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/vfs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/vfs.h: 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 sys/vfs.h" >&5 +echo $ECHO_N "checking for sys/vfs.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_sys_vfs_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_vfs_h" >&6 +fi +if test $ac_cv_header_sys_vfs_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_VFS_H 1 +_ACEOF -if test $HAVE_FLEX = "no"; then - as_fn_error $? "\"flex required in PATH to complete build\"" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for required Math::BigInt perl module" >&5 -$as_echo_n "checking for required Math::BigInt perl module... " >&6; } -perl -e "use Math::BigInt" 2>&1 > /dev/null -if test $? != 0; then - as_fn_error $? "no" "$LINENO" 5 + +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/mount.h" >&5 +echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/mount.h usability" >&5 +echo $ECHO_N "checking sys/mount.h 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 +_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + 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 -if test $host != $build; then - for ac_prog in gcc cc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_BUILD_CC+:} false; then : - $as_echo_n "(cached) " >&6 +# Is the header present? +echo "$as_me:$LINENO: checking sys/mount.h presence" >&5 +echo $ECHO_N "checking sys/mount.h 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 +_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 - if test -n "$BUILD_CC"; then - ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes 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_BUILD_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -fi -BUILD_CC=$ac_cv_prog_BUILD_CC -if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } +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: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/mount.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/mount.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/mount.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/mount.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/mount.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/mount.h: 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 sys/mount.h" >&5 +echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_sys_mount_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 +fi +if test $ac_cv_header_sys_mount_h = yes; then - test -n "$BUILD_CC" && break -done +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_MOUNT_H 1 +_ACEOF -else - BUILD_CC=$CC - BUILD_CFLAGS=$BUILD_CFLAGS - BUILD_LDFLAGS=$BUILD_LDFLAGS fi +if test "${ac_cv_header_sys_stat_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/stat.h" >&5 +echo $ECHO_N "checking for sys/stat.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_stat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_stat_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/stat.h usability" >&5 +echo $ECHO_N "checking sys/stat.h 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 +_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 sys/stat.h presence" >&5 +echo $ECHO_N "checking sys/stat.h 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 +_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 -# -# Threading options. -# -# Client - thread-safe or not -# --disable-thread-safety : chooses null or posix locking mechanism -# For applications that know they are not multi-threaded, or choose -# to handle locking themselves, this configure option can be used to -# slightly decrease library-induced latency by removing the locking. -# -# Client - job threading -# libpvfs2-threaded.{so,a} with __PVFS2_JOB_THREADED__ + 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: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/stat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/stat.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/stat.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/stat.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/stat.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/stat.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/stat.h: 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 sys/stat.h" >&5 +echo $ECHO_N "checking for sys/stat.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_stat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_stat_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_stat_h" >&6 + +fi +if test $ac_cv_header_sys_stat_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_STAT_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_sys_types_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/types.h" >&5 +echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_types_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/types.h usability" >&5 +echo $ECHO_N "checking sys/types.h 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 +_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 sys/types.h presence" >&5 +echo $ECHO_N "checking sys/types.h 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 +_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: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/types.h: 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 sys/types.h" >&5 +echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_types_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_types_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 + +fi +if test $ac_cv_header_sys_types_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_TYPES_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_sys_socket_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/socket.h" >&5 +echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_socket_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/socket.h usability" >&5 +echo $ECHO_N "checking sys/socket.h 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 +_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 sys/socket.h presence" >&5 +echo $ECHO_N "checking sys/socket.h 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 +_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: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/socket.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/socket.h: 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 sys/socket.h" >&5 +echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_socket_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_socket_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 + +fi +if test $ac_cv_header_sys_socket_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/sendfile.h" >&5 +echo $ECHO_N "checking for sys/sendfile.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sendfile_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/sendfile.h usability" >&5 +echo $ECHO_N "checking sys/sendfile.h 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 +_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 sys/sendfile.h presence" >&5 +echo $ECHO_N "checking sys/sendfile.h 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 +_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: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sendfile.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sendfile.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/sendfile.h: 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 sys/sendfile.h" >&5 +echo $ECHO_N "checking for sys/sendfile.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_sendfile_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sendfile_h" >&6 + +fi +if test $ac_cv_header_sys_sendfile_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SENDFILE_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/xattr.h" >&5 +echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/xattr.h usability" >&5 +echo $ECHO_N "checking sys/xattr.h 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 +_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 sys/xattr.h presence" >&5 +echo $ECHO_N "checking sys/xattr.h 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 +_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: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/xattr.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/xattr.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/xattr.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/xattr.h: 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 sys/xattr.h" >&5 +echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_xattr_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6 + +fi +if test $ac_cv_header_sys_xattr_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_XATTR_H 1 +_ACEOF + +fi + + + +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 +echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 +echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 +echo $ECHO_N "checking arpa/inet.h 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 +_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 arpa/inet.h presence" >&5 +echo $ECHO_N "checking arpa/inet.h 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 +_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: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: arpa/inet.h: 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 arpa/inet.h" >&5 +echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_arpa_inet_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 +echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 + +fi +if test $ac_cv_header_arpa_inet_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ARPA_INET_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + echo "$as_me:$LINENO: checking for attr/xattr.h" >&5 +echo $ECHO_N "checking for attr/xattr.h... $ECHO_C" >&6 +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 +echo "${ECHO_T}$ac_cv_header_attr_xattr_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking attr/xattr.h usability" >&5 +echo $ECHO_N "checking attr/xattr.h 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 +_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 attr/xattr.h presence" >&5 +echo $ECHO_N "checking attr/xattr.h 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 +_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: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: attr/xattr.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: attr/xattr.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: attr/xattr.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: attr/xattr.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: attr/xattr.h: 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 attr/xattr.h" >&5 +echo $ECHO_N "checking for attr/xattr.h... $ECHO_C" >&6 +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_attr_xattr_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 +echo "${ECHO_T}$ac_cv_header_attr_xattr_h" >&6 + +fi +if test $ac_cv_header_attr_xattr_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATTR_XATTR_H 1 +_ACEOF + +fi + + + +echo "$as_me:$LINENO: checking for long int" >&5 +echo $ECHO_N "checking for long int... $ECHO_C" >&6 +if test "${ac_cv_type_long_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. */ +$ac_includes_default +int +main () +{ +if ((long int *) 0) + return 0; +if (sizeof (long int)) + 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_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_int=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_int" >&6 + +echo "$as_me:$LINENO: checking size of long int" >&5 +echo $ECHO_N "checking size of long int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long_int" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= 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_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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; +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=$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 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long int))) < 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)]; +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_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 + +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` + 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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; +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=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 +long longval () { return (long) (sizeof (long int)); } +unsigned long ulongval () { return (long) (sizeof (long int)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long int))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long int)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long int)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + 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_sizeof_long_int=`cat conftest.val` +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 ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long int), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long_int=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +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 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$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_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + 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 "gcc", so it can be a program name with args. +set dummy gcc; 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="gcc" + 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 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$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_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + 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 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +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 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + 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 "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + 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_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$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_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + 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 + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +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_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="$ac_prog" + 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 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&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_c_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 () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + 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_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+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 () +{ + + ; + 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_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +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 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + 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_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +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 ;; + *) + 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" ;; +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' +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:$LINENO: checking for required gcc" >&5 +echo $ECHO_N "checking for required gcc... $ECHO_C" >&6 +if test "x$GCC" = "x"; then + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +fi + +CFLAGS=$USR_CFLAGS + +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:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_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 { (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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent 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 { (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 + # 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 +fi +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 + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_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 { (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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent 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 { (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 + # 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 +fi +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 \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (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 + +# 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_HAVE_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_PERL"; then + ac_cv_prog_HAVE_PERL="$HAVE_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_PERL="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" +fi +fi +HAVE_PERL=$ac_cv_prog_HAVE_PERL +if test -n "$HAVE_PERL"; then + echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 +echo "${ECHO_T}$HAVE_PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test $HAVE_PERL = "no"; then + { { echo "$as_me:$LINENO: error: \"perl required in PATH to complete build\"" >&5 +echo "$as_me: error: \"perl required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "find", so it can be a program name with args. +set dummy find; 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_HAVE_FIND+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_FIND"; then + ac_cv_prog_HAVE_FIND="$HAVE_FIND" # 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_HAVE_FIND="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" +fi +fi +HAVE_FIND=$ac_cv_prog_HAVE_FIND +if test -n "$HAVE_FIND"; then + echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 +echo "${ECHO_T}$HAVE_FIND" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test $HAVE_FIND = "no"; then + { { echo "$as_me:$LINENO: error: \"find required in PATH complete build\"" >&5 +echo "$as_me: error: \"find required in PATH complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "bison", so it can be a program name with args. +set dummy bison; 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_HAVE_BISON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_BISON"; then + ac_cv_prog_HAVE_BISON="$HAVE_BISON" # 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_HAVE_BISON="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" +fi +fi +HAVE_BISON=$ac_cv_prog_HAVE_BISON +if test -n "$HAVE_BISON"; then + echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 +echo "${ECHO_T}$HAVE_BISON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test $HAVE_BISON = "no"; then + { { echo "$as_me:$LINENO: error: \"bison required in PATH to complete build\"" >&5 +echo "$as_me: error: \"bison required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; 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_HAVE_FLEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_FLEX"; then + ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # 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_HAVE_FLEX="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" +fi +fi +HAVE_FLEX=$ac_cv_prog_HAVE_FLEX +if test -n "$HAVE_FLEX"; then + echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 +echo "${ECHO_T}$HAVE_FLEX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test $HAVE_FLEX = "no"; then + { { echo "$as_me:$LINENO: error: \"flex required in PATH to complete build\"" >&5 +echo "$as_me: error: \"flex required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking for required Math::BigInt perl module" >&5 +echo $ECHO_N "checking for required Math::BigInt perl module... $ECHO_C" >&6 +perl -e "use Math::BigInt" 2>&1 > /dev/null +if test $? != 0; then + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi + +if test $host != $build; then + for ac_prog in gcc cc +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_BUILD_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_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_BUILD_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +echo "${ECHO_T}$BUILD_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$BUILD_CC" && break +done + +else + BUILD_CC=$CC + BUILD_CFLAGS=$BUILD_CFLAGS + BUILD_LDFLAGS=$BUILD_LDFLAGS +fi + + + + + +# +# Threading options. +# +# Client - thread-safe or not +# --disable-thread-safety : chooses null or posix locking mechanism +# For applications that know they are not multi-threaded, or choose +# to handle locking themselves, this configure option can be used to +# slightly decrease library-induced latency by removing the locking. +# +# Client - job threading +# libpvfs2-threaded.{so,a} with __PVFS2_JOB_THREADED__ # This option causes the client library to spawn an extra thread # to handle network communications. In this way, it is possible # that the library can handle new and completed requests from @@ -4958,966 +8028,5431 @@ fi # enabled, the shared library takes precedence. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for client library thread safety support" >&5 -$as_echo_n "checking for client library thread safety support... " >&6; } -# Check whether --enable-thread-safety was given. -if test "${enable_thread_safety+set}" = set; then : - enableval=$enable_thread_safety; if test "x$enableval" = "xno" ; then - LIBCFLAGS="$LIBCFLAGS -D__GEN_NULL_LOCKING__" - THREAD_LIB="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +echo "$as_me:$LINENO: checking for client library thread safety support" >&5 +echo $ECHO_N "checking for client library thread safety support... $ECHO_C" >&6 +# Check whether --enable-thread-safety or --disable-thread-safety was given. +if test "${enable_thread_safety+set}" = set; then + enableval="$enable_thread_safety" + if test "x$enableval" = "xno" ; then + LIBCFLAGS="$LIBCFLAGS -D__GEN_NULL_LOCKING__" + THREAD_LIB="" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +else + LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__" + THREAD_LIB="-lpthread" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi; + + + + +# Check whether --enable-server or --disable-server was given. +if test "${enable_server+set}" = set; then + enableval="$enable_server" + if test "x$enableval" = "xyes" ; then + BUILD_SERVER=1 + NEED_BERKELEY_DB=yes +else + BUILD_SERVER="" +fi +else + BUILD_SERVER=1 + NEED_BERKELEY_DB=yes +fi; + + + +# Check whether --with-openssl or --without-openssl was given. +if test "${with_openssl+set}" = set; then + withval="$with_openssl" + + opensslpath=${withval} + + if test "x${withval}" != "xno"; then + + echo "$as_me:$LINENO: checking for openssl library" >&5 +echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 + + if test "x${opensslpath}" != "x"; then + CFLAGS="${CFLAGS} -I${opensslpath}/include" + LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" + SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" + fi + LIBS="$LIBS -lcrypto -lssl" + + cat >conftest.$ac_ext <<_ACEOF +#include "openssl/bio.h" +_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 + +{ { echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 +echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} + { (exit 1); exit 1; }; } +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. */ +#include "openssl/bio.h" +int +main () +{ +BIO * b; + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: could not find openssl libs" >&5 +echo "$as_me: error: could not find openssl libs" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +cat >>confdefs.h <<\_ACEOF +#define WITH_OPENSSL 1 +_ACEOF + + + +for ac_header in openssl/evp.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 + + +for ac_header in openssl/crypto.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 + + +for ac_header in openssl/sha.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 + + fi + +else + + echo "$as_me:$LINENO: checking for openssl library" >&5 +echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 + TMPLIBS=${LIBS} + LIBS="$LIBS -lcrypto -lssl" + + cat >conftest.$ac_ext <<_ACEOF +#include "openssl/bio.h" +_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 + +{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +echo "$as_me: WARNING: No openssl headers found." >&2;} +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. */ +#include "openssl/bio.h" +int +main () +{ +BIO * b; + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define WITH_OPENSSL 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +echo "$as_me: WARNING: No openssl headers found." >&2;} + LIBS=${TMPLIBS} + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +for ac_header in openssl/evp.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 + + +for ac_header in openssl/crypto.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 + + +for ac_header in openssl/sha.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 + + + +fi; + + +# Check whether --enable-karma-mem-usage-stats or --disable-karma-mem-usage-stats was given. +if test "${enable_karma_mem_usage_stats+set}" = set; then + enableval="$enable_karma_mem_usage_stats" + if test "x$enableval" = "xno" ; then + CFLAGS="$CFLAGS -D__KARMA_DISABLE_MEM_USAGE__" +fi + +fi; + +# Check whether --enable-bmi-only or --disable-bmi-only was given. +if test "${enable_bmi_only+set}" = set; then + enableval="$enable_bmi_only" + if test "x$enableval" = "xyes" ; then + BUILD_BMI_ONLY=1 +fi + +fi; + + +if test "x$BUILD_BMI_ONLY" = "x1"; then + BUILD_SERVER="" + NEED_BERKELEY_DB=no + + +fi + +# Check whether --enable-perf-counters or --disable-perf-counters was given. +if test "${enable_perf_counters+set}" = set; then + enableval="$enable_perf_counters" + if test "x$enableval" = "xno" ; then + CFLAGS="$CFLAGS -D__PVFS2_DISABLE_PERF_COUNTERS__" +fi + +fi; + +MMAP_RA_CACHE="" +# Check whether --enable-mmap-racache or --disable-mmap-racache was given. +if test "${enable_mmap_racache+set}" = set; then + enableval="$enable_mmap_racache" + if test "x$enableval" = "xyes" ; then +MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE" +fi + +fi; + + +RESET_FILE_POS="" +# Check whether --enable-reset-file-pos or --disable-reset-file-pos was given. +if test "${enable_reset_file_pos+set}" = set; then + enableval="$enable_reset_file_pos" + if test "x$enableval" = "xyes" ; then +RESET_FILE_POS="-DRESET_FILE_POS" +fi + +fi; + + + +# Check whether --enable-trusted-connections or --disable-trusted-connections was given. +if test "${enable_trusted_connections+set}" = set; then + enableval="$enable_trusted_connections" + if test "x$enableval" = "xyes"; then +TRUSTED_CONNECTIONS="-DUSE_TRUSTED" +fi +fi; + + + +test_for_karma() +{ + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_HAVE_PKGCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_PKGCONFIG"; then + ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # 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_HAVE_PKGCONFIG="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" +fi +fi +HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG +if test -n "$HAVE_PKGCONFIG"; then + echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 +echo "${ECHO_T}$HAVE_PKGCONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "x$HAVE_PKGCONFIG" = "xyes" ; then + echo "$as_me:$LINENO: checking for gtk2.0 (for karma gui)" >&5 +echo $ECHO_N "checking for gtk2.0 (for karma gui)... $ECHO_C" >&6 + if `pkg-config --exists gtk+-2.0` ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + GTKLIBS=`pkg-config --libs gtk+-2.0` + GTKCFLAGS=`pkg-config --cflags gtk+-2.0` + + + + BUILD_KARMA="1" + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + fi +} + +# Check whether --enable-karma or --disable-karma was given. +if test "${enable_karma+set}" = set; then + enableval="$enable_karma" + if test "x$enableval" = "xyes" ; then + test_for_karma + fi + +else + test_for_karma + +fi; + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + build_static=$enableval +else + build_static=yes +fi; + + + + +set_redhat24=0 +use_redhat24=0 + +# Check whether --enable-redhat24 or --disable-redhat24 was given. +if test "${enable_redhat24+set}" = set; then + enableval="$enable_redhat24" + set_redhat24=1 + if test "$enableval" = no ; then + use_redhat24=0 + else + use_redhat24=1 + fi + +fi; + + +set_nptl_workaround=0 +use_nptl_workaround=0 + +# Check whether --enable-nptl-workaround or --disable-nptl-workaround was given. +if test "${enable_nptl_workaround+set}" = set; then + enableval="$enable_nptl_workaround" + set_nptl_workaround=1 + if test "$enableval" = no ; then + use_nptl_workaround=0 + else + use_nptl_workaround=1 + fi + +fi; + +RHTAG1="Red Hat Linux release 9" +RHTAG2="Red Hat Enterprise Linux WS release 3" +RHTAG3="Red Hat Enterprise Linux AS release 3" +RHTAG4="Red Hat Enterprise Linux ES release 3" +RHTAG5="Red Hat Linux Advanced Server release 2.1AS" +RHTAG6="Fedora Core release 1 (Yarrow)" + + + +REDHAT_RELEASE="" +if test -f /etc/redhat-release; then + echo "$as_me:$LINENO: checking for tagged Redhat releases (must patch)" >&5 +echo $ECHO_N "checking for tagged Redhat releases (must patch)... $ECHO_C" >&6 + REDHAT_REL=`cat /etc/redhat-release` + if test "x`echo $REDHAT_REL | cut -b 1-23`" = "x$RHTAG1" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG2" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG3" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG4" || + test "x`echo $REDHAT_REL | cut -b 1-43`" = "x$RHTAG5" || + test "x`echo $REDHAT_REL | cut -b 1-30`" = "x$RHTAG6" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + if test "$set_redhat24" = 0 || test "$set_nptl_workaround" = 0 ; then + { { echo "$as_me:$LINENO: error: + You appear to be configuring PVFS2 on a RedHat distribution that + likely ships with a heavily modified kernel and c library. You must + specify two configure arguments to provide necessary information before + proceeding. First pick one of these two options: + ============================= + --enable-redhat24 (if you are using a redhat provided 2.4 kernel) + --disable-redhat24 (if you are using a stock kernel.org kernel) + ============================= + Also pick one of the next two options. You should probably enable the + workaround if you are using RedHat EL 3 prior to update 2. Otherwise it + is probably safer (and higher performance) to disable it: + ============================= + --enable-nptl-workaround (to work around buggy glibc pthread library) + --disable-nptl-workaround (if you trust your glibc pthread library) + ============================= " >&5 +echo "$as_me: error: + You appear to be configuring PVFS2 on a RedHat distribution that + likely ships with a heavily modified kernel and c library. You must + specify two configure arguments to provide necessary information before + proceeding. First pick one of these two options: + ============================= + --enable-redhat24 (if you are using a redhat provided 2.4 kernel) + --disable-redhat24 (if you are using a stock kernel.org kernel) + ============================= + Also pick one of the next two options. You should probably enable the + workaround if you are using RedHat EL 3 prior to update 2. Otherwise it + is probably safer (and higher performance) to disable it: + ============================= + --enable-nptl-workaround (to work around buggy glibc pthread library) + --disable-nptl-workaround (if you trust your glibc pthread library) + ============================= " >&2;} + { (exit 1); exit 1; }; } + fi + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +fi + + +if test "$use_redhat24" = 1 ; then + REDHAT_RELEASE="-DREDHAT_RELEASE_9" +fi + + +if test "$use_nptl_workaround" = 1 ; then + NPTL_WORKAROUND="1" +fi + + +use_aio_thcb=1 +# Check whether --enable-aio-threaded-callbacks or --disable-aio-threaded-callbacks was given. +if test "${enable_aio_threaded_callbacks+set}" = set; then + enableval="$enable_aio_threaded_callbacks" + if test "$enableval" = no ; then use_aio_thcb=0 ; fi +fi; + + +MISC_TROVE_FLAGS="" +if test $use_aio_thcb = 1 ; then + MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__" +fi + + +echo "$as_me:$LINENO: checking for __error_code field in aiocb struct" >&5 +echo $ECHO_N "checking for __error_code field in aiocb struct... $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 + +int +main () +{ + + struct aiocb aiocb; + aiocb.__error_code = 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIOCB_ERROR_CODE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +echo "$as_me:$LINENO: checking for __return_value field in aiocb struct" >&5 +echo $ECHO_N "checking for __return_value field in aiocb struct... $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 + +int +main () +{ + + struct aiocb aiocb; + aiocb.__return_value = 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIOCB_RETURN_VALUE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +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 !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + 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 + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + 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 + +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 + +# 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 + +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 + +( 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) + +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 + + +echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6 +if test "${ac_cv_type_void_p+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 ((void * *) 0) + return 0; +if (sizeof (void *)) + 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_void_p=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_void_p=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6 + +echo "$as_me:$LINENO: checking size of void *" >&5 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6 +if test "${ac_cv_sizeof_void_p+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_void_p" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 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_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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +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=$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 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 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. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; +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_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 + +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` + 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 () +{ +static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +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=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 +long longval () { return (long) (sizeof (void *)); } +unsigned long ulongval () { return (long) (sizeof (void *)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (void *))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (void *)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (void *)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + 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_sizeof_void_p=`cat conftest.val` +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 ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (void *), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_void_p=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + + + +# Check whether --with-mtrace or --without-mtrace was given. +if test "${with_mtrace+set}" = set; then + withval="$with_mtrace" + CFLAGS="$CFLAGS -include mcheck.h" + +cat >>confdefs.h <<\_ACEOF +#define WITH_MTRACE 1 +_ACEOF + + +fi; + + +# Check whether --with-berkdb-debug or --without-berkdb-debug was given. +if test "${with_berkdb_debug+set}" = set; then + withval="$with_berkdb_debug" + +cat >>confdefs.h <<\_ACEOF +#define BERKDB_ERROR_REPORTING 1 +_ACEOF + + +fi; + +TAU_INCS= +BUILD_TAU= + + +# Check whether --with-tau or --without-tau was given. +if test "${with_tau+set}" = set; then + withval="$with_tau" + if test "x$withval" = "xyes" ; then + { { echo "$as_me:$LINENO: error: --with-tau must be given a pathname" >&5 +echo "$as_me: error: --with-tau must be given a pathname" >&2;} + { (exit 1); exit 1; }; } + else + TAU_INCS="-I$withval/include" + CFLAGS="$CFLAGS $TAU_INCS -D__PVFS2_ENABLE_EVENT__" + LDFLAGS="$LDFLAGS -L$withval/$(uname -m)/lib" + tau_mkfile=$withval/$(uname -m)/lib/Makefile.*-profile-trace + if test ! -f $tau_mkfile; then + { { echo "$as_me:$LINENO: error: TAU not compiled with profiling and tracing support" >&5 +echo "$as_me: error: TAU not compiled with profiling and tracing support" >&2;} + { (exit 1); exit 1; }; } + fi + tau_config=$(echo $tau_mkfile | sed -e "s|.*Makefile.tau-||") + LIBS="$LIBS -lTAU_tf -lTAU_traceinput-$tau_config -ltau-$tau_config -lpthread -lstdc++" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TAU 1 +_ACEOF + + BUILD_TAU=1 + fi + +fi; + + + + +BUILD_KERNEL= + + +# Check whether --with-kernel or --without-kernel was given. +if test "${with_kernel+set}" = set; then + withval="$with_kernel" + if test "x$withval" = "xyes" -o "x$withval" = "x" ; then + { { echo "$as_me:$LINENO: error: --with-kernel must be given the path to your kernel source." >&5 +echo "$as_me: error: --with-kernel must be given the path to your kernel source." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -d $withval ; then + { { echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 +echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -r $withval/include/linux/version.h ; then + { { echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 +echo "$as_me: error: The kernel source tree must have been configured." >&2;} + { (exit 1); exit 1; }; } + fi + + if test -r $withval/include/linux/version.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` + elif test -r $withval/include/linux/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/utsrelease.h` + elif test -r $withval/include/generated/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/generated/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` + elif test -r $withval/include/generated/utsrelease.h && grep -qE UTS_RELEASE..3\\. $withval/include/generated/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` + else + { { echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.6 or 3.X" >&5 +echo "$as_me: error: The kernel source tree does not appear to be 2.6 or 3.X" >&2;} + { (exit 1); exit 1; }; } + + fi + + # At least up through 2.6.3 needed to write .__modpost.cmd; this changed + # sometime between then and 2.6.10. Now anybody can compile out-of-tree + # modules against a configured kernel tree + LINUX_KERNEL_SRC="$withval" + BUILD_KERNEL=1 + +else + LINUX_KERNEL_SRC="" + +fi; + + +# Check whether --with-kernel24 or --without-kernel24 was given. +if test "${with_kernel24+set}" = set; then + withval="$with_kernel24" + if test "x$withval" = "xyes" -o "x$withval" = "x" ; then + { { echo "$as_me:$LINENO: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&5 +echo "$as_me: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -d $withval ; then + { { echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 +echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -r $withval/include/linux/version.h ; then + { { echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 +echo "$as_me: error: The kernel source tree must have been configured." >&2;} + { (exit 1); exit 1; }; } + fi + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` + if ! grep -q UTS_RELEASE..2\\.4\\. $withval/include/linux/version.h ; then + { { echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.4" >&5 +echo "$as_me: error: The kernel source tree does not appear to be 2.4" >&2;} + { (exit 1); exit 1; }; } + fi + k24_minor_ver=`echo $vers | cut -b 26- | sed -n 's/\"//p' | head -n 1` + tmp_k24_minor_ver=`echo $k24_minor_ver | grep \-` + if ! test "x$tmp_k24_minor_ver" = "x"; then + tmp_k24_minor_ver=`echo $k24_minor_ver | cut -d- -f1` + k24_minor_ver=$tmp_k24_minor_ver + fi + LINUX24_KERNEL_SRC="$withval" LINUX24_KERNEL_MINOR_VER="`echo $k24_minor_ver| cut -d'.' -f 1`" + BUILD_KERNEL=1 + +else + LINUX24_KERNEL_SRC="" LINUX24_KERNEL_MINOR_VER="" +fi; + + + + +oldcflags=$CFLAGS +if test -z "${LINUX_KERNEL_SRC}" ; then + lk_src=${LINUX24_KERNEL_SRC} +elif test -z "${LINUX24_KERNEL_SRC}" ; then + lk_src=${LINUX_KERNEL_SRC} +fi + + +# Check whether --enable-kernel-aio or --disable-kernel-aio was given. +if test "${enable_kernel_aio+set}" = set; then + enableval="$enable_kernel_aio" + enable_kernel_aio=$enableval +else + enable_kernel_aio=yes + +fi; + +# Check whether --enable-kernel-sendfile or --disable-kernel-sendfile was given. +if test "${enable_kernel_sendfile+set}" = set; then + enableval="$enable_kernel_sendfile" + enable_kernel_sendfile=$enableval +else + enable_kernel_sendfile=no + +fi; + +if test -n "$lk_src" ; then + + + + + NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`" + + if test -d $lk_src/source; then + lk_src_source="$lk_src/source" + else + lk_src_source=$lk_src + fi + + CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src_source/include -I$lk_src_source/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty)" + + if test -f $lk_src/include/generated/autoconf.h ; then + CFLAGS="$CFLAGS -imacros $lk_src/include/generated/autoconf.h" + else + CFLAGS="$CFLAGS -imacros $lk_src/include/linux/autoconf.h" + fi + + if test -n "${ARCH}" ; then + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" + else + SUBARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh.*/sh/` + if test "x$SUBARCH" = "xi386"; then + ARCH=x86 + elif test "x$SUBARCH" = "xx86_64"; then + ARCH=x86 + elif test "x$SUBARCH" = "xsparc64"; then + ARCH=sparc + else + ARCH=$SUBARCH + fi + + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" + + fi + + if test "$lk_src" != "$lk_src_source"; then + CFLAGS="$CFLAGS -I$lk_src/include" + fi + + need_optimize_flag=0 + echo "$as_me:$LINENO: checking for sanity of linux/fs.h include" >&5 +echo $ECHO_N "checking for sanity of linux/fs.h include... $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. */ + + #define __KERNEL__ + #include + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + need_optimize_flag=1 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test $need_optimize_flag -eq 1; then + CFLAGS="-Os $CFLAGS" + fi + + echo "$as_me:$LINENO: checking for i_size_write in kernel" >&5 +echo $ECHO_N "checking for i_size_write in kernel... $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. */ + + #define __KERNEL__ + #include + void i_size_write(struct inode *inode, + loff_t i_size) + { + return; + } + +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SIZE_WRITE 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for i_size_read in kernel" >&5 +echo $ECHO_N "checking for i_size_read in kernel... $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. */ + + #define __KERNEL__ + #include + loff_t i_size_read(struct inode *inode) + { + return 0; + } + +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SIZE_READ 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for iget_locked function in kernel" >&5 +echo $ECHO_N "checking for iget_locked function in kernel... $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. */ + + #define __KERNEL__ + #include + loff_t iget_locked(struct inode *inode) + { + return 0; + } + +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IGET_LOCKED 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for iget4_locked function in kernel" >&5 +echo $ECHO_N "checking for iget4_locked function in kernel... $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. */ + + #define __KERNEL__ + #include + loff_t iget4_locked(struct inode *inode) + { + return 0; + } + +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IGET4_LOCKED 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for iget5_locked function in kernel" >&5 +echo $ECHO_N "checking for iget5_locked function in kernel... $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. */ + + #define __KERNEL__ + #include + loff_t iget5_locked(struct inode *inode) + { + return 0; + } + +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IGET5_LOCKED 1 +_ACEOF + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for struct xtvec in kernel" >&5 +echo $ECHO_N "checking for struct xtvec in kernel... $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. */ + + #define __KERNEL__ + #include + static struct xtvec xv = { 0, 0 }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_XTVEC 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for struct kmem_cache in kernel" >&5 +echo $ECHO_N "checking for struct kmem_cache in kernel... $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. */ + + #define __KERNEL__ + #include + #include + + int foo(struct kmem_cache *s) + { + return (s == NULL) ? 3 : 4; + } + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_KMEM_CACHE 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + echo "$as_me:$LINENO: checking for SLAB_KERNEL flag in kernel" >&5 +echo $ECHO_N "checking for SLAB_KERNEL flag in kernel... $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. */ + + #define __KERNEL__ + #include + static int flags = SLAB_KERNEL; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SLAB_KERNEL 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for memory_backed in struct backing_dev_info in kernel" >&5 +echo $ECHO_N "checking for memory_backed in struct backing_dev_info in kernel... $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. */ + + #define __KERNEL__ + #include + #include + static struct backing_dev_info bdi = { + .memory_backed = 0 + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDI_MEMORY_BACKED 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "x$enable_kernel_sendfile" = "xyes"; then + echo "$as_me:$LINENO: checking for sendfile callback in struct file_operations in kernel" >&5 +echo $ECHO_N "checking for sendfile callback in struct file_operations in kernel... $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. */ + + #define __KERNEL__ + #include + static struct file_operations fop = { + .sendfile = NULL, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SENDFILE_VFS_SUPPORT 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + echo "$as_me:$LINENO: checking for readv callback in struct file_operations in kernel" >&5 +echo $ECHO_N "checking for readv callback in struct file_operations in kernel... $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. */ + + #define __KERNEL__ + #include + static struct file_operations fop = { + .readv = NULL, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_READV_FILE_OPERATIONS 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for writev callback in struct file_operations in kernel" >&5 +echo $ECHO_N "checking for writev callback in struct file_operations in kernel... $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. */ + + #define __KERNEL__ + #include + static struct file_operations fop = { + .writev = NULL, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WRITEV_FILE_OPERATIONS 1 +_ACEOF + else - LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__" - THREAD_LIB="-lpthread" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for find_inode_handle callback in struct super_operations in kernel" >&5 +echo $ECHO_N "checking for find_inode_handle callback in struct super_operations in kernel... $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. */ + #define __KERNEL__ + #include + static struct super_operations sop = { + .find_inode_handle = NULL, + }; +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS 1 +_ACEOF -# Check whether --enable-server was given. -if test "${enable_server+set}" = set; then : - enableval=$enable_server; if test "x$enableval" = "xyes" ; then - BUILD_SERVER=1 - NEED_BERKELEY_DB=yes -else - BUILD_SERVER="" -fi else - BUILD_SERVER=1 - NEED_BERKELEY_DB=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for i_blksize in struct inode" >&5 +echo $ECHO_N "checking for i_blksize in struct inode... $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. */ + #define __KERNEL__ + #include + static struct inode i = { + .i_blksize = 0, + }; +int +main () +{ -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; - opensslpath=${withval} + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - if test "x${withval}" != "xno"; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_BLKSIZE_IN_STRUCT_INODE 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library" >&5 -$as_echo_n "checking for openssl library... " >&6; } +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "x${opensslpath}" != "x"; then - CFLAGS="${CFLAGS} -I${opensslpath}/include" - LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" - SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" - fi - LIBS="$LIBS -lcrypto -lssl" +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for i_sem in struct inode" >&5 +echo $ECHO_N "checking for i_sem in struct inode... $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 "openssl/bio.h" + + #define __KERNEL__ + #include + static struct inode i = { + .i_sem = {0}, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SEM_IN_STRUCT_INODE 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : else - as_fn_error $? "Invalid openssl path specified. No openssl/bio.h found." "$LINENO" 5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for statfs_lite callback in struct super_operations in kernel" >&5 +echo $ECHO_N "checking for statfs_lite callback in struct super_operations in kernel... $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 "openssl/bio.h" + + #define __KERNEL__ + #include + static struct super_operations sop = { + .statfs_lite = NULL, + }; + int main () { -BIO * b; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STATFS_LITE_SUPER_OPERATIONS 1 +_ACEOF + else - as_fn_error $? "could not find openssl libs" "$LINENO" 5 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for fill_handle callback in struct inode_operations in kernel" >&5 +echo $ECHO_N "checking for fill_handle callback in struct inode_operations in kernel... $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. */ -$as_echo "#define WITH_OPENSSL 1" >>confdefs.h + #define __KERNEL__ + #include + static struct inode_operations iop = { + .fill_handle = NULL, + }; +int +main () +{ - for ac_header in openssl/evp.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_evp_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_EVP_H 1 + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_FILL_HANDLE_INODE_OPERATIONS 1 +_ACEOF -done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - for ac_header in openssl/crypto.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_crypto_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_CRYPTO_H 1 -_ACEOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done + echo "$as_me:$LINENO: checking for getattr_lite callback in struct inode_operations in kernel" >&5 +echo $ECHO_N "checking for getattr_lite callback in struct inode_operations in kernel... $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. */ - fi + #define __KERNEL__ + #include + static struct inode_operations iop = { + .getattr_lite = NULL, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETATTR_LITE_INODE_OPERATIONS 1 +_ACEOF else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library" >&5 -$as_echo_n "checking for openssl library... " >&6; } - TMPLIBS=${LIBS} - LIBS="$LIBS -lcrypto -lssl" +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for get_fs_key callback in struct super_operations in kernel" >&5 +echo $ECHO_N "checking for get_fs_key callback in struct super_operations in kernel... $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 "openssl/bio.h" + + #define __KERNEL__ + #include + static struct super_operations sop = { + .get_fs_key = NULL, + }; + +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_FS_KEY_SUPER_OPERATIONS 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No openssl headers found." >&5 -$as_echo "$as_me: WARNING: No openssl headers found." >&2;} + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for readdirplus member in file_operations structure" >&5 +echo $ECHO_N "checking for readdirplus member in file_operations structure... $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 "openssl/bio.h" + + #define __KERNEL__ + #include + int main () { -BIO * b; + + struct file_operations filop = { + .readdirplus = NULL + }; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define WITH_OPENSSL 1" >>confdefs.h +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_READDIRPLUS_FILE_OPERATIONS 1 +_ACEOF else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No openssl headers found." >&5 -$as_echo "$as_me: WARNING: No openssl headers found." >&2;} - LIBS=${TMPLIBS} +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - for ac_header in openssl/evp.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_evp_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_EVP_H 1 + echo "$as_me:$LINENO: checking for readdirplus_lite member in file_operations structure" >&5 +echo $ECHO_N "checking for readdirplus_lite member in file_operations structure... $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. */ -fi + #define __KERNEL__ + #include -done +int +main () +{ - for ac_header in openssl/crypto.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_crypto_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL_CRYPTO_H 1 + struct file_operations filop = { + .readdirplus_lite = 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_READDIRPLUSLITE_FILE_OPERATIONS 1 _ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done + echo "$as_me:$LINENO: checking for readx member in file_operations structure" >&5 +echo $ECHO_N "checking for readx member in file_operations structure... $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. */ + #define __KERNEL__ + #include -fi +int +main () +{ + struct file_operations filop = { + .readx = NULL + }; -# Check whether --enable-karma-mem-usage-stats was given. -if test "${enable_karma_mem_usage_stats+set}" = set; then : - enableval=$enable_karma_mem_usage_stats; if test "x$enableval" = "xno" ; then - CFLAGS="$CFLAGS -D__KARMA_DISABLE_MEM_USAGE__" -fi + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_READX_FILE_OPERATIONS 1 +_ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-bmi-only was given. -if test "${enable_bmi_only+set}" = set; then : - enableval=$enable_bmi_only; if test "x$enableval" = "xyes" ; then - BUILD_BMI_ONLY=1 -fi +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for writex member in file_operations structure" >&5 +echo $ECHO_N "checking for writex member in file_operations structure... $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. */ + #define __KERNEL__ + #include -if test "x$BUILD_BMI_ONLY" = "x1"; then - BUILD_SERVER="" - NEED_BERKELEY_DB=no - +int +main () +{ -fi + struct file_operations filop = { + .writex = NULL + }; -# Check whether --enable-perf-counters was given. -if test "${enable_perf_counters+set}" = set; then : - enableval=$enable_perf_counters; if test "x$enableval" = "xno" ; then - CFLAGS="$CFLAGS -D__PVFS2_DISABLE_PERF_COUNTERS__" -fi + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_WRITEX_FILE_OPERATIONS 1 +_ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -MMAP_RA_CACHE="" -# Check whether --enable-mmap-racache was given. -if test "${enable_mmap_racache+set}" = set; then : - enableval=$enable_mmap_racache; if test "x$enableval" = "xyes" ; then -MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE" -fi +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for aio support in kernel" >&5 +echo $ECHO_N "checking for aio support in kernel... $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. */ + #define __KERNEL__ + #include + #include + static struct kiocb iocb; -# Check whether --enable-trusted-connections was given. -if test "${enable_trusted_connections+set}" = set; then : - enableval=$enable_trusted_connections; if test "x$enableval" = "xyes"; then -TRUSTED_CONNECTIONS="-DUSE_TRUSTED" -fi -fi - - +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -test_for_karma() -{ - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_PKGCONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_PKGCONFIG"; then - ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # 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_HAVE_PKGCONFIG="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIO 1 +_ACEOF - test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" -fi -fi -HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG -if test -n "$HAVE_PKGCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGCONFIG" >&5 -$as_echo "$HAVE_PKGCONFIG" >&6; } + have_aio=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_aio=no - if test "x$HAVE_PKGCONFIG" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk2.0 (for karma gui)" >&5 -$as_echo_n "checking for gtk2.0 (for karma gui)... " >&6; } - if `pkg-config --exists gtk+-2.0` ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - GTKLIBS=`pkg-config --libs gtk+-2.0` - GTKCFLAGS=`pkg-config --cflags gtk+-2.0` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then + echo "$as_me:$LINENO: checking for ki_dtor in kiocb structure of kernel" >&5 +echo $ECHO_N "checking for ki_dtor in kiocb structure of kernel... $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. */ + #define __KERNEL__ + #include + #include + static struct kiocb io_cb = { + .ki_dtor = NULL, + }; - BUILD_KARMA="1" +int +main () +{ - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - fi + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -# Check whether --enable-karma was given. -if test "${enable_karma+set}" = set; then : - enableval=$enable_karma; if test "x$enableval" = "xyes" ; then - test_for_karma - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIO_VFS_SUPPORT 1 +_ACEOF else - test_for_karma - -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 -# Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; build_static=$enableval -else - build_static=yes fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for new prototype of aio_read callback of file_operations structure" >&5 +echo $ECHO_N "checking for new prototype of aio_read callback of file_operations structure... $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. */ + #define __KERNEL__ + #include + extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); + static struct file_operations fop = { + .aio_read = my_aio_read, + }; +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIO_NEW_AIO_SIGNATURE 1 +_ACEOF -set_redhat24=0 -use_redhat24=0 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-redhat24 was given. -if test "${enable_redhat24+set}" = set; then : - enableval=$enable_redhat24; set_redhat24=1 - if test "$enableval" = no ; then - use_redhat24=0 - else - use_redhat24=1 - fi +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + fi + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for dentry argument in kernel super_operations statfs" >&5 +echo $ECHO_N "checking for dentry argument in kernel super_operations statfs... $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. */ -set_nptl_workaround=0 -use_nptl_workaround=0 - -# Check whether --enable-nptl-workaround was given. -if test "${enable_nptl_workaround+set}" = set; then : - enableval=$enable_nptl_workaround; set_nptl_workaround=1 - if test "$enableval" = no ; then - use_nptl_workaround=0 - else - use_nptl_workaround=1 - fi + #define __KERNEL__ + #include + struct super_operations sop; + int s(struct dentry *de, struct kstatfs *kfs) + { + return 0; + } -fi +int +main () +{ + sop.statfs = s; -RHTAG1="Red Hat Linux release 9" -RHTAG2="Red Hat Enterprise Linux WS release 3" -RHTAG3="Red Hat Enterprise Linux AS release 3" -RHTAG4="Red Hat Enterprise Linux ES release 3" -RHTAG5="Red Hat Linux Advanced Server release 2.1AS" -RHTAG6="Fedora Core release 1 (Yarrow)" + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_DENTRY_STATFS_SOP 1 +_ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -REDHAT_RELEASE="" -if test -f /etc/redhat-release; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tagged Redhat releases (must patch)" >&5 -$as_echo_n "checking for tagged Redhat releases (must patch)... " >&6; } - REDHAT_REL=`cat /etc/redhat-release` - if test "x`echo $REDHAT_REL | cut -b 1-23`" = "x$RHTAG1" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG2" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG3" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG4" || - test "x`echo $REDHAT_REL | cut -b 1-43`" = "x$RHTAG5" || - test "x`echo $REDHAT_REL | cut -b 1-30`" = "x$RHTAG6" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - if test "$set_redhat24" = 0 || test "$set_nptl_workaround" = 0 ; then - as_fn_error $? " - You appear to be configuring PVFS2 on a RedHat distribution that - likely ships with a heavily modified kernel and c library. You must - specify two configure arguments to provide necessary information before - proceeding. First pick one of these two options: - ============================= - --enable-redhat24 (if you are using a redhat provided 2.4 kernel) - --disable-redhat24 (if you are using a stock kernel.org kernel) - ============================= - Also pick one of the next two options. You should probably enable the - workaround if you are using RedHat EL 3 prior to update 2. Otherwise it - is probably safer (and higher performance) to disable it: - ============================= - --enable-nptl-workaround (to work around buggy glibc pthread library) - --disable-nptl-workaround (if you trust your glibc pthread library) - ============================= " "$LINENO" 5 - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + echo "$as_me:$LINENO: checking for vfsmount argument in kernel file_system_type get_sb" >&5 +echo $ECHO_N "checking for vfsmount argument in kernel file_system_type get_sb... $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. */ -if test "$use_redhat24" = 1 ; then - REDHAT_RELEASE="-DREDHAT_RELEASE_9" -fi - + #define __KERNEL__ + #include + int get_sb_bdev(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data, + int (*fill_super)(struct super_block *, void *, + int), + struct vfsmount *vfsm) + { + return 0; + } -if test "$use_nptl_workaround" = 1 ; then - NPTL_WORKAROUND="1" -fi +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -use_aio_thcb=1 -# Check whether --enable-aio-threaded-callbacks was given. -if test "${enable_aio_threaded_callbacks+set}" = set; then : - enableval=$enable_aio_threaded_callbacks; if test "$enableval" = no ; then use_aio_thcb=0 ; fi -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_VFSMOUNT_GETSB 1 +_ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 -MISC_TROVE_FLAGS="" -if test $use_aio_thcb = 1 ; then - MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__" fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __error_code field in aiocb struct" >&5 -$as_echo_n "checking for __error_code field in aiocb struct... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for get_sb_nodev" >&5 +echo $ECHO_N "checking for get_sb_nodev... $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 + #define __KERNEL__ + #include + int v_fill_sb(struct super_block *sb, void *data, int s) + { + return 0; + } int main () { - struct aiocb aiocb; - aiocb.__error_code = 0; + int ret = 0; + struct super_block *sb = NULL; +#ifdef HAVE_VFSMOUNT_GETSB + ret = get_sb_nodev(NULL, 0, NULL, v_fill_sb, NULL ); +#else + sb = get_sb_nodev(NULL, 0, NULL, v_fill_sb); +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_AIOCB_ERROR_CODE 1" >>confdefs.h +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETSB_NODEV 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __return_value field in aiocb struct" >&5 -$as_echo_n "checking for __return_value field in aiocb struct... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for file_system_type get_sb" >&5 +echo $ECHO_N "checking for file_system_type get_sb... $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 + #define __KERNEL__ + #include int main () { - struct aiocb aiocb; - aiocb.__return_value = 0; + struct file_system_type f; + f.get_sb = NULL; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_AIOCB_RETURN_VALUE 1" >>confdefs.h +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSTYPE_GET_SB 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_bigendian=unknown - # See if we're dealing with a universal compiler. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - # Check for potential -arch flags. It is not universal unless - # there are at least two -arch flags with different values. - ac_arch= - ac_prev= - for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do - if test -n "$ac_prev"; then - case $ac_word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then - ac_arch=$ac_word - else - ac_cv_c_bigendian=universal - break - fi - ;; - esac - ac_prev= - elif test "x$ac_word" = "x-arch"; then - ac_prev=arch - fi - done -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_c_bigendian = unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + + + echo "$as_me:$LINENO: checking for file_system_type mount exclusively" >&5 +echo $ECHO_N "checking for file_system_type mount exclusively... $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 - #include + + #define __KERNEL__ + #include int main () { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif + +#ifdef HAVE_FSTYPE_GET_SB + assert(0); +#else + struct file_system_type f; + f.mount = NULL; +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSTYPE_MOUNT_ONLY 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for xattr support in kernel" >&5 +echo $ECHO_N "checking for xattr support in kernel... $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 - #include + + #define __KERNEL__ + #include + static struct inode_operations in_op = { + .getxattr = NULL + }; int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian - #endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XATTR 1 +_ACEOF + + have_xattr=yes else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_xattr=no + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "x$have_xattr" = "xyes"; then + echo "$as_me:$LINENO: checking for const argument to setxattr function" >&5 +echo $ECHO_N "checking for const argument to setxattr function... $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 + + #define __KERNEL__ + #include int main () { -#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif + + struct inode_operations inode_ops; + int ret; + struct dentry * dent = NULL; + const char * name = NULL; + const void * val = NULL; + size_t size = 0; + int flags = 0; + + ret = inode_ops.setxattr(dent, name, val, size, flags); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - # It does; now see whether it defined to _BIG_ENDIAN or not. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SETXATTR_CONST_ARG 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + + echo "$as_me:$LINENO: checking for file argument to sysctl proc handlers" >&5 +echo $ECHO_N "checking for file argument to sysctl proc handlers... $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 + + #define __KERNEL__ + #include + #include int main () { -#ifndef _BIG_ENDIAN - not big endian - #endif + + struct ctl_table * ctl = NULL; + int write = 0; + struct file * filp = NULL; + void __user * buffer = NULL; + size_t * lenp = NULL; + loff_t * ppos = NULL; + + proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_bigendian=yes +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PROC_HANDLER_FILE_ARG 1 +_ACEOF + else - ac_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $ac_cv_c_bigendian = unknown; then - # Compile a test program. - if test "$cross_compiling" = yes; then : - # Try to guess by grepping values from an object file. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] = - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] = - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking for ppos argument to sysctl proc handlers" >&5 +echo $ECHO_N "checking for ppos argument to sysctl proc handlers... $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. */ + + #define __KERNEL__ + #include + #include int main () { -return use_ascii (foo) == use_ebcdic (foo); + + struct ctl_table * ctl = NULL; + int write = 0; + void __user * buffer = NULL; + size_t * lenp = NULL; + loff_t * ppos = NULL; + + proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; 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 +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PROC_HANDLER_PPOS_ARG 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +for ac_header in linux/posix_acl.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 confdefs.h - <<_ACEOF >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_includes_default -int -main () -{ +#define __KERNEL__ + #include + #ifdef HAVE_XATTR + #include + #endif - /* 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; -} +#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 + eval "$as_ac_Header=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 + +fi + +done + + + +for ac_header in linux/posix_acl_xattr.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. */ +#define __KERNEL__ + #include + #ifdef HAVE_XATTR + #include + #endif + + +#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 + eval "$as_ac_Header=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 + +fi + +done + + + +for ac_header in linux/xattr_acl.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. */ +#define __KERNEL__ + #include + #ifdef HAVE_XATTR + #include + #endif + + +#include <$ac_header> _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_bigendian=no +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 - ac_cv_c_bigendian=yes + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +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 - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } - case $ac_cv_c_bigendian in #( - yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -;; #( - no) - ;; #( - universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +done - ;; #( - *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; - esac -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 +for ac_header in linux/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 - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define __KERNEL__ + #include + +#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 + eval "$as_ac_Header=yes" else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_Header=no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +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 +fi +done -# Check whether --with-mtrace was given. -if test "${with_mtrace+set}" = set; then : - withval=$with_mtrace; CFLAGS="$CFLAGS -include mcheck.h" +for ac_header in linux/ioctl32.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. */ +#define __KERNEL__ + #include -$as_echo "#define WITH_MTRACE 1" >>confdefs.h +#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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +eval "$as_ac_Header=no" fi - - - -# Check whether --with-berkdb-debug was given. -if test "${with_berkdb_debug+set}" = set; then : - withval=$with_berkdb_debug; -$as_echo "#define BERKDB_ERROR_REPORTING 1" >>confdefs.h - +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 fi +done -TAU_INCS= -BUILD_TAU= +for ac_header in linux/compat.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. */ +#define __KERNEL__ + #include -# Check whether --with-tau was given. -if test "${with_tau+set}" = set; then : - withval=$with_tau; if test "x$withval" = "xyes" ; then - as_fn_error $? "--with-tau must be given a pathname" "$LINENO" 5 - else - TAU_INCS="-I$withval/include" - CFLAGS="$CFLAGS $TAU_INCS -D__PVFS2_ENABLE_EVENT__" - LDFLAGS="$LDFLAGS -L$withval/$(uname -m)/lib" - tau_mkfile=$withval/$(uname -m)/lib/Makefile.*-profile-trace - if test ! -f $tau_mkfile; then - as_fn_error $? "TAU not compiled with profiling and tracing support" "$LINENO" 5 - fi - tau_config=$(echo $tau_mkfile | sed -e "s|.*Makefile.tau-||") - LIBS="$LIBS -lTAU_tf -lTAU_traceinput-$tau_config -ltau-$tau_config -lpthread -lstdc++" -$as_echo "#define HAVE_TAU 1" >>confdefs.h +#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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - BUILD_TAU=1 - fi +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 fi +done + +for ac_header in linux/syscalls.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. */ +#define __KERNEL__ + #include +#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 + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -BUILD_KERNEL= +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 +fi -# Check whether --with-kernel was given. -if test "${with_kernel+set}" = set; then : - withval=$with_kernel; if test "x$withval" = "xyes" -o "x$withval" = "x" ; then - as_fn_error $? "--with-kernel must be given the path to your kernel source." "$LINENO" 5 - fi - if ! test -d $withval ; then - as_fn_error $? "The --with-kernel path $withval is not a directory." "$LINENO" 5 - fi - if ! test -r $withval/include/linux/version.h ; then - as_fn_error $? "The kernel source tree must have been configured." "$LINENO" 5 - fi +done - if test -r $withval/include/linux/version.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` - elif test -r $withval/include/linux/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/utsrelease.h` - elif test -r $withval/include/generated/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/generated/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` - elif test -r $withval/include/generated/utsrelease.h && grep -qE UTS_RELEASE..3\\. $withval/include/generated/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` - else - as_fn_error $? "The kernel source tree does not appear to be 2.6 or 3.X" "$LINENO" 5 - fi +for ac_header in asm/ioctl32.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. */ +#define __KERNEL__ + #include - # At least up through 2.6.3 needed to write .__modpost.cmd; this changed - # sometime between then and 2.6.10. Now anybody can compile out-of-tree - # modules against a configured kernel tree - LINUX_KERNEL_SRC="$withval" - BUILD_KERNEL=1 +#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 + eval "$as_ac_Header=yes" else - LINUX_KERNEL_SRC="" + 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 +fi +done -# Check whether --with-kernel24 was given. -if test "${with_kernel24+set}" = set; then : - withval=$with_kernel24; if test "x$withval" = "xyes" -o "x$withval" = "x" ; then - as_fn_error $? "--with-kernel24 must be given the path to your kernel 2.4.x source." "$LINENO" 5 - fi - if ! test -d $withval ; then - as_fn_error $? "The --with-kernel path $withval is not a directory." "$LINENO" 5 - fi - if ! test -r $withval/include/linux/version.h ; then - as_fn_error $? "The kernel source tree must have been configured." "$LINENO" 5 - fi - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` - if ! grep -q UTS_RELEASE..2\\.4\\. $withval/include/linux/version.h ; then - as_fn_error $? "The kernel source tree does not appear to be 2.4" "$LINENO" 5 - fi - k24_minor_ver=`echo $vers | cut -b 26- | sed -n 's/\"//p' | head -n 1` - tmp_k24_minor_ver=`echo $k24_minor_ver | grep \-` - if ! test "x$tmp_k24_minor_ver" = "x"; then - tmp_k24_minor_ver=`echo $k24_minor_ver | cut -d- -f1` - k24_minor_ver=$tmp_k24_minor_ver - fi - LINUX24_KERNEL_SRC="$withval" LINUX24_KERNEL_MINOR_VER="`echo $k24_minor_ver| cut -d'.' -f 1`" - BUILD_KERNEL=1 +for ac_header in linux/exportfs.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 - LINUX24_KERNEL_SRC="" LINUX24_KERNEL_MINOR_VER="" -fi - + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define __KERNEL__ + #include +#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 + eval "$as_ac_Header=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 -oldcflags=$CFLAGS -if test -z "${LINUX_KERNEL_SRC}" ; then - lk_src=${LINUX24_KERNEL_SRC} -elif test -z "${LINUX24_KERNEL_SRC}" ; then - lk_src=${LINUX_KERNEL_SRC} fi +done -# Check whether --enable-kernel-aio was given. -if test "${enable_kernel_aio+set}" = set; then : - enableval=$enable_kernel_aio; enable_kernel_aio=$enableval -else - enable_kernel_aio=yes -fi + echo "$as_me:$LINENO: checking for linux/smp_lock.h" >&5 +echo $ECHO_N "checking for linux/smp_lock.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_smp_lock_h+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 __KERNEL__ + #include -# Check whether --enable-kernel-sendfile was given. -if test "${enable_kernel_sendfile+set}" = set; then : - enableval=$enable_kernel_sendfile; enable_kernel_sendfile=$enableval +#include +_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_linux_smp_lock_h=yes else - enable_kernel_sendfile=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_header_linux_smp_lock_h=no fi - - -if test -n "$lk_src" ; then +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_smp_lock_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_smp_lock_h" >&6 + echo "$as_me:$LINENO: checking for generic_file_readv api in kernel" >&5 +echo $ECHO_N "checking for generic_file_readv api in kernel... $ECHO_C" >&6 - NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test -d $lk_src/source; then - lk_src_source="$lk_src/source" - else - lk_src_source=$lk_src - fi + #define __KERNEL__ + #include + int generic_file_readv(struct inode *inode) + { + return 0; + } - CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src_source/include -I$lk_src_source/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty)" +int +main () +{ - if test -f $lk_src/include/generated/autoconf.h ; then - CFLAGS="$CFLAGS -imacros $lk_src/include/generated/autoconf.h" - else - CFLAGS="$CFLAGS -imacros $lk_src/include/linux/autoconf.h" - fi + ; + 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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test -n "${ARCH}" ; then - CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" - else - SUBARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh.*/sh/` - if test "x$SUBARCH" = "xi386"; then - ARCH=x86 - elif test "x$SUBARCH" = "xx86_64"; then - ARCH=x86 - elif test "x$SUBARCH" = "xsparc64"; then - ARCH=sparc - else - ARCH=$SUBARCH - fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_FILE_READV 1 +_ACEOF - fi +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$lk_src" != "$lk_src_source"; then - CFLAGS="$CFLAGS -I$lk_src/include" - fi + echo "$as_me:$LINENO: checking for generic_permission api in kernel" >&5 +echo $ECHO_N "checking for generic_permission api in kernel... $ECHO_C" >&6 - need_optimize_flag=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sanity of linux/fs.h include" >&5 -$as_echo_n "checking for sanity of linux/fs.h include... " >&6; } - cat confdefs.h - <<_ACEOF >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. */ #define __KERNEL__ #include + int generic_permission(struct inode *inode) + { + return 0; + } int main () @@ -5927,418 +13462,845 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - need_optimize_flag=1 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_PERMISSION 1 +_ACEOF + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $need_optimize_flag -eq 1; then - CFLAGS="-Os $CFLAGS" - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for i_size_write in kernel" >&5 -$as_echo_n "checking for i_size_write in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for three-param generic_permission" >&5 +echo $ECHO_N "checking for three-param generic_permission... $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. */ #define __KERNEL__ #include - void i_size_write(struct inode *inode, - loff_t i_size) - { - return; - } + struct inode *f; int main () { + generic_permission(f, 0, NULL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_THREE_PARAM_GENERIC_PERMISSION 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_I_SIZE_WRITE 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for i_size_read in kernel" >&5 -$as_echo_n "checking for i_size_read in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for four-param generic_permission" >&5 +echo $ECHO_N "checking for four-param generic_permission... $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. */ #define __KERNEL__ #include - loff_t i_size_read(struct inode *inode) - { - return 0; - } + struct inode *f; int main () { + generic_permission(f, 0, 0, NULL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FOUR_PARAM_GENERIC_PERMISSION 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_I_SIZE_READ 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iget_locked function in kernel" >&5 -$as_echo_n "checking for iget_locked function in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for two-param generic_permission" >&5 +echo $ECHO_N "checking for two-param generic_permission... $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. */ #define __KERNEL__ #include - loff_t iget_locked(struct inode *inode) - { - return 0; - } + struct inode *f; int main () { + generic_permission(f, 0); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TWO_PARAM_GENERIC_PERMISSION 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_IGET_LOCKED 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iget4_locked function in kernel" >&5 -$as_echo_n "checking for iget4_locked function in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for set_nlink" >&5 +echo $ECHO_N "checking for set_nlink... $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. */ #define __KERNEL__ #include - loff_t iget4_locked(struct inode *inode) - { - return 0; - } + struct inode *i; int main () { + set_nlink(i, 0); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SET_NLINK 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_IGET4_LOCKED 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iget5_locked function in kernel" >&5 -$as_echo_n "checking for iget5_locked function in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for inc_nlink" >&5 +echo $ECHO_N "checking for inc_nlink... $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. */ #define __KERNEL__ #include - loff_t iget5_locked(struct inode *inode) - { - return 0; - } + struct inode *i; int main () { + inc_nlink(i); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_INC_NLINK 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_IGET5_LOCKED 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct xtvec in kernel" >&5 -$as_echo_n "checking for struct xtvec in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for drop_nlink" >&5 +echo $ECHO_N "checking for drop_nlink... $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. */ #define __KERNEL__ - #include - static struct xtvec xv = { 0, 0 }; + #include + struct inode *i; int main () { + drop_nlink(i); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_STRUCT_XTVEC 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_DROP_NLINK 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct kmem_cache in kernel" >&5 -$as_echo_n "checking for struct kmem_cache in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for clear_nlink" >&5 +echo $ECHO_N "checking for clear_nlink... $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. */ #define __KERNEL__ - #include - #include - - int foo(struct kmem_cache *s) - { - return (s == NULL) ? 3 : 4; - } + #include + struct inode *i; int main () { + clear_nlink(i); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_STRUCT_KMEM_CACHE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_CLEAR_NLINK 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLAB_KERNEL flag in kernel" >&5 -$as_echo_n "checking for SLAB_KERNEL flag in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for posix_acl_equiv_mode umode_t" >&5 +echo $ECHO_N "checking for posix_acl_equiv_mode umode_t... $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. */ #define __KERNEL__ - #include - static int flags = SLAB_KERNEL; + #include + #include + struct posix_acl *acl; + umode_t mode = 0; int main () { + posix_acl_equiv_mode(acl, &mode); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SLAB_KERNEL 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory_backed in struct backing_dev_info in kernel" >&5 -$as_echo_n "checking for memory_backed in struct backing_dev_info in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for posix_acl_create" >&5 +echo $ECHO_N "checking for posix_acl_create... $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. */ #define __KERNEL__ - #include - #include - static struct backing_dev_info bdi = { - .memory_backed = 0 - }; + #include + #include + struct posix_acl *acl; + umode_t mode = 0; int main () { + posix_acl_create(&acl, GFP_KERNEL, &mode); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_BDI_MEMORY_BACKED 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CREATE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$enable_kernel_sendfile" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile callback in struct file_operations in kernel" >&5 -$as_echo_n "checking for sendfile callback in struct file_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for posix_acl_chmod" >&5 +echo $ECHO_N "checking for posix_acl_chmod... $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. */ - #define __KERNEL__ - #include - static struct file_operations fop = { - .sendfile = NULL, - }; + #define __KERNEL__ + #include + #include + struct posix_acl *acl; + struct inode *inode; + umode_t mode = 0; int main () { + posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode ); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SENDFILE_VFS_SUPPORT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CHMOD 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readv callback in struct file_operations in kernel" >&5 -$as_echo_n "checking for readv callback in struct file_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for posix_acl_clone" >&5 +echo $ECHO_N "checking for posix_acl_clone... $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. */ #define __KERNEL__ #include - static struct file_operations fop = { - .readv = NULL, - }; + #include + struct posix_acl *acl; int main () { + posix_acl_clone(acl, GFP_KERNEL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_READV_FILE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CLONE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for writev callback in struct file_operations in kernel" >&5 -$as_echo_n "checking for writev callback in struct file_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for fsync with loff_t" >&5 +echo $ECHO_N "checking for fsync with loff_t... $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. */ #define __KERNEL__ #include - static struct file_operations fop = { - .writev = NULL, - }; + + int my_fsync(struct file *, loff_t, loff_t, int); + + int my_fsync(struct file *f, loff_t start, loff_t end, int datasync) + { + } int main () { + struct file_operations fop; + + fop.fsync = my_fsync; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_WRITEV_FILE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_LOFF_T_PARAMS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for find_inode_handle callback in struct super_operations in kernel" >&5 -$as_echo_n "checking for find_inode_handle callback in struct super_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for generic_getxattr api in kernel" >&5 +echo $ECHO_N "checking for generic_getxattr api in kernel... $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. */ #define __KERNEL__ #include - static struct super_operations sop = { - .find_inode_handle = NULL, - }; + #include + int generic_getxattr(struct inode *inode) + { + return 0; + } int main () @@ -6348,125 +14310,242 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS 1" >>confdefs.h +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_GETXATTR 1 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for i_blksize in struct inode" >&5 -$as_echo_n "checking for i_blksize in struct inode... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for arg member in read_descriptor_t in kernel" >&5 +echo $ECHO_N "checking for arg member in read_descriptor_t in kernel... $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. */ - #define __KERNEL__ - #include - static struct inode i = { - .i_blksize = 0, - }; + #define __KERNEL__ + #include int main () { + read_descriptor_t x; + x.arg.data = NULL; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_I_BLKSIZE_IN_STRUCT_INODE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ARG_IN_READ_DESCRIPTOR_T 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for i_sem in struct inode" >&5 -$as_echo_n "checking for i_sem in struct inode... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for fh_to_dentry member in export_operations in kernel" >&5 +echo $ECHO_N "checking for fh_to_dentry member in export_operations in kernel... $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. */ - #define __KERNEL__ - #include - static struct inode i = { - .i_sem = {0}, - }; + #define __KERNEL__ + #include int main () { + struct export_operations x; + x.fh_to_dentry = NULL; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_I_SEM_IN_STRUCT_INODE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FHTODENTRY_EXPORT_OPERATIONS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs_lite callback in struct super_operations in kernel" >&5 -$as_echo_n "checking for statfs_lite callback in struct super_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for encode_fh member in export_operations in kernel" >&5 +echo $ECHO_N "checking for encode_fh member in export_operations in kernel... $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. */ - #define __KERNEL__ - #include - static struct super_operations sop = { - .statfs_lite = NULL, - }; + #define __KERNEL__ + #include int main () { + struct export_operations x; + x.encode_fh = NULL; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_STATFS_LITE_SUPER_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_ENCODEFH_EXPORT_OPERATIONS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fill_handle callback in struct inode_operations in kernel" >&5 -$as_echo_n "checking for fill_handle callback in struct inode_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for second arg type int in address_space_operations releasepage" >&5 +echo $ECHO_N "checking for second arg type int in address_space_operations releasepage... $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. */ - #define __KERNEL__ - #include - static struct inode_operations iop = { - .fill_handle = NULL, - }; + #define __KERNEL__ + #include + extern int try_to_release_page(struct page *page, int gfp_mask); int main () @@ -6476,29 +14555,58 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FILL_HANDLE_INODE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getattr_lite callback in struct inode_operations in kernel" >&5 -$as_echo_n "checking for getattr_lite callback in struct inode_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for int return in inode_operations follow_link" >&5 +echo $ECHO_N "checking for int return in inode_operations follow_link... $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. */ - #define __KERNEL__ - #include - static struct inode_operations iop = { - .getattr_lite = NULL, - }; + #define __KERNEL__ + #include + extern int page_follow_link_light(struct dentry *, + struct nameidata *); int main () @@ -6508,29 +14616,57 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_GETATTR_LITE_INODE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for get_fs_key callback in struct super_operations in kernel" >&5 -$as_echo_n "checking for get_fs_key callback in struct super_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for int return in kmem_cache_destroy" >&5 +echo $ECHO_N "checking for int return in kmem_cache_destroy... $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. */ - #define __KERNEL__ - #include - static struct super_operations sop = { - .get_fs_key = NULL, - }; + #define __KERNEL__ + #include + extern int kmem_cache_destroy(kmem_cache_t *); int main () @@ -6540,89 +14676,181 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_GET_FS_KEY_SUPER_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT_RETURN_KMEM_CACHE_DESTROY 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdirplus member in file_operations structure" >&5 -$as_echo_n "checking for readdirplus member in file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for older int return in invalidatepage" >&5 +echo $ECHO_N "checking for older int return in invalidatepage... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct file_operations filop = { - .readdirplus = NULL - }; + struct address_space_operations aso; + + int ret; + struct page * page = NULL; + unsigned long offset; + + ret = aso.invalidatepage(page, offset); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_READDIRPLUS_FILE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: NO" >&5 +echo "${ECHO_T}NO" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdirplus_lite member in file_operations structure" >&5 -$as_echo_n "checking for readdirplus_lite member in file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=${CFLAGS} + CFLAGS="${CFLAGS} -Werror" + echo "$as_me:$LINENO: checking for warnings when including linux/config.h" >&5 +echo $ECHO_N "checking for warnings when including linux/config.h... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct file_operations filop = { - .readdirplus_lite = NULL - }; - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 -$as_echo "#define HAVE_READDIRPLUSLITE_FILE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readx member in file_operations structure" >&5 -$as_echo_n "checking for readx member in file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for compat_ioctl member in file_operations structure" >&5 +echo $ECHO_N "checking for compat_ioctl member in file_operations structure... $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. */ #define __KERNEL__ @@ -6633,1027 +14861,1778 @@ main () { struct file_operations filop = { - .readx = NULL + .compat_ioctl = NULL }; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_READX_FILE_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMPAT_IOCTL_HANDLER 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for writex member in file_operations structure" >&5 -$as_echo_n "checking for writex member in file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test x$ac_cv_header_linux_ioctl32_h = xyes ; then + echo "$as_me:$LINENO: checking for register_ioctl32_conversion kernel exports" >&5 +echo $ECHO_N "checking for register_ioctl32_conversion kernel exports... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + #include + int register_ioctl32_conversion(void) + { + return 0; + } int main () { - struct file_operations filop = { - .writex = NULL - }; - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_WRITEX_FILE_OPERATIONS 1" >>confdefs.h +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_REGISTER_IOCTL32_CONVERSION 1 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for aio support in kernel" >&5 -$as_echo_n "checking for aio support in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for int return value of kmem_cache_destroy" >&5 +echo $ECHO_N "checking for int return value of kmem_cache_destroy... $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. */ #define __KERNEL__ - #include - #include - static struct kiocb iocb; + #include int main () { + int i = kmem_cache_destroy(NULL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_AIO 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMEM_CACHE_DESTROY_INT_RETURN 1 +_ACEOF - have_aio=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_aio=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ki_dtor in kiocb structure of kernel" >&5 -$as_echo_n "checking for ki_dtor in kiocb structure of kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for combined file_operations readv and aio_read" >&5 +echo $ECHO_N "checking for combined file_operations readv and aio_read... $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. */ - #define __KERNEL__ - #include - #include - static struct kiocb io_cb = { - .ki_dtor = NULL, - }; + #define __KERNEL__ + #include int main () { + struct file_operations filop = { + .readv = NULL + }; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_AIO_VFS_SUPPORT 1" >>confdefs.h +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMBINED_AIO_AND_VECTOR 1 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for new prototype of aio_read callback of file_operations structure" >&5 -$as_echo_n "checking for new prototype of aio_read callback of file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for kzalloc" >&5 +echo $ECHO_N "checking for kzalloc... $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. */ - #define __KERNEL__ - #include - extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); - static struct file_operations fop = { - .aio_read = my_aio_read, - }; + #define __KERNEL__ + #include int main () { + void * a; + a = kzalloc(1024, GFP_KERNEL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_AIO_NEW_AIO_SIGNATURE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KZALLOC 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - fi +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dentry argument in kernel super_operations statfs" >&5 -$as_echo_n "checking for dentry argument in kernel super_operations statfs... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for two arguments to register_sysctl_table" >&5 +echo $ECHO_N "checking for two arguments to register_sysctl_table... $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. */ #define __KERNEL__ - #include - struct super_operations sop; - int s(struct dentry *de, struct kstatfs *kfs) - { - return 0; - } + #include + #include int main () { - sop.statfs = s; + register_sysctl_table(NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_DENTRY_STATFS_SOP 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vfsmount argument in kernel file_system_type get_sb" >&5 -$as_echo_n "checking for vfsmount argument in kernel file_system_type get_sb... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for generic FS_IOC ioctl flags" >&5 +echo $ECHO_N "checking for generic FS_IOC ioctl flags... $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. */ - #define __KERNEL__ - #include - int get_sb_bdev(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, - int), - struct vfsmount *vfsm) - { - return 0; - } + #define __KERNEL__ + #include int main () { + int flags = FS_IOC_GETFLAGS; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_VFSMOUNT_GETSB 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_NO_FS_IOC_FLAGS 1 +_ACEOF + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for get_sb_nodev" >&5 -$as_echo_n "checking for get_sb_nodev... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for obsolete struct page count without underscore" >&5 +echo $ECHO_N "checking for obsolete struct page count without underscore... $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. */ - #define __KERNEL__ - #include - int v_fill_sb(struct super_block *sb, void *data, int s) - { - return 0; - } + #define __KERNEL__ + #include int main () { - int ret = 0; - struct super_block *sb = NULL; -#ifdef HAVE_VFSMOUNT_GETSB - ret = get_sb_nodev(NULL, 0, NULL, v_fill_sb, NULL ); -#else - sb = get_sb_nodev(NULL, 0, NULL, v_fill_sb); -#endif + struct page *p; + int foo; + foo = atomic_read(&(p)->count); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_GETSB_NODEV 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file_system_type get_sb" >&5 -$as_echo_n "checking for file_system_type get_sb... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel has device classes" >&5 +echo $ECHO_N "checking if kernel has device classes... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct file_system_type f; - f.get_sb = NULL; + class_device_destroy(NULL, "pvfs2") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FSTYPE_GET_SB 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KERNEL_DEVICE_CLASSES 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file_system_type mount exclusively" >&5 -$as_echo_n "checking for file_system_type mount exclusively... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for destructor param to kmem_cache_create" >&5 +echo $ECHO_N "checking for destructor param to kmem_cache_create... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { -#ifdef HAVE_FSTYPE_GET_SB - assert(0); -#else - struct file_system_type f; - f.mount = NULL; -#endif + kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FSTYPE_MOUNT_ONLY 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xattr support in kernel" >&5 -$as_echo_n "checking for xattr support in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for one-param kmem_cache_create constructor" >&5 +echo $ECHO_N "checking for one-param kmem_cache_create constructor... $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. */ #define __KERNEL__ - #include - static struct inode_operations in_op = { - .getxattr = NULL - }; + #include + #include + void ctor(void *req) + { + } int main () { + kmem_cache_create("config-test", 0, 0, 0, ctor); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_XATTR 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM 1 +_ACEOF - have_xattr=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_xattr=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - if test "x$have_xattr" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const argument to setxattr function" >&5 -$as_echo_n "checking for const argument to setxattr function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror -Wall" + echo "$as_me:$LINENO: checking for two param permission" >&5 +echo $ECHO_N "checking for two param permission... $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. */ #define __KERNEL__ + #include + #include #include + #include + int ctor(struct inode *i, int a) + { + return 0; + } + struct inode_operations iop = { + .permission = ctor, + }; int main () { - struct inode_operations inode_ops; - int ret; - struct dentry * dent = NULL; - const char * name = NULL; - const void * val = NULL; - size_t size = 0; - int flags = 0; - - ret = inode_ops.setxattr(dent, name, val, size, flags); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SETXATTR_CONST_ARG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TWO_PARAM_PERMISSION 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file argument to sysctl proc handlers" >&5 -$as_echo_n "checking for file argument to sysctl proc handlers... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for two-param kmem_cache_create constructor" >&5 +echo $ECHO_N "checking for two-param kmem_cache_create constructor... $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. */ - #define __KERNEL__ - #include - #include + #define __KERNEL__ + #include + #include + void ctor(struct kmem_cache *cachep, void *req) + { + } int main () { - struct ctl_table * ctl = NULL; - int write = 0; - struct file * filp = NULL; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); + kmem_cache_create("config-test", 0, 0, 0, ctor); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_PROC_HANDLER_FILE_ARG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ppos argument to sysctl proc handlers" >&5 -$as_echo_n "checking for ppos argument to sysctl proc handlers... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel address_space struct has a spin_lock field named page_lock" >&5 +echo $ECHO_N "checking if kernel address_space struct has a spin_lock field named page_lock... $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. */ - #define __KERNEL__ - #include - #include + #define __KERNEL__ + #include int main () { - struct ctl_table * ctl = NULL; - int write = 0; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); + struct address_space as; + spin_lock(&as.page_lock); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_PROC_HANDLER_PPOS_ARG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - for ac_header in linux/posix_acl.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/posix_acl.h" "ac_cv_header_linux_posix_acl_h" "#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -" -if test "x$ac_cv_header_linux_posix_acl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_POSIX_ACL_H 1 -_ACEOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done - - - for ac_header in linux/posix_acl_xattr.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/posix_acl_xattr.h" "ac_cv_header_linux_posix_acl_xattr_h" "#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif - -" -if test "x$ac_cv_header_linux_posix_acl_xattr_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_POSIX_ACL_XATTR_H 1 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking if kernel address_space struct has a rwlock_t field named tree_lock" >&5 +echo $ECHO_N "checking if kernel address_space struct has a rwlock_t field named tree_lock... $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. */ -fi - -done + #define __KERNEL__ + #include +int +main () +{ - for ac_header in linux/xattr_acl.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/xattr_acl.h" "ac_cv_header_linux_xattr_acl_h" "#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif + struct address_space as; + read_lock(&as.tree_lock); -" -if test "x$ac_cv_header_linux_xattr_acl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_XATTR_ACL_H 1 + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi - -done - - - for ac_header in linux/mount.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/mount.h" "ac_cv_header_linux_mount_h" "#define __KERNEL__ - #include - -" -if test "x$ac_cv_header_linux_mount_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_MOUNT_H 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT 1 _ACEOF -fi - -done - - for ac_header in linux/ioctl32.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/ioctl32.h" "ac_cv_header_linux_ioctl32_h" "#define __KERNEL__ - #include +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -" -if test "x$ac_cv_header_linux_ioctl32_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_IOCTL32_H 1 -_ACEOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -done - - for ac_header in linux/compat.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/compat.h" "ac_cv_header_linux_compat_h" "#define __KERNEL__ - #include - -" -if test "x$ac_cv_header_linux_compat_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_COMPAT_H 1 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking if kernel address_space struct has a spinlock_t field named tree_lock" >&5 +echo $ECHO_N "checking if kernel address_space struct has a spinlock_t field named tree_lock... $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. */ -fi + #define __KERNEL__ + #include -done +int +main () +{ - for ac_header in linux/syscalls.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/syscalls.h" "ac_cv_header_linux_syscalls_h" "#define __KERNEL__ - #include + struct address_space as; + spin_lock(&as.tree_lock); -" -if test "x$ac_cv_header_linux_syscalls_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_SYSCALLS_H 1 + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi - -done +cat >>confdefs.h <<\_ACEOF +#define HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT 1 +_ACEOF - for ac_header in asm/ioctl32.h -do : - ac_fn_c_check_header_compile "$LINENO" "asm/ioctl32.h" "ac_cv_header_asm_ioctl32_h" "#define __KERNEL__ - #include +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -" -if test "x$ac_cv_header_asm_ioctl32_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ASM_IOCTL32_H 1 -_ACEOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -done + echo "$as_me:$LINENO: checking if kernel address_space struct has a priv_lock field - from RT linux" >&5 +echo $ECHO_N "checking if kernel address_space struct has a priv_lock field - from RT linux... $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. */ - for ac_header in linux/exportfs.h -do : - ac_fn_c_check_header_compile "$LINENO" "linux/exportfs.h" "ac_cv_header_linux_exportfs_h" "#define __KERNEL__ - #include + #define __KERNEL__ + #include -" -if test "x$ac_cv_header_linux_exportfs_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LINUX_EXPORTFS_H 1 -_ACEOF +int +main () +{ -fi + struct address_space as; + spin_lock(&as.priv_lock); -done + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT 1 +_ACEOF - ac_fn_c_check_header_compile "$LINENO" "linux/smp_lock.h" "ac_cv_header_linux_smp_lock_h" "#define __KERNEL__ - #include +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -" -if test "x$ac_cv_header_linux_smp_lock_h" = xyes; then : +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic_file_readv api in kernel" >&5 -$as_echo_n "checking for generic_file_readv api in kernel... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel defines mapping_nrpages macro - from RT linux" >&5 +echo $ECHO_N "checking if kernel defines mapping_nrpages macro - from RT linux... $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. */ #define __KERNEL__ #include - int generic_file_readv(struct inode *inode) - { - return 0; - } int main () { + struct address_space idata; + int i = mapping_nrpages(&idata); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MAPPING_NRPAGES_MACRO 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_GENERIC_FILE_READV 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic_permission api in kernel" >&5 -$as_echo_n "checking for generic_permission api in kernel... " >&6; } - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel super_operations contains read_inode field" >&5 +echo $ECHO_N "checking if kernel super_operations contains read_inode field... $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. */ #define __KERNEL__ #include - int generic_permission(struct inode *inode) - { - return 0; - } int main () { + struct super_operations sops; + sops.read_inode(NULL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_READ_INODE 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_GENERIC_PERMISSION 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for four-param generic_permission" >&5 -$as_echo_n "checking for four-param generic_permission... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel super_operations contains drop_inode field" >&5 +echo $ECHO_N "checking if kernel super_operations contains drop_inode field... $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. */ #define __KERNEL__ #include - struct inode *f; int main () { - generic_permission(f, 0, 0, NULL); + struct super_operations sops; + sops.drop_inode(NULL); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FOUR_PARAM_GENERIC_PERMISSION 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DROP_INODE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic_getxattr api in kernel" >&5 -$as_echo_n "checking for generic_getxattr api in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel super_operations contains put_inode field" >&5 +echo $ECHO_N "checking if kernel super_operations contains put_inode field... $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. */ #define __KERNEL__ #include - #include - int generic_getxattr(struct inode *inode) - { - return 0; - } int main () { + struct super_operations sops; + sops.put_inode(NULL); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PUT_INODE 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_GENERIC_GETXATTR 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arg member in read_descriptor_t in kernel" >&5 -$as_echo_n "checking for arg member in read_descriptor_t in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if mount.h defines MNT_NOATIME" >&5 +echo $ECHO_N "checking if mount.h defines MNT_NOATIME... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - read_descriptor_t x; - x.arg.data = NULL; + int flag = MNT_NOATIME; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_ARG_IN_READ_DESCRIPTOR_T 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_MNT_NOATIME 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fh_to_dentry member in export_operations in kernel" >&5 -$as_echo_n "checking for fh_to_dentry member in export_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if mount.h defines MNT_NODIRATIME" >&5 +echo $ECHO_N "checking if mount.h defines MNT_NODIRATIME... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct export_operations x; - x.fh_to_dentry = NULL; + int flag = MNT_NODIRATIME; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FHTODENTRY_EXPORT_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_MNT_NODIRATIME 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for encode_fh member in export_operations in kernel" >&5 -$as_echo_n "checking for encode_fh member in export_operations in kernel... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for d_alloc_anon" >&5 +echo $ECHO_N "checking for d_alloc_anon... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct export_operations x; - x.encode_fh = NULL; + struct inode *i; + d_alloc_anon(i); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_ENCODEFH_EXPORT_OPERATIONS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_ALLOC_ANON 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for second arg type int in address_space_operations releasepage" >&5 -$as_echo_n "checking for second arg type int in address_space_operations releasepage... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for s_dirty in struct super_block" >&5 +echo $ECHO_N "checking for s_dirty in struct super_block... $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. */ - #define __KERNEL__ - #include - extern int try_to_release_page(struct page *page, int gfp_mask); + #define __KERNEL__ + #include int main () { + struct super_block *s; + list_empty(&s->s_dirty); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SB_DIRTY_LIST 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int return in inode_operations follow_link" >&5 -$as_echo_n "checking for int return in inode_operations follow_link... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for current_fsuid" >&5 +echo $ECHO_N "checking for current_fsuid... $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. */ - #define __KERNEL__ - #include - extern int page_follow_link_light(struct dentry *, - struct nameidata *); + #define __KERNEL__ + #include + #include int main () { + int uid = current_fsuid(); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_CURRENT_FSUID 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int return in kmem_cache_destroy" >&5 -$as_echo_n "checking for int return in kmem_cache_destroy... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking if kernel backing_dev_info struct has a name field" >&5 +echo $ECHO_N "checking if kernel backing_dev_info struct has a name field... $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. */ - #define __KERNEL__ - #include - extern int kmem_cache_destroy(kmem_cache_t *); + #define __KERNEL__ + #include + #include int main () { + struct backing_dev_info foo = + { + .name = "foo" + }; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_INT_RETURN_KMEM_CACHE_DESTROY 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_BACKING_DEV_INFO_NAME 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for older int return in invalidatepage" >&5 -$as_echo_n "checking for older int return in invalidatepage... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for bdi_init" >&5 +echo $ECHO_N "checking for bdi_init... $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. */ - #define __KERNEL__ + #define __KERNEL__ #include + #include int main () { - struct address_space_operations aso; - - int ret; - struct page * page = NULL; - unsigned long offset; - - ret = aso.invalidatepage(page, offset); + int ret = bdi_init(NULL); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDI_INIT 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: NO" >&5 -$as_echo "NO" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=${CFLAGS} - CFLAGS="${CFLAGS} -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for warnings when including linux/config.h" >&5 -$as_echo_n "checking for warnings when including linux/config.h... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +echo $ECHO_N "checking whether struct ctl_table has ctl_name... $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. */ #define __KERNEL__ - #include + #include + static struct ctl_table c = { .ctl_name = 0, }; int main () @@ -7663,965 +16642,1886 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_NAME 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compat_ioctl member in file_operations structure" >&5 -$as_echo_n "checking for compat_ioctl member in file_operations structure... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking whether struct ctl_table has strategy" >&5 +echo $ECHO_N "checking whether struct ctl_table has strategy... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + static struct ctl_table c = { .strategy = 0, }; int main () { - struct file_operations filop = { - .compat_ioctl = NULL - }; - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_COMPAT_IOCTL_HANDLER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRATEGY_NAME 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - if test x$ac_cv_header_linux_ioctl32_h = xyes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for register_ioctl32_conversion kernel exports" >&5 -$as_echo_n "checking for register_ioctl32_conversion kernel exports... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for five-param xattr_handler.get" >&5 +echo $ECHO_N "checking for five-param xattr_handler.get... $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. */ #define __KERNEL__ - #include - #include - int register_ioctl32_conversion(void) - { - return 0; - } + #include + #include + static struct xattr_handler x; + static int get_xattr_h( struct dentry *d, const char *n, + void *b, size_t s, int h) + { return 0; } int main () { + x.get = get_xattr_h; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XATTR_HANDLER_GET_FIVE_PARAM 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_REGISTER_IOCTL32_CONVERSION 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int return value of kmem_cache_destroy" >&5 -$as_echo_n "checking for int return value of kmem_cache_destroy... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for six-param xattr_handler.set" >&5 +echo $ECHO_N "checking for six-param xattr_handler.set... $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. */ #define __KERNEL__ - #include + #include + #include + static struct xattr_handler x; + static int set_xattr_h( struct dentry *d, const char *n, + const void *b, size_t s, int f, int h) + { return 0; } int main () { - int i = kmem_cache_destroy(NULL); + x.set = set_xattr_h; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KMEM_CACHE_DESTROY_INT_RETURN 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_XATTR_HANDLER_SET_SIX_PARAM 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for combined file_operations readv and aio_read" >&5 -$as_echo_n "checking for combined file_operations readv and aio_read... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for const s_xattr member in super_block struct" >&5 +echo $ECHO_N "checking for const s_xattr member in super_block struct... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + #include + struct super_block sb; + const struct xattr_handler *x[] = { NULL }; int main () { - struct file_operations filop = { - .readv = NULL - }; + sb.s_xattr = x; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_S_XATTR_IN_SUPERBLOCK 1 +_ACEOF + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_COMBINED_AIO_AND_VECTOR 1" >>confdefs.h +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kzalloc" >&5 -$as_echo_n "checking for kzalloc... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking stddef.h true/false enum" >&5 +echo $ECHO_N "checking stddef.h true/false enum... $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. */ #define __KERNEL__ - #include + #include + int f = true; int main () { - void * a; - a = kzalloc(1024, GFP_KERNEL); - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KZALLOC 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TRUE_FALSE_ENUM 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two arguments to register_sysctl_table" >&5 -$as_echo_n "checking for two arguments to register_sysctl_table... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for dentry argument in fsync" >&5 +echo $ECHO_N "checking for dentry argument in fsync... $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. */ #define __KERNEL__ - #include - #include + #include + static struct file_operations f; + static int local_fsync(struct file *f, struct dentry *d, int i) + { return 0; } int main () { - register_sysctl_table(NULL, 0); + f.fsync = local_fsync; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_DENTRY_PARAM 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for generic FS_IOC ioctl flags" >&5 -$as_echo_n "checking for generic FS_IOC ioctl flags... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for unlocked_ioctl in file_operations" >&5 +echo $ECHO_N "checking for unlocked_ioctl in file_operations... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + static struct file_operations f; int main () { - int flags = FS_IOC_GETFLAGS; + f.unlocked_ioctl = NULL; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNLOCKED_IOCTL_HANDLER 1 +_ACEOF -$as_echo "#define HAVE_NO_FS_IOC_FLAGS 1" >>confdefs.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete struct page count without underscore" >&5 -$as_echo_n "checking for obsolete struct page count without underscore... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for inode_setattr" >&5 +echo $ECHO_N "checking for inode_setattr... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + struct iattr *iattr; + struct inode *inode; + int ret; int main () { - struct page *p; - int foo; - foo = atomic_read(&(p)->count); + ret = inode_setattr(inode, iattr); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_SETATTR 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel has device classes" >&5 -$as_echo_n "checking if kernel has device classes... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for three-param dentry_operations.d_hash" >&5 +echo $ECHO_N "checking for three-param dentry_operations.d_hash... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_hash_t(const struct dentry *d, + const struct inode *i, + struct qstr * q) + { return 0; } int main () { - class_device_destroy(NULL, "pvfs2") + d.d_hash = d_hash_t; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KERNEL_DEVICE_CLASSES 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_THREE_PARAM_D_HASH 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for destructor param to kmem_cache_create" >&5 -$as_echo_n "checking for destructor param to kmem_cache_create... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for seven-param dentry_operations.d_compare" >&5 +echo $ECHO_N "checking for seven-param dentry_operations.d_compare... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_compare_t(const struct dentry *d1, + const struct inode *i1, + const struct dentry *d2, + const struct inode *i2, + unsigned int len, + const char *str, + const struct qstr *qstr) + { return 0; } int main () { - kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); + d.d_compare = d_compare_t; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SEVEN_PARAM_D_COMPARE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-param kmem_cache_create constructor" >&5 -$as_echo_n "checking for one-param kmem_cache_create constructor... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for constified dentry_operations.d_delete" >&5 +echo $ECHO_N "checking for constified dentry_operations.d_delete... $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. */ #define __KERNEL__ - #include - #include - void ctor(void *req) - { - } + #include + #include + static struct dentry_operations d; + static int d_delete_t(const struct dentry *d) + { return 0; } int main () { - kmem_cache_create("config-test", 0, 0, 0, ctor); + d.d_delete = d_delete_t; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_DELETE_CONST 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wall" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two param permission" >&5 -$as_echo_n "checking for two param permission... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for dentry.d_count atomic_t type" >&5 +echo $ECHO_N "checking for dentry.d_count atomic_t type... $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. */ #define __KERNEL__ - #include - #include #include - #include - int ctor(struct inode *i, int a) - { - return 0; - } - struct inode_operations iop = { - .permission = ctor, - }; + #include + struct dentry d; + atomic_t x; int main () { + x = d.d_count; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_TWO_PARAM_PERMISSION 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DENTRY_D_COUNT_ATOMIC 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-param kmem_cache_create constructor" >&5 -$as_echo_n "checking for two-param kmem_cache_create constructor... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for three-param inode_operations permission" >&5 +echo $ECHO_N "checking for three-param inode_operations permission... $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. */ #define __KERNEL__ - #include - #include - void ctor(struct kmem_cache *cachep, void *req) - { - } + #include + struct inode_operations i; + int p(struct inode *i, int mode, unsigned int flags) + { return 0; } int main () { - kmem_cache_create("config-test", 0, 0, 0, ctor); + i.permission = p; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel address_space struct has a spin_lock field named page_lock" >&5 -$as_echo_n "checking if kernel address_space struct has a spin_lock field named page_lock... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for three-param acl_check of generic_permission" >&5 +echo $ECHO_N "checking for three-param acl_check of generic_permission... $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. */ #define __KERNEL__ #include + struct inode *i; + int p(struct inode *i, int mode, unsigned int flags) + { return 0; } int main () { - struct address_space as; - spin_lock(&as.page_lock); + generic_permission(i, 0, 0, p); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_THREE_PARAM_ACL_CHECK 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel address_space struct has a rwlock_t field named tree_lock" >&5 -$as_echo_n "checking if kernel address_space struct has a rwlock_t field named tree_lock... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for SPIN_LOCK_UNLOCKED " >&5 +echo $ECHO_N "checking for SPIN_LOCK_UNLOCKED ... $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. */ #define __KERNEL__ - #include + #include + spinlock_t test_lock = SPIN_LOCK_UNLOCKED; + struct inode *i; int main () { - struct address_space as; - read_lock(&as.tree_lock); - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SPIN_LOCK_UNLOCKED 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel address_space struct has a spinlock_t field named tree_lock" >&5 -$as_echo_n "checking if kernel address_space struct has a spinlock_t field named tree_lock... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + echo "$as_me:$LINENO: checking for get_sb " >&5 +echo $ECHO_N "checking for get_sb ... $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. */ #define __KERNEL__ #include + struct file_system_type f; int main () { - struct address_space as; - spin_lock(&as.tree_lock); + f.get_sb = NULL; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_SB_MEMBER_FILE_SYSTEM_TYPE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel address_space struct has a priv_lock field - from RT linux" >&5 -$as_echo_n "checking if kernel address_space struct has a priv_lock field - from RT linux... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for dirty_inode flag" >&5 +echo $ECHO_N "checking for dirty_inode flag... $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. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + void di(struct inode *i, int f) + { + return; + } int main () { - struct address_space as; - spin_lock(&as.priv_lock); + struct super_operations s; + s.dirty_inode = di; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIRTY_INODE_FLAGS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel defines mapping_nrpages macro - from RT linux" >&5 -$as_echo_n "checking if kernel defines mapping_nrpages macro - from RT linux... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - #define __KERNEL__ - #include + CFLAGS=$oldcflags -int -main () -{ - struct address_space idata; - int i = mapping_nrpages(&idata); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define WITH_LINUX_KMOD 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_MAPPING_NRPAGES_MACRO 1" >>confdefs.h +fi + +# Check whether --enable-threaded-kmod-helper or --disable-threaded-kmod-helper was given. +if test "${enable_threaded_kmod_helper+set}" = set; then + enableval="$enable_threaded_kmod_helper" + if test "x$enableval" = "xyes" ; then + THREADED_KMOD_HELPER=yes + fi + +fi; + + +BUILD_ABSOLUTE_TOP=`pwd` +SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"` +SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd` + + + + + + + +# Check whether --enable-fast or --disable-fast was given. +if test "${enable_fast+set}" = set; then + enableval="$enable_fast" + +if test "x$USR_CFLAGS_SET" = "xno"; then + CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG" +fi + +fi; + +test_for_fuse() +{ + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; 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_HAVE_PKGCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_PKGCONFIG"; then + ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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_HAVE_PKGCONFIG="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" +fi +fi +HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG +if test -n "$HAVE_PKGCONFIG"; then + echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 +echo "${ECHO_T}$HAVE_PKGCONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel super_operations contains read_inode field" >&5 -$as_echo_n "checking if kernel super_operations contains read_inode field... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test "x$HAVE_PKGCONFIG" = "xyes" ; then + echo "$as_me:$LINENO: checking for FUSE library" >&5 +echo $ECHO_N "checking for FUSE library... $ECHO_C" >&6 + if `pkg-config --exists fuse` ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + FUSE_LDFLAGS=`pkg-config --libs fuse` + FUSE_CFLAGS=`pkg-config --cflags fuse` - #define __KERNEL__ - #include -int -main () -{ - struct super_operations sops; - sops.read_inode(NULL); + BUILD_FUSE="1" - ; - return 0; + else + { { echo "$as_me:$LINENO: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&5 +echo "$as_me: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&2;} + { (exit 1); exit 1; }; } + fi + else + { { echo "$as_me:$LINENO: error: FUSE: pkg-config not available. Please install pkg-config." >&5 +echo "$as_me: error: FUSE: pkg-config not available. Please install pkg-config." >&2;} + { (exit 1); exit 1; }; } + fi } -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_READ_INODE 1" >>confdefs.h +# Check whether --enable-fuse or --disable-fuse was given. +if test "${enable_fuse+set}" = set; then + enableval="$enable_fuse" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test "x$enableval" = "xyes" ; then + test_for_fuse + CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__" +fi +fi; + +# default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast +if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then + CFLAGS="$CFLAGS -g -O2" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel super_operations contains drop_inode field" >&5 -$as_echo_n "checking if kernel super_operations contains drop_inode field... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #define __KERNEL__ - #include -int -main () + +STRICT_CFLAGS= +# Check whether --enable-strict or --disable-strict was given. +if test "${enable_strict+set}" = set; then + enableval="$enable_strict" + STRICT_CFLAGS=1 +fi; + + +# Check whether --enable-verbose-build or --disable-verbose-build was given. +if test "${enable_verbose_build+set}" = set; then + enableval="$enable_verbose_build" + QUIET_COMPILE=0 +else + QUIET_COMPILE=1 +fi; + + + +test_for_epoll() { - struct super_operations sops; - sops.drop_inode(NULL); +for ac_header in sys/epoll.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 - ; - return 0; -} +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 ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 -$as_echo "#define HAVE_DROP_INODE 1" >>confdefs.h + 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel super_operations contains put_inode field" >&5 -$as_echo_n "checking if kernel super_operations contains put_inode field... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi - #define __KERNEL__ - #include +done + echo "$as_me:$LINENO: checking for epoll functions" >&5 +echo $ECHO_N "checking for epoll functions... $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 int main () { - struct super_operations sops; - sops.put_inode(NULL); + int fd; + fd = epoll_create(1); + close(fd); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_PUT_INODE 1" >>confdefs.h +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + BUILD_EPOLL=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +} + +# Check whether --enable-epoll or --disable-epoll was given. +if test "${enable_epoll+set}" = set; then + enableval="$enable_epoll" + + if test "x$enableval" = "xyes"; then + BUILD_EPOLL=1 + + fi + +else + + test_for_epoll + +fi; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mount.h defines MNT_NOATIME" >&5 -$as_echo_n "checking if mount.h defines MNT_NOATIME... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Check whether --enable-segv-backtrace or --disable-segv-backtrace was given. +if test "${enable_segv_backtrace+set}" = set; then + enableval="$enable_segv_backtrace" + +else + echo "$as_me:$LINENO: checking if segv backtrace capable" >&5 +echo $ECHO_N "checking if segv backtrace capable... $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. */ - #define __KERNEL__ - #include +#include +#define __USE_GNU +#include +#if !defined(REG_EIP) && !defined(REG_RIP) + choke me +#endif int main () { - int flag = MNT_NOATIME; - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_MNT_NOATIME 1" >>confdefs.h - +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + PVFS2_SEGV_BACKTRACE=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if mount.h defines MNT_NODIRATIME" >&5 -$as_echo_n "checking if mount.h defines MNT_NODIRATIME... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi; - #define __KERNEL__ - #include -int -main () -{ +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + build_shared=$enableval +else + build_shared=no +fi; - int flag = MNT_NODIRATIME; - ; - return 0; -} +if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then + { { echo "$as_me:$LINENO: error: Must do --enable-shared or --enable-static or both." >&5 +echo "$as_me: error: Must do --enable-shared or --enable-static or both." >&2;} + { (exit 1); exit 1; }; } +fi + +BUILD_USRINT= +# Check whether --enable-usrint or --disable-usrint was given. +if test "${enable_usrint+set}" = set; then + enableval="$enable_usrint" + if test "x$enableval" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_BUILD 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_MNT_NODIRATIME 1" >>confdefs.h + BUILD_USRINT=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_BUILD 0 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_alloc_anon" >&5 -$as_echo_n "checking for d_alloc_anon... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +else - #define __KERNEL__ - #include +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_BUILD 1 +_ACEOF -int -main () -{ +BUILD_USRINT=1 - struct inode *i; - d_alloc_anon(i); +fi; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +USRINT_KMOUNT= +# Check whether --enable-usrint-kmount or --disable-usrint-kmount was given. +if test "${enable_usrint_kmount+set}" = set; then + enableval="$enable_usrint_kmount" + if test "x$enableval" = "xyes" ; then + if test "x$BUILD_KERNEL" = "x1" -o "x$BUILD_FUSE" = "x1" ; then -$as_echo "#define HAVE_D_ALLOC_ANON 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_KMOUNT 1 +_ACEOF + USRINT_KMOUNT=1 + else + { { echo "$as_me:$LINENO: error: Assume FS mounted but neither kernel nor FUSE build " >&5 +echo "$as_me: error: Assume FS mounted but neither kernel nor FUSE build " >&2;} + { (exit 1); exit 1; }; } + fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_KMOUNT 0 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s_dirty in struct super_block" >&5 -$as_echo_n "checking for s_dirty in struct super_block... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_KMOUNT 0 +_ACEOF - #define __KERNEL__ - #include -int -main () -{ +fi; - struct super_block *s; - list_empty(&s->s_dirty); +# Check whether --enable-usrint-cwd or --disable-usrint-cwd was given. +if test "${enable_usrint_cwd+set}" = set; then + enableval="$enable_usrint_cwd" + if test "x$enableval" = "xyes" ; then - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_SB_DIRTY_LIST 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 0 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + if test "x$USRINT_KMOUNT" = "x1" ; then - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for current_fsuid" >&5 -$as_echo_n "checking for current_fsuid... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 0 +_ACEOF - #define __KERNEL__ - #include - #include +else -int -main () -{ +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 1 +_ACEOF - int uid = current_fsuid(); +fi +fi; + +echo "$as_me:$LINENO: checking if dlfns needs explicit library request" >&5 +echo $ECHO_N "checking if dlfns needs explicit library request... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF + +#define _GNU_SOURCE 1 +#include +main() {void *p = dlsym(RTLD_DEFAULT,"sym");} - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 -$as_echo "#define HAVE_CURRENT_FSUID 1" >>confdefs.h + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kernel backing_dev_info struct has a name field" >&5 -$as_echo_n "checking if kernel backing_dev_info struct has a name field... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + LIBS="$LIBS -ldl" - #define __KERNEL__ - #include - #include +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -int -main () -{ +BUILD_UCACHE= +# Check whether --enable-ucache or --disable-ucache was given. +if test "${enable_ucache+set}" = set; then + enableval="$enable_ucache" + if test "x$enableval" = "xyes" ; then - struct backing_dev_info foo = - { - .name = "foo" - }; +cat >>confdefs.h <<\_ACEOF +#define PVFS_UCACHE_ENABLE 1 +_ACEOF - ; - return 0; -} + BUILD_UCACHE=1 +else + +cat >>confdefs.h <<\_ACEOF +#define PVFS_UCACHE_ENABLE 0 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_BACKING_DEV_INFO_NAME 1" >>confdefs.h +fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cat >>confdefs.h <<\_ACEOF +#define PVFS_UCACHE_ENABLE 0 +_ACEOF - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bdi_init" >&5 -$as_echo_n "checking for bdi_init... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +fi; + +BUILD_ACL_INTERFACE= +echo "$as_me:$LINENO: checking for user acl includes sys/acl.h acl/libacl.h" >&5 +echo $ECHO_N "checking for user acl includes sys/acl.h acl/libacl.h... $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. */ - #define __KERNEL__ - #include - #include +#include +#include int main () { - int ret = bdi_init(NULL); - ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + BUILD_ACL_INTERFACE=1 + +cat >>confdefs.h <<\_ACEOF +#define PVFS_HAVE_ACL_INCLUDES 1 +_ACEOF -$as_echo "#define HAVE_BDI_INIT 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + BUILD_ACL_INTERFACE=0 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct ctl_table has ctl_name" >&5 -$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for scandir compare arg using void pointers" >&5 +echo $ECHO_N "checking for scandir compare arg using void pointers... $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. */ - #define __KERNEL__ - #include - static struct ctl_table c = { .ctl_name = 0, }; +#define _LARGEFILE64_SOURCE 1 +#define _GNU_SOURCE 1 +#include +int scandir (const char *dir, struct dirent ***list, + int (*sel)(const struct dirent *), + int (*cmp)(const void *, const void *)) +{ return 0; } +int scandir64 (const char *dir, struct dirent64 ***list, + int (*sel)(const struct dirent64 *), + int (*cmp)(const void *, const void *)) +{ return 0; } int main () @@ -8631,27 +18531,61 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define PVFS_SCANDIR_VOID 1 +_ACEOF -$as_echo "#define HAVE_CTL_NAME 1" >>confdefs.h else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct ctl_table has strategy" >&5 -$as_echo_n "checking whether struct ctl_table has strategy... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +INTELC= +GNUC= +echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 +echo $ECHO_N "checking whether cc is an Intel compiler... $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. */ - #define __KERNEL__ - #include - static struct ctl_table c = { .strategy = 0, }; +#ifndef __ICC + choke me +#endif int main () @@ -8661,2832 +18595,5259 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_STRATEGY_NAME 1" >>confdefs.h +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INTELC=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "x$INTELC" = "x" ; then + if test "x$GCC" = "xyes" ; then + GNUC=1 + fi +fi - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for five-param xattr_handler.get" >&5 -$as_echo_n "checking for five-param xattr_handler.get... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int get_xattr_h( struct dentry *d, const char *n, - void *b, size_t s, int h) - { return 0; } + +# Check whether --with-efence or --without-efence was given. +if test "${with_efence+set}" = set; then + withval="$with_efence" + if test "x$withval" != "xyes" ; then + LDFLAGS="${LDFLAGS} -L$withval" + fi + +echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 +echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6 +if test "${ac_cv_lib_efence_malloc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lefence $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char malloc (); int main () { - - x.get = get_xattr_h; - +malloc (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_XATTR_HANDLER_GET_FIVE_PARAM 1" >>confdefs.h - +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_efence_malloc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_efence_malloc=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6 +if test $ac_cv_lib_efence_malloc = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBEFENCE 1 +_ACEOF - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for six-param xattr_handler.set" >&5 -$as_echo_n "checking for six-param xattr_handler.set... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + LIBS="-lefence $LIBS" - #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int set_xattr_h( struct dentry *d, const char *n, - const void *b, size_t s, int f, int h) - { return 0; } +fi -int -main () -{ - x.set = set_xattr_h; +fi; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_XATTR_HANDLER_SET_SIX_PARAM 1" >>confdefs.h +# Check whether --with-valgrind or --without-valgrind was given. +if test "${with_valgrind+set}" = set; then + withval="$with_valgrind" + found=no + save_cppflags="$CPPFLAGS" + echo "$as_me:$LINENO: checking for valgrind.h usability" >&5 +echo $ECHO_N "checking for valgrind.h usability... $ECHO_C" >&6 + if test "x$withval" = xyes ; then + cat >conftest.$ac_ext <<_ACEOF +#include +_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 + found=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const s_xattr member in super_block struct" >&5 -$as_echo_n "checking for const s_xattr member in super_block struct... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define __KERNEL__ - #include - #include - struct super_block sb; - const struct xattr_handler *x[] = { NULL }; +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$found = xno ; then + CPPFLAGS="$CPPFLAGS -I/usr/include/valgrind" + cat >conftest.$ac_ext <<_ACEOF +#include +_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 + found=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int -main () -{ +CPPFLAGS="$save_cppflags" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + else + for d in $withval $withval/include \ + $withval/valgrind $withval/include/valgrind + do + CPPFLAGS="$CPPFLAGS -I$d" + cat >conftest.$ac_ext <<_ACEOF +#include +_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 + found=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - sb.s_xattr = x; +CPPFLAGS="$save_cppflags" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$found = xyes ; then + break + fi + done + fi + echo "$as_me:$LINENO: result: $found" >&5 +echo "${ECHO_T}$found" >&6 + if test x$found = xyes ; then - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_VALGRIND_H 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_CONST_S_XATTR_IN_SUPERBLOCK 1" >>confdefs.h + fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +fi; -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +if test "x$NEED_BERKELEY_DB" = "xyes" ; then - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking stddef.h true/false enum" >&5 -$as_echo_n "checking stddef.h true/false enum... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Check whether --with-db or --without-db was given. +if test "${with_db+set}" = set; then + withval="$with_db" - #define __KERNEL__ - #include - int f = true; + dbpath=${withval} -int -main () -{ + DB_LDFLAGS= + echo "$as_me:$LINENO: checking for db library" >&5 +echo $ECHO_N "checking for db library... $ECHO_C" >&6 + oldlibs=$LIBS + lib=notfound - ; - return 0; -} + if test "x$dbpath" != "x" ; then + oldcflags=$CFLAGS + for dbheader in db4 db3 notfound; do + cat >conftest.$ac_ext <<_ACEOF +#include "$dbpath/include/$dbheader/db.h" _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + DB_CFLAGS="-I$dbpath/include/$dbheader/" + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_TRUE_FALSE_ENUM 1" >>confdefs.h +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + if test "x$dbheader" = "xnotfound"; then + cat >conftest.$ac_ext <<_ACEOF +#include "$dbpath/include/db.h" +_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 + DB_CFLAGS="-I$dbpath/include/" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. +See \`config.log' for more details." >&5 +echo "$as_me: error: Invalid libdb path specified. No db.h found. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + DB_LDFLAGS="-L${dbpath}/lib" + LDFLAGS="$DB_LDFLAGS ${LDFLAGS}" - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dentry argument in fsync" >&5 -$as_echo_n "checking for dentry argument in fsync... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="${oldlibs} -ldb -lpthread" + DB_LIB="-ldb" + CFLAGS="$DB_CFLAGS $oldcflags" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - static struct file_operations f; - static int local_fsync(struct file *f, struct dentry *d, int i) - { return 0; } - +#include int main () { - - f.fsync = local_fsync; - +DB *dbp; db_create(&dbp, NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_FSYNC_DENTRY_PARAM 1" >>confdefs.h - +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 + lib=db else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$oldcflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unlocked_ioctl in file_operations" >&5 -$as_echo_n "checking for unlocked_ioctl in file_operations... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + else + for lib in db4 db3 db notfound; do + LIBS="${oldlibs} -l$lib -lpthread" + DB_LIB="-l$lib" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - static struct file_operations f; - +#include int main () { - - f.unlocked_ioctl = NULL; - +DB *dbp; db_create(&dbp, NULL, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_UNLOCKED_IOCTL_HANDLER 1" >>confdefs.h - +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 + break else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inode_setattr" >&5 -$as_echo_n "checking for inode_setattr... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + LIBS=$oldlibs + if test "x$lib" = "xnotfound" ; then + { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +echo "$as_me: error: could not find DB libraries" >&2;} + { (exit 1); exit 1; }; } + else + echo "$as_me:$LINENO: result: $lib" >&5 +echo "${ECHO_T}$lib" >&6 + fi - #define __KERNEL__ - #include - struct iattr *iattr; - struct inode *inode; - int ret; -int -main () -{ - ret = inode_setattr(inode, iattr); - ; - return 0; -} + echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + oldcflags=$CFLAGS + CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_INODE_SETATTR 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param dentry_operations.d_hash" >&5 -$as_echo_n "checking for three-param dentry_operations.d_hash... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_hash_t(const struct dentry *d, - const struct inode *i, - struct qstr * q) - { return 0; } + #include + + void error_callback_fn(const DB_ENV *dbenv, + const char *prefix, + const char *message) + { + return; + } int main () { - d.d_hash = d_hash_t; + DB *db; + + db->set_errcall(db, error_callback_fn); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_THREE_PARAM_D_HASH 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 +_ACEOF + have_dbenv_parameter_to_db_error_callback=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_dbenv_parameter_to_db_error_callback=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seven-param dentry_operations.d_compare" >&5 -$as_echo_n "checking for seven-param dentry_operations.d_compare... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then + echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +echo $ECHO_N "checking if third parameter to error callback function is const... $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. */ - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_compare_t(const struct dentry *d1, - const struct inode *i1, - const struct dentry *d2, - const struct inode *i2, - unsigned int len, - const char *str, - const struct qstr *qstr) - { return 0; } + #include + + void error_callback_fn(const DB_ENV *dbenv, + const char *prefix, + char *message) + { + return; + } int main () { - d.d_compare = d_compare_t; + DB *db; + + db->set_errcall(db, error_callback_fn); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -$as_echo "#define HAVE_SEVEN_PARAM_D_COMPARE 1" >>confdefs.h +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for constified dentry_operations.d_delete" >&5 -$as_echo_n "checking for constified dentry_operations.d_delete... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" + echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +echo $ECHO_N "checking for DB stat with malloc function ptr... $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. */ - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_delete_t(const struct dentry *d) - { return 0; } + #include + #include int main () { - d.d_delete = d_delete_t; + int ret = 0; + DB *db = db; + int dummy = 0; + u_int32_t flags = 0; + + ret = db->stat(db, &dummy, malloc, flags); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_D_DELETE_CONST 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 +_ACEOF + have_db_stat_malloc=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_db_stat_malloc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dentry.d_count atomic_t type" >&5 -$as_echo_n "checking for dentry.d_count atomic_t type... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$have_db_stat_malloc" = "xno" ; then + + echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +echo $ECHO_N "checking for txnid parameter to DB stat function... $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. */ - #define __KERNEL__ - #include - #include - struct dentry d; - atomic_t x; + #include int main () { - x = d.d_count; + int ret = 0; + DB *db = db; + DB_TXN *txnid = txnid; + u_int32_t flags = 0; + + ret = db->stat(db, txnid, NULL, flags); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_DENTRY_D_COUNT_ATOMIC 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 +_ACEOF + have_txnid_param_to_stat=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_txnid_param_to_stat=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param inode_operations permission" >&5 -$as_echo_n "checking for three-param inode_operations permission... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + + echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +echo $ECHO_N "checking for txnid parameter to DB open function... $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. */ - #define __KERNEL__ - #include - struct inode_operations i; - int p(struct inode *i, int mode, unsigned int flags) - { return 0; } + #include int main () { - i.permission = p; + int ret = 0; + DB *db = NULL; + DB_TXN *txnid = NULL; + char *file = NULL; + char *database = NULL; + DBTYPE type = 0; + u_int32_t flags = 0; + int mode = 0; + + ret = db->open(db, txnid, file, database, type, flags, mode); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for three-param acl_check of generic_permission" >&5 -$as_echo_n "checking for three-param acl_check of generic_permission... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +echo $ECHO_N "checking for DB_DIRTY_READ flag... $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. */ - #define __KERNEL__ - #include - struct inode *i; - int p(struct inode *i, int mode, unsigned int flags) - { return 0; } + #include int main () { - generic_permission(i, 0, 0, p); + u_int32_t flags = DB_DIRTY_READ; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_THREE_PARAM_ACL_CHECK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_DIRTY_READ 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SPIN_LOCK_UNLOCKED " >&5 -$as_echo_n "checking for SPIN_LOCK_UNLOCKED ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +echo $ECHO_N "checking for DB_BUFFER_SMALL error... $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. */ - #define __KERNEL__ - #include - spinlock_t test_lock = SPIN_LOCK_UNLOCKED; - struct inode *i; + #include int main () { + int res = DB_BUFFER_SMALL; + res++; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_SPIN_LOCK_UNLOCKED 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_BUFFER_SMALL 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for get_sb " >&5 -$as_echo_n "checking for get_sb ... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +echo $ECHO_N "checking for berkeley db get_pagesize function... $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. */ - #define __KERNEL__ - #include - struct file_system_type f; + #include int main () { - f.get_sb = NULL; + int ret = 0; + DB *db = NULL; + int pagesize; + + ret = db->get_pagesize(db, &pagesize); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_GET_SB_MEMBER_FILE_SYSTEM_TYPE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_GET_PAGESIZE 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirty_inode flag" >&5 -$as_echo_n "checking for dirty_inode flag... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +echo $ECHO_N "checking Berkeley DB version... $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. */ - #define __KERNEL__ - #include - void di(struct inode *i, int f) - { - return; - } + #include int main () { - struct super_operations s; - s.dirty_inode = di; + #if DB_VERSION_MAJOR < 4 || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ + DB_VERSION_PATCH < 30) + #error "Recommend version of Berkeley DB at least 4.8.30" + #endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DIRTY_INODE_FLAGS 1" >>confdefs.h - +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_DB_OLD=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + HAVE_DB_OLD=1 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$oldcflags" - CFLAGS=$oldcflags +else + dbpath="" + DB_LDFLAGS= + echo "$as_me:$LINENO: checking for db library" >&5 +echo $ECHO_N "checking for db library... $ECHO_C" >&6 + oldlibs=$LIBS + lib=notfound -$as_echo "#define WITH_LINUX_KMOD 1" >>confdefs.h + if test "x$dbpath" != "x" ; then + oldcflags=$CFLAGS + for dbheader in db4 db3 notfound; do + cat >conftest.$ac_ext <<_ACEOF +#include "$dbpath/include/$dbheader/db.h" +_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 + DB_CFLAGS="-I$dbpath/include/$dbheader/" + 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 -# Check whether --enable-threaded-kmod-helper was given. -if test "${enable_threaded_kmod_helper+set}" = set; then : - enableval=$enable_threaded_kmod_helper; if test "x$enableval" = "xyes" ; then - THREADED_KMOD_HELPER=yes - fi + if test "x$dbheader" = "xnotfound"; then + cat >conftest.$ac_ext <<_ACEOF +#include "$dbpath/include/db.h" +_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 + DB_CFLAGS="-I$dbpath/include/" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. +See \`config.log' for more details." >&5 +echo "$as_me: error: Invalid libdb path specified. No db.h found. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + DB_LDFLAGS="-L${dbpath}/lib" + LDFLAGS="$DB_LDFLAGS ${LDFLAGS}" + LIBS="${oldlibs} -ldb -lpthread" + DB_LIB="-ldb" + CFLAGS="$DB_CFLAGS $oldcflags" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +DB *dbp; db_create(&dbp, NULL, 0); + ; + 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 + lib=db +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -BUILD_ABSOLUTE_TOP=`pwd` -SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"` -SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd` - - - - - - +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$oldcflags + else + for lib in db4 db3 db notfound; do + LIBS="${oldlibs} -l$lib -lpthread" + DB_LIB="-l$lib" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +DB *dbp; db_create(&dbp, NULL, 0); + ; + 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 + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --enable-fast was given. -if test "${enable_fast+set}" = set; then : - enableval=$enable_fast; -if test "x$USR_CFLAGS_SET" = "xno"; then - CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG" fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi -fi + LIBS=$oldlibs + if test "x$lib" = "xnotfound" ; then + { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +echo "$as_me: error: could not find DB libraries" >&2;} + { (exit 1); exit 1; }; } + else + echo "$as_me:$LINENO: result: $lib" >&5 +echo "${ECHO_T}$lib" >&6 + fi -test_for_fuse() -{ - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_PKGCONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$HAVE_PKGCONFIG"; then - ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # 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_HAVE_PKGCONFIG="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" -fi -fi -HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG -if test -n "$HAVE_PKGCONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGCONFIG" >&5 -$as_echo "$HAVE_PKGCONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + oldcflags=$CFLAGS + CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - if test "x$HAVE_PKGCONFIG" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSE library" >&5 -$as_echo_n "checking for FUSE library... " >&6; } - if `pkg-config --exists fuse` ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - FUSE_LDFLAGS=`pkg-config --libs fuse` - FUSE_CFLAGS=`pkg-config --cflags fuse` + #include + void error_callback_fn(const DB_ENV *dbenv, + const char *prefix, + const char *message) + { + return; + } +int +main () +{ - BUILD_FUSE="1" + DB *db; - else - as_fn_error $? "FUSE: FUSE library not found. Check LD_LIBRARY_PATH." "$LINENO" 5 - fi - else - as_fn_error $? "FUSE: pkg-config not available. Please install pkg-config." "$LINENO" 5 - fi -} + db->set_errcall(db, error_callback_fn); -# Check whether --enable-fuse was given. -if test "${enable_fuse+set}" = set; then : - enableval=$enable_fuse; -if test "x$enableval" = "xyes" ; then - test_for_fuse - CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__" -fi + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 +_ACEOF + have_dbenv_parameter_to_db_error_callback=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast -if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then - CFLAGS="$CFLAGS -g -O2" +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_dbenv_parameter_to_db_error_callback=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then + echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +echo $ECHO_N "checking if third parameter to error callback function is const... $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 + void error_callback_fn(const DB_ENV *dbenv, + const char *prefix, + char *message) + { + return; + } -STRICT_CFLAGS= -# Check whether --enable-strict was given. -if test "${enable_strict+set}" = set; then : - enableval=$enable_strict; STRICT_CFLAGS=1 -fi +int +main () +{ + DB *db; + db->set_errcall(db, error_callback_fn); -# Check whether --enable-verbose-build was given. -if test "${enable_verbose_build+set}" = set; then : - enableval=$enable_verbose_build; QUIET_COMPILE=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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - QUIET_COMPILE=1 -fi - - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -test_for_epoll() -{ - for ac_header in sys/epoll.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_epoll_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_EPOLL_H 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll functions" >&5 -$as_echo_n "checking for epoll functions... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" + echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +echo $ECHO_N "checking for DB stat with malloc function ptr... $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 + + #include + #include + int main () { - int fd; - fd = epoll_create(1); - close(fd); + int ret = 0; + DB *db = db; + int dummy = 0; + u_int32_t flags = 0; + + ret = db->stat(db, &dummy, malloc, flags); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - BUILD_EPOLL=1 - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -} - -# Check whether --enable-epoll was given. -if test "${enable_epoll+set}" = set; then : - enableval=$enable_epoll; - if test "x$enableval" = "xyes"; then - BUILD_EPOLL=1 +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 +_ACEOF + have_db_stat_malloc=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test_for_epoll - +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_db_stat_malloc=no fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test "x$have_db_stat_malloc" = "xno" ; then -# Check whether --enable-segv-backtrace was given. -if test "${enable_segv_backtrace+set}" = set; then : - enableval=$enable_segv_backtrace; -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if segv backtrace capable" >&5 -$as_echo_n "checking if segv backtrace capable... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +echo $ECHO_N "checking for txnid parameter to DB stat function... $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 -#define __USE_GNU -#include -#if !defined(REG_EIP) && !defined(REG_RIP) - choke me -#endif + #include int main () { + int ret = 0; + DB *db = db; + DB_TXN *txnid = txnid; + u_int32_t flags = 0; + + ret = db->stat(db, txnid, NULL, flags); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - PVFS2_SEGV_BACKTRACE=1 +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 +_ACEOF + + have_txnid_param_to_stat=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_txnid_param_to_stat=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi + fi + echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +echo $ECHO_N "checking for txnid parameter to DB open function... $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 -# Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; build_shared=$enableval -else - build_shared=no -fi +int +main () +{ + + int ret = 0; + DB *db = NULL; + DB_TXN *txnid = NULL; + char *file = NULL; + char *database = NULL; + DBTYPE type = 0; + u_int32_t flags = 0; + int mode = 0; + + ret = db->open(db, txnid, file, database, type, flags, mode); + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 +_ACEOF -if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then - as_fn_error $? "Must do --enable-shared or --enable-static or both." "$LINENO" 5 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -INTELC= -GNUC= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc is an Intel compiler" >&5 -$as_echo_n "checking whether cc is an Intel compiler... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +echo $ECHO_N "checking for DB_DIRTY_READ flag... $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. */ -#ifndef __ICC - choke me -#endif + #include int main () { + u_int32_t flags = DB_DIRTY_READ; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - INTELC=1 +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_DIRTY_READ 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "x$INTELC" = "x" ; then - if test "x$GCC" = "xyes" ; then - GNUC=1 - fi -fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - - - -# Check whether --with-efence was given. -if test "${with_efence+set}" = set; then : - withval=$with_efence; if test "x$withval" != "xyes" ; then - LDFLAGS="${LDFLAGS} -L$withval" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lefence" >&5 -$as_echo_n "checking for malloc in -lefence... " >&6; } -if ${ac_cv_lib_efence_malloc+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lefence $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +echo $ECHO_N "checking for DB_BUFFER_SMALL error... $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. */ -/* 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 malloc (); + #include + int main () { -return malloc (); + + int res = DB_BUFFER_SMALL; + res++; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_efence_malloc=yes -else - ac_cv_lib_efence_malloc=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_efence_malloc" >&5 -$as_echo "$ac_cv_lib_efence_malloc" >&6; } -if test "x$ac_cv_lib_efence_malloc" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBEFENCE 1 +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_BUFFER_SMALL 1 _ACEOF - LIBS="-lefence $LIBS" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +echo $ECHO_N "checking for berkeley db get_pagesize function... $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. */ -fi + #include +int +main () +{ + int ret = 0; + DB *db = NULL; + int pagesize; -# Check whether --with-valgrind was given. -if test "${with_valgrind+set}" = set; then : - withval=$with_valgrind; - found=no - save_cppflags="$CPPFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valgrind.h usability" >&5 -$as_echo_n "checking for valgrind.h usability... " >&6; } - if test "x$withval" = xyes ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - found=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$found = xno ; then - CPPFLAGS="$CPPFLAGS -I/usr/include/valgrind" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - found=yes -else - CPPFLAGS="$save_cppflags" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - else - for d in $withval $withval/include \ - $withval/valgrind $withval/include/valgrind - do - CPPFLAGS="$CPPFLAGS -I$d" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + ret = db->get_pagesize(db, &pagesize); + + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - found=yes -else - CPPFLAGS="$save_cppflags" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$found = xyes ; then - break - fi - done - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 -$as_echo "$found" >&6; } - if test x$found = xyes ; then +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_VALGRIND_H 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_DB_GET_PAGESIZE 1 +_ACEOF - fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +echo $ECHO_N "checking Berkeley DB version... $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. */ -if test "x$NEED_BERKELEY_DB" = "xyes" ; then + #include -# Check whether --with-db was given. -if test "${with_db+set}" = set; then : - withval=$with_db; - dbpath=${withval} +int +main () +{ - DB_LDFLAGS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db library" >&5 -$as_echo_n "checking for db library... " >&6; } - oldlibs=$LIBS - lib=notfound + #if DB_VERSION_MAJOR < 4 || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ + DB_VERSION_PATCH < 30) + #error "Recommend version of Berkeley DB at least 4.8.30" + #endif - if test "x$dbpath" != "x" ; then - oldcflags=$CFLAGS - for dbheader in db4 db3 notfound; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "$dbpath/include/$dbheader/db.h" + ; + return 0; +} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - DB_CFLAGS="-I$dbpath/include/$dbheader/" - break +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_DB_OLD=0 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + HAVE_DB_OLD=1 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$oldcflags" - if test "x$dbheader" = "xnotfound"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "$dbpath/include/db.h" -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - DB_CFLAGS="-I$dbpath/include/" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Invalid libdb path specified. No db.h found. -See \`config.log' for more details" "$LINENO" 5; } +fi; fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - DB_LDFLAGS="-L${dbpath}/lib" - LDFLAGS="$DB_LDFLAGS ${LDFLAGS}" +if test "x$BUILD_SERVER" = "x1"; then - LIBS="${oldlibs} -ldb -lpthread" - DB_LIB="-ldb" - CFLAGS="$DB_CFLAGS $oldcflags" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + +echo "$as_me:$LINENO: checking if server lib needs -lrt" >&5 +echo $ECHO_N "checking if server lib needs -lrt... $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 +#include + #include + #include int main () { -DB *dbp; db_create(&dbp, NULL, 0); +lio_listio(LIO_NOWAIT, NULL, 0, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lib=db -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$oldcflags +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - else - for lib in db4 db3 db notfound; do - LIBS="${oldlibs} -l$lib -lpthread" - DB_LIB="-l$lib" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + oldlibs=$LIBS + LIBS="$LIBS -lrt" + 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 int main () { -DB *dbp; db_create(&dbp, NULL, 0); +lio_listio(LIO_NOWAIT, NULL, 0, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - break +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 + NEEDS_LIBRT=1 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: failed attempting to link lio_listio" >&5 +echo "$as_me: error: failed attempting to link lio_listio" >&2;} + { (exit 1); exit 1; }; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$oldlibs - LIBS=$oldlibs - if test "x$lib" = "xnotfound" ; then - as_fn_error $? "could not find DB libraries" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib" >&5 -$as_echo "$lib" >&6; } - fi +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +case "$host_os" in + *darwin*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbenv parameter to DB error callback function" >&5 -$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } - oldcflags=$CFLAGS - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<\_ACEOF +#define TARGET_OS_DARWIN 1 +_ACEOF - #include + TARGET_OS_DARWIN=1 - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - const char *message) - { - return; - } + ;; + *linux*) + +cat >>confdefs.h <<\_ACEOF +#define TARGET_OS_LINUX 1 +_ACEOF + + TARGET_OS_LINUX=1 + + ;; +esac + +echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +oldcflags="$CFLAGS" +CFLAGS="$USR_CFLAGS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include int main () { - DB *db; - - db->set_errcall(db, error_callback_fn); +gethostbyname("localhost"); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME 1 +_ACEOF - have_dbenv_parameter_to_db_error_callback=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_dbenv_parameter_to_db_error_callback=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +WARN_ABOUT_HOSTNAMES="yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if third parameter to error callback function is const" >&5 -$as_echo_n "checking if third parameter to error callback function is const... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for gethostbyaddr" >&5 +echo $ECHO_N "checking for gethostbyaddr... $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 - - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - char *message) - { - return; - } +#include int main () { - DB *db; - - db->set_errcall(db, error_callback_fn); +struct sockaddr_in peer; +gethostbyaddr((void *)&peer.sin_addr.s_addr, sizeof(struct in_addr), AF_INET); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR 1 +_ACEOF -$as_echo "#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1" >>confdefs.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +CFLAGS="$oldcflags" + +BUILD_BMI_TCP=1 + +# Check whether --with-bmi-tcp or --without-bmi-tcp was given. +if test "${with_bmi_tcp+set}" = set; then + withval="$with_bmi_tcp" + if test -z "$withval" -o "$withval" = yes ; then + : + elif test "$withval" = no ; then + BUILD_BMI_TCP= + else + { { echo "$as_me:$LINENO: error: Option --with-tcp requires yes/no argument." >&5 +echo "$as_me: error: Option --with-tcp requires yes/no argument." >&2;} + { (exit 1); exit 1; }; } fi - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB stat with malloc function ptr" >&5 -$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi; - #include - #include -int -main () -{ - int ret = 0; - DB *db = db; - int dummy = 0; - u_int32_t flags = 0; + gm_home= - ret = db->stat(db, &dummy, malloc, flags); +# Check whether --with-gm or --without-gm was given. +if test "${with_gm+set}" = set; then + withval="$with_gm" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-gm requires the path to your GM tree." >&5 +echo "$as_me: error: Option --with-gm requires the path to your GM tree." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + gm_home="$withval" + fi - ; - return 0; -} +fi; + +# Check whether --with-gm-includes or --without-gm-includes was given. +if test "${with_gm_includes+set}" = set; then + withval="$with_gm_includes" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-gm-includes requires path to GM headers." >&5 +echo "$as_me: error: Option --with-gm-includes requires path to GM headers." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + GM_INCDIR="$withval" + fi + +fi; + +# Check whether --with-gm-libs or --without-gm-libs was given. +if test "${with_gm_libs+set}" = set; then + withval="$with_gm_libs" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-gm-libs requires path to GM libraries." >&5 +echo "$as_me: error: Option --with-gm-libs requires path to GM libraries." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + GM_LIBDIR="$withval" + fi + +fi; + if test -n "$gm_home" ; then + if test -z "$GM_INCDIR"; then + GM_INCDIR=$gm_home/include + fi + if test -z "$GM_LIBDIR"; then + GM_LIBDIR=$gm_home/lib64 + if test ! -d "$GM_LIBDIR" ; then + GM_LIBDIR=$gm_home/lib + fi + fi + fi + if test -n "$GM_INCDIR$GM_LIBDIR" ; then + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm" + if test "${ac_cv_header_gm_h+set}" = set; then + echo "$as_me:$LINENO: checking for gm.h" >&5 +echo $ECHO_N "checking for gm.h... $ECHO_C" >&6 +if test "${ac_cv_header_gm_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 +echo "${ECHO_T}$ac_cv_header_gm_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking gm.h usability" >&5 +echo $ECHO_N "checking gm.h 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 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 -$as_echo "#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1" >>confdefs.h +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 - have_db_stat_malloc=yes +# Is the header present? +echo "$as_me:$LINENO: checking gm.h presence" >&5 +echo $ECHO_N "checking gm.h 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 +_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: gm.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: gm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: gm.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: gm.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: gm.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: gm.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: gm.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: gm.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: gm.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: gm.h: 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 gm.h" >&5 +echo $ECHO_N "checking for gm.h... $ECHO_C" >&6 +if test "${ac_cv_header_gm_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_db_stat_malloc=no + ac_cv_header_gm_h=$ac_header_preproc fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test "x$have_db_stat_malloc" = "xno" ; then +echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 +echo "${ECHO_T}$ac_cv_header_gm_h" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for txnid parameter to DB stat function" >&5 -$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +if test $ac_cv_header_gm_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header gm.h not found." >&5 +echo "$as_me: error: Header gm.h not found." >&2;} + { (exit 1); exit 1; }; } +fi - #include -int -main () -{ + if test ! -f $GM_LIBDIR/libgm.so ; then + if test ! -f $GM_LIBDIR/libgm.a ; then + { { echo "$as_me:$LINENO: error: Neither GM library libgm.so or libgm.a found." >&5 +echo "$as_me: error: Neither GM library libgm.so or libgm.a found." >&2;} + { (exit 1); exit 1; }; } + fi + fi + BUILD_GM=1 + CPPFLAGS="$save_cppflags" + fi - int ret = 0; - DB *db = db; - DB_TXN *txnid = txnid; - u_int32_t flags = 0; - ret = db->stat(db, txnid, NULL, flags); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1" >>confdefs.h - have_txnid_param_to_stat=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_txnid_param_to_stat=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi + mx_home= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for txnid parameter to DB open function" >&5 -$as_echo_n "checking for txnid parameter to DB open function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +# Check whether --with-mx or --without-mx was given. +if test "${with_mx+set}" = set; then + withval="$with_mx" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-mx requires the path to your MX tree." >&5 +echo "$as_me: error: Option --with-mx requires the path to your MX tree." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + mx_home="$withval" + fi - #include +fi; -int -main () -{ +# Check whether --with-mx-includes or --without-mx-includes was given. +if test "${with_mx_includes+set}" = set; then + withval="$with_mx_includes" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-mx-includes requires path to MX headers." >&5 +echo "$as_me: error: Option --with-mx-includes requires path to MX headers." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + MX_INCDIR="$withval" + fi - int ret = 0; - DB *db = NULL; - DB_TXN *txnid = NULL; - char *file = NULL; - char *database = NULL; - DBTYPE type = 0; - u_int32_t flags = 0; - int mode = 0; +fi; - ret = db->open(db, txnid, file, database, type, flags, mode); +# Check whether --with-mx-libs or --without-mx-libs was given. +if test "${with_mx_libs+set}" = set; then + withval="$with_mx_libs" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-mx-libs requires path to MX libraries." >&5 +echo "$as_me: error: Option --with-mx-libs requires path to MX libraries." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + MX_LIBDIR="$withval" + fi - ; - return 0; -} +fi; + if test -n "$mx_home" ; then + if test -z "$MX_INCDIR"; then + MX_INCDIR=$mx_home/include + fi + if test -z "$MX_LIBDIR"; then + MX_LIBDIR=$mx_home/lib64 + if test ! -d "$MX_LIBDIR" ; then + MX_LIBDIR=$mx_home/lib + fi + fi + fi + if test -n "$MX_INCDIR$MX_LIBDIR" ; then + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx" + if test "${ac_cv_header_myriexpress_h+set}" = set; then + echo "$as_me:$LINENO: checking for myriexpress.h" >&5 +echo $ECHO_N "checking for myriexpress.h... $ECHO_C" >&6 +if test "${ac_cv_header_myriexpress_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 +echo "${ECHO_T}$ac_cv_header_myriexpress_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking myriexpress.h usability" >&5 +echo $ECHO_N "checking myriexpress.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1" >>confdefs.h - +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB_DIRTY_READ flag" >&5 -$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking myriexpress.h presence" >&5 +echo $ECHO_N "checking myriexpress.h 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 - -int -main () -{ - - u_int32_t flags = DB_DIRTY_READ; - - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 -$as_echo "#define HAVE_DB_DIRTY_READ 1" >>confdefs.h + 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: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: myriexpress.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: myriexpress.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: myriexpress.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: myriexpress.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: myriexpress.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: myriexpress.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: myriexpress.h: 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 myriexpress.h" >&5 +echo $ECHO_N "checking for myriexpress.h... $ECHO_C" >&6 +if test "${ac_cv_header_myriexpress_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + ac_cv_header_myriexpress_h=$ac_header_preproc fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 +echo "${ECHO_T}$ac_cv_header_myriexpress_h" >&6 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB_BUFFER_SMALL error" >&5 -$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +if test $ac_cv_header_myriexpress_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header myriexpress.h not found." >&5 +echo "$as_me: error: Header myriexpress.h not found." >&2;} + { (exit 1); exit 1; }; } +fi - #include -int -main () -{ + if test ! -f $MX_LIBDIR/libmyriexpress.so ; then + if test ! -f $MX_LIBDIR/libmyriexpress.a ; then + { { echo "$as_me:$LINENO: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&5 +echo "$as_me: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&2;} + { (exit 1); exit 1; }; } + fi + fi + BUILD_MX=1 + CPPFLAGS="$save_cppflags" + fi - int res = DB_BUFFER_SMALL; - res++; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_DB_BUFFER_SMALL 1" >>confdefs.h -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test -n "$BUILD_MX" ; then + save_ldflags="$LDFLAGS" + LDFLAGS="-L$MX_LIBDIR $LDFLAGS" + save_libs="$LIBS" + LIBS="-lmyriexpress -lpthread $LIBS" + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$MX_INCDIR" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for berkeley db get_pagesize function" >&5 -$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for mx_decompose_endpoint_addr2" >&5 +echo $ECHO_N "checking for mx_decompose_endpoint_addr2... $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 + #include "mx_extensions.h" + #include int main () { - int ret = 0; - DB *db = NULL; - int pagesize; - - ret = db->get_pagesize(db, &pagesize); + mx_endpoint_addr_t epa; + mx_decompose_endpoint_addr2(epa, NULL, NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DB_GET_PAGESIZE 1" >>confdefs.h - +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Berkeley DB version" >&5 -$as_echo_n "checking Berkeley DB version... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: Function mx_decompose_endpoint_addr2() not found." >&5 +echo "$as_me: error: Function mx_decompose_endpoint_addr2() not found." >&2;} + { (exit 1); exit 1; }; } - #include +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -int -main () -{ + LDFLAGS="$save_ldflags" + CPPFLAGS="$save_cppflags" + LIBS="$save_libs" + fi - #if DB_VERSION_MAJOR < 4 || \ - (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ - (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ - DB_VERSION_PATCH < 30) - #error "Recommend version of Berkeley DB at least 4.8.30" - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_DB_OLD=0 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_DB_OLD=1 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$oldcflags" + ib_home= -else +# Check whether --with-ib or --without-ib was given. +if test "${with_ib+set}" = set; then + withval="$with_ib" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-ib requires the path to your IB tree." >&5 +echo "$as_me: error: Option --with-ib requires the path to your IB tree." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + ib_home="$withval" + fi - dbpath="" +fi; - DB_LDFLAGS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for db library" >&5 -$as_echo_n "checking for db library... " >&6; } - oldlibs=$LIBS - lib=notfound +# Check whether --with-ib-includes or --without-ib-includes was given. +if test "${with_ib_includes+set}" = set; then + withval="$with_ib_includes" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-ib-includes requires path to IB headers." >&5 +echo "$as_me: error: Option --with-ib-includes requires path to IB headers." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + IB_INCDIR="$withval" + fi - if test "x$dbpath" != "x" ; then - oldcflags=$CFLAGS - for dbheader in db4 db3 notfound; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "$dbpath/include/$dbheader/db.h" -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - DB_CFLAGS="-I$dbpath/include/$dbheader/" - break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +fi; - if test "x$dbheader" = "xnotfound"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "$dbpath/include/db.h" -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - DB_CFLAGS="-I$dbpath/include/" -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Invalid libdb path specified. No db.h found. -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Check whether --with-ib-libs or --without-ib-libs was given. +if test "${with_ib_libs+set}" = set; then + withval="$with_ib_libs" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-ib-libs requires path to IB libraries." >&5 +echo "$as_me: error: Option --with-ib-libs requires path to IB libraries." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + IB_LIBDIR="$withval" fi - DB_LDFLAGS="-L${dbpath}/lib" - LDFLAGS="$DB_LDFLAGS ${LDFLAGS}" - - LIBS="${oldlibs} -ldb -lpthread" - DB_LIB="-ldb" - CFLAGS="$DB_CFLAGS $oldcflags" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -DB *dbp; db_create(&dbp, NULL, 0); - ; - return 0; -} +fi; + if test -n "$ib_home" ; then + if test -z "$IB_INCDIR"; then + IB_INCDIR=$ib_home/include + fi + if test -z "$IB_LIBDIR"; then + IB_LIBDIR=$ib_home/lib64 + if test ! -d "$IB_LIBDIR" ; then + IB_LIBDIR=$ib_home/lib + fi + fi + fi + if test -n "$IB_INCDIR$IB_LIBDIR" ; then + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$IB_INCDIR" + if test "${ac_cv_header_vapi_h+set}" = set; then + echo "$as_me:$LINENO: checking for vapi.h" >&5 +echo $ECHO_N "checking for vapi.h... $ECHO_C" >&6 +if test "${ac_cv_header_vapi_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 +echo "${ECHO_T}$ac_cv_header_vapi_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking vapi.h usability" >&5 +echo $ECHO_N "checking vapi.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lib=db +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_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 core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$oldcflags +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 - else - for lib in db4 db3 db notfound; do - LIBS="${oldlibs} -l$lib -lpthread" - DB_LIB="-l$lib" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking vapi.h presence" >&5 +echo $ECHO_N "checking vapi.h 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 -int -main () -{ -DB *dbp; db_create(&dbp, NULL, 0); - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - break +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 -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - 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 - LIBS=$oldlibs - if test "x$lib" = "xnotfound" ; then - as_fn_error $? "could not find DB libraries" "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lib" >&5 -$as_echo "$lib" >&6; } - fi + 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: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: vapi.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: vapi.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vapi.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vapi.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: vapi.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vapi.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vapi.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: vapi.h: 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 vapi.h" >&5 +echo $ECHO_N "checking for vapi.h... $ECHO_C" >&6 +if test "${ac_cv_header_vapi_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_vapi_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 +echo "${ECHO_T}$ac_cv_header_vapi_h" >&6 +fi +if test $ac_cv_header_vapi_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header vapi.h not found." >&5 +echo "$as_me: error: Header vapi.h not found." >&2;} + { (exit 1); exit 1; }; } +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbenv parameter to DB error callback function" >&5 -$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } - oldcflags=$CFLAGS - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test ! -f $IB_LIBDIR/libvapi.so ; then + if test ! -f $IB_LIBDIR/libvapi.a ; then + { { echo "$as_me:$LINENO: error: Infiniband library libvapi.so not found." >&5 +echo "$as_me: error: Infiniband library libvapi.so not found." >&2;} + { (exit 1); exit 1; }; } + fi + fi + BUILD_IB=1 + echo "$as_me:$LINENO: checking for wrap_common.h" >&5 +echo $ECHO_N "checking for wrap_common.h... $ECHO_C" >&6 +if test "${ac_cv_header_wrap_common_h+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 +_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_wrap_common_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - const char *message) - { - return; - } +ac_cv_header_wrap_common_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_wrap_common_h" >&5 +echo "${ECHO_T}$ac_cv_header_wrap_common_h" >&6 +if test $ac_cv_header_wrap_common_h = yes; then -int -main () -{ +cat >>confdefs.h <<\_ACEOF +#define HAVE_IB_WRAP_COMMON_H 1 +_ACEOF - DB *db; +fi - db->set_errcall(db, error_callback_fn); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + CPPFLAGS="$save_cppflags" + fi -$as_echo "#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1" >>confdefs.h - have_dbenv_parameter_to_db_error_callback=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_dbenv_parameter_to_db_error_callback=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if third parameter to error callback function is const" >&5 -$as_echo_n "checking if third parameter to error callback function is const... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #include + openib_home= - void error_callback_fn(const DB_ENV *dbenv, - const char *prefix, - char *message) - { - return; - } +# Check whether --with-openib or --without-openib was given. +if test "${with_openib+set}" = set; then + withval="$with_openib" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-openib requires the path to your OpenIB tree." >&5 +echo "$as_me: error: Option --with-openib requires the path to your OpenIB tree." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + openib_home="$withval" + fi -int -main () -{ +fi; - DB *db; +# Check whether --with-openib-includes or --without-openib-includes was given. +if test "${with_openib_includes+set}" = set; then + withval="$with_openib_includes" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-openib-includes requires path to OpenIB headers." >&5 +echo "$as_me: error: Option --with-openib-includes requires path to OpenIB headers." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + OPENIB_INCDIR="$withval" + fi - db->set_errcall(db, error_callback_fn); +fi; - ; - return 0; -} +# Check whether --with-openib-libs or --without-openib-libs was given. +if test "${with_openib_libs+set}" = set; then + withval="$with_openib_libs" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-openib-libs requires path to OpenIB libraries." >&5 +echo "$as_me: error: Option --with-openib-libs requires path to OpenIB libraries." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + OPENIB_LIBDIR="$withval" + fi + +fi; + if test -n "$openib_home" ; then + if test -z "$OPENIB_INCDIR"; then + OPENIB_INCDIR=$openib_home/include + fi + if test -z "$OPENIB_LIBDIR"; then + OPENIB_LIBDIR=$openib_home/lib64 + if test ! -d "$OPENIB_LIBDIR" ; then + OPENIB_LIBDIR=$openib_home/lib + fi + fi + fi + if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" + if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then + echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5 +echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6 +if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 +echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5 +echo $ECHO_N "checking infiniband/verbs.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1" >>confdefs.h + 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 - 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 - CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB stat with malloc function ptr" >&5 -$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Is the header present? +echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5 +echo $ECHO_N "checking infiniband/verbs.h 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 - #include - -int -main () -{ - - int ret = 0; - DB *db = db; - int dummy = 0; - u_int32_t flags = 0; - - ret = db->stat(db, &dummy, malloc, flags); - - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1" >>confdefs.h - - have_db_stat_malloc=yes +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_db_stat_malloc=no + ac_cpp_err=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test "x$have_db_stat_malloc" = "xno" ; then +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for txnid parameter to DB stat function" >&5 -$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 - #include +# 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: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: infiniband/verbs.h: 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 infiniband/verbs.h" >&5 +echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6 +if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_infiniband_verbs_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 +echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6 -int -main () -{ +fi +if test $ac_cv_header_infiniband_verbs_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header infiniband/verbs.h not found." >&5 +echo "$as_me: error: Header infiniband/verbs.h not found." >&2;} + { (exit 1); exit 1; }; } +fi - int ret = 0; - DB *db = db; - DB_TXN *txnid = txnid; - u_int32_t flags = 0; - ret = db->stat(db, txnid, NULL, flags); + if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then + if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then + { { echo "$as_me:$LINENO: error: OpenIB library libibverbs.so not found." >&5 +echo "$as_me: error: OpenIB library libibverbs.so not found." >&2;} + { (exit 1); exit 1; }; } + fi + fi + BUILD_OPENIB=1 + CPPFLAGS="$save_cppflags" + fi - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -$as_echo "#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1" >>confdefs.h - have_txnid_param_to_stat=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_txnid_param_to_stat=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi + if test -n "$BUILD_OPENIB" ; then + save_ldflags="$LDFLAGS" + LDFLAGS="-L$OPENIB_LIBDIR -libverbs" + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for txnid parameter to DB open function" >&5 -$as_echo_n "checking for txnid parameter to DB open function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for ibv_get_devices" >&5 +echo $ECHO_N "checking for ibv_get_devices... $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 - int main () { - int ret = 0; - DB *db = NULL; - DB_TXN *txnid = NULL; - char *file = NULL; - char *database = NULL; - DBTYPE type = 0; - u_int32_t flags = 0; - int mode = 0; - - ret = db->open(db, txnid, file, database, type, flags, mode); + ibv_get_devices(); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_IBV_GET_DEVICES 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB_DIRTY_READ flag" >&5 -$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo "$as_me:$LINENO: checking for IBV_EVENT_CLIENT_REREGISTER" >&5 +echo $ECHO_N "checking for IBV_EVENT_CLIENT_REREGISTER... $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 + #include "infiniband/verbs.h" int main () { - u_int32_t flags = DB_DIRTY_READ; + enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_DB_DIRTY_READ 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_IBV_EVENT_CLIENT_REREGISTER 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DB_BUFFER_SMALL error" >&5 -$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + LDFLAGS="$save_ldflags" + CPPFLAGS="$save_cppflags" + fi - #include -int -main () -{ - int res = DB_BUFFER_SMALL; - res++; + use_portals= + home= + incs= + libs= - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +# Check whether --with-portals or --without-portals was given. +if test "${with_portals+set}" = set; then + withval="$with_portals" + if test -z "$withval" -o "$withval" = yes ; then + use_portals=yes + elif test "$withval" != no ; then + home="$withval" + fi -$as_echo "#define HAVE_DB_BUFFER_SMALL 1" >>confdefs.h +fi; -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Check whether --with-portals-includes or --without-portals-includes was given. +if test "${with_portals_includes+set}" = set; then + withval="$with_portals_includes" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-portals-includes requires an argument." >&5 +echo "$as_me: error: Option --with-portals-includes requires an argument." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + incs="$withval" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for berkeley db get_pagesize function" >&5 -$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi; - #include +# Check whether --with-portals-libs or --without-portals-libs was given. +if test "${with_portals_libs+set}" = set; then + withval="$with_portals_libs" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-portals-libs requires an argument." >&5 +echo "$as_me: error: Option --with-portals-libs requires an argument." >&2;} + { (exit 1); exit 1; }; } + elif test "$withval" != no ; then + libs="$withval" + fi -int -main () -{ +fi; + if test -n "$home" ; then + if test -z "$incs"; then + incs=-I$home/include + fi + if test -z "$libs"; then + libs=-L$home/lib64 + if test ! -d "$home/lib64" ; then + libs=-L$home/lib + fi + fi + fi - int ret = 0; - DB *db = NULL; - int pagesize; + BUILD_PORTALS= + PORTALS_INCS= + PORTALS_LIBS= + if test "X$use_portals$home$incs$libs" != X ; then + # Save stuff + save_cppflags="$CPPFLAGS" + save_libs="$LIBS" - ret = db->get_pagesize(db, &pagesize); + PORTALS_INCS="$incs" + CPPFLAGS="$CPPFLAGS $PORTALS_INCS" + + PORTALS_LIBS="$libs" + LIBS="$save_libs $PORTALS_LIBS" + echo "$as_me:$LINENO: checking for portals3.h header" >&5 +echo $ECHO_N "checking for portals3.h header... $ECHO_C" >&6 + ok=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int m, n; m = PtlInit(&n); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_DB_GET_PAGESIZE 1" >>confdefs.h - +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 + ok=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Berkeley DB version" >&5 -$as_echo_n "checking Berkeley DB version... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - #include + if test "$ok" = yes ; then + 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 + { { echo "$as_me:$LINENO: error: Header portals/portals3.h not found." >&5 +echo "$as_me: error: Header portals/portals3.h not found." >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: checking for portals libraries" >&5 +echo $ECHO_N "checking for portals libraries... $ECHO_C" >&6 + ok=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include int main () { - - #if DB_VERSION_MAJOR < 4 || \ - (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ - (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ - DB_VERSION_PATCH < 30) - #error "Recommend version of Berkeley DB at least 4.8.30" - #endif - +int m, n; m = PtlInit(&n); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - HAVE_DB_OLD=0 +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 + ok=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_DB_OLD=1 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$oldcflags" - -fi + 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 -if test "x$BUILD_SERVER" = "x1"; then - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if server lib needs -lrt" >&5 -$as_echo_n "checking if server lib needs -lrt... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$ok" = no ; then + PORTALS_LIBS="$libs -lportals" + LIBS="$save_libs $PORTALS_LIBS" + 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 int main () { -lio_listio(LIO_NOWAIT, NULL, 0, NULL); +int m, n; m = PtlInit(&n); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + ok=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - oldlibs=$LIBS - LIBS="$LIBS -lrt" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + + if test "$ok" = no ; then + PORTALS_LIBS="$libs -lp3api -lp3lib -lp3utcp -lp3rt -lpthread" + LIBS="$save_libs $PORTALS_LIBS" + 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 int main () { -lio_listio(LIO_NOWAIT, NULL, 0, NULL); +int m, n; m = PtlInit(&n); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - NEEDS_LIBRT=1 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + ok=yes else - as_fn_error $? "failed attempting to link lio_listio" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$oldlibs - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + 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 + fi -case "$host_os" in - - *darwin*) + if test "$ok" = yes ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + BUILD_PORTALS=1 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: Could not link Portals library." >&5 +echo "$as_me: error: Could not link Portals library." >&2;} + { (exit 1); exit 1; }; } + fi -$as_echo "#define TARGET_OS_DARWIN 1" >>confdefs.h + # + # Check for API variations. + # - TARGET_OS_DARWIN=1 +for ac_func in PtlErrorStr +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 - ;; - *linux*) +/* 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. */ -$as_echo "#define TARGET_OS_LINUX 1" >>confdefs.h +#ifdef __STDC__ +# include +#else +# include +#endif - TARGET_OS_LINUX=1 +#undef $ac_func - ;; -esac +/* 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; +#endif +#ifdef __cplusplus +} +#endif -for ac_header in netdb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" -if test "x$ac_cv_header_netdb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDB_H 1 +int +main () +{ +return f != $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 + 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 + 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 - -done - -for ac_header in arpa/inet.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : +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 HAVE_ARPA_INET_H 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi - done -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 + +for ac_func in PtlEventKindStr +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 -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. */ -done +#ifdef __STDC__ +# include +#else +# include +#endif -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -oldcflags="$CFLAGS" -CFLAGS="$USR_CFLAGS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef $ac_func -#include +/* 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; +#endif +#ifdef __cplusplus +} +#endif int main () { - -gethostbyname("localhost"); - +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h - +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 + eval "$as_ac_var=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -WARN_ABOUT_HOSTNAMES="yes" + 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 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr" >&5 -$as_echo_n "checking for gethostbyaddr... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +fi +done -#include + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include int main () { - -struct sockaddr_in peer; -gethostbyaddr((void *)&peer.sin_addr.s_addr, sizeof(struct in_addr), AF_INET); - +int m; ptl_process_id_t any_pid; + m = PtlACEntry(0, 0, any_pid, (ptl_uid_t) -1, (ptl_jid_t) -1, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 -$as_echo "#define HAVE_GETHOSTBYADDR 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTLACENTRY_JID 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -CFLAGS="$oldcflags" - -BUILD_BMI_TCP=1 - -# Check whether --with-bmi-tcp was given. -if test "${with_bmi_tcp+set}" = set; then : - withval=$with_bmi_tcp; if test -z "$withval" -o "$withval" = yes ; then - : - elif test "$withval" = no ; then - BUILD_BMI_TCP= - else - as_fn_error $? "Option --with-tcp requires yes/no argument." "$LINENO" 5 - fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + # Reset + CPPFLAGS="$save_cppflags" + LIBS="$save_libs" + fi - gm_home= -# Check whether --with-gm was given. -if test "${with_gm+set}" = set; then : - withval=$with_gm; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-gm requires the path to your GM tree." "$LINENO" 5 - elif test "$withval" != no ; then - gm_home="$withval" - fi -fi -# Check whether --with-gm-includes was given. -if test "${with_gm_includes+set}" = set; then : - withval=$with_gm_includes; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-gm-includes requires path to GM headers." "$LINENO" 5 +# Check whether --with-zoid or --without-zoid was given. +if test "${with_zoid+set}" = set; then + withval="$with_zoid" + if test -z "$withval" -o "$withval" = yes ; then + { { echo "$as_me:$LINENO: error: Option --with-zoid requires the path to your ZOID source tree." >&5 +echo "$as_me: error: Option --with-zoid requires the path to your ZOID source tree." >&2;} + { (exit 1); exit 1; }; } elif test "$withval" != no ; then - GM_INCDIR="$withval" + ZOID_SRCDIR="$withval" fi +fi; + if test -n "$ZOID_SRCDIR" ; then + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -Isrc/io/bmi -I$ZOID_SRCDIR/include -I$ZOID_SRCDIR/zbmi -I$ZOID_SRCDIR/zbmi/implementation" + if test "${ac_cv_header_zbmi_h+set}" = set; then + echo "$as_me:$LINENO: checking for zbmi.h" >&5 +echo $ECHO_N "checking for zbmi.h... $ECHO_C" >&6 +if test "${ac_cv_header_zbmi_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 fi +echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 +echo "${ECHO_T}$ac_cv_header_zbmi_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking zbmi.h usability" >&5 +echo $ECHO_N "checking zbmi.h 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 +_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 - -# Check whether --with-gm-libs was given. -if test "${with_gm_libs+set}" = set; then : - withval=$with_gm_libs; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-gm-libs requires path to GM libraries." "$LINENO" 5 - elif test "$withval" != no ; then - GM_LIBDIR="$withval" - fi - +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 - if test -n "$gm_home" ; then - if test -z "$GM_INCDIR"; then - GM_INCDIR=$gm_home/include - fi - if test -z "$GM_LIBDIR"; then - GM_LIBDIR=$gm_home/lib64 - if test ! -d "$GM_LIBDIR" ; then - GM_LIBDIR=$gm_home/lib - fi - fi - fi - if test -n "$GM_INCDIR$GM_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm" - ac_fn_c_check_header_mongrel "$LINENO" "gm.h" "ac_cv_header_gm_h" "$ac_includes_default" -if test "x$ac_cv_header_gm_h" = xyes; then : - +# Is the header present? +echo "$as_me:$LINENO: checking zbmi.h presence" >&5 +echo $ECHO_N "checking zbmi.h 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 +_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 - as_fn_error $? "Header gm.h not found." "$LINENO" 5 + 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 - - if test ! -f $GM_LIBDIR/libgm.so ; then - if test ! -f $GM_LIBDIR/libgm.a ; then - as_fn_error $? "Neither GM library libgm.so or libgm.a found." "$LINENO" 5 - fi - fi - BUILD_GM=1 - CPPFLAGS="$save_cppflags" - fi - - - - - - - mx_home= - -# Check whether --with-mx was given. -if test "${with_mx+set}" = set; then : - withval=$with_mx; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-mx requires the path to your MX tree." "$LINENO" 5 - elif test "$withval" != no ; then - mx_home="$withval" - fi - + 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 - -# Check whether --with-mx-includes was given. -if test "${with_mx_includes+set}" = set; then : - withval=$with_mx_includes; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-mx-includes requires path to MX headers." "$LINENO" 5 - elif test "$withval" != no ; then - MX_INCDIR="$withval" - fi - +# 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: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zbmi.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zbmi.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zbmi.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zbmi.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zbmi.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zbmi.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zbmi.h: 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 zbmi.h" >&5 +echo $ECHO_N "checking for zbmi.h... $ECHO_C" >&6 +if test "${ac_cv_header_zbmi_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zbmi_h=$ac_header_preproc fi - - -# Check whether --with-mx-libs was given. -if test "${with_mx_libs+set}" = set; then : - withval=$with_mx_libs; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-mx-libs requires path to MX libraries." "$LINENO" 5 - elif test "$withval" != no ; then - MX_LIBDIR="$withval" - fi +echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 +echo "${ECHO_T}$ac_cv_header_zbmi_h" >&6 fi - - if test -n "$mx_home" ; then - if test -z "$MX_INCDIR"; then - MX_INCDIR=$mx_home/include - fi - if test -z "$MX_LIBDIR"; then - MX_LIBDIR=$mx_home/lib64 - if test ! -d "$MX_LIBDIR" ; then - MX_LIBDIR=$mx_home/lib - fi - fi - fi - if test -n "$MX_INCDIR$MX_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx" - ac_fn_c_check_header_mongrel "$LINENO" "myriexpress.h" "ac_cv_header_myriexpress_h" "$ac_includes_default" -if test "x$ac_cv_header_myriexpress_h" = xyes; then : - +if test $ac_cv_header_zbmi_h = yes; then + : else - as_fn_error $? "Header myriexpress.h not found." "$LINENO" 5 + { { echo "$as_me:$LINENO: error: Header zbmi.h not found." >&5 +echo "$as_me: error: Header zbmi.h not found." >&2;} + { (exit 1); exit 1; }; } fi - if test ! -f $MX_LIBDIR/libmyriexpress.so ; then - if test ! -f $MX_LIBDIR/libmyriexpress.a ; then - as_fn_error $? "Neither MX library libmyriexpress.so or libmyriexpress.a found." "$LINENO" 5 - fi - fi - BUILD_MX=1 - CPPFLAGS="$save_cppflags" - fi - - - - - if test -n "$BUILD_MX" ; then - save_ldflags="$LDFLAGS" - LDFLAGS="-L$MX_LIBDIR $LDFLAGS" - save_libs="$LIBS" - LIBS="-lmyriexpress -lpthread $LIBS" - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$MX_INCDIR" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mx_decompose_endpoint_addr2" >&5 -$as_echo_n "checking for mx_decompose_endpoint_addr2... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${ac_cv_header_zoid_api_h+set}" = set; then + echo "$as_me:$LINENO: checking for zoid_api.h" >&5 +echo $ECHO_N "checking for zoid_api.h... $ECHO_C" >&6 +if test "${ac_cv_header_zoid_api_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 +echo "${ECHO_T}$ac_cv_header_zoid_api_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking zoid_api.h usability" >&5 +echo $ECHO_N "checking zoid_api.h 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. */ - - #include "mx_extensions.h" - #include - -int -main () -{ - - mx_endpoint_addr_t epa; - mx_decompose_endpoint_addr2(epa, NULL, NULL, NULL); - - ; - return 0; -} +$ac_includes_default +#include _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Function mx_decompose_endpoint_addr2() not found." "$LINENO" 5 + 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_exeext conftest.$ac_ext - - LDFLAGS="$save_ldflags" - CPPFLAGS="$save_cppflags" - LIBS="$save_libs" - 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 zoid_api.h presence" >&5 +echo $ECHO_N "checking zoid_api.h 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 +_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 - ib_home= + 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 -# Check whether --with-ib was given. -if test "${with_ib+set}" = set; then : - withval=$with_ib; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-ib requires the path to your IB tree." "$LINENO" 5 - elif test "$withval" != no ; then - ib_home="$withval" - fi +# 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: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zoid_api.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zoid_api.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zoid_api.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zoid_api.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zoid_api.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zoid_api.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zoid_api.h: 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 zoid_api.h" >&5 +echo $ECHO_N "checking for zoid_api.h... $ECHO_C" >&6 +if test "${ac_cv_header_zoid_api_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zoid_api_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 +echo "${ECHO_T}$ac_cv_header_zoid_api_h" >&6 +fi +if test $ac_cv_header_zoid_api_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header zoid_api.h not found." >&5 +echo "$as_me: error: Header zoid_api.h not found." >&2;} + { (exit 1); exit 1; }; } fi -# Check whether --with-ib-includes was given. -if test "${with_ib_includes+set}" = set; then : - withval=$with_ib_includes; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-ib-includes requires path to IB headers." "$LINENO" 5 - elif test "$withval" != no ; then - IB_INCDIR="$withval" - fi + if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then + echo "$as_me:$LINENO: checking for zbmi_protocol.h" >&5 +echo $ECHO_N "checking for zbmi_protocol.h... $ECHO_C" >&6 +if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 +echo "${ECHO_T}$ac_cv_header_zbmi_protocol_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking zbmi_protocol.h usability" >&5 +echo $ECHO_N "checking zbmi_protocol.h 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 +_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 - -# Check whether --with-ib-libs was given. -if test "${with_ib_libs+set}" = set; then : - withval=$with_ib_libs; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-ib-libs requires path to IB libraries." "$LINENO" 5 - elif test "$withval" != no ; then - IB_LIBDIR="$withval" - fi - +# Is the header present? +echo "$as_me:$LINENO: checking zbmi_protocol.h presence" >&5 +echo $ECHO_N "checking zbmi_protocol.h 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 +_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 - if test -n "$ib_home" ; then - if test -z "$IB_INCDIR"; then - IB_INCDIR=$ib_home/include - fi - if test -z "$IB_LIBDIR"; then - IB_LIBDIR=$ib_home/lib64 - if test ! -d "$IB_LIBDIR" ; then - IB_LIBDIR=$ib_home/lib - fi - fi - fi - if test -n "$IB_INCDIR$IB_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$IB_INCDIR" - ac_fn_c_check_header_mongrel "$LINENO" "vapi.h" "ac_cv_header_vapi_h" "$ac_includes_default" -if test "x$ac_cv_header_vapi_h" = xyes; then : + 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: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zbmi_protocol.h: 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 zbmi_protocol.h" >&5 +echo $ECHO_N "checking for zbmi_protocol.h... $ECHO_C" >&6 +if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - as_fn_error $? "Header vapi.h not found." "$LINENO" 5 + ac_cv_header_zbmi_protocol_h=$ac_header_preproc fi +echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 +echo "${ECHO_T}$ac_cv_header_zbmi_protocol_h" >&6 - - if test ! -f $IB_LIBDIR/libvapi.so ; then - if test ! -f $IB_LIBDIR/libvapi.a ; then - as_fn_error $? "Infiniband library libvapi.so not found." "$LINENO" 5 - fi - fi - BUILD_IB=1 - ac_fn_c_check_header_compile "$LINENO" "wrap_common.h" "ac_cv_header_wrap_common_h" "#include -" -if test "x$ac_cv_header_wrap_common_h" = xyes; then : - -$as_echo "#define HAVE_IB_WRAP_COMMON_H 1" >>confdefs.h - +fi +if test $ac_cv_header_zbmi_protocol_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: Header zbmi_protocol.h not found." >&5 +echo "$as_me: error: Header zbmi_protocol.h not found." >&2;} + { (exit 1); exit 1; }; } fi CPPFLAGS="$save_cppflags" + BUILD_ZOID=1 fi - openib_home= - -# Check whether --with-openib was given. -if test "${with_openib+set}" = set; then : - withval=$with_openib; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-openib requires the path to your OpenIB tree." "$LINENO" 5 - elif test "$withval" != no ; then - openib_home="$withval" - fi +echo "$as_me:$LINENO: checking for F_NOCACHE" >&5 +echo $ECHO_N "checking for F_NOCACHE... $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. */ -fi + #include + int fd; + fcntl(fd, F_NOCACHE, 1); +int +main () +{ -# Check whether --with-openib-includes was given. -if test "${with_openib_includes+set}" = set; then : - withval=$with_openib_includes; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-openib-includes requires path to OpenIB headers." "$LINENO" 5 - elif test "$withval" != no ; then - OPENIB_INCDIR="$withval" - fi + ; + 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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: checking for open O_DIRECT" >&5 +echo $ECHO_N "checking for open O_DIRECT... $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. */ -# Check whether --with-openib-libs was given. -if test "${with_openib_libs+set}" = set; then : - withval=$with_openib_libs; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-openib-libs requires path to OpenIB libraries." "$LINENO" 5 - elif test "$withval" != no ; then - OPENIB_LIBDIR="$withval" - fi + #include -fi +int +main () +{ - if test -n "$openib_home" ; then - if test -z "$OPENIB_INCDIR"; then - OPENIB_INCDIR=$openib_home/include - fi - if test -z "$OPENIB_LIBDIR"; then - OPENIB_LIBDIR=$openib_home/lib64 - if test ! -d "$OPENIB_LIBDIR" ; then - OPENIB_LIBDIR=$openib_home/lib - fi - fi - fi - if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" - ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" -if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then : + open("somefile", O_DIRECT); + ; + 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 - as_fn_error $? "Header infiniband/verbs.h not found." "$LINENO" 5 -fi - - - if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then - if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then - as_fn_error $? "OpenIB library libibverbs.so not found." "$LINENO" 5 - fi - fi - BUILD_OPENIB=1 - CPPFLAGS="$save_cppflags" - fi - - - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test -n "$BUILD_OPENIB" ; then - save_ldflags="$LDFLAGS" - LDFLAGS="-L$OPENIB_LIBDIR -libverbs" - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_devices" >&5 -$as_echo_n "checking for ibv_get_devices... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 +echo $ECHO_N "checking for fgetxattr extra arguments... $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 + #ifdef HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_SYS_XATTR_H + #include + #endif + int main () { - ibv_get_devices(); + fgetxattr(0, 0, 0, 0, 0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_IBV_GET_DEVICES 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FGETXATTR_EXTRA_ARGS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBV_EVENT_CLIENT_REREGISTER" >&5 -$as_echo_n "checking for IBV_EVENT_CLIENT_REREGISTER... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for setxattr extra arguments" >&5 +echo $ECHO_N "checking for setxattr extra arguments... $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 "infiniband/verbs.h" + #include + #ifdef HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_SYS_XATTR_H + #include + #endif int main () { - enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER; + setxattr(0, 0, 0, 0, 0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_IBV_EVENT_CLIENT_REREGISTER 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_SETXATTR_EXTRA_ARGS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - LDFLAGS="$save_ldflags" - CPPFLAGS="$save_cppflags" - fi +echo "$as_me:$LINENO: checking for getxattr extra arguments" >&5 +echo $ECHO_N "checking for getxattr extra arguments... $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 + #ifdef HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_SYS_XATTR_H + #include + #endif +int +main () +{ - use_portals= - home= - incs= - libs= + getxattr(0, 0, 0, 0, 0, 0); -# Check whether --with-portals was given. -if test "${with_portals+set}" = set; then : - withval=$with_portals; if test -z "$withval" -o "$withval" = yes ; then - use_portals=yes - elif test "$withval" != no ; then - home="$withval" - fi + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETXATTR_EXTRA_ARGS 1 +_ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# Check whether --with-portals-includes was given. -if test "${with_portals_includes+set}" = set; then : - withval=$with_portals_includes; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-portals-includes requires an argument." "$LINENO" 5 - elif test "$withval" != no ; then - incs="$withval" - fi +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/sysinfo.h" >&5 +echo $ECHO_N "checking for sys/sysinfo.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysinfo_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/sysinfo.h usability" >&5 +echo $ECHO_N "checking sys/sysinfo.h 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 +_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 -# Check whether --with-portals-libs was given. -if test "${with_portals_libs+set}" = set; then : - withval=$with_portals_libs; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-portals-libs requires an argument." "$LINENO" 5 - elif test "$withval" != no ; then - libs="$withval" - fi - +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 - if test -n "$home" ; then - if test -z "$incs"; then - incs=-I$home/include - fi - if test -z "$libs"; then - libs=-L$home/lib64 - if test ! -d "$home/lib64" ; then - libs=-L$home/lib - fi - fi - fi +# Is the header present? +echo "$as_me:$LINENO: checking sys/sysinfo.h presence" >&5 +echo $ECHO_N "checking sys/sysinfo.h 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 +_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 - BUILD_PORTALS= - PORTALS_INCS= - PORTALS_LIBS= - if test "X$use_portals$home$incs$libs" != X ; then - # Save stuff - save_cppflags="$CPPFLAGS" - save_libs="$LIBS" + 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 - PORTALS_INCS="$incs" - CPPFLAGS="$CPPFLAGS $PORTALS_INCS" +# 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: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/sysinfo.h: 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 sys/sysinfo.h" >&5 +echo $ECHO_N "checking for sys/sysinfo.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_sysinfo_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysinfo_h" >&6 - PORTALS_LIBS="$libs" - LIBS="$save_libs $PORTALS_LIBS" +fi +if test $ac_cv_header_sys_sysinfo_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for portals3.h header" >&5 -$as_echo_n "checking for portals3.h header... " >&6; } - ok=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int m, n; m = PtlInit(&n); - ; - return 0; -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYSINFO 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "$ok" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Header portals/portals3.h not found." "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for portals libraries" >&5 -$as_echo_n "checking for portals libraries... " >&6; } - ok=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int m, n; m = PtlInit(&n); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$ok" = no ; then - PORTALS_LIBS="$libs -lportals" - LIBS="$save_libs $PORTALS_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + +for ac_func in strnlen +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. */ -#include -int -main () +/* 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" { -int m, n; m = PtlInit(&n); - ; - return 0; +#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; +#endif +#ifdef __cplusplus } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi +#endif - if test "$ok" = no ; then - PORTALS_LIBS="$libs -lp3api -lp3lib -lp3utcp -lp3rt -lpthread" - LIBS="$save_libs $PORTALS_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -int m, n; m = PtlInit(&n); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ok=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - - if test "$ok" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - BUILD_PORTALS=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Could not link Portals library." "$LINENO" 5 - fi +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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # - # Check for API variations. - # - for ac_func in PtlErrorStr -do : - ac_fn_c_check_func "$LINENO" "PtlErrorStr" "ac_cv_func_PtlErrorStr" -if test "x$ac_cv_func_PtlErrorStr" = xyes; then : +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 HAVE_PTLERRORSTR 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done - for ac_func in PtlEventKindStr -do : - ac_fn_c_check_func "$LINENO" "PtlEventKindStr" "ac_cv_func_PtlEventKindStr" -if test "x$ac_cv_func_PtlEventKindStr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTLEVENTKINDSTR 1 + +for ac_func in strtoull +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 -fi -done +/* 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; +#endif +#ifdef __cplusplus +} +#endif - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include int main () { -int m; ptl_process_id_t any_pid; - m = PtlACEntry(0, 0, any_pid, (ptl_uid_t) -1, (ptl_jid_t) -1, 0); +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_PTLACENTRY_JID 1" >>confdefs.h +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 + 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 conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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 - # Reset - CPPFLAGS="$save_cppflags" - LIBS="$save_libs" - fi +fi +done +for ac_func in strstr +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. */ +#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; +#endif +#ifdef __cplusplus +} +#endif -# Check whether --with-zoid was given. -if test "${with_zoid+set}" = set; then : - withval=$with_zoid; if test -z "$withval" -o "$withval" = yes ; then - as_fn_error $? "Option --with-zoid requires the path to your ZOID source tree." "$LINENO" 5 - elif test "$withval" != no ; then - ZOID_SRCDIR="$withval" - fi +int +main () +{ +return f != $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 + 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 + 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 - - if test -n "$ZOID_SRCDIR" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -Isrc/io/bmi -I$ZOID_SRCDIR/include -I$ZOID_SRCDIR/zbmi -I$ZOID_SRCDIR/zbmi/implementation" - ac_fn_c_check_header_mongrel "$LINENO" "zbmi.h" "ac_cv_header_zbmi_h" "$ac_includes_default" -if test "x$ac_cv_header_zbmi_h" = xyes; then : - -else - as_fn_error $? "Header zbmi.h not found." "$LINENO" 5 +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_fn_c_check_header_mongrel "$LINENO" "zoid_api.h" "ac_cv_header_zoid_api_h" "$ac_includes_default" -if test "x$ac_cv_header_zoid_api_h" = xyes; then : - -else - as_fn_error $? "Header zoid_api.h not found." "$LINENO" 5 fi +done - ac_fn_c_check_header_mongrel "$LINENO" "zbmi_protocol.h" "ac_cv_header_zbmi_protocol_h" "$ac_includes_default" -if test "x$ac_cv_header_zbmi_protocol_h" = xyes; then : - +for ac_func in fgetxattr +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 - as_fn_error $? "Header zbmi_protocol.h not found." "$LINENO" 5 -fi - - - CPPFLAGS="$save_cppflags" - BUILD_ZOID=1 - fi - + 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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr extra arguments" >&5 -$as_echo_n "checking for fgetxattr extra arguments... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#undef $ac_func - #include - #ifdef HAVE_ATTR_XATTR_H - #include - #endif - #ifdef HAVE_SYS_XATTR_H - #include - #endif +/* 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; +#endif +#ifdef __cplusplus +} +#endif int main () -{ - - fgetxattr(0, 0, 0, 0, 0, 0); - +{ +return f != $ac_func; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_FGETXATTR_EXTRA_ARGS 1" >>confdefs.h - +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 + eval "$as_ac_var=yes" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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.$ac_ext - -ac_fn_c_check_header_mongrel "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysinfo_h" = xyes; then : - -$as_echo "#define HAVE_SYSINFO 1" >>confdefs.h - - +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - - - -for ac_func in strnlen -do : - ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" -if test "x$ac_cv_func_strnlen" = xyes; then : +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 HAVE_STRNLEN 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in strtoull -do : - ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOULL 1 + +for ac_func in fsetxattr +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 -fi -done +/* 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. */ -for ac_func in strstr -do : - ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" -if test "x$ac_cv_func_strstr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRSTR 1 -_ACEOF +#ifdef __STDC__ +# include +#else +# include +#endif -fi -done +#undef $ac_func -for ac_func in fgetxattr -do : - ac_fn_c_check_func "$LINENO" "fgetxattr" "ac_cv_func_fgetxattr" -if test "x$ac_cv_func_fgetxattr" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FGETXATTR 1 +/* 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; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $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 + 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 + 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 -done - -for ac_func in fsetxattr -do : - ac_fn_c_check_func "$LINENO" "fsetxattr" "ac_cv_func_fsetxattr" -if test "x$ac_cv_func_fsetxattr" = xyes; then : +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 HAVE_FSETXATTR 1 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr prototype" >&5 -$as_echo_n "checking for fgetxattr prototype... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for fgetxattr prototype" >&5 +echo $ECHO_N "checking for fgetxattr prototype... $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 @@ -11506,23 +23867,53 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FGETXATTR_PROTOTYPE 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FGETXATTR_PROTOTYPE 1 +_ACEOF fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr extra arguments" >&5 -$as_echo_n "checking for fgetxattr extra arguments... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 +echo $ECHO_N "checking for fgetxattr extra arguments... $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 @@ -11547,22 +23938,52 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_FGETXATTR_EXTRA_ARGS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_FGETXATTR_EXTRA_ARGS 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsetxattr extra arguments" >&5 -$as_echo_n "checking for fsetxattr extra arguments... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +echo "$as_me:$LINENO: checking for fsetxattr extra arguments" >&5 +echo $ECHO_N "checking for fsetxattr extra arguments... $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 @@ -11583,171 +24004,835 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_FSETXATTR_EXTRA_ARGS 1" >>confdefs.h - +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSETXATTR_EXTRA_ARGS 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +# 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 + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsun $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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" +#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_sun_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_sun_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_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 $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lseq $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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" +#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_seq_getmntent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_seq_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_seq_getmntent" >&5 +echo "${ECHO_T}$ac_cv_lib_seq_getmntent" >&6 +if test $ac_cv_lib_seq_getmntent = yes; then + LIBS="-lseq $LIBS" +else + echo "$as_me:$LINENO: checking for getmntent in -lgen" >&5 +echo $ECHO_N "checking for getmntent in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_getmntent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +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" +#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 +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 + +fi + +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 $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. */ +#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; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $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 + 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 + 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 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 + +fi +done + + + + +# Check whether --enable-static-server or --disable-static-server was given. +if test "${enable_static_server+set}" = set; then + enableval="$enable_static_server" + staticserver=$enableval +else + staticserver="no" +fi; + +if test "$staticserver" = "yes"; then + SERVER_LDFLAGS="$LDFLAGS -static" +else + SERVER_LDFLAGS="$LDFLAGS -rdynamic" +fi + + + + +for ac_header in execinfo.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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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 - +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 -# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 -$as_echo_n "checking for library containing getmntent... " >&6; } -if ${ac_cv_search_getmntent+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# 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. */ - -/* 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 getmntent (); -int -main () -{ -return getmntent (); - ; - return 0; -} +#include <$ac_header> _ACEOF -for ac_lib in '' sun seq gen; do - if test -z "$ac_lib"; then - ac_res="none required" +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_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" + ac_cpp_err= fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_getmntent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_getmntent+:} false; then : - break -fi -done -if ${ac_cv_search_getmntent+:} false; then : - else - ac_cv_search_getmntent=no + ac_cpp_err=yes fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 -$as_echo "$ac_cv_search_getmntent" >&6; } -ac_res=$ac_cv_search_getmntent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - ac_cv_func_getmntent=yes +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 -$as_echo "#define HAVE_GETMNTENT 1" >>confdefs.h + 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 - ac_cv_func_getmntent=no + 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 - - -for ac_header in malloc.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes; then : +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_MALLOC_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF + LDFLAGS="$LDFLAGS -rdynamic" + GOSSIP_ENABLE_BACKTRACE=1 fi done -for ac_header in mntent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default" -if test "x$ac_cv_header_mntent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MNTENT_H 1 -_ACEOF -fi -done +test_for_sdl() +{ + echo "$as_me:$LINENO: checking for SDL" >&5 +echo $ECHO_N "checking for SDL... $ECHO_C" >&6 + SDL_CONFIG=`which sdl-config 2> /dev/null` + if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SDL_VERSION=`sdl-config --version` + VISCFLAGS=`sdl-config --cflags` + VISCLIBS=`sdl-config --libs` + + +for ac_header in SDL_ttf.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 -# Check whether --enable-static-server was given. -if test "${enable_static_server+set}" = set; then : - enableval=$enable_static_server; staticserver=$enableval +# 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 - staticserver="no" + 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 -if test "$staticserver" = "yes"; then - SERVER_LDFLAGS="$LDFLAGS -static" +# 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 - SERVER_LDFLAGS="$LDFLAGS -rdynamic" + 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 - - -for ac_header in execinfo.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_execinfo_h" = xyes; then : +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_EXECINFO_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - LDFLAGS="$LDFLAGS -rdynamic" - GOSSIP_ENABLE_BACKTRACE=1 + BUILD_VIS="1" + CPPFLAGS="$CPPFLAGS $VISCFLAGS" +else +for ac_header in SDL/SDL_ttf.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 -done - +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 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5 -$as_echo_n "checking for SDL... " >&6; } -SDL_CONFIG=`which sdl-config 2> /dev/null` -if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SDL_VERSION=`sdl-config --version` - VISCFLAGS=`sdl-config --cflags` - VISCLIBS=`sdl-config --libs` + 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 - for ac_header in SDL_ttf.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "SDL_ttf.h" "ac_cv_header_SDL_ttf_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL_ttf_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SDL_TTF_H 1 -_ACEOF - BUILD_VIS="1" - CPPFLAGS="$CPPFLAGS $VISCFLAGS" +# 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 - for ac_header in SDL/SDL_ttf.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL_ttf.h" "ac_cv_header_SDL_SDL_ttf_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL_SDL_ttf_h" = xyes; then : + 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 HAVE_SDL_SDL_TTF_H 1 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF BUILD_VIS="1" - CPPFLAGS="$CPPFLAGS $VISCFLAGS" + CPPFLAGS="$CPPFLAGS $VISCFLAGS" fi done @@ -11760,14 +24845,29 @@ done -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +} + +# Check whether --enable-visual or --disable-visual was given. +if test "${enable_visual+set}" = set; then + enableval="$enable_visual" + +if test "x$enableval" = "xyes" ; then + test_for_sdl fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU-style strerror_r" >&5 -$as_echo_n "checking for GNU-style strerror_r... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi; + +echo "$as_me:$LINENO: checking for GNU-style strerror_r" >&5 +echo $ECHO_N "checking for GNU-style strerror_r... $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 @@ -11781,27 +24881,52 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -$as_echo "#define HAVE_GNU_STRERROR_R 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define HAVE_GNU_STRERROR_R 1 +_ACEOF else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext for d in src/apps src/io src/common src/client src/kernel \ doc src/apps/kernel test; do install -d $d; done -ac_config_files="$ac_config_files include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" - + ac_config_files="$ac_config_files include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -11820,70 +24945,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -11892,19 +24986,32 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -11912,15 +25019,12 @@ LTLIBOBJS=$ac_ltlibobjs - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 +: ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -11930,377 +25034,230 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac + as_unset=false fi -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' + $as_unset $as_var fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done -PS1='$ ' -PS2='> ' -PS4='+ ' -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - +rm -f conf$$ conf$$.exe conf$$.file -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -12309,20 +25266,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to + +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12330,46 +25298,45 @@ generated by GNU Autoconf 2.68. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi -_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages + -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -12377,90 +25344,84 @@ $config_files Configuration headers: $config_headers -Report bugs to the package provider." - +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -test -n "\$AWK" || AWK=awk +srcdir=$srcdir +INSTALL="$INSTALL" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -12474,99 +25435,86 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "pvfs2-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; - "include/pvfs2.h") CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "module.mk") CONFIG_FILES="$CONFIG_FILES module.mk" ;; - "src/apps/admin/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; - "src/apps/admin/pvfs2-config") CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; - "src/apps/devel/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; - "src/apps/karma/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; - "src/apps/vis/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; - "src/apps/fuse/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; - "src/apps/kernel/linux/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; - "src/apps/user/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; - "src/io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; - "src/io/trove/trove-handle-mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; - "src/io/trove/trove-dbpf/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; - "src/common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; - "src/common/quickhash/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; - "src/common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; - "src/common/dotconf/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; - "src/common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; - "src/common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; - "src/common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; - "src/common/llist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; - "src/common/statecomp/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; - "src/common/events/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; - "src/common/mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; - "src/io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; - "src/io/bmi/bmi_tcp/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; - "src/io/bmi/bmi_gm/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; - "src/io/bmi/bmi_mx/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; - "src/io/bmi/bmi_ib/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; - "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; - "src/io/bmi/bmi_portals/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; - "src/io/bmi/bmi_zoid/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; - "src/io/description/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; - "src/io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; - "src/io/flow/flowproto-bmi-trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; - "src/io/flow/flowproto-template/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; - "src/io/flow/flowproto-dump-offsets/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; - "src/io/flow/flowproto-bmi-cache/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; - "src/io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; - "src/io/job/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; - "src/io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; - "src/proto/module.mk") CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; - "src/server/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; - "src/server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; - "src/client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; - "src/client/usrint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; - "src/kernel/linux-2.6/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; - "src/kernel/linux-2.4/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; - "doc/module.mk") CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; - "doc/coding/module.mk") CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; - "doc/design/module.mk") CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; - "doc/random/module.mk") CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; - "examples/pvfs2-server.rc") CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; - "doc/doxygen/pvfs2-doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + case "$ac_config_target" in + # Handling of arguments. + "include/pvfs2.h" ) CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "module.mk" ) CONFIG_FILES="$CONFIG_FILES module.mk" ;; + "src/apps/admin/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; + "src/apps/admin/pvfs2-config" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; + "src/apps/devel/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; + "src/apps/karma/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; + "src/apps/vis/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; + "src/apps/fuse/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; + "src/apps/ucache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; + "src/apps/kernel/linux/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; + "src/apps/user/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; + "src/io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; + "src/io/trove/trove-handle-mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; + "src/io/trove/trove-dbpf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; + "src/common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; + "src/common/quickhash/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; + "src/common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; + "src/common/dotconf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; + "src/common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; + "src/common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; + "src/common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; + "src/common/llist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; + "src/common/statecomp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; + "src/common/events/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; + "src/common/mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; + "src/io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; + "src/io/bmi/bmi_tcp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; + "src/io/bmi/bmi_gm/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; + "src/io/bmi/bmi_mx/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; + "src/io/bmi/bmi_ib/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; + "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; + "src/io/bmi/bmi_portals/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; + "src/io/bmi/bmi_zoid/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; + "src/io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; + "src/io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; + "src/io/flow/flowproto-bmi-trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; + "src/io/flow/flowproto-template/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; + "src/io/flow/flowproto-dump-offsets/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; + "src/io/flow/flowproto-bmi-cache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; + "src/io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; + "src/io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; + "src/io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; + "src/proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; + "src/server/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; + "src/server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; + "src/client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; + "src/client/usrint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; + "src/kernel/linux-2.6/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; + "src/kernel/linux-2.4/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; + "doc/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; + "doc/coding/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; + "doc/design/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; + "doc/random/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; + "examples/pvfs2-server.rc" ) CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; + "doc/doxygen/pvfs2-doxygen.conf" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; + "pvfs2-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -12577,550 +25525,645 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +# +# CONFIG_FILES section. +# - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@PVFS2_VERSION@,$PVFS2_VERSION,;t t +s,@PVFS2_VERSION_MAJOR@,$PVFS2_VERSION_MAJOR,;t t +s,@PVFS2_VERSION_MINOR@,$PVFS2_VERSION_MINOR,;t t +s,@PVFS2_VERSION_SUB@,$PVFS2_VERSION_SUB,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@HAVE_PERL@,$HAVE_PERL,;t t +s,@HAVE_FIND@,$HAVE_FIND,;t t +s,@HAVE_BISON@,$HAVE_BISON,;t t +s,@HAVE_FLEX@,$HAVE_FLEX,;t t +s,@BUILD_CC@,$BUILD_CC,;t t +s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t +s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t +s,@LIBCFLAGS@,$LIBCFLAGS,;t t +s,@THREAD_LIB@,$THREAD_LIB,;t t +s,@BUILD_SERVER@,$BUILD_SERVER,;t t +s,@BUILD_BMI_ONLY@,$BUILD_BMI_ONLY,;t t +s,@NEED_BERKELEY_DB@,$NEED_BERKELEY_DB,;t t +s,@MMAP_RA_CACHE@,$MMAP_RA_CACHE,;t t +s,@RESET_FILE_POS@,$RESET_FILE_POS,;t t +s,@TRUSTED_CONNECTIONS@,$TRUSTED_CONNECTIONS,;t t +s,@HAVE_PKGCONFIG@,$HAVE_PKGCONFIG,;t t +s,@GTKLIBS@,$GTKLIBS,;t t +s,@GTKCFLAGS@,$GTKCFLAGS,;t t +s,@BUILD_KARMA@,$BUILD_KARMA,;t t +s,@build_static@,$build_static,;t t +s,@REDHAT_RELEASE@,$REDHAT_RELEASE,;t t +s,@NPTL_WORKAROUND@,$NPTL_WORKAROUND,;t t +s,@MISC_TROVE_FLAGS@,$MISC_TROVE_FLAGS,;t t +s,@TAU_INCS@,$TAU_INCS,;t t +s,@BUILD_TAU@,$BUILD_TAU,;t t +s,@BUILD_KERNEL@,$BUILD_KERNEL,;t t +s,@THREADED_KMOD_HELPER@,$THREADED_KMOD_HELPER,;t t +s,@LINUX_KERNEL_SRC@,$LINUX_KERNEL_SRC,;t t +s,@LINUX24_KERNEL_SRC@,$LINUX24_KERNEL_SRC,;t t +s,@LINUX24_KERNEL_MINOR_VER@,$LINUX24_KERNEL_MINOR_VER,;t t +s,@BUILD_ABSOLUTE_TOP@,$BUILD_ABSOLUTE_TOP,;t t +s,@SRC_RELATIVE_TOP@,$SRC_RELATIVE_TOP,;t t +s,@SRC_ABSOLUTE_TOP@,$SRC_ABSOLUTE_TOP,;t t +s,@FUSE_LDFLAGS@,$FUSE_LDFLAGS,;t t +s,@FUSE_CFLAGS@,$FUSE_CFLAGS,;t t +s,@BUILD_FUSE@,$BUILD_FUSE,;t t +s,@ENABLE_COVERAGE@,$ENABLE_COVERAGE,;t t +s,@STRICT_CFLAGS@,$STRICT_CFLAGS,;t t +s,@QUIET_COMPILE@,$QUIET_COMPILE,;t t +s,@BUILD_EPOLL@,$BUILD_EPOLL,;t t +s,@PVFS2_SEGV_BACKTRACE@,$PVFS2_SEGV_BACKTRACE,;t t +s,@build_shared@,$build_shared,;t t +s,@BUILD_USRINT@,$BUILD_USRINT,;t t +s,@BUILDUSRINT@,$BUILDUSRINT,;t t +s,@BUILD_UCACHE@,$BUILD_UCACHE,;t t +s,@BUILD_ACL_INTERFACE@,$BUILD_ACL_INTERFACE,;t t +s,@INTELC@,$INTELC,;t t +s,@GNUC@,$GNUC,;t t +s,@DB_CFLAGS@,$DB_CFLAGS,;t t +s,@DB_LIB@,$DB_LIB,;t t +s,@NEEDS_LIBRT@,$NEEDS_LIBRT,;t t +s,@TARGET_OS_DARWIN@,$TARGET_OS_DARWIN,;t t +s,@TARGET_OS_LINUX@,$TARGET_OS_LINUX,;t t +s,@BUILD_BMI_TCP@,$BUILD_BMI_TCP,;t t +s,@BUILD_GM@,$BUILD_GM,;t t +s,@GM_INCDIR@,$GM_INCDIR,;t t +s,@GM_LIBDIR@,$GM_LIBDIR,;t t +s,@BUILD_MX@,$BUILD_MX,;t t +s,@MX_INCDIR@,$MX_INCDIR,;t t +s,@MX_LIBDIR@,$MX_LIBDIR,;t t +s,@BUILD_IB@,$BUILD_IB,;t t +s,@IB_INCDIR@,$IB_INCDIR,;t t +s,@IB_LIBDIR@,$IB_LIBDIR,;t t +s,@BUILD_OPENIB@,$BUILD_OPENIB,;t t +s,@OPENIB_INCDIR@,$OPENIB_INCDIR,;t t +s,@OPENIB_LIBDIR@,$OPENIB_LIBDIR,;t t +s,@BUILD_PORTALS@,$BUILD_PORTALS,;t t +s,@PORTALS_INCS@,$PORTALS_INCS,;t t +s,@PORTALS_LIBS@,$PORTALS_LIBS,;t t +s,@BUILD_ZOID@,$BUILD_ZOID,;t t +s,@ZOID_SRCDIR@,$ZOID_SRCDIR,;t t +s,@SERVER_LDFLAGS@,$SERVER_LDFLAGS,;t t +s,@GOSSIP_ENABLE_BACKTRACE@,$GOSSIP_ENABLE_BACKTRACE,;t t +s,@BUILD_VIS@,$BUILD_VIS,;t t +s,@VISCFLAGS@,$VISCFLAGS,;t t +s,@VISLIBS@,$VISLIBS,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi + mv $tmp/out $ac_file else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + cat $tmp/out + rm -f $tmp/out fi - ;; +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac -done # for ac_tag + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -13140,11 +26183,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + $ac_cs_success || { (exit 1); exit 1; } fi @@ -13152,20 +26191,20 @@ chmod +x $BUILD_ABSOLUTE_TOP/src/apps/admin/pvfs2-config # print a summary of the configuration information if test "x$BUILD_BMI_ONLY" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ***** Displaying BMI configuration information *****" >&5 -$as_echo "***** Displaying BMI configuration information *****" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ----------------------------------------------------" >&5 -$as_echo "----------------------------------------------------" >&6; } + echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + echo "$as_me:$LINENO: result: ***** Displaying BMI configuration information *****" >&5 +echo "${ECHO_T}***** Displaying BMI configuration information *****" >&6 + echo "$as_me:$LINENO: result: ----------------------------------------------------" >&5 +echo "${ECHO_T}----------------------------------------------------" >&6 PKGSTR="BMI" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ***** Displaying PVFS Configuration Information *****" >&5 -$as_echo "***** Displaying PVFS Configuration Information *****" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ------------------------------------------------------" >&5 -$as_echo "------------------------------------------------------" >&6; } + echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + echo "$as_me:$LINENO: result: ***** Displaying PVFS Configuration Information *****" >&5 +echo "${ECHO_T}***** Displaying PVFS Configuration Information *****" >&6 + echo "$as_me:$LINENO: result: ------------------------------------------------------" >&5 +echo "${ECHO_T}------------------------------------------------------" >&6 PKGSTR="PVFS2" fi @@ -13173,83 +26212,117 @@ fi if test "x$BUILD_BMI_ONLY" != "x1" ; then if test "x$BUILD_KARMA" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to build karma gui : yes" >&5 -$as_echo "PVFS2 configured to build karma gui : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : yes" >&5 +echo "${ECHO_T}PVFS2 configured to build karma gui : yes" >&6 +else + echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : no" >&5 +echo "${ECHO_T}PVFS2 configured to build karma gui : no" >&6 +fi + +if test "x$BUILD_VIS" = "x1" ; then + echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : yes" >&5 +echo "${ECHO_T}PVFS2 configured to build visualization tools : yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to build karma gui : no" >&5 -$as_echo "PVFS2 configured to build karma gui : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : no" >&5 +echo "${ECHO_T}PVFS2 configured to build visualization tools : no" >&6 fi if test "x$ENABLE_COVERAGE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to perform coverage analysis : yes" >&5 -$as_echo "PVFS2 configured to perform coverage analysis : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : yes" >&5 +echo "${ECHO_T}PVFS2 configured to perform coverage analysis : yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to perform coverage analysis : no" >&5 -$as_echo "PVFS2 configured to perform coverage analysis : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : no" >&5 +echo "${ECHO_T}PVFS2 configured to perform coverage analysis : no" >&6 fi if test "x$MISC_TROVE_FLAGS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for aio threaded callbacks : no" >&5 -$as_echo "PVFS2 configured for aio threaded callbacks : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : no" >&5 +echo "${ECHO_T}PVFS2 configured for aio threaded callbacks : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for aio threaded callbacks : yes" >&5 -$as_echo "PVFS2 configured for aio threaded callbacks : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : yes" >&5 +echo "${ECHO_T}PVFS2 configured for aio threaded callbacks : yes" >&6 fi if test "x$BUILD_FUSE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to use FUSE : yes" >&5 -$as_echo "PVFS2 configured to use FUSE : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : yes" >&5 +echo "${ECHO_T}PVFS2 configured to use FUSE : yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured to use FUSE : no" >&5 -$as_echo "PVFS2 configured to use FUSE : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : no" >&5 +echo "${ECHO_T}PVFS2 configured to use FUSE : no" >&6 fi if test "x$LINUX_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for the 2.6/3 kernel module : no" >&5 -$as_echo "PVFS2 configured for the 2.6/3 kernel module : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : no" >&5 +echo "${ECHO_T}PVFS2 configured for the 2.6/3 kernel module : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for the 2.6/3 kernel module : yes" >&5 -$as_echo "PVFS2 configured for the 2.6/3 kernel module : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : yes" >&5 +echo "${ECHO_T}PVFS2 configured for the 2.6/3 kernel module : yes" >&6 fi if test "x$LINUX24_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for the 2.4.x kernel module : no" >&5 -$as_echo "PVFS2 configured for the 2.4.x kernel module : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : no" >&5 +echo "${ECHO_T}PVFS2 configured for the 2.4.x kernel module : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for the 2.4.x kernel module : yes" >&5 -$as_echo "PVFS2 configured for the 2.4.x kernel module : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : yes" >&5 +echo "${ECHO_T}PVFS2 configured for the 2.4.x kernel module : yes" >&6 fi if test "x$MMAP_RA_CACHE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for using the mmap-ra-cache : no" >&5 -$as_echo "PVFS2 configured for using the mmap-ra-cache : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : no" >&5 +echo "${ECHO_T}PVFS2 configured for using the mmap-ra-cache : no" >&6 +else + echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : yes" >&5 +echo "${ECHO_T}PVFS2 configured for using the mmap-ra-cache : yes" >&6 +fi + +if test "x$RESET_FILE_POS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then + echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : no" >&5 +echo "${ECHO_T}PVFS2 configured for resetting file position : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 configured for using the mmap-ra-cache : yes" >&5 -$as_echo "PVFS2 configured for using the mmap-ra-cache : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : yes" >&5 +echo "${ECHO_T}PVFS2 configured for resetting file position : yes" >&6 fi if test "x$REDHAT_RELEASE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 will use workaround for redhat 2.4 kernels : no" >&5 -$as_echo "PVFS2 will use workaround for redhat 2.4 kernels : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : no" >&5 +echo "${ECHO_T}PVFS2 will use workaround for redhat 2.4 kernels : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 will use workaround for redhat 2.4 kernels : yes" >&5 -$as_echo "PVFS2 will use workaround for redhat 2.4 kernels : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : yes" >&5 +echo "${ECHO_T}PVFS2 will use workaround for redhat 2.4 kernels : yes" >&6 fi if test "x$NPTL_WORKAROUND" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 will use workaround for buggy NPTL : no" >&5 -$as_echo "PVFS2 will use workaround for buggy NPTL : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : no" >&5 +echo "${ECHO_T}PVFS2 will use workaround for buggy NPTL : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 will use workaround for buggy NPTL : yes" >&5 -$as_echo "PVFS2 will use workaround for buggy NPTL : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : yes" >&5 +echo "${ECHO_T}PVFS2 will use workaround for buggy NPTL : yes" >&6 fi if test "x$BUILD_SERVER" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 server will be built : yes" >&5 -$as_echo "PVFS2 server will be built : yes" >&6; } + echo "$as_me:$LINENO: result: PVFS2 server will be built : yes" >&5 +echo "${ECHO_T}PVFS2 server will be built : yes" >&6 +else + echo "$as_me:$LINENO: result: PVFS2 server will be built : no" >&5 +echo "${ECHO_T}PVFS2 server will be built : no" >&6 + +fi + +if test "x$BUILD_USRINT" = "x1" ; then + echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : yes" >&5 +echo "${ECHO_T}PVFS2 user interface libraries will be built : yes" >&6 +else + echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : no" >&5 +echo "${ECHO_T}PVFS2 user interface libraries will be built : no" >&6 + +fi + +if test "x$BUILD_UCACHE" = "x1" ; then + echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : yes" >&5 +echo "${ECHO_T}PVFS2 user interface library cache enabled : yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: PVFS2 server will be built : no" >&5 -$as_echo "PVFS2 server will be built : no" >&6; } + echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : no" >&5 +echo "${ECHO_T}PVFS2 user interface library cache enabled : no" >&6 fi @@ -13257,46 +26330,46 @@ else # print BMI and PVFS configs if test "x$THREAD_LIB" = "x"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured for a thread-safe client library : no" >&5 -$as_echo "$PKGSTR configured for a thread-safe client library : no" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : no" >&5 +echo "${ECHO_T}$PKGSTR configured for a thread-safe client library : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured for a thread-safe client library : yes" >&5 -$as_echo "$PKGSTR configured for a thread-safe client library : yes" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : yes" >&5 +echo "${ECHO_T}$PKGSTR configured for a thread-safe client library : yes" >&6 fi if test "x$BUILD_EPOLL" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured to use epoll : yes" >&5 -$as_echo "$PKGSTR configured to use epoll : yes" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : yes" >&5 +echo "${ECHO_T}$PKGSTR configured to use epoll : yes" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured to use epoll : no" >&5 -$as_echo "$PKGSTR configured to use epoll : no" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : no" >&5 +echo "${ECHO_T}$PKGSTR configured to use epoll : no" >&6 fi if test "x$TRUSTED_CONNECTIONS" = "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured for using trusted connections : no" >&5 -$as_echo "$PKGSTR configured for using trusted connections : no" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : no" >&5 +echo "${ECHO_T}$PKGSTR configured for using trusted connections : no" >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR configured for using trusted connections : yes" >&5 -$as_echo "$PKGSTR configured for using trusted connections : yes" >&6; } + echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : yes" >&5 +echo "${ECHO_T}$PKGSTR configured for using trusted connections : yes" >&6 fi fi # end of BMI/PVFS config display if test "x$WARN_ABOUT_HOSTNAMES" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&5 -$as_echo "WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&6; } + echo "$as_me:$LINENO: result: WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&5 +echo "${ECHO_T}WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&6 fi if test x$BUILD_GM = x1 -o x$BUILD_MX = x1 -o x$BUILD_IB = x1 -o \ x$BUILD_OPENIB = x1 -o x$BUILD_PORTALS = x1 -o x$BUILD_ZOID = x1 ; then if test x$BUILD_BMI_TCP = x1 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have selected to build $PKGSTR to use a \"fast\" network + { echo "$as_me:$LINENO: WARNING: You have selected to build $PKGSTR to use a \"fast\" network interface, but have not disabled TCP. The way this is currently implemented will lead to rather slow response times on the fast interface. Suggest you configure with \"--without-bmi-tcp\" for the best performance." >&5 -$as_echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" network +echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" network interface, but have not disabled TCP. The way this is currently implemented will lead to rather slow response times on the fast interface. Suggest you configure with @@ -13305,20 +26378,20 @@ $as_echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" fi if test x$HAVE_DB_OLD = x1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The detected version of Berkeley DB is not at least 4.8.30. + { echo "$as_me:$LINENO: WARNING: The detected version of Berkeley DB is not at least 4.8.30. Metadata corruption has been documented in versions prior to 4.8.30. It is highly recommended that you update the version of Berkeley DB you are building against." >&5 -$as_echo "$as_me: WARNING: The detected version of Berkeley DB is not at least 4.8.30. +echo "$as_me: WARNING: The detected version of Berkeley DB is not at least 4.8.30. Metadata corruption has been documented in versions prior to 4.8.30. It is highly recommended that you update the version of Berkeley DB you are building against." >&2;} fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGSTR version string: $PVFS2_VERSION" >&5 -$as_echo "$PKGSTR version string: $PVFS2_VERSION" >&6; } +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: $PKGSTR version string: $PVFS2_VERSION" >&5 +echo "${ECHO_T}$PKGSTR version string: $PVFS2_VERSION" >&6 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 diff --git a/configure.in b/configure.in index 7eec399..62bf3b4 100644 --- a/configure.in +++ b/configure.in @@ -6,7 +6,7 @@ dnl You may need to use autoheader as well if changing any DEFINEs dnl sanity checks, output header, location of scripts used here AC_INIT(include/pvfs2-types.h) -AC_PREREQ(2.59) +AC_PREREQ(2.57) AC_CONFIG_AUX_DIR(maint/config) dnl @@ -18,12 +18,12 @@ dnl An @ in the date string can confuse e.g. scp and 'make kmod' CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"` PVFS2_VERSION_MAJOR=2 PVFS2_VERSION_MINOR=8 -PVFS2_VERSION_SUB=5 -PVFS2_VERSION_RELEASE="orangefs" +PVFS2_VERSION_SUB=6 +#PVFS2_VERSION_RELEASE="orangefs" #PVFS2_PRE="" -#PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" +PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" -PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE +PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE$PVFS2_VERSION_PRE AC_SUBST(PVFS2_VERSION) AC_DEFINE_UNQUOTED(PVFS2_VERSION_MAJOR, $PVFS2_VERSION_MAJOR, major version number) AC_DEFINE_UNQUOTED(PVFS2_VERSION_MINOR, $PVFS2_VERSION_MINOR, minor version number) @@ -32,7 +32,7 @@ AC_DEFINE_UNQUOTED(PVFS2_VERSION_SUB, $PVFS2_VERSION_SUB, sub version number) AC_SUBST(PVFS2_VERSION_MAJOR) AC_SUBST(PVFS2_VERSION_MINOR) AC_SUBST(PVFS2_VERSION_SUB) -AC_SUBST(PVFS2_VERSION_RELEASE) +#AC_SUBST(PVFS2_VERSION_RELEASE) dnl BMI_ONLY_TAG @@ -45,21 +45,68 @@ if test "x$USR_CFLAGS" = "x"; then USR_CFLAGS_SET=no fi +dnl if we use headers that might not be on every platform, add them here AC_CONFIG_HEADER(pvfs2-config.h) AC_CHECK_HEADER([pwd.h], - [AC_DEFINE(HAVE_GETPWUID, 1, Define if pwd.h exists)]) + [AC_DEFINE(HAVE_PWD_H, 1, Define if pwd.h exists)]) +AC_CHECK_HEADER([features.h], + [AC_DEFINE(HAVE_FEATURES_H, 1, Define if features.h exists)]) +AC_CHECK_HEADER([fstab.h], + [AC_DEFINE(HAVE_FSTAB_H, 1, Define if fstab.h exists)]) +AC_CHECK_HEADER([malloc.h], + [AC_DEFINE(HAVE_MALLOC_H, 1, Define if malloc.h exists)]) +AC_CHECK_HEADER([memory.h], + [AC_DEFINE(HAVE_MEMORY_H, 1, Define if memory.h exists)]) +AC_CHECK_HEADER([mntent.h], + [AC_DEFINE(HAVE_MNTENT_H, 1, Define if mntent.h exists)]) +AC_CHECK_HEADER([netdb.h], + [AC_DEFINE(HAVE_NETDB_H, 1, Define if netdb.h exists)]) +AC_CHECK_HEADER([stdarg.h], + [AC_DEFINE(HAVE_STDARG_H, 1, Define if stdarg.h exists)]) +AC_CHECK_HEADER([stdint.h], + [AC_DEFINE(HAVE_STDINT_H, 1, Define if stdint.h exists)]) +AC_CHECK_HEADER([stdlib.h], + [AC_DEFINE(HAVE_STDLIB_H, 1, Define if stdlib.h exists)]) +AC_CHECK_HEADER([strings.h], + [AC_DEFINE(HAVE_STRINGS_H, 1, Define if strings.h exists)]) +AC_CHECK_HEADER([stdlib.h], + [AC_DEFINE(HAVE_STDLIB_H, 1, Define if stdlib.h exists)]) + +AC_CHECK_HEADER([linux/types.h], + [AC_DEFINE(HAVE_LINUX_TYPES_H, 1, Define if linux/types.h exists)]) +AC_CHECK_HEADER([linux/malloc.h], + [AC_DEFINE(HAVE_LINUX_MALLOC_H, 1, Define if linux/malloc.h exists)]) + +dnl These are kernel headers checked in maint/config/kernel.m4 +dnl AC_CHECK_HEADERS([linux/compat.h]) +dnl AC_CHECK_HEADERS([linux/exportfs.h]) +dnl AC_CHECK_HEADERS([linux/ioctl32.h]) +dnl AC_CHECK_HEADERS([linux/mount.h]) +dnl AC_CHECK_HEADERS([linux/posix_acl.h]) +dnl AC_CHECK_HEADERS([linux/posix_acl_xattr.h]) +dnl AC_CHECK_HEADERS([linux/syscalls.h]) +dnl AC_CHECK_HEADERS([linux/xattr_acl.h]) + AC_CHECK_HEADER([sys/vfs.h], [AC_DEFINE(HAVE_SYS_VFS_H, 1, Define if sys/vfs.h exists)]) AC_CHECK_HEADER([sys/mount.h], [AC_DEFINE(HAVE_SYS_MOUNT_H, 1, Define if sys/mount.h exists)]) - -AC_CHECK_HEADERS([mntent.h, fstab.h]) - -AC_CHECK_HEADERS(stdarg.h) - -AC_CHECK_HEADERS(attr/xattr.h) -AC_CHECK_HEADERS(sys/xattr.h) +AC_CHECK_HEADER([sys/stat.h], + [AC_DEFINE(HAVE_SYS_STAT_H, 1, Define if sys/stat.h exists)]) +AC_CHECK_HEADER([sys/types.h], + [AC_DEFINE(HAVE_SYS_TYPES_H, 1, Define if sys/types.h exists)]) +AC_CHECK_HEADER([sys/socket.h], + [AC_DEFINE(HAVE_SYS_SOCKET_H, 1, Define if sys/socket.h exists)]) +AC_CHECK_HEADER([sys/sendfile.h], + [AC_DEFINE(HAVE_SYS_SENDFILE_H, 1, Define if sys/sendfile.h exists)]) +AC_CHECK_HEADER([sys/xattr.h], + [AC_DEFINE(HAVE_SYS_XATTR_H, 1, Define if sys/xattr.h exists)]) + +AC_CHECK_HEADER([arpa/inet.h], + [AC_DEFINE(HAVE_ARPA_INET_H, 1, Define if arpa/inet.h exists)]) +AC_CHECK_HEADER([attr/xattr.h], + [AC_DEFINE(HAVE_ATTR_XATTR_H, 1, Define if attr/xattr.h exists)]) AC_CHECK_SIZEOF([long int]) @@ -197,10 +244,13 @@ fi], AC_SUBST(BUILD_SERVER) AC_ARG_WITH(openssl, - [ --with-openssl= Build with openssl (default=/usr) - --without-openssl Don't build with openssl.], - [AX_OPENSSL(${withval})], - [AX_OPENSSL_OPTIONAL]) + [ --with-openssl= Build with openssl (default=/usr) + --without-openssl Don't build with openssl.], + [AX_OPENSSL(${withval})], + [AX_OPENSSL_OPTIONAL]) + +dnl check to see if the "fast" getgrouplist function is available +dnl AX_GETGROUPLIST dnl a mechanism to turn off memory usage statistics in karma (may be dnl confusing for some classes of users) @@ -248,6 +298,18 @@ fi] ,) AC_SUBST(MMAP_RA_CACHE) +dnl a mechanism that resets the file position pointer when an error occurs whether +dnl or not any bytes were written (kernel interface only). +RESET_FILE_POS="" +AC_ARG_ENABLE(reset-file-pos, +[ --enable-reset-file-pos Resets file position pointer in kernel interface upon error], +[if test "x$enableval" = "xyes" ; then +RESET_FILE_POS="-DRESET_FILE_POS" +fi] +,) +AC_SUBST(RESET_FILE_POS) + + dnl See if the --enable-trusted-connections option was given to configure AC_ARG_ENABLE(trusted-connections, [ --enable-trusted-connections @@ -790,6 +852,133 @@ if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then AC_MSG_ERROR([Must do --enable-shared or --enable-static or both.]) fi +dnl Method to disable build of user interface libraries +BUILD_USRINT= +AC_ARG_ENABLE(usrint, +[ --disable-usrint Do not build posix and stdio user libraries], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_USRINT_BUILD, 1, + [Should we build user interface libraries.]) + BUILD_USRINT=1 +else + AC_DEFINE(PVFS_USRINT_BUILD, 0, + [Should we build user interface libraries.]) +fi +AC_SUBST(BUILD_USRINT)], +[AC_DEFINE(PVFS_USRINT_BUILD, 1, + [Should we build user interface libraries.]) +BUILD_USRINT=1 +AC_SUBST(BUILDUSRINT)]) + +USRINT_KMOUNT= +dnl Method to enable user interface kmod support +AC_ARG_ENABLE(usrint-kmount, +[ --enable-usrint-kmount Assume FS is mounted via kernel], +[if test "x$enableval" = "xyes" ; then + if test "x$BUILD_KERNEL" = "x1" -o "x$BUILD_FUSE" = "x1" ; then + AC_DEFINE(PVFS_USRINT_KMOUNT, 1, + [Should user interface assume FS is mounted.]) + USRINT_KMOUNT=1 + else + AC_MSG_ERROR([Assume FS mounted but neither kernel nor FUSE build ]) + fi +else + AC_DEFINE(PVFS_USRINT_KMOUNT, 0, + [Should user interface assume FS is mounted.]) +fi], +[AC_DEFINE(PVFS_USRINT_KMOUNT, 0, + [Should user interface assume FS is mounted.]) +]) + +dnl Method to disable user interface CWD support +AC_ARG_ENABLE(usrint-cwd, +[ --disable-usrint-cwd Do not enable user interface CWD support], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_USRINT_CWD, 1, + [Should we enable user interface CWD support.]) +else + AC_DEFINE(PVFS_USRINT_CWD, 0, + [Should we enable user interface CWD support.]) +fi], +[if test "x$USRINT_KMOUNT" = "x1" ; then + AC_DEFINE(PVFS_USRINT_CWD, 0, + [Should we enable user interface CWD support.]) +else + AC_DEFINE(PVFS_USRINT_CWD, 1, + [Should we enable user interface CWD support.]) +fi]) + +dnl Method to check if dl calls need an explicit link flag +AC_MSG_CHECKING(if dlfns needs explicit library request) +AC_LINK_IFELSE( +[ +#define _GNU_SOURCE 1 +#include +main() {void *p = dlsym(RTLD_DEFAULT,"sym");} +],[ + AC_MSG_RESULT(no) +],[ + AC_MSG_RESULT(yes) + LIBS="$LIBS -ldl" +]) + +dnl Method to enable user interface data cache +BUILD_UCACHE= +AC_ARG_ENABLE(ucache, +[ --enable-ucache Do not enable user user interface data cache.], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_UCACHE_ENABLE, 1, + [Should we enable user interface data cache.]) + BUILD_UCACHE=1 +else + AC_DEFINE(PVFS_UCACHE_ENABLE, 0, + [Should we enable user interface data cache.]) +fi +AC_SUBST(BUILD_UCACHE)], +[AC_DEFINE(PVFS_UCACHE_ENABLE, 0, + [Should we enable user interface data cache.]) +AC_SUBST(BUILD_UCACHE)]) + +dnl See if we have includes needed for acls +BUILD_ACL_INTERFACE= +AC_MSG_CHECKING(for user acl includes sys/acl.h acl/libacl.h) +AC_TRY_COMPILE([ +#include +#include +], [], + AC_MSG_RESULT(yes) + BUILD_ACL_INTERFACE=1 + AC_DEFINE(PVFS_HAVE_ACL_INCLUDES, 1, + [Should we build user interface acl routines.]) +, + AC_MSG_RESULT(no) + BUILD_ACL_INTERFACE=0 +) +AC_SUBST(BUILD_ACL_INTERFACE) + +dnl See if scandir compare arg takes void pointers +AC_MSG_CHECKING(for scandir compare arg using void pointers) +AC_TRY_COMPILE([ +#define _LARGEFILE64_SOURCE 1 +#define _GNU_SOURCE 1 +#include +int scandir (const char *dir, struct dirent ***list, + int (*sel)(const struct dirent *), + int (*cmp)(const void *, const void *)) +{ return 0; } +int scandir64 (const char *dir, struct dirent64 ***list, + int (*sel)(const struct dirent64 *), + int (*cmp)(const void *, const void *)) +{ return 0; } +], [], + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_SCANDIR_VOID, 1, + [scandir compare arg takes void pointers.]) +, + AC_MSG_RESULT(no) +) + + dnl See if CC is a GNU compiler. This may require a real test in future dnl versions of autoconf. In 2.13 it is a side-effect of AC_PROG_CC. First dnl check if it is an Intel compiler; those lie and claim to be gcc but are @@ -888,9 +1077,6 @@ case "$host_os" in ;; esac -AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(arpa/inet.h) -AC_CHECK_HEADERS(sys/socket.h) dnl check for gethostbyname function AC_MSG_CHECKING(for gethostbyname) oldcflags="$CFLAGS" @@ -957,6 +1143,32 @@ dnl Configure bmi_zoid, if --with-zoid or a variant given. dnl AX_ZOID +dnl +dnl check for F_NOCACHE (MACOSX) +AC_MSG_CHECKING([for F_NOCACHE]) +AC_TRY_COMPILE([ + #include + int fd; + fcntl(fd, F_NOCACHE, 1); + ], [], + AC_MSG_RESULT(no), + AC_MSG_RESULT(yes), + AC_DEFINE(HAVE_FCNTL_F_NOCACHE, 1, Define if system defines F_NOCACHE fcntl) +) + +dnl +dnl check for open O_DIRECT +AC_MSG_CHECKING([for open O_DIRECT]) +AC_TRY_COMPILE([ + #include + ], [ + open("somefile", O_DIRECT); + ], [], + AC_MSG_RESULT(no), + AC_MSG_RESULT(yes), + AC_DEFINE(HAVE_OPEN_O_DIRECT, 1, Define if system defines O_DIRECT fcntl) +) + dnl dnl check if fgetxattr takes extra arguments AC_MSG_CHECKING([for fgetxattr extra arguments]) @@ -977,6 +1189,46 @@ AC_TRY_COMPILE([ AC_MSG_RESULT(no) ) +dnl +dnl check if setxattr takes extra arguments +AC_MSG_CHECKING([for setxattr extra arguments]) +AC_TRY_COMPILE([ + #include + #ifdef HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_SYS_XATTR_H + #include + #endif + ], + [ + setxattr(0, 0, 0, 0, 0, 0); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SETXATTR_EXTRA_ARGS, 1, Define if setxattr takes position and option arguments), + AC_MSG_RESULT(no) +) + +dnl +dnl check if getxattr takes extra arguments +AC_MSG_CHECKING([for getxattr extra arguments]) +AC_TRY_COMPILE([ + #include + #ifdef HAVE_ATTR_XATTR_H + #include + #endif + #ifdef HAVE_SYS_XATTR_H + #include + #endif + ], + [ + getxattr(0, 0, 0, 0, 0, 0); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETXATTR_EXTRA_ARGS, 1, Define if getxattr takes position and option arguments), + AC_MSG_RESULT(no) +) + dnl dnl look for sysinfo header AC_CHECK_HEADER(sys/sysinfo.h, @@ -1055,9 +1307,6 @@ AC_TRY_COMPILE([ dnl check for getmntent(), special test AC_FUNC_GETMNTENT -dnl if we use headers that might not be on every platform, add them here -AC_CHECK_HEADERS(malloc.h) -AC_CHECK_HEADERS(mntent.h) AC_ARG_ENABLE(static-server, [ --enable-static-server Builds the server static], @@ -1082,30 +1331,43 @@ AC_SUBST(GOSSIP_ENABLE_BACKTRACE) dnl -- dnl Check for SDL -AC_MSG_CHECKING([for SDL]) -SDL_CONFIG=`which sdl-config 2> /dev/null` -if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then - AC_MSG_RESULT(yes) - SDL_VERSION=`sdl-config --version` - VISCFLAGS=`sdl-config --cflags` - VISCLIBS=`sdl-config --libs` - - dnl We also need SDL ttf support - dnl only define BUILD_VIS if we have all required parts - AC_CHECK_HEADERS(SDL_ttf.h, - [BUILD_VIS="1" - CPPFLAGS="$CPPFLAGS $VISCFLAGS"], - [AC_CHECK_HEADERS(SDL/SDL_ttf.h, - [BUILD_VIS="1" - CPPFLAGS="$CPPFLAGS $VISCFLAGS"],)], -) +test_for_sdl() +{ + AC_MSG_CHECKING([for SDL]) + SDL_CONFIG=`which sdl-config 2> /dev/null` + if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then + AC_MSG_RESULT(yes) + SDL_VERSION=`sdl-config --version` + VISCFLAGS=`sdl-config --cflags` + VISCLIBS=`sdl-config --libs` + + dnl We also need SDL ttf support + dnl only define BUILD_VIS if we have all required parts + AC_CHECK_HEADERS(SDL_ttf.h, + [BUILD_VIS="1" + CPPFLAGS="$CPPFLAGS $VISCFLAGS"], + [AC_CHECK_HEADERS(SDL/SDL_ttf.h, + [BUILD_VIS="1" + CPPFLAGS="$CPPFLAGS $VISCFLAGS"],)], + ) - AC_SUBST(BUILD_VIS) - AC_SUBST(VISCFLAGS) - AC_SUBST(VISLIBS) -else - AC_MSG_RESULT(no) + AC_SUBST(BUILD_VIS) + AC_SUBST(VISCFLAGS) + AC_SUBST(VISLIBS) + else + AC_MSG_RESULT(no) + fi +} + +dnl optionally disable building visualisation tools +AC_ARG_ENABLE(visual, +[ --enable-visual Enable visualisation tools. (Disabled by default, requires SDL)], +[ +if test "x$enableval" = "xyes" ; then + test_for_sdl fi +], +) dnl Which form of strerror? AC_MSG_CHECKING([for GNU-style strerror_r]) @@ -1138,6 +1400,7 @@ src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk +src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk @@ -1210,6 +1473,12 @@ else AC_MSG_RESULT([PVFS2 configured to build karma gui : no]) fi +if test "x$BUILD_VIS" = "x1" ; then + AC_MSG_RESULT([PVFS2 configured to build visualization tools : yes]) +else + AC_MSG_RESULT([PVFS2 configured to build visualization tools : no]) +fi + if test "x$ENABLE_COVERAGE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then AC_MSG_RESULT([PVFS2 configured to perform coverage analysis : yes]) else @@ -1246,6 +1515,12 @@ else AC_MSG_RESULT([PVFS2 configured for using the mmap-ra-cache : yes]) fi +if test "x$RESET_FILE_POS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then + AC_MSG_RESULT([PVFS2 configured for resetting file position : no]) +else + AC_MSG_RESULT([PVFS2 configured for resetting file position : yes]) +fi + if test "x$REDHAT_RELEASE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then AC_MSG_RESULT([PVFS2 will use workaround for redhat 2.4 kernels : no]) else @@ -1265,6 +1540,20 @@ else fi +if test "x$BUILD_USRINT" = "x1" ; then + AC_MSG_RESULT([PVFS2 user interface libraries will be built : yes]) +else + AC_MSG_RESULT([PVFS2 user interface libraries will be built : no]) + +fi + +if test "x$BUILD_UCACHE" = "x1" ; then + AC_MSG_RESULT([PVFS2 user interface library cache enabled : yes]) +else + AC_MSG_RESULT([PVFS2 user interface library cache enabled : no]) + +fi + else # print BMI and PVFS configs diff --git a/include/pvfs2-hint.h b/include/pvfs2-hint.h index 8bd54aa..390a68d 100644 --- a/include/pvfs2-hint.h +++ b/include/pvfs2-hint.h @@ -9,24 +9,31 @@ #include "pvfs2-types.h" -#define PVFS_HINT_REQUEST_ID_NAME "pvfs.hint.request_id" -#define PVFS_HINT_CLIENT_ID_NAME "pvfs.hint.client_id" -#define PVFS_HINT_HANDLE_NAME "pvfs.hint.handle" -#define PVFS_HINT_OP_ID_NAME "pvfs.hint.op_id" -#define PVFS_HINT_RANK_NAME "pvfs.hint.rank" -#define PVFS_HINT_SERVER_ID_NAME "pvfs.hint.server_id" +/* these are for tracing requests */ +#define PVFS_HINT_REQUEST_ID_NAME "pvfs.hint.request_id" +#define PVFS_HINT_CLIENT_ID_NAME "pvfs.hint.client_id" +#define PVFS_HINT_HANDLE_NAME "pvfs.hint.handle" +#define PVFS_HINT_OP_ID_NAME "pvfs.hint.op_id" +#define PVFS_HINT_RANK_NAME "pvfs.hint.rank" +#define PVFS_HINT_SERVER_ID_NAME "pvfs.hint.server_id" +/* these are file creation parameters */ +#define PVFS_HINT_DISTRIBUTION_NAME "pvfs.hint.disribution" +#define PVFS_HINT_DFILE_COUNT_NAME "pvfs.hint.dfile_count" +#define PVFS_HINT_LAYOUT_NAME "pvfs.hint.layout" +#define PVFS_HINT_SERVERLIST_NAME "pvfs.hint.serverlist" +#define PVFS_HINT_NOCACHE_NAME "pvfs.hint.nocache" typedef struct PVFS_hint_s *PVFS_hint; #define PVFS_HINT_NULL NULL int PVFS_hint_add(PVFS_hint *hint, - const char *type, + const char *name, int length, void *value); int PVFS_hint_replace(PVFS_hint *hint, - const char *type, + const char *name, int length, void *value); @@ -35,7 +42,10 @@ int PVFS_hint_copy(PVFS_hint old_hint, PVFS_hint *new_hint); void PVFS_hint_free(PVFS_hint hint); /* check to see if a hint has already been added */ -int PVFS_hint_check(PVFS_hint *hints, const char *type); +int PVFS_hint_check(PVFS_hint *hints, const char *name); + +/* check to see if any hints should be transferred */ +int PVFS_hint_check_transfer(PVFS_hint *hints); /* * function allows users to specify hints in an environment variable. diff --git a/include/pvfs2-types.h b/include/pvfs2-types.h index cb13e24..5b668ba 100644 --- a/include/pvfs2-types.h +++ b/include/pvfs2-types.h @@ -215,7 +215,10 @@ enum PVFS_sys_layout_algorithm PVFS_SYS_LAYOUT_RANDOM = 3, /* order the datafiles based on the list specified */ - PVFS_SYS_LAYOUT_LIST = 4 + PVFS_SYS_LAYOUT_LIST = 4, + + /* order the datafiles based on the list specified */ + PVFS_SYS_LAYOUT_LOCAL = 5 }; #define PVFS_SYS_LAYOUT_DEFAULT NULL @@ -427,7 +430,7 @@ typedef struct (PVFS_ATTR_SYS_UID | PVFS_ATTR_SYS_GID | \ PVFS_ATTR_SYS_PERM | PVFS_ATTR_SYS_ATIME | \ PVFS_ATTR_SYS_CTIME | PVFS_ATTR_SYS_MTIME | \ - PVFS_ATTR_SYS_TYPE | PVFS_ATTR_SYS_CID) + PVFS_ATTR_SYS_TYPE | PVFS_ATTR_SYS_CID) #define PVFS_ATTR_SYS_ALL \ (PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_SIZE | \ @@ -727,6 +730,7 @@ PVFS_error PVFS_errno_to_error(int err); #define PVFS_EALREADY E(57) /* Operation already in progress */ #define PVFS_EACCES E(58) /* Access not allowed */ #define PVFS_ECONNRESET E(59) /* Connection reset by peer */ +#define PVFS_ERANGE E(60) /* Math out of range or buf too small */ /***************** non-errno/pvfs2 specific error codes *****************/ #define PVFS_ECANCEL (1|(PVFS_NON_ERRNO_ERROR_BIT|PVFS_ERROR_BIT)) diff --git a/include/pvfs2.h b/include/pvfs2.h index d15b23b..842da60 100644 --- a/include/pvfs2.h +++ b/include/pvfs2.h @@ -15,7 +15,7 @@ #ifndef PVFS2_VERSION_MAJOR #define PVFS2_VERSION_MAJOR 2 #define PVFS2_VERSION_MINOR 8 -#define PVFS2_VERSION_SUB 5 +#define PVFS2_VERSION_SUB 6 #endif #include "pvfs2-types.h" diff --git a/maint/config/kernel.m4 b/maint/config/kernel.m4 index e2780d4..7f7e029 100644 --- a/maint/config/kernel.m4 +++ b/maint/config/kernel.m4 @@ -816,8 +816,24 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_GENERIC_PERMISSION, 1, Define if kernel has generic_permission), ) - dnl generic_permission in 2.6.38 and newer has a four parameter - dnl signature + dnl generic_permission in < 2.6.38 has three parameters + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for three-param generic_permission) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *f; + ], + [ + generic_permission(f, 0, NULL); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_THREE_PARAM_GENERIC_PERMISSION, 1, [Define if generic_permission takes three parameters]), + AC_MSG_RESULT(no) + ) + + dnl generic_permission in >= 2.6.38 and 3.0.x has four parameters tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for four-param generic_permission) @@ -834,13 +850,200 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(no) ) + dnl generic_permission in >= 3.1.x has two parameters + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for two-param generic_permission) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *f; + ], + [ + generic_permission(f, 0); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TWO_PARAM_GENERIC_PERMISSION, 1, [Define if generic_permission takes two parameters]), + AC_MSG_RESULT(no) + ) + + dnl set_nlink is defined in 3.2.x + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for set_nlink) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *i; + ], + [ + set_nlink(i, 0); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_I_SET_NLINK, 1, [Define if set_nlink exists]), + AC_MSG_RESULT(no) + ) + + dnl inc_nlink is defined in 3.2.x + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for inc_nlink) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *i; + ], + [ + inc_nlink(i); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_I_INC_NLINK, 1, [Define if inc_nlink exists]), + AC_MSG_RESULT(no) + ) + + dnl drop_nlink is defined in 3.2.x + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for drop_nlink) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *i; + ], + [ + drop_nlink(i); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_I_DROP_NLINK, 1, [Define if drop_nlink exists]), + AC_MSG_RESULT(no) + ) + + dnl clear_nlink is defined in 3.2.x + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for clear_nlink) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + struct inode *i; + ], + [ + clear_nlink(i); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_I_CLEAR_NLINK, 1, [Define if clear_nlink exists]), + AC_MSG_RESULT(no) + ) + + dnl check for posix_acl_equiv_mode umode_t type + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for posix_acl_equiv_mode umode_t) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + struct posix_acl *acl; + umode_t mode = 0; + ], + [ + posix_acl_equiv_mode(acl, &mode); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1, [Define if posix_acl_equiv_mode accepts umode_t type]), + AC_MSG_RESULT(no) + ) + + dnl check for posix_acl_create + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for posix_acl_create) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + struct posix_acl *acl; + umode_t mode = 0; + ], + [ + posix_acl_create(&acl, GFP_KERNEL, &mode); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_CREATE, 1, [Define if posix_acl_create_masq accepts umode_t type]), + AC_MSG_RESULT(no) + ) + + dnl check for posix_acl_chmod + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for posix_acl_chmod) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + struct posix_acl *acl; + struct inode *inode; + umode_t mode = 0; + ], + [ + posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode ); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_CHMOD, 1, [Define if posix_acl_chmod exists]), + AC_MSG_RESULT(no) + ) + + + dnl check for posix_acl_clone + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for posix_acl_clone) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + struct posix_acl *acl; + ], + [ + posix_acl_clone(acl, GFP_KERNEL); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_CLONE, 1, [Define if posix_acl_clone exists]), + AC_MSG_RESULT(no) + ) + + dnl check for fsync with loff_t + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for fsync with loff_t) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + + int my_fsync(struct file *, loff_t, loff_t, int); + + int my_fsync(struct file *f, loff_t start, loff_t end, int datasync) + { + } + ], + [ + struct file_operations fop; + + fop.fsync = my_fsync; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FSYNC_LOFF_T_PARAMS, 1, [Define if fsync has loff_t params]), + AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING(for generic_getxattr api in kernel) dnl if this test passes, the kernel does not have it dnl if this test fails, the kernel has it defined AC_TRY_COMPILE([ #define __KERNEL__ #include - #include + #include int generic_getxattr(struct inode *inode) { return 0; diff --git a/maint/config/openssl.m4 b/maint/config/openssl.m4 index 6bfb92e..d04fddb 100644 --- a/maint/config/openssl.m4 +++ b/maint/config/openssl.m4 @@ -29,6 +29,7 @@ AC_DEFUN([AX_OPENSSL], AC_CHECK_HEADERS(openssl/evp.h) AC_CHECK_HEADERS(openssl/crypto.h) + AC_CHECK_HEADERS(openssl/sha.h) fi ]) @@ -56,6 +57,7 @@ AC_DEFUN([AX_OPENSSL_OPTIONAL], AC_CHECK_HEADERS(openssl/evp.h) AC_CHECK_HEADERS(openssl/crypto.h) + AC_CHECK_HEADERS(openssl/sha.h) ]) diff --git a/prepare b/prepare index 2a9c081..0c62e84 100755 --- a/prepare +++ b/prepare @@ -1,6 +1,6 @@ #!/bin/sh -if aclocal-1.7 -I ./maint/config && autoheader && autoconf ; then +if aclocal -I ./maint/config && autoheader && autoconf ; then echo "configure script successfully regenerated" else echo "some part of configure regeneration failed" diff --git a/pvfs2-config.h.in b/pvfs2-config.h.in index 23113e5..98bc2dc 100644 --- a/pvfs2-config.h.in +++ b/pvfs2-config.h.in @@ -1,8 +1,5 @@ /* pvfs2-config.h.in. Generated from configure.in by autoheader. */ -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Define if berkeley db error reporting was enabled */ #undef BERKDB_ERROR_REPORTING @@ -24,13 +21,13 @@ /* Define if read_descriptor_t has an arg member */ #undef HAVE_ARG_IN_READ_DESCRIPTOR_T -/* Define to 1 if you have the header file. */ +/* Define if arpa/inet.h exists */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_ASM_IOCTL32_H -/* Define to 1 if you have the header file. */ +/* Define if attr/xattr.h exists */ #undef HAVE_ATTR_XATTR_H /* Define if kernel backing_dev_info struct has a name field */ @@ -97,6 +94,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EXECINFO_H +/* Define if system defines F_NOCACHE fcntl */ +#undef HAVE_FCNTL_F_NOCACHE + +/* Define if features.h exists */ +#undef HAVE_FEATURES_H + /* Define to 1 if you have the `fgetxattr' function. */ #undef HAVE_FGETXATTR @@ -125,7 +128,7 @@ /* Define if fsetxattr takes position and option arguments */ #undef HAVE_FSETXATTR_EXTRA_ARGS -/* Define to 1 if you have the header file. */ +/* Define if fstab.h exists */ #undef HAVE_FSTAB_H /* Define if only filesystem_type has get_sb */ @@ -138,6 +141,9 @@ as the second parameter */ #undef HAVE_FSYNC_DENTRY_PARAM +/* Define if fsync has loff_t params */ +#undef HAVE_FSYNC_LOFF_T_PARAMS + /* Define if kernel has generic_file_readv */ #undef HAVE_GENERIC_FILE_READV @@ -159,12 +165,12 @@ /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT -/* Define if pwd.h exists */ -#undef HAVE_GETPWUID - /* Define if get_sb_nodev function exists */ #undef HAVE_GETSB_NODEV +/* Define if getxattr takes position and option arguments */ +#undef HAVE_GETXATTR_EXTRA_ARGS + /* Define if struct super_operations in kernel has get_fs_key callback */ #undef HAVE_GET_FS_KEY_SUPER_OPERATIONS @@ -214,9 +220,21 @@ /* Define if struct inode in kernel has i_blksize member */ #undef HAVE_I_BLKSIZE_IN_STRUCT_INODE +/* Define if clear_nlink exists */ +#undef HAVE_I_CLEAR_NLINK + +/* Define if drop_nlink exists */ +#undef HAVE_I_DROP_NLINK + +/* Define if inc_nlink exists */ +#undef HAVE_I_INC_NLINK + /* Define if struct inode in kernel has i_sem member */ #undef HAVE_I_SEM_IN_STRUCT_INODE +/* Define if set_nlink exists */ +#undef HAVE_I_SET_NLINK + /* Define if kernel has i_size_read */ #undef HAVE_I_SIZE_READ @@ -255,6 +273,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_IOCTL32_H +/* Define if linux/malloc.h exists */ +#undef HAVE_LINUX_MALLOC_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_MOUNT_H @@ -267,31 +288,31 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_SYSCALLS_H +/* Define if linux/types.h exists */ +#undef HAVE_LINUX_TYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_XATTR_ACL_H -/* Define to 1 if you have the header file. */ +/* Define if malloc.h exists */ #undef HAVE_MALLOC_H /* Define if kernel defines mapping_nrpages macro -- defined by RT linux */ #undef HAVE_MAPPING_NRPAGES_MACRO -/* Define to 1 if you have the header file. */ +/* Define if memory.h exists */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the header file. */ +/* Define if mntent.h exists */ #undef HAVE_MNTENT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_MNTENT_H_ - /* Define if mount.h contains MNT_NOATIME flags */ #undef HAVE_MNT_NOATIME /* Define if mount.h contains MNT_NODIRATIME flags */ #undef HAVE_MNT_NODIRATIME -/* Define to 1 if you have the header file. */ +/* Define if netdb.h exists */ #undef HAVE_NETDB_H /* Define if including linux/config.h gives no warnings */ @@ -309,6 +330,24 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_EVP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_SHA_H + +/* Define if system defines O_DIRECT fcntl */ +#undef HAVE_OPEN_O_DIRECT + +/* Define if posix_acl_chmod exists */ +#undef HAVE_POSIX_ACL_CHMOD + +/* Define if posix_acl_clone exists */ +#undef HAVE_POSIX_ACL_CLONE + +/* Define if posix_acl_create_masq accepts umode_t type */ +#undef HAVE_POSIX_ACL_CREATE + +/* Define if posix_acl_equiv_mode accepts umode_t type */ +#undef HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T + /* Define if sysctl proc handlers have 6th argument */ #undef HAVE_PROC_HANDLER_FILE_ARG @@ -327,6 +366,9 @@ /* Define if kernel super_operations contains put_inode field */ #undef HAVE_PUT_INODE +/* Define if pwd.h exists */ +#undef HAVE_PWD_H + /* Define if struct file_operations in kernel has readdirplus_lite callback */ #undef HAVE_READDIRPLUSLITE_FILE_OPERATIONS @@ -368,6 +410,9 @@ /* Define if kernel setxattr has const void* argument */ #undef HAVE_SETXATTR_CONST_ARG +/* Define if setxattr takes position and option arguments */ +#undef HAVE_SETXATTR_EXTRA_ARGS + /* Define if d_compare member of dentry_operations has seven params */ #undef HAVE_SEVEN_PARAM_D_COMPARE @@ -388,19 +433,19 @@ /* Define if struct super_operations in kernel has statfs_lite callback */ #undef HAVE_STATFS_LITE_SUPER_OPERATIONS -/* Define to 1 if you have the header file. */ +/* Define if stdarg.h exists */ #undef HAVE_STDARG_H -/* Define to 1 if you have the header file. */ +/* Define if stdint.h exists */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ +/* Define if stdlib.h exists */ #undef HAVE_STDLIB_H /* Define if struct ctl_table has strategy member */ #undef HAVE_STRATEGY_NAME -/* Define to 1 if you have the header file. */ +/* Define if strings.h exists */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ @@ -430,19 +475,22 @@ /* Define if sys/mount.h exists */ #undef HAVE_SYS_MOUNT_H -/* Define to 1 if you have the header file. */ +/* Define if sys/sendfile.h exists */ +#undef HAVE_SYS_SENDFILE_H + +/* Define if sys/socket.h exists */ #undef HAVE_SYS_SOCKET_H -/* Define to 1 if you have the header file. */ +/* Define if sys/stat.h exists */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ +/* Define if sys/types.h exists */ #undef HAVE_SYS_TYPES_H /* Define if sys/vfs.h exists */ #undef HAVE_SYS_VFS_H -/* Define to 1 if you have the header file. */ +/* Define if sys/xattr.h exists */ #undef HAVE_SYS_XATTR_H /* Define if TAU library is used */ @@ -456,6 +504,9 @@ inode paramsbeing the difference */ #undef HAVE_THREE_PARAM_D_HASH +/* Define if generic_permission takes three parameters */ +#undef HAVE_THREE_PARAM_GENERIC_PERMISSION + /* Define if permission function pointer of inode_operations struct has three parameters and the third parameter is for flags (unsigned int) */ #undef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG @@ -466,6 +517,9 @@ /* Define if register_sysctl_table takes two arguments */ #undef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE +/* Define if generic_permission takes two parameters */ +#undef HAVE_TWO_PARAM_GENERIC_PERMISSION + /* Define if kernel's inode_operations has two parameters permission function */ #undef HAVE_TWO_PARAM_PERMISSION @@ -520,9 +574,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -535,10 +586,28 @@ /* sub version number */ #undef PVFS2_VERSION_SUB -/* The size of `long int', as computed by sizeof. */ +/* Should we build user interface acl routines. */ +#undef PVFS_HAVE_ACL_INCLUDES + +/* scandir compare arg takes void pointers. */ +#undef PVFS_SCANDIR_VOID + +/* Should we enable user interface data cache. */ +#undef PVFS_UCACHE_ENABLE + +/* Should we build user interface libraries. */ +#undef PVFS_USRINT_BUILD + +/* Should we enable user interface CWD support. */ +#undef PVFS_USRINT_CWD + +/* Should user interface assume FS is mounted. */ +#undef PVFS_USRINT_KMOUNT + +/* The size of a `long int', as computed by sizeof. */ #undef SIZEOF_LONG_INT -/* The size of `void *', as computed by sizeof. */ +/* The size of a `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define to 1 if you have the ANSI C header files. */ @@ -559,14 +628,6 @@ /* Define if openssl exists */ #undef WITH_OPENSSL -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN diff --git a/src/apps/admin/pvfs2-ls.c b/src/apps/admin/pvfs2-ls.c index d80ce81..75abcc3 100644 --- a/src/apps/admin/pvfs2-ls.c +++ b/src/apps/admin/pvfs2-ls.c @@ -238,7 +238,7 @@ void print_entry_attr( struct tm *time; PVFS_size size = 0; char scratch_owner[16] = {0}, scratch_group[16] = {0}, scratch_time[MAX_TIME_LENGTH] = {0}, scratch_big_time[MAX_TIME_LENGTH] = {0}; - char scratch_size[16] = {0}, scratch_inode[16] = {0}; + char scratch_size[16] = {0}, scratch_inode[21] = {0}; char f_type = '-'; char group_x_char = '-'; int num_bytes = 0; @@ -299,7 +299,7 @@ void print_entry_attr( if (opts->list_inode) { - snprintf(scratch_inode,16,"%llu ",llu(handle)); + snprintf(scratch_inode,21,"%llu ",llu(handle)); inode = scratch_inode; } @@ -388,7 +388,7 @@ void print_entry_attr( group_x_char = ((attr->perms & PVFS_G_EXECUTE) ? 'x' : '-'); } - snprintf(entry_buffer,ENTRY_MAX,"%s%c%c%c%c%c%c%c%c%c%c 1 %s %s %s " + snprintf(entry_buffer,ENTRY_MAX,"%s %c%c%c%c%c%c%c%c%c%c 1 %s %s %s " "%s %s", inode, f_type, diff --git a/src/apps/admin/pvfs2-migrate-collection.c b/src/apps/admin/pvfs2-migrate-collection.c index 91c06cf..83a79ee 100644 --- a/src/apps/admin/pvfs2-migrate-collection.c +++ b/src/apps/admin/pvfs2-migrate-collection.c @@ -173,7 +173,7 @@ int main(int argc, char **argv) server_alias = PINT_util_guess_alias(); } - ret = PINT_parse_config(&server_config, opts.fs_conf, server_alias); + ret = PINT_parse_config(&server_config, opts.fs_conf, server_alias, 1); if(ret < 0) { gossip_err("Error: Please check your config files.\n"); diff --git a/src/apps/devel/pvfs2-db-display.c b/src/apps/devel/pvfs2-db-display.c index 38b5c8b..3ea111c 100644 --- a/src/apps/devel/pvfs2-db-display.c +++ b/src/apps/devel/pvfs2-db-display.c @@ -43,7 +43,9 @@ typedef struct int verbose; } options_t; +/* globals */ static options_t opts; +int hex = 0; int open_db( DB **db_p, char *path, int type, int flags); void close_db( DB *db_p ); @@ -240,7 +242,10 @@ void print_collection( DBT key, DBT val ) int32_t v; k = key.data; v = *(int32_t *)val.data; - printf("(%s)(%d) -> (%d)(%d)\n", k, key.size, v, val.size); + if (hex) + printf("(%s)(%d) -> (%x)(%d)\n", k, key.size, v, val.size); + else + printf("(%s)(%d) -> (%d)(%d)\n", k, key.size, v, val.size); return; } @@ -250,7 +255,10 @@ void print_storage( DBT key, DBT val ) int32_t v; k = key.data; v = *(int32_t *)val.data; - printf("(%s)(%d) -> (%d)(%d)\n", k, key.size, v, val.size); + if (hex) + printf("(%s)(%d) -> (%x)(%d)\n", k, key.size, v, val.size); + else + printf("(%s)(%d) -> (%d)(%d)\n", k, key.size, v, val.size); return; } @@ -262,14 +270,25 @@ void print_dspace( DBT key, DBT val ) k = *(uint64_t *)key.data; v = val.data; - printf("(%llu)(%d) -> ", llu(k), key.size); + if (hex) + printf("(%llx)(%d) -> ", llu(k), key.size); + else + printf("(%llu)(%d) -> ", llu(k), key.size); print_ds_type( v->type ); - printf("(fsid: %d)(handle: %llu)(uid: %u)(gid: %u)" + if (hex) { + printf("(fsid: %d)(handle: %llx)(uid: %u)(gid: %u)" + "(perm: %u)(ctime: %llu)(mtime: %llu)(atime: %llu)(%d)\n", + v->fs_id, llu(v->handle), v->uid, v->gid, v->mode, + llu(v->ctime), llu(v->mtime), llu(v->atime), val.size); + } + else { + printf("(fsid: %d)(handle: %llu)(uid: %u)(gid: %u)" "(perm: %u)(ctime: %llu)(mtime: %llu)(atime: %llu)(%d)\n", v->fs_id, llu(v->handle), v->uid, v->gid, v->mode, llu(v->ctime), llu(v->mtime), llu(v->atime), val.size); + } /* union elements are not printed */ return; @@ -283,7 +302,10 @@ void print_keyval( DBT key, DBT val ) k = key.data; - printf("(%llu)", llu(k->handle)); + if (hex) + printf("(%llx)", llu(k->handle)); + else + printf("(%llu)", llu(k->handle)); if( key.size == 8 ) { printf("()(%d) -> ", key.size); @@ -291,7 +313,10 @@ void print_keyval( DBT key, DBT val ) else if( key.size == 16 ) { kh = *(uint64_t *)k->key; - printf("(%llu)(%d) -> ", llu(kh), key.size); + if (hex) + printf("(%llx)(%d) -> ", llu(kh), key.size); + else + printf("(%llu)(%d) -> ", llu(kh), key.size); } else { @@ -304,7 +329,10 @@ void print_keyval( DBT key, DBT val ) while(s < val.size ) { vh = *(uint64_t *)(val.data + s); - printf("(%llu)", llu(vh)); + if (hex) + printf("(%llx)", llu(vh)); + else + printf("(%llu)", llu(vh)); s += sizeof(TROVE_handle); } printf("(%d)\n", val.size); @@ -325,13 +353,19 @@ void print_keyval( DBT key, DBT val ) { /* should be cases of filename to handle */ vh = *(uint64_t *)val.data; - printf("(%llu)(%d)\n", llu(vh), val.size ); + if (hex) + printf("(%llx)(%d)\n", llu(vh), val.size ); + else + printf("(%llu)(%d)\n", llu(vh), val.size ); } else if( (key.size == 8 || key.size == 16 ) && val.size == 4 ) { vi = *(uint32_t *)val.data; - printf("(%u)(%d)\n", vi, val.size ); + if (hex) + printf("(%x)(%d)\n", vi, val.size ); + else + printf("(%u)(%d)\n", vi, val.size ); } /* * not implemented @@ -369,7 +403,10 @@ void print_collection_attr( DBT key, DBT val ) if( val.size == 8 ) { vu = *(uint64_t *)val.data; - printf("(%llu)(%d)\n", llu(vu), val.size); + if (hex) + printf("(%llx)(%d)\n", llu(vu), val.size); + else + printf("(%llu)(%d)\n", llu(vu), val.size); } else { @@ -388,6 +425,7 @@ int process_args(int argc, char ** argv) {"verbose",0,0,0}, {"dbpath",1,0,0}, {"hexdir",1,0,0}, + {"hexhandles",0,0,0}, {0,0,0,0} }; @@ -410,6 +448,9 @@ int process_args(int argc, char ** argv) case 3: /* hexdir */ strncpy(opts.hexdir, optarg, PATH_MAX); break; + case 4: /* hexhandles */ + hex = 1; + break; default: print_help(argv[0]); return -1; @@ -447,6 +488,7 @@ void print_help(char *progname) fprintf(stderr, "\nOptions:\n" "\t--verbose\t\tEnable verbose output\n" "\t--help\t\t\tThis message.\n" + "\t--hexhandles\t\tPrint handles in hex\n" "\t--dbpath \t\tThe path of the server's " "StorageSpace. The path\n\t\t\t\tshould contain " "collections.db and \n\t\t\t\tstorage_attributes.db\n" diff --git a/src/apps/fuse/pvfs2fuse.c b/src/apps/fuse/pvfs2fuse.c index 17b6063..dcab18c 100644 --- a/src/apps/fuse/pvfs2fuse.c +++ b/src/apps/fuse/pvfs2fuse.c @@ -507,8 +507,10 @@ static int pvfs_fuse_chmod(const char *path, mode_t mode) ret = lookup( path, &pfh, PVFS2_LOOKUP_LINK_FOLLOW ); if ( ret < 0 ) return PVFS_ERROR_TO_ERRNO_N( ret ); - - new_attr.perms = mode; + /* FUSE passes in 5 octets in 'mode'. However, the the first + * octet is not related to permissions, hence checking only + * the lower 4 octets */ + new_attr.perms = mode & 07777; new_attr.mask = PVFS_ATTR_SYS_PERM; ret = PVFS_sys_setattr(pfh.ref,new_attr,&pfh.creds); diff --git a/src/apps/kernel/linux/pvfs2-client-core.c b/src/apps/kernel/linux/pvfs2-client-core.c index 7a7b531..2af5cfe 100644 --- a/src/apps/kernel/linux/pvfs2-client-core.c +++ b/src/apps/kernel/linux/pvfs2-client-core.c @@ -204,7 +204,7 @@ static struct PVFS_dev_map_desc s_io_desc[NUM_MAP_DESC]; static struct PINT_dev_params s_desc_params[NUM_MAP_DESC]; static struct PINT_perf_counter* acache_pc = NULL; -static struct PINT_perf_counter* static_acache_pc = NULL; +/* static struct PINT_perf_counter* static_acache_pc = NULL; */ static struct PINT_perf_counter* ncache_pc = NULL; /* static char hostname[100]; */ @@ -1277,7 +1277,7 @@ static PVFS_error service_perf_count_request(vfs_request_t *vfs_request) vfs_request->out_downcall.status = 0; } break; - +/* case PVFS2_PERF_COUNT_REQUEST_STATIC_ACACHE: tmp_str = PINT_perf_generate_text(static_acache_pc, PERF_COUNT_BUF_SIZE); @@ -1293,7 +1293,7 @@ static PVFS_error service_perf_count_request(vfs_request_t *vfs_request) vfs_request->out_downcall.status = 0; } break; - +*/ case PVFS2_PERF_COUNT_REQUEST_NCACHE: tmp_str = PINT_perf_generate_text(ncache_pc, PERF_COUNT_BUF_SIZE); @@ -1433,8 +1433,9 @@ static PVFS_error service_param_request(vfs_request_t *vfs_request) tmp_perf_val = vfs_request->in_upcall.req.param.value; ret = PINT_perf_set_info( acache_pc, PINT_PERF_HISTORY_SIZE, tmp_perf_val); - ret = PINT_perf_set_info( +/* ret = PINT_perf_set_info( static_acache_pc, PINT_PERF_HISTORY_SIZE, tmp_perf_val); +*/ ret = PINT_perf_set_info( ncache_pc, PINT_PERF_HISTORY_SIZE, tmp_perf_val); } @@ -1446,7 +1447,7 @@ static PVFS_error service_param_request(vfs_request_t *vfs_request) PVFS2_PARAM_REQUEST_SET) { PINT_perf_reset(acache_pc); - PINT_perf_reset(static_acache_pc); +/* PINT_perf_reset(static_acache_pc);*/ PINT_perf_reset(ncache_pc); } vfs_request->out_downcall.resp.param.value = 0; @@ -3320,9 +3321,9 @@ int main(int argc, char **argv) struct tm *local_time = NULL; uint64_t debug_mask = GOSSIP_NO_DEBUG; PINT_client_sm *acache_timer_sm_p = NULL; - PINT_client_sm *static_acache_timer_sm_p = NULL; + /* PINT_client_sm *static_acache_timer_sm_p = NULL; */ PINT_smcb *acache_smcb = NULL; - PINT_smcb *acache_static_smcb = NULL; + /* PINT_smcb *acache_static_smcb = NULL; */ PINT_smcb *ncache_smcb = NULL; PINT_client_sm *ncache_timer_sm_p = NULL; @@ -3333,11 +3334,14 @@ int main(int argc, char **argv) sigemptyset (&segv_action.sa_mask); segv_action.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONESHOT; sigaction (SIGSEGV, &segv_action, NULL); + sigaction (SIGABRT, &segv_action, NULL); #else - /* if pvfs2-client-core segfaults, at least log the occurence so - * pvfs2-client won't repeatedly respawn pvfs2-client-core */ + /* if pvfs2-client-core segfaults or aborts, at least log the occurence so + * pvfs2-client won't repeatedly respawn pvfs2-client-core + * */ signal(SIGSEGV, client_segfault_handler); + signal(SIGABRT, client_segfault_handler); #endif memset(&s_opts, 0, sizeof(options_t)); @@ -3481,6 +3485,7 @@ int main(int argc, char **argv) return(ret); } + /* static_acache_pc = PINT_perf_initialize(acache_keys); if(!static_acache_pc) { @@ -3488,6 +3493,7 @@ int main(int argc, char **argv) finalize_perf_items( 0 ); return(-PVFS_ENOMEM); } + ret = PINT_perf_set_info(static_acache_pc, PINT_PERF_HISTORY_SIZE, s_opts.perf_history_size); if(ret < 0) @@ -3496,8 +3502,9 @@ int main(int argc, char **argv) finalize_perf_items( 0 ); return(ret); } + */ - PINT_acache_enable_perf_counter(acache_pc, static_acache_pc); + PINT_acache_enable_perf_counter(acache_pc); /* start performance counters for ncache */ ncache_pc = PINT_perf_initialize(ncache_keys); @@ -3540,6 +3547,7 @@ int main(int argc, char **argv) return(ret); } + /* PINT_smcb_alloc(&acache_static_smcb, PVFS_CLIENT_PERF_COUNT_TIMER, sizeof(struct PINT_client_sm), client_op_state_get_machine, @@ -3562,6 +3570,7 @@ int main(int argc, char **argv) finalize_perf_items( 2, acache_smcb, acache_static_smcb ); return(ret); } + */ PINT_smcb_alloc(&ncache_smcb, PVFS_CLIENT_PERF_COUNT_TIMER, sizeof(struct PINT_client_sm), @@ -3570,7 +3579,7 @@ int main(int argc, char **argv) s_client_dev_context); if (!ncache_smcb) { - finalize_perf_items( 2, acache_smcb, acache_static_smcb ); + finalize_perf_items( 1, acache_smcb); return(-PVFS_ENOMEM); } ncache_timer_sm_p = PINT_sm_frame(ncache_smcb, PINT_FRAME_CURRENT); @@ -3581,7 +3590,7 @@ int main(int argc, char **argv) if (ret < 0) { gossip_lerr("Error posting ncache timer.\n"); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return(ret); } @@ -3589,7 +3598,7 @@ int main(int argc, char **argv) if (ret) { PVFS_perror("initialize_ops_in_progress_table", ret); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return ret; } @@ -3597,7 +3606,7 @@ int main(int argc, char **argv) if (ret < 0) { PVFS_perror("PINT_dev_initialize", ret); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return -PVFS_EDEVINIT; } @@ -3607,7 +3616,7 @@ int main(int argc, char **argv) if (ret < 0) { PVFS_perror("PINT_dev_get_mapped_region", ret); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return ret; } @@ -3615,7 +3624,7 @@ int main(int argc, char **argv) if (ret < 0) { PVFS_perror("device job_open_context failed", ret); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return ret; } @@ -3628,7 +3637,7 @@ int main(int argc, char **argv) if (pthread_create(&remount_thread, NULL, exec_remount, NULL)) { gossip_err("Cannot create remount thread!"); - finalize_perf_items( 3, acache_smcb, acache_static_smcb, ncache_smcb ); + finalize_perf_items( 2, acache_smcb, ncache_smcb ); return -1; } @@ -3670,9 +3679,11 @@ int main(int argc, char **argv) gossip_debug(GOSSIP_CLIENTCORE_DEBUG, "calling PVFS_sys_finalize()\n"); +#if 0 /*release smcb associated with the acache-timer*/ if (static_acache_timer_sm_p->sys_op_id) PINT_sys_release(static_acache_timer_sm_p->sys_op_id); +#endif finalize_perf_items( 2, acache_smcb, ncache_smcb ); @@ -4087,11 +4098,13 @@ static void finalize_perf_items(int n, ... ) { PINT_perf_finalize( acache_pc ); } - + + /* if( static_acache_pc != NULL ) { PINT_perf_finalize( static_acache_pc ); } + */ if( ncache_pc != NULL ) { diff --git a/src/apps/kernel/linux/pvfs2-client.c b/src/apps/kernel/linux/pvfs2-client.c index a2efbdb..c67321c 100644 --- a/src/apps/kernel/linux/pvfs2-client.c +++ b/src/apps/kernel/linux/pvfs2-client.c @@ -298,8 +298,8 @@ static int monitor_pvfs2_client(options_t *opts) gossip_enable_stderr(); } - gossip_err("Child process with pid %d was killed by an " - "uncaught signal %d\n", core_pid, WTERMSIG(ret)); + gossip_err("Child process with pid %d was killed by " + "signal %d\n", core_pid, WTERMSIG(ret)); core_pid = -1; gettimeofday(&now, NULL); diff --git a/src/apps/user/getmattr.c b/src/apps/user/getmattr.c index a02a1c2..de2b6aa 100644 --- a/src/apps/user/getmattr.c +++ b/src/apps/user/getmattr.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ +#include "pvfs2-config.h" #include #include #include @@ -57,10 +58,19 @@ int main(int argc, char **argv) /*Get the mirroring attributes for the given file*/ if (my_args.mode) { +#ifdef HAVE_GETXATTR_EXTRA_ARGS + ret = getxattr(my_args.filename + ,"user.pvfs2.mirror.mode" + ,&mode + ,sizeof(mode) + ,0 + ,0 ); +#else ret = getxattr(my_args.filename ,"user.pvfs2.mirror.mode" ,&mode ,sizeof(mode) ); +#endif if (!ret) perror("Failure to get mirror mode"); else { @@ -88,10 +98,19 @@ int main(int argc, char **argv) }/*end if mode*/ if (my_args.copies){ +#ifdef HAVE_GETXATTR_EXTRA_ARGS + ret = getxattr(my_args.filename + ,"user.pvfs2.mirror.copies" + ,&(copies) + ,sizeof(copies) + ,0 + ,0); +#else ret = getxattr(my_args.filename ,"user.pvfs2.mirror.copies" ,&(copies) ,sizeof(copies) ); +#endif if (!ret) perror("Failure to get mirror copies"); else diff --git a/src/apps/user/setmattr.c b/src/apps/user/setmattr.c index 1b351e0..aaf4b4b 100644 --- a/src/apps/user/setmattr.c +++ b/src/apps/user/setmattr.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ +#include "pvfs2-config.h" #include #include #include @@ -57,11 +58,20 @@ int main(int argc, char **argv) if (my_args.mode > 0) { printf("Setting mirror mode to %d\n" ,my_args.mode); +#ifdef HAVE_SETXATTR_EXTRA_ARGS ret = setxattr(my_args.filename ,"user.pvfs2.mirror.mode" ,&(my_args.mode) ,sizeof(my_args.mode) + ,0 ,0); +#else + ret = setxattr(my_args.filename + ,"user.pvfs2.mirror.mode" + ,&(my_args.mode) + ,sizeof(my_args.mode) + ,0); +#endif if (ret) perror("Failure to set mirror mode"); } @@ -69,11 +79,20 @@ int main(int argc, char **argv) if (my_args.copies >= 0){ printf("Setting number of mirrored copies to %d\n" ,my_args.copies); +#ifdef HAVE_SETXATTR_EXTRA_ARGS + ret = setxattr(my_args.filename + ,"user.pvfs2.mirror.copies" + ,&(my_args.copies) + ,sizeof(my_args.copies) + ,0 + ,0); +#else ret = setxattr(my_args.filename ,"user.pvfs2.mirror.copies" ,&(my_args.copies) ,sizeof(my_args.copies) ,0); +#endif if (ret) perror("Failure to set mirror copies"); } diff --git a/src/client/sysint/acache.c b/src/client/sysint/acache.c index b6963d7..0e5e16d 100644 --- a/src/client/sysint/acache.c +++ b/src/client/sysint/acache.c @@ -27,8 +27,11 @@ #define ACACHE_DEFAULT_RECLAIM_PERCENTAGE 25 #define ACACHE_DEFAULT_REPLACE_ALGORITHM LEAST_RECENTLY_USED -/* this one is modeled after TROVE_DEFAULT_HANDLE_PURGATORY_SEC */ -#define STATIC_ACACHE_DEFAULT_TIMEOUT_MSECS 360000 +#define STATIC_ACACHE_DEFAULT_TIMEOUT_MSECS 7200000 /* 2 hours */ +#if 0 +#define CAPABILITIES_ACACHE_DEFAULT_TIMEOUT_MSECS 7200000 /* 2 hours */ +#endif +#define DYNAMIC_ACACHE_DEFAULT_TIMEOUT_MSECS 5000 /* 5 seconds */ struct PINT_perf_key acache_keys[] = { @@ -45,23 +48,19 @@ struct PINT_perf_key acache_keys[] = {NULL, 0, 0}, }; -/* non-static data to be stored in a cached entry */ +/* data to be stored in a cached entry */ struct acache_payload { - PVFS_object_ref refn; /* PVFS2 object reference */ - PVFS_object_attr attr; /* cached attributes */ - int attr_status; /* are the attributes valid? */ - PVFS_size size; /* cached size */ - int size_status; /* is the size valid? */ -}; - -/* static data to be stored in a cached entry */ -struct static_payload -{ - PVFS_object_ref refn; /* PVFS2 object reference */ + /** Non-static objects */ + PVFS_object_ref refn; /**< PVFS2 object reference */ + PVFS_object_attr attr; /**< cached attributes */ + int attr_status; /**< are the attributes valid? */ + PVFS_size size; /**< cached size */ + int size_status; /**< is the size valid? */ + + /** Static objects */ uint32_t mask; - /* static fields that can be cached separately */ PVFS_ds_type objtype; PINT_dist *dist; uint32_t dist_size; @@ -69,20 +68,23 @@ struct static_payload uint32_t dfile_count; PVFS_handle *mirror_dfile_array; uint32_t mirror_copies_count; + + /* Additional time stamps */ + #if 0 + uint64_t msecs_capabilities; /**< Time when the capabilities attr was refreshed. */ + #endif + uint64_t msecs_dynamic; /**< Time when the dynamic attrs were refreshed. */ }; - + static struct PINT_tcache* acache = NULL; -static struct PINT_tcache* static_acache = NULL; static gen_mutex_t acache_mutex = GEN_MUTEX_INITIALIZER; static int acache_compare_key_entry(void* key, struct qhash_head* link); static int acache_free_payload(void* payload); -static int static_compare_key_entry(void* key, struct qhash_head* link); -static int static_free_payload(void* payload); static int acache_hash_key(void* key, int table_size); static struct PINT_perf_counter* acache_pc = NULL; -static struct PINT_perf_counter* static_pc = NULL; + static int set_tcache_defaults(struct PINT_tcache* instance); static void load_payload(struct PINT_tcache* instance, @@ -94,17 +96,13 @@ static void load_payload(struct PINT_tcache* instance, * Enables perf counter instrumentation of the acache */ void PINT_acache_enable_perf_counter( - struct PINT_perf_counter* pc_in, /**< counter for non static fields */ - struct PINT_perf_counter* static_pc_in) /**< counter for static fields */ + struct PINT_perf_counter* pc_in) /**< counter for cache fields */ { gen_mutex_lock(&acache_mutex); acache_pc = pc_in; assert(acache_pc); - static_pc = static_pc_in; - assert(static_pc); - /* set initial values */ PINT_perf_count(acache_pc, PERF_ACACHE_SOFT_LIMIT, acache->soft_limit, PINT_PERF_SET); @@ -113,15 +111,7 @@ void PINT_acache_enable_perf_counter( PINT_perf_count(acache_pc, PERF_ACACHE_ENABLED, acache->enable, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_SOFT_LIMIT, - static_acache->soft_limit, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_HARD_LIMIT, - static_acache->hard_limit, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_ENABLED, - static_acache->enable, PINT_PERF_SET); - gen_mutex_unlock(&acache_mutex); - return; } @@ -146,35 +136,12 @@ int PINT_acache_initialize(void) return(-PVFS_ENOMEM); } - static_acache = PINT_tcache_initialize(static_compare_key_entry, - acache_hash_key, - static_free_payload, - -1 /* default tcache table size */); - if(!static_acache) - { - PINT_tcache_finalize(acache); - gen_mutex_unlock(&acache_mutex); - return(-PVFS_ENOMEM); - } - - /* fill in defaults that are specific to non-static cache */ ret = PINT_tcache_set_info(acache, TCACHE_TIMEOUT_MSECS, - ACACHE_DEFAULT_TIMEOUT_MSECS); - if(ret < 0) - { - PINT_tcache_finalize(acache); - PINT_tcache_finalize(static_acache); - gen_mutex_unlock(&acache_mutex); - return(ret); - } - - /* fill in defaults that are specific to static cache */ - ret = PINT_tcache_set_info(static_acache, TCACHE_TIMEOUT_MSECS, STATIC_ACACHE_DEFAULT_TIMEOUT_MSECS); if(ret < 0) { PINT_tcache_finalize(acache); - PINT_tcache_finalize(static_acache); + /* PINT_tcache_finalize(static_acache); */ gen_mutex_unlock(&acache_mutex); return(ret); } @@ -184,20 +151,11 @@ int PINT_acache_initialize(void) if(ret < 0) { PINT_tcache_finalize(acache); - PINT_tcache_finalize(static_acache); + /* PINT_tcache_finalize(static_acache); */ gen_mutex_unlock(&acache_mutex); return(ret); } - ret = set_tcache_defaults(static_acache); - if(ret < 0) - { - PINT_tcache_finalize(acache); - PINT_tcache_finalize(static_acache); - gen_mutex_unlock(&acache_mutex); - return(ret); - } - gen_mutex_unlock(&acache_mutex); return(0); } @@ -208,9 +166,7 @@ void PINT_acache_finalize(void) gen_mutex_lock(&acache_mutex); PINT_tcache_finalize(acache); - PINT_tcache_finalize(static_acache); acache = NULL; - static_acache = NULL; gen_mutex_unlock(&acache_mutex); return; @@ -235,7 +191,7 @@ int PINT_acache_get_info( * tcache */ option -= STATIC_ACACHE_OPT; - ret = PINT_tcache_get_info(static_acache, option, arg); + ret = PINT_tcache_get_info(acache, option, arg); } else { @@ -266,17 +222,17 @@ int PINT_acache_set_info( * tcache */ option -= STATIC_ACACHE_OPT; - ret = PINT_tcache_set_info(static_acache, option, arg); + ret = PINT_tcache_set_info(acache, option, arg); /* record any parameter changes that may have resulted*/ - PINT_perf_count(static_pc, PERF_ACACHE_SOFT_LIMIT, - static_acache->soft_limit, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_HARD_LIMIT, - static_acache->hard_limit, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_ENABLED, - static_acache->enable, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_NUM_ENTRIES, - static_acache->num_entries, PINT_PERF_SET); + PINT_perf_count(acache_pc, PERF_ACACHE_SOFT_LIMIT, + acache->soft_limit, PINT_PERF_SET); + PINT_perf_count(acache_pc, PERF_ACACHE_HARD_LIMIT, + acache->hard_limit, PINT_PERF_SET); + PINT_perf_count(acache_pc, PERF_ACACHE_ENABLED, + acache->enable, PINT_PERF_SET); + PINT_perf_count(acache_pc, PERF_ACACHE_NUM_ENTRIES, + acache->num_entries, PINT_PERF_SET); } else { @@ -315,8 +271,13 @@ int PINT_acache_get_cached_entry( int ret = -1; struct PINT_tcache_entry* tmp_entry; struct acache_payload* tmp_payload; - struct static_payload* tmp_static_payload; int status; + /* Storage of current time */ + struct timeval current_time = { 0, 0}; + uint64_t current_time_msecs = 0; + /* Flags indicating whether dynamic attrs or capabilities attr have expired. */ + /* unsigned char capabilities_expired = 0; */ + unsigned char dynamic_attrs_expired = 0; gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: get_cached_entry(): H=%llu\n", llu(refn.handle)); @@ -328,27 +289,12 @@ int PINT_acache_get_cached_entry( gen_mutex_lock(&acache_mutex); - /* lookup static components */ - ret = PINT_tcache_lookup(static_acache, &refn, &tmp_entry, &status); - if(ret < 0 || status != 0) - { - PINT_perf_count(static_pc, PERF_ACACHE_MISSES, 1, PINT_PERF_ADD); - gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: miss static: H=%llu\n", - llu(refn.handle)); - tmp_static_payload = NULL; - } - else - { - PINT_perf_count(static_pc, PERF_ACACHE_HITS, 1, PINT_PERF_ADD); - tmp_static_payload = tmp_entry->payload; - } - - /* lookup non-static components */ + /* lookup */ ret = PINT_tcache_lookup(acache, &refn, &tmp_entry, &status); if(ret < 0 || status != 0) { PINT_perf_count(acache_pc, PERF_ACACHE_MISSES, 1, PINT_PERF_ADD); - gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: miss non-static: H=%llu\n", + gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: miss: H=%llu\n", llu(refn.handle)); tmp_payload = NULL; } @@ -358,18 +304,56 @@ int PINT_acache_get_cached_entry( tmp_payload = tmp_entry->payload; } - if(!tmp_payload && !tmp_static_payload) + if(!tmp_payload) { /* missed everything */ gen_mutex_unlock(&acache_mutex); return(ret); } - -#if 0 + + /* Get the time of day and store as milliseconds */ + gettimeofday(¤t_time, NULL); + current_time_msecs = current_time.tv_sec * 1000; + current_time_msecs += current_time.tv_usec / 1000; + + #if 0 + if((current_time_msecs - tmp_payload->msecs_capabilities) > + CAPABILITIES_ACACHE_DEFAULT_TIMEOUT_MSECS) + { + capabilities_expired = 1; + /* Invalidate entire entry */ + PINT_tcache_delete(acache, tmp_entry); + PINT_perf_count(acache_pc, PERF_ACACHE_DELETIONS, 1, + PINT_PERF_ADD); + /* set the new current number of entries */ + PINT_perf_count(acache_pc, PERF_ACACHE_NUM_ENTRIES, + acache->num_entries, PINT_PERF_SET); + /* return since record is invalid */ + gen_mutex_unlock(&acache_mutex); + return(ret); /* Todo return indicating invalid credentials or -PVFS_ENOENT? */ + } + #endif + + /* Check to see if dynamic attrs have expired. */ + if((current_time_msecs - tmp_payload->msecs_dynamic) > + DYNAMIC_ACACHE_DEFAULT_TIMEOUT_MSECS) + { + dynamic_attrs_expired = 1; + /* Mark the dynamic attrs invalid */ + tmp_payload->attr_status = -PVFS_ETIME; + *attr_status = -PVFS_ETIME; + tmp_payload->size_status = -PVFS_ETIME; + *size_status = -PVFS_ETIME; + } + + /* Reset Dynamic attrs timestamp since it was hit */ + tmp_payload->msecs_dynamic = current_time_msecs; + +//#if 0 gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: " "status=%d, attr_status=%d, size_status=%d\n", status, tmp_payload->attr_status, tmp_payload->size_status); -#endif +//#endif /* copy out non-static attributes if valid */ if(tmp_payload && tmp_payload->attr_status == 0) @@ -392,53 +376,58 @@ int PINT_acache_get_cached_entry( *size_status = 0; } - /* copy out static attributes if valid */ - if(tmp_static_payload) + /* copy out static attributes */ + if(tmp_payload) { - attr->mask |= tmp_static_payload->mask; - if(tmp_static_payload->mask & PVFS_ATTR_COMMON_TYPE) + attr->mask |= tmp_payload->mask; + if(tmp_payload->mask & PVFS_ATTR_COMMON_TYPE) { - attr->objtype = tmp_static_payload->objtype; + attr->objtype = tmp_payload->objtype; } - if(tmp_static_payload->mask & PVFS_ATTR_META_DFILES) + + if(tmp_payload->mask & PVFS_ATTR_META_DFILES) { if(attr->u.meta.dfile_array) free(attr->u.meta.dfile_array); attr->u.meta.dfile_array = - malloc(tmp_static_payload->dfile_count*sizeof(PVFS_handle)); + malloc(tmp_payload->dfile_count*sizeof(PVFS_handle)); if(!attr->u.meta.dfile_array) { gen_mutex_unlock(&acache_mutex); return(-PVFS_ENOMEM); } - memcpy(attr->u.meta.dfile_array, tmp_static_payload->dfile_array, - tmp_static_payload->dfile_count*sizeof(PVFS_handle)); - attr->u.meta.dfile_count = tmp_static_payload->dfile_count; + memcpy(attr->u.meta.dfile_array, tmp_payload->dfile_array, + tmp_payload->dfile_count*sizeof(PVFS_handle)); + attr->u.meta.dfile_count = tmp_payload->dfile_count; } - if(tmp_static_payload->mask & PVFS_ATTR_META_MIRROR_DFILES) + + if(tmp_payload->mask & PVFS_ATTR_META_MIRROR_DFILES) { if(attr->u.meta.mirror_dfile_array) free(attr->u.meta.mirror_dfile_array); attr->u.meta.mirror_dfile_array = - malloc(tmp_static_payload->dfile_count*sizeof(PVFS_handle)* - tmp_static_payload->mirror_copies_count); + malloc(tmp_payload->dfile_count*sizeof(PVFS_handle)* + tmp_payload->mirror_copies_count); + if(!attr->u.meta.mirror_dfile_array) { gen_mutex_unlock(&acache_mutex); return(-PVFS_ENOMEM); } + memcpy(attr->u.meta.mirror_dfile_array - ,tmp_static_payload->mirror_dfile_array - ,tmp_static_payload->dfile_count*sizeof(PVFS_handle)* - tmp_static_payload->mirror_copies_count); + ,tmp_payload->mirror_dfile_array + ,tmp_payload->dfile_count*sizeof(PVFS_handle)* + tmp_payload->mirror_copies_count); attr->u.meta.mirror_copies_count = - tmp_static_payload->mirror_copies_count; + tmp_payload->mirror_copies_count; } - if(tmp_static_payload->mask & PVFS_ATTR_META_DIST) + + if(tmp_payload->mask & PVFS_ATTR_META_DIST) { if(attr->u.meta.dist) PINT_dist_free(attr->u.meta.dist); - attr->u.meta.dist = PINT_dist_copy(tmp_static_payload->dist); + attr->u.meta.dist = PINT_dist_copy(tmp_payload->dist); if(!attr->u.meta.dist) { if(attr->u.meta.dfile_array) @@ -446,7 +435,7 @@ int PINT_acache_get_cached_entry( gen_mutex_unlock(&acache_mutex); return(-PVFS_ENOMEM); } - attr->u.meta.dist_size = tmp_static_payload->dist_size; + attr->u.meta.dist_size = tmp_payload->dist_size; } *attr_status = 0; } @@ -458,7 +447,7 @@ int PINT_acache_get_cached_entry( "size_status=%d, attr_status=%d\n", llu(refn.handle), *size_status, *attr_status); - if(*size_status == 0 || *attr_status == 0) + if(*size_status == 0 || *attr_status == 0) /* TODO what about the static attrs? */ { /* return success if we got _anything_ out of the cache */ return(0); @@ -494,23 +483,9 @@ void PINT_acache_invalidate( PINT_PERF_ADD); } - /* find out if we have static items cached */ - ret = PINT_tcache_lookup(static_acache, - &refn, - &tmp_entry, - &tmp_status); - if(ret == 0) - { - PINT_tcache_delete(static_acache, tmp_entry); - PINT_perf_count(static_pc, PERF_ACACHE_DELETIONS, 1, - PINT_PERF_ADD); - } - /* set the new current number of entries */ PINT_perf_count(acache_pc, PERF_ACACHE_NUM_ENTRIES, acache->num_entries, PINT_PERF_SET); - PINT_perf_count(static_pc, PERF_ACACHE_NUM_ENTRIES, - static_acache->num_entries, PINT_PERF_SET); gen_mutex_unlock(&acache_mutex); return; @@ -569,18 +544,9 @@ int PINT_acache_update( PVFS_size* size) /**< logical file size (NULL if not available) */ { struct acache_payload* tmp_payload = NULL; - struct static_payload* tmp_static_payload = NULL; - unsigned int enabled; uint32_t old_mask; int ret = -1; - /* skip out immediately if the cache is disabled */ - PINT_tcache_get_info(static_acache, TCACHE_ENABLE, &enabled); - if(!enabled) - { - return(0); - } - gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: update(): H=%llu\n", llu(refn.handle)); @@ -592,72 +558,78 @@ int PINT_acache_update( /* do we have static fields? */ if(attr && (attr->mask & PVFS_STATIC_ATTR_MASK)) { - tmp_static_payload = - (struct static_payload*)calloc(1, sizeof(*tmp_static_payload)); - if(!tmp_static_payload) + tmp_payload = + (struct acache_payload*)calloc(1, sizeof(*tmp_payload)); + if(!tmp_payload) { ret = -PVFS_ENOMEM; goto err; } - tmp_static_payload->refn = refn; - tmp_static_payload->mask = attr->mask & PVFS_STATIC_ATTR_MASK; + + tmp_payload->refn = refn; + tmp_payload->mask = attr->mask & PVFS_STATIC_ATTR_MASK; if(attr->mask & PVFS_ATTR_COMMON_TYPE) { - tmp_static_payload->objtype = attr->objtype; + tmp_payload->objtype = attr->objtype; } if(attr->mask & PVFS_ATTR_META_DFILES) { - tmp_static_payload->dfile_array = + tmp_payload->dfile_array = malloc(attr->u.meta.dfile_count*sizeof(PVFS_handle)); - if(!tmp_static_payload->dfile_array) + if(!tmp_payload->dfile_array) { ret = -PVFS_ENOMEM; goto err; } - memcpy(tmp_static_payload->dfile_array, attr->u.meta.dfile_array, + memcpy(tmp_payload->dfile_array, attr->u.meta.dfile_array, attr->u.meta.dfile_count*sizeof(PVFS_handle)); - tmp_static_payload->dfile_count = attr->u.meta.dfile_count; + tmp_payload->dfile_count = attr->u.meta.dfile_count; } if(attr->mask & PVFS_ATTR_META_MIRROR_DFILES) { - tmp_static_payload->mirror_dfile_array = + tmp_payload->mirror_dfile_array = malloc(attr->u.meta.dfile_count * sizeof(PVFS_handle) * attr->u.meta.mirror_copies_count); - if (!tmp_static_payload->mirror_dfile_array) + if (!tmp_payload->mirror_dfile_array) { ret = -PVFS_ENOMEM; goto err; } - memcpy(tmp_static_payload->mirror_dfile_array + memcpy(tmp_payload->mirror_dfile_array ,attr->u.meta.mirror_dfile_array ,attr->u.meta.dfile_count * sizeof(PVFS_handle) * attr->u.meta.mirror_copies_count); - tmp_static_payload->mirror_copies_count = + tmp_payload->mirror_copies_count = attr->u.meta.mirror_copies_count; } if(attr->mask & PVFS_ATTR_META_DIST) { - tmp_static_payload->dist = PINT_dist_copy(attr->u.meta.dist); - if(!tmp_static_payload->dist) + tmp_payload->dist = PINT_dist_copy(attr->u.meta.dist); + if(!tmp_payload->dist) { ret = -PVFS_ENOMEM; goto err; } - tmp_static_payload->dist_size = attr->u.meta.dist_size; + tmp_payload->dist_size = attr->u.meta.dist_size; } } - /* do we have size or other non-static fields? */ + /* do we have size or other non-static fields? TODO non-static fields in the attr-mask? */ if(size || (attr && (attr->mask & (~(PVFS_STATIC_ATTR_MASK))))) { - tmp_payload = - (struct acache_payload*)calloc(1, sizeof(*tmp_payload)); + /* Allocate memory for acache payload if not previously done. */ if(!tmp_payload) { - ret = -PVFS_ENOMEM; - goto err; - } - tmp_payload->refn = refn; + tmp_payload = + (struct acache_payload*)calloc(1, sizeof(*tmp_payload)); + if(!tmp_payload) + { + ret = -PVFS_ENOMEM; + goto err; + } + tmp_payload->refn = refn; + } + tmp_payload->attr_status = -PVFS_ETIME; tmp_payload->size_status = -PVFS_ETIME; @@ -684,7 +656,7 @@ int PINT_acache_update( } } - + #if 0 gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: update(): attr_status=%d, size_status=%d\n", tmp_payload->attr_status, tmp_payload->size_status); @@ -692,10 +664,6 @@ int PINT_acache_update( gen_mutex_lock(&acache_mutex); - if(tmp_static_payload) - { - load_payload(static_acache, refn, tmp_static_payload, static_pc); - } if(tmp_payload) { load_payload(acache, refn, tmp_payload, acache_pc); @@ -706,52 +674,27 @@ int PINT_acache_update( return(0); err: - - if(tmp_static_payload) - { - if(tmp_static_payload->dfile_array) - free(tmp_static_payload->dfile_array); - if(tmp_static_payload->mirror_dfile_array) - free(tmp_static_payload->mirror_dfile_array); - if(tmp_static_payload->dist) - PINT_dist_free(tmp_static_payload->dist); - free(tmp_static_payload); - } if(tmp_payload) { + if(tmp_payload->dfile_array) + { + free(tmp_payload->dfile_array); + } + if(tmp_payload->mirror_dfile_array) + { + free(tmp_payload->mirror_dfile_array); + } + if(tmp_payload->dist) + { + PINT_dist_free(tmp_payload->dist); + } + free(tmp_payload); PINT_free_object_attr(&tmp_payload->attr); free(tmp_payload); } - return(ret); } -/* static_compare_key_entry() - * - * compares an opaque key (object ref in this case) against a payload to see - * if there is a match - * - * returns 1 on match, 0 otherwise - */ -static int static_compare_key_entry(void* key, struct qhash_head* link) -{ - PVFS_object_ref* real_key = (PVFS_object_ref*)key; - struct static_payload* tmp_payload = NULL; - struct PINT_tcache_entry* tmp_entry = NULL; - - tmp_entry = qhash_entry(link, struct PINT_tcache_entry, hash_link); - assert(tmp_entry); - - tmp_payload = (struct static_payload*)tmp_entry->payload; - if(real_key->handle == tmp_payload->refn.handle && - real_key->fs_id == tmp_payload->refn.fs_id) - { - return(1); - } - - return(0); -} - /* acache_compare_key_entry() * * compares an opaque key (object ref in this case) against a payload to see @@ -793,51 +736,37 @@ static int acache_hash_key(void* key, int table_size) return(tmp_ret); } -/* static_free_payload() +/* acache_free_payload() * * frees payload that has been stored in the acache * * returns 0 on success, -PVFS_error on failure */ -static int static_free_payload(void* payload) +static int acache_free_payload(void* payload) { - struct static_payload* tmp_static_payload = - (struct static_payload*)payload; + struct acache_payload* tmp_payload = (struct acache_payload*)payload; - if(tmp_static_payload->dfile_array) + if(&tmp_payload->attr) + PINT_free_object_attr(&tmp_payload->attr); + + if(tmp_payload->dfile_array) { - free(tmp_static_payload->dfile_array); + free(tmp_payload->dfile_array); } - if(tmp_static_payload->mirror_dfile_array) + if(tmp_payload->mirror_dfile_array) { - free(tmp_static_payload->mirror_dfile_array); + free(tmp_payload->mirror_dfile_array); } - if(tmp_static_payload->dist) + if(tmp_payload->dist) { - PINT_dist_free(tmp_static_payload->dist); + PINT_dist_free(tmp_payload->dist); } - free(tmp_static_payload); - return(0); - -} - -/* acache_free_payload() - * - * frees payload that has been stored in the acache - * - * returns 0 on success, -PVFS_error on failure - */ -static int acache_free_payload(void* payload) -{ - struct acache_payload* tmp_payload = (struct acache_payload*)payload; - - PINT_free_object_attr(&tmp_payload->attr); + free(tmp_payload); return(0); } - static int set_tcache_defaults(struct PINT_tcache* instance) { int ret; @@ -873,18 +802,36 @@ static void load_payload(struct PINT_tcache* instance, int purged; struct PINT_tcache_entry* tmp_entry; int ret; + /* Storage of current time */ + struct timeval current_time = { 0, 0}; + uint64_t current_time_msecs = 0; /* find out if the entry is already in the cache */ ret = PINT_tcache_lookup(instance, &refn, &tmp_entry, &status); + + /* Get the time of day and convert to milliseconds. */ + gettimeofday(¤t_time, NULL); + current_time_msecs = current_time.tv_sec * 1000; + current_time_msecs += current_time.tv_usec / 1000; + if(ret == 0) { - /* found match in cache; destroy old payload, replace, and - * refresh time stamp - */ + /* Update the dynamic attrs' timestamp */ + ((struct acache_payload *)payload)->msecs_dynamic = current_time_msecs; + + #if 0 + /* Copy out previous timestamps */ + ((struct acache_payload *)payload)->msecs_capabilities = + ((struct acache_payload *)(tmp_entry->payload))->msecs_capabilities; + #endif + + /* Free the entry's old payload */ instance->free_payload(tmp_entry->payload); + + /* Point to the new one */ tmp_entry->payload = payload; ret = PINT_tcache_refresh_entry(instance, tmp_entry); /* this counts as an update of an existing entry */ @@ -892,6 +839,10 @@ static void load_payload(struct PINT_tcache* instance, } else { + /* Set the timestamps we'll track outside of tcache control */ + /* ((struct acache_payload *)payload)->msecs_capabilities = current_time_msecs; */ + ((struct acache_payload *)payload)->msecs_dynamic = current_time_msecs; + /* not found in cache; insert new payload*/ ret = PINT_tcache_insert_entry(instance, &refn, payload, &purged); diff --git a/src/client/sysint/acache.h b/src/client/sysint/acache.h index 24e5f15..c0710a4 100644 --- a/src/client/sysint/acache.h +++ b/src/client/sysint/acache.h @@ -110,8 +110,7 @@ enum /** acache performance counter keys */ extern struct PINT_perf_key acache_keys[]; -void PINT_acache_enable_perf_counter(struct PINT_perf_counter* pc, - struct PINT_perf_counter* static_pc); +void PINT_acache_enable_perf_counter(struct PINT_perf_counter* pc); int PINT_acache_initialize(void); diff --git a/src/client/sysint/client-state-machine.c b/src/client/sysint/client-state-machine.c index 4469f9b..36a8799 100644 --- a/src/client/sysint/client-state-machine.c +++ b/src/client/sysint/client-state-machine.c @@ -440,10 +440,9 @@ PVFS_error PINT_client_state_machine_post( start state machine and continue advancing while we're getting immediate completions */ - sm_ret = PINT_state_machine_start(smcb, &js); assert(SM_ACTION_ISVALID(sm_ret)); - + if(sm_ret < 0) { /* state machine code failed */ @@ -532,6 +531,8 @@ PVFS_error PINT_client_io_cancel(PVFS_sys_op_id id) gossip_debug(GOSSIP_CLIENT_DEBUG, "PINT_client_io_cancel id %lld\n",lld(id)); + gossip_debug(GOSSIP_CANCEL_DEBUG, + "PINT_client_io_cancel id %lld\n",lld(id)); smcb = PINT_id_gen_safe_lookup(id); if (!smcb) diff --git a/src/client/sysint/client-state-machine.h b/src/client/sysint/client-state-machine.h index f97b2af..66c9298 100644 --- a/src/client/sysint/client-state-machine.h +++ b/src/client/sysint/client-state-machine.h @@ -333,7 +333,6 @@ typedef struct * in a context. Again fields manage the progress as these * lookups happen. */ - typedef struct { int total_segments; @@ -396,7 +395,7 @@ struct PINT_client_mgmt_perf_mon_list_sm int64_t **perf_matrix; uint64_t *end_time_ms_array; int server_count; - int *key_count; + int *key_count; int history_count; PVFS_id_gen_t *addr_array; uint32_t *next_id_array; @@ -743,7 +742,7 @@ enum PVFS_MGMT_REMOVE_DIRENT = 78, PVFS_MGMT_CREATE_DIRENT = 79, PVFS_MGMT_GET_DIRDATA_HANDLE = 80, - PVFS_MGMT_GET_UID_LIST = 81, + PVFS_MGMT_GET_UID_LIST = 81, PVFS_SERVER_GET_CONFIG = 200, PVFS_CLIENT_JOB_TIMER = 300, PVFS_CLIENT_PERF_COUNT_TIMER = 301, diff --git a/src/client/sysint/finalize.c b/src/client/sysint/finalize.c index 1fccbc0..9f4c48f 100644 --- a/src/client/sysint/finalize.c +++ b/src/client/sysint/finalize.c @@ -42,7 +42,7 @@ int PVFS_sys_finalize() PINT_ncache_finalize(); PINT_acache_finalize(); PINT_cached_config_finalize(); - + /* flush all known server configurations */ PINT_server_config_mgr_finalize(); diff --git a/src/client/sysint/fs-add.sm b/src/client/sysint/fs-add.sm index 33f7ce1..61ee79b 100644 --- a/src/client/sysint/fs-add.sm +++ b/src/client/sysint/fs-add.sm @@ -220,7 +220,7 @@ PVFS_error PVFS_isys_fs_add( int PVFS_sys_fs_add(struct PVFS_sys_mntent *mntent) { int ret = -PVFS_EINVAL, error = 0; - PVFS_sys_op_id op_id; + PVFS_sys_op_id op_id = -1; ret = PVFS_isys_fs_add(mntent, &op_id, NULL); if (ret) @@ -338,7 +338,6 @@ static PINT_sm_action pvfs2_server_prepare_fetch_config( } sm_p->fetch_config.nservers = count; - sm_p->fetch_config.fs_config_bufs = (char **) calloc(count, sizeof(char *)); if (sm_p->fetch_config.fs_config_bufs == NULL) { diff --git a/src/client/sysint/mgmt-noop.sm b/src/client/sysint/mgmt-noop.sm index d069528..e65c409 100644 --- a/src/client/sysint/mgmt-noop.sm +++ b/src/client/sysint/mgmt-noop.sm @@ -30,7 +30,7 @@ extern job_context_id pint_client_sm_context; enum { OSD_MSGPAIR = 2001, - RETRY = 2002, + RETRY = 2002 }; %% diff --git a/src/client/sysint/remove.sm b/src/client/sysint/remove.sm index 3de652a..a92102e 100644 --- a/src/client/sysint/remove.sm +++ b/src/client/sysint/remove.sm @@ -209,6 +209,7 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( PVFS_object_attr *attr = NULL; int ret = -PVFS_EINVAL; PINT_sm_msgpair_state *msg_p = NULL; + int is_osd = fsid_is_osd(sm_p->object_ref.fs_id); /* * NOTE: it's easier to clean up from a metafile with no datafiles @@ -227,21 +228,7 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( PINT_msgpair_init(&sm_p->msgarray_op); msg_p = &sm_p->msgarray_op.msgpair; - msg_p->fs_id = sm_p->object_ref.fs_id; - msg_p->handle = attr->u.meta.dfile_array[0]; - msg_p->retry_flag = PVFS_MSGPAIR_RETRY; /* TODO: Do we want retry? */ - msg_p->comp_fn = NULL; - - ret = PINT_cached_config_map_to_server( - &msg_p->svr_addr, msg_p->handle, msg_p->fs_id); - - if (ret) - { - gossip_err("Failed to map meta server address\n"); - js_p->error_code = ret; - } - - if (server_is_osd(msg_p->svr_addr)) { + if (is_osd) { struct osd_command *command = &msg_p->osd_command; ret = osd_command_set_remove(command, PVFS_OSD_DATA_PID, attr->u.meta.dfile_array[0]); @@ -264,6 +251,20 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( sm_p->hints); } + msg_p->fs_id = sm_p->object_ref.fs_id; + msg_p->handle = attr->u.meta.dfile_array[0]; + msg_p->retry_flag = PVFS_MSGPAIR_RETRY; /* TODO: Do we want retry? */ + msg_p->comp_fn = NULL; + + ret = PINT_cached_config_map_to_server( + &msg_p->svr_addr, msg_p->handle, msg_p->fs_id); + + if (ret) + { + gossip_err("Failed to map meta server address\n"); + js_p->error_code = ret; + } + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); return SM_ACTION_COMPLETE; } diff --git a/src/client/sysint/server-get-config.sm b/src/client/sysint/server-get-config.sm index fadb81e..0dceba2 100644 --- a/src/client/sysint/server-get-config.sm +++ b/src/client/sysint/server-get-config.sm @@ -16,6 +16,7 @@ #include "job.h" #include "gossip.h" #include "str-utils.h" +#include "pint-util.h" #include "pint-cached-config.h" #include "PINT-reqproto-encode.h" @@ -164,6 +165,7 @@ static int server_parse_config( { int ret = 1, template_index = 1; char temp_path[MAX_PATH], temp_file[MAX_PATH]; + char *server_alias = NULL; DWORD rc = 1, use_temp_path, bytes; HANDLE hFile; @@ -214,7 +216,8 @@ static int server_parse_config( if (rc && (bytes == fs_config_buf_size - 1)) { - ret = PINT_parse_config(config, temp_file, NULL); + server_alias = PINT_util_guess_alias(); + ret = PINT_parse_config(config, temp_file, server_alias, 0); } else { @@ -234,6 +237,7 @@ static int server_parse_config( { int ret = 1, template_index = 1; int fs_fd = 0; + char *server_alias = NULL; char fs_template_array[2][64] = { ".__pvfs_fs_configXXXXXX", @@ -268,7 +272,8 @@ static int server_parse_config( if (write(fs_fd,fs_config_buf, (fs_config_buf_size - 1)) == (fs_config_buf_size - 1)) { - ret = PINT_parse_config(config, fs_template, NULL); + server_alias = PINT_util_guess_alias(); + ret = PINT_parse_config(config, fs_template, server_alias, 0); } else { diff --git a/src/client/sysint/sys-create.sm b/src/client/sysint/sys-create.sm index 4b5c910..78c27af 100644 --- a/src/client/sysint/sys-create.sm +++ b/src/client/sysint/sys-create.sm @@ -41,9 +41,8 @@ static int create_comp_fn( void *v_p, struct PVFS_server_resp *resp_p, int index); static int create_datafiles_comp_fn( void *v_p, struct PVFS_server_resp *resp_p, int index); -static int create_setattr_comp_fn(void *v_p, - struct PVFS_server_resp *resp_p, - int index); +static int create_setattr_comp_fn( + void *v_p, struct PVFS_server_resp *resp_p, int index); static int create_crdirent_comp_fn( void *v_p, struct PVFS_server_resp *resp_p, int index); static int create_delete_handles_comp_fn( @@ -82,7 +81,7 @@ machine pvfs2_client_create_sm success => create_setup_msgpair; default => cleanup; } - + state create_setup_msgpair { run create_create_setup_msgpair; @@ -274,6 +273,8 @@ PVFS_error PVFS_isys_create( switch(layout->algorithm) { /* these are valid */ + case PVFS_SYS_LAYOUT_NONE: + case PVFS_SYS_LAYOUT_LOCAL: case PVFS_SYS_LAYOUT_ROUND_ROBIN: case PVFS_SYS_LAYOUT_RANDOM: case PVFS_SYS_LAYOUT_LIST: @@ -403,7 +404,7 @@ static PINT_sm_action create_init( { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); job_id_t tmp_id; - + assert((js_p->error_code == 0) || (js_p->error_code == CREATE_RETRY)); @@ -431,13 +432,15 @@ static PINT_sm_action create_init( pint_client_sm_context); } - return SM_ACTION_COMPLETE; + + return SM_ACTION_COMPLETE; } static int create_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { + gossip_err("create_comp_fn\n"); PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); @@ -445,7 +448,7 @@ static int create_comp_fn(void *v_p, gossip_debug(GOSSIP_CLIENT_DEBUG, "create_create_comp_fn\n"); - if (is_osd_meta) { + if (is_osd_meta) { int ret; uint64_t oid; PVFS_error status; @@ -491,8 +494,10 @@ static int create_comp_fn(void *v_p, resp_p->u.create.datafile_handles, (sizeof(*sm_p->u.create.datafile_handles) * resp_p->u.create.datafile_count)); + sm_p->u.create.stuffed = resp_p->u.create.stuffed; } + gossip_debug( GOSSIP_CLIENT_DEBUG, "*** Got newly created handle %llu\n", llu(sm_p->u.create.metafile_handle)); @@ -504,6 +509,7 @@ static int create_datafiles_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { + gossip_err("create_datafiles_comp_fn\n"); PVFS_error status; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); @@ -614,7 +620,6 @@ static int create_setattr_comp_fn(void *v_p, return status; } - static int create_crdirent_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) @@ -646,10 +651,11 @@ static PINT_sm_action create_create_setup_msgpair( int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); int is_osd_meta = fsid_is_osd_meta(sm_p->object_ref.fs_id); int is_osd = fsid_is_osd(sm_p->object_ref.fs_id); + gossip_debug(GOSSIP_CLIENT_DEBUG, "create state: " "dspace_create_setup_msgpair\n"); - if (is_osd_md) { + //if (is_osd_md) { /* * OK, so osd_type == OSD_MDFILE which means that we're storing the * file metadata as attributes of the first datafile. There is nothing @@ -657,9 +663,9 @@ static PINT_sm_action create_create_setup_msgpair( * create_xfer state and jump directly to the * datafiles_setup_msgpair_array state. */ - js_p->error_code = OSD_MDFILE_MSGPAIR; - return SM_ACTION_COMPLETE; - } + //js_p->error_code = OSD_MDFILE_MSGPAIR; + //return SM_ACTION_COMPLETE; + //} gossip_debug(GOSSIP_CLIENT_DEBUG," create: posting create req\n"); @@ -678,6 +684,7 @@ static PINT_sm_action create_create_setup_msgpair( ret = PINT_cached_config_get_next_meta( sm_p->object_ref.fs_id, &msg_p->svr_addr, &meta_handle_extent_array, 0); + gossip_err("server: %s\n", BMI_addr_rev_lookup(msg_p->svr_addr)); if(ret != 0) { gossip_err("Failed to map meta server address\n"); @@ -738,6 +745,7 @@ static PINT_sm_action create_create_setup_msgpair( msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = meta_handle_extent_array.extent_array[0].first; + gossip_err("msg_p->handle: %d\n", msg_p->handle); msg_p->retry_flag = PVFS_MSGPAIR_RETRY; msg_p->comp_fn = create_comp_fn; msg_p->req.u.create.attr.u.meta.dfile_count = 0; @@ -747,7 +755,7 @@ static PINT_sm_action create_create_setup_msgpair( PINT_DIST_PACK_SIZE(sm_p->u.create.dist); msg_p->req.u.create.attr.cid = sm_p->getattr.attr.cid; sm_p->u.create.attr.cid = sm_p->getattr.attr.cid; - + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); return SM_ACTION_COMPLETE; } @@ -755,6 +763,7 @@ static PINT_sm_action create_create_setup_msgpair( static PINT_sm_action create_datafiles_setup_msgpair_array( struct PINT_smcb *smcb, job_status_s *js_p) { + gossip_err("create_datafiles_setup_msgpair_array\n"); struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -PVFS_EINVAL; struct server_configuration_s *server_config; @@ -768,7 +777,7 @@ static PINT_sm_action create_datafiles_setup_msgpair_array( sm_p->object_ref.fs_id); PINT_put_server_config_struct(server_config); is_osd = (server_config->osd_type != OSD_NONE); - + js_p->error_code = is_osd ? OSD_MSGPAIR : 0; /* allocate handle extent array objects */ @@ -1048,6 +1057,7 @@ static PINT_sm_action create_crdirent_setup_msgpair( PINT_msgpair_init(&sm_p->msgarray_op); msg_p = &sm_p->msgarray_op.msgpair; + gossip_err("is_osd: %d\n", server_is_osd(msg_p->svr_addr)); PINT_SERVREQ_CRDIRENT_FILL( msg_p->req, *sm_p->cred_p, @@ -1099,20 +1109,20 @@ static PINT_sm_action create_cleanup( PVFS_object_ref metafile_ref; PVFS_size tmp_size = 0; int ret; - + gossip_debug(GOSSIP_CLIENT_DEBUG, "create state: cleanup\n"); - + PINT_free_object_attr(&sm_p->u.create.attr); - + if(js_p->error_code == OSD_POST_CREATE) js_p->error_code = 0; - + PINT_SM_GETATTR_STATE_CLEAR(sm_p->getattr); sm_p->error_code = (sm_p->u.create.stored_error_code ? sm_p->u.create.stored_error_code : js_p->error_code); - + memset(&metafile_ref, 0, sizeof(metafile_ref)); if (sm_p->error_code == 0) @@ -1134,7 +1144,7 @@ static PINT_sm_action create_cleanup( sm_p->u.create.datafile_handles; sm_p->u.create.attr.u.meta.dfile_count = sm_p->u.create.datafile_count; - + if(sm_p->u.create.stuffed) { gossip_debug(GOSSIP_CLIENT_DEBUG, "created stuffed file\n"); @@ -1159,7 +1169,6 @@ static PINT_sm_action create_cleanup( /* Also, make sure to clear time masks. The server is responsible * for setting that. */ - sm_p->u.create.attr.mask &= (~(PVFS_ATTR_COMMON_MTIME)); sm_p->u.create.attr.mask &= (~(PVFS_ATTR_COMMON_CTIME)); sm_p->u.create.attr.mask &= (~(PVFS_ATTR_COMMON_ATIME)); @@ -1201,7 +1210,7 @@ static PINT_sm_action create_cleanup( free(sm_p->u.create.datafile_handles); sm_p->u.create.datafile_handles = NULL; } - + PINT_msgpairarray_destroy(&sm_p->msgarray_op); PINT_SET_OP_COMPLETE; @@ -1215,12 +1224,11 @@ static PINT_sm_action create_parent_getattr_inspect( struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - PVFS_object_attr *attr = NULL; PINT_dist *current_dist; int ret = 0; int num_dfiles_requested = 0; - + gossip_debug(GOSSIP_CLIENT_DEBUG, "create state: parent_getattr_inspect\n"); attr = &sm_p->getattr.attr; @@ -1405,6 +1413,7 @@ static PINT_sm_action create_parent_getattr_inspect( sm_p->u.create.dist, num_dfiles_requested, &sm_p->u.create.num_data_files); + if(ret < 0) { gossip_err("Error: failed to get number of data servers\n"); @@ -1414,7 +1423,7 @@ static PINT_sm_action create_parent_getattr_inspect( gossip_debug(GOSSIP_CLIENT_DEBUG, "Setting number of datafiles to %d [requested %d]\n", sm_p->u.create.num_data_files, num_dfiles_requested); - + return SM_ACTION_COMPLETE; } diff --git a/src/client/sysint/sys-getattr.sm b/src/client/sysint/sys-getattr.sm index cc91814..a02efcf 100644 --- a/src/client/sysint/sys-getattr.sm +++ b/src/client/sysint/sys-getattr.sm @@ -81,7 +81,7 @@ nested machine pvfs2_client_datafile_getattr_sizes_sm jump pvfs2_osd_msgpairarray_sm; default => datafile_getattr_cleanup; } - + state datafile_getattr_xfer_msgpairarray { jump pvfs2_msgpairarray_sm; @@ -334,11 +334,11 @@ static PINT_sm_action getattr_acache_lookup( js_p->error_code = 0; object_ref = sm_p->getattr.object_ref; - + server_config = PINT_get_server_config_struct( sm_p->object_ref.fs_id); PINT_put_server_config_struct(server_config); - + assert(object_ref.handle != PVFS_HANDLE_NULL); assert(object_ref.fs_id != PVFS_FS_ID_NULL); @@ -368,7 +368,6 @@ static PINT_sm_action getattr_acache_lookup( &attr_status, &sm_p->getattr.size, &size_status); - if(ret < 0 || attr_status < 0) { gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: clean acache miss: " @@ -673,7 +672,7 @@ static int getattr_object_getattr_comp_fn( PVFS_object_attr *attr = NULL; int ret, status; PINT_smcb *smcb = v_p; - PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); + PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); attr = &sm_p->getattr.attr; @@ -711,8 +710,8 @@ static int getattr_object_getattr_comp_fn( assert(resp_p->op == PVFS_SERV_GETATTR); gossip_debug(GOSSIP_GETATTR_DEBUG, - "getattr_object_getattr_comp_fn called\n"); - + "getattr_object_getattr_comp_fn called\n"); + if (resp_p->status != 0) { return resp_p->status; @@ -724,7 +723,7 @@ static int getattr_object_getattr_comp_fn( * caching. */ PINT_copy_object_attr(&sm_p->getattr.attr, - &resp_p->u.getattr.attr); + &resp_p->u.getattr.attr); } /* if the ref_type mask is set to a non-zero value (!PVFS_TYPE_NONE) @@ -910,7 +909,7 @@ static PINT_sm_action getattr_datafile_getattr_setup_msgpairarray( attr = &sm_p->getattr.attr; assert(attr); - + PINT_msgpair_init(&sm_p->msgarray_op); msg_p = &sm_p->msgarray_op.msgpair; @@ -993,7 +992,7 @@ static PINT_sm_action getattr_datafile_getattr_setup_msgpairarray( } } } else { -//START_PROFILER(getattr_prof); + //START_PROFILER(getattr_prof); PINT_SERVREQ_TREE_GET_FILE_SIZE_FILL( msg_p->req, *sm_p->cred_p, @@ -1033,6 +1032,7 @@ static PINT_sm_action getattr_datafile_getattr_setup_msgpairarray( msg_p->retry_flag = PVFS_MSGPAIR_RETRY; } + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); return SM_ACTION_COMPLETE; } @@ -1130,7 +1130,7 @@ static int getattr_datafile_getattr_comp_fn( ,(int)resp_p->u.tree_get_file_size.error[i] ,i ,(int)resp_p->u.tree_get_file_size.size[i]); - + if (resp_p->u.tree_get_file_size.error[i] != 0) { gossip_debug(GOSSIP_GETATTR_DEBUG,"%s: error[%d] is %d\n" @@ -1140,12 +1140,13 @@ static int getattr_datafile_getattr_comp_fn( memset(getattr->size_array,0,sizeof(*getattr->size_array)); return (resp_p->u.tree_get_file_size.error[i]); } - + getattr->size_array[i] = resp_p->u.tree_get_file_size.size[i]; }/*end for*/ }/*end if*/ } + return(0); }/*end getattr_datafile_getattr_comp_fn*/ @@ -1349,6 +1350,11 @@ static PINT_sm_action getattr_datafile_getattr_retry( return SM_ACTION_COMPLETE; } /*end datafile_getattr_retry*/ + + + + + static PINT_sm_action getattr_datafile_getattr_cleanup( struct PINT_smcb *smcb, job_status_s *js_p) { @@ -1376,10 +1382,10 @@ static PINT_sm_action getattr_datafile_getattr_cleanup( static PINT_sm_action getattr_acache_insert( struct PINT_smcb *smcb, job_status_s *js_p) -{ +{ struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PVFS_size* tmp_size = NULL; - + if( sm_p->getattr.attr.objtype == PVFS_TYPE_METAFILE || sm_p->getattr.attr.objtype == PVFS_TYPE_DIRECTORY || sm_p->getattr.attr.objtype == PVFS_TYPE_SYMLINK ) @@ -1432,7 +1438,7 @@ static PINT_sm_action getattr_cleanup( { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PINT_sm_getattr_state *getattr = &(sm_p->getattr); - + gossip_debug(GOSSIP_CLIENT_DEBUG, "(%p) getattr state: getattr_cleanup\n", sm_p); @@ -1449,7 +1455,7 @@ static PINT_sm_action getattr_cleanup( free(getattr->size_array); /* cleanup getattr when an error occurs */ - if (js_p->error_code && js_p->error_code) + if (js_p->error_code) { if (getattr->attr.mask & PVFS_ATTR_META_DFILES) { @@ -1468,7 +1474,7 @@ static PINT_sm_action getattr_cleanup( PINT_dist_free(getattr->attr.u.meta.dist); } }/*end if error*/ - + return SM_ACTION_COMPLETE; } @@ -1484,7 +1490,7 @@ static PINT_sm_action getattr_set_sys_response( PINT_SET_OP_COMPLETE; return SM_ACTION_TERMINATE; } - + attr = &sm_p->getattr.attr; assert(attr); @@ -1632,7 +1638,7 @@ static PINT_sm_action getattr_set_sys_response( memset(sm_p->u.getattr.getattr_resp_p, 0, sizeof(PVFS_sysresp_getattr)); } - + PINT_SM_GETATTR_STATE_CLEAR(sm_p->getattr); PINT_SET_OP_COMPLETE; diff --git a/src/client/sysint/sys-io.sm b/src/client/sysint/sys-io.sm index 2ca40d4..c6132da 100644 --- a/src/client/sysint/sys-io.sm +++ b/src/client/sysint/sys-io.sm @@ -314,7 +314,7 @@ PVFS_error PVFS_isys_io( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_isys_io entered [%llu]\n", llu(ref.handle)); - + server_config = PINT_get_server_config_struct(ref.fs_id); cur_fs = PINT_config_find_fs_id(server_config, ref.fs_id); PINT_put_server_config_struct(server_config); @@ -325,7 +325,7 @@ PVFS_error PVFS_isys_io( if(!server_config->post_create) { gossip_err("invalid (NULL) required argument\n"); return ret; - } + } } if ((io_type != PVFS_IO_READ) && (io_type != PVFS_IO_WRITE)) @@ -437,12 +437,12 @@ static PINT_sm_action io_init( { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); job_id_t tmp_id; - + gossip_debug(GOSSIP_CLIENT_DEBUG, "(%p) io state: io_init\n", sm_p); assert((js_p->error_code == 0) || (js_p->error_code == IO_RETRY)); - + PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, sm_p->object_ref, @@ -454,6 +454,7 @@ static PINT_sm_action io_init( (js_p->error_code == IO_RETRY_NODELAY)) { js_p->error_code = 0; + io_datafile_index_array_destroy(sm_p); io_contexts_destroy(sm_p); @@ -489,7 +490,7 @@ static PINT_sm_action io_inspect_attr( js_p->error_code = -PVFS_ECANCEL; return SM_ACTION_COMPLETE; } - + /* determine if we need to unstuff or not to service this request */ js_p->error_code = unstuff_needed( sm_p->u.io.mem_req, @@ -498,12 +499,11 @@ static PINT_sm_action io_inspect_attr( sm_p->getattr.attr.mask, sm_p->u.io.io_type); - if (is_osd_meta || is_osd_md) { js_p->error_code = 0; } - + return(SM_ACTION_COMPLETE); } @@ -577,7 +577,6 @@ static PINT_sm_action io_datafile_setup_msgpairs( int sio_count; /* Is the underlying storage system OSD? */ - int is_osd = fsid_is_osd(sm_p->object_ref.fs_id); gossip_debug(GOSSIP_CLIENT_DEBUG, "(%p) io state: " @@ -687,7 +686,7 @@ static PINT_sm_action io_datafile_setup_msgpairs( " %s: %d datafiles " "might have data\n", __func__, target_datafile_count); - if (is_osd) + if (is_osd) { /* underlying storage is OSD */ gossip_debug(GOSSIP_IO_DEBUG, " %s: doing OSD I/O\n", __func__); diff --git a/src/client/sysint/sys-lookup.sm b/src/client/sysint/sys-lookup.sm index 699c761..9ba50a4 100644 --- a/src/client/sysint/sys-lookup.sm +++ b/src/client/sysint/sys-lookup.sm @@ -646,10 +646,9 @@ static int lookup_segment_query_ncache(struct PINT_smcb *smcb, parent_ref.fs_id = cur_seg->seg_starting_refn.fs_id; parent_ref.handle = cur_seg->seg_starting_refn.handle; - + ret = PINT_ncache_get_cached_entry(cur_seg->seg_name, &object_ref, &parent_ref); - if (ret == 0) { gossip_debug(GOSSIP_NCACHE_DEBUG, @@ -725,7 +724,7 @@ static PINT_sm_action lookup_segment_setup_msgpair(struct PINT_smcb *smcb, msg_p->handle = cur_seg->seg_starting_refn.handle; msg_p->retry_flag = PVFS_MSGPAIR_RETRY; msg_p->comp_fn = lookup_segment_lookup_comp_fn; - + ret = PINT_cached_config_map_to_server( &msg_p->svr_addr, msg_p->handle, msg_p->fs_id); diff --git a/src/client/sysint/sys-mkdir.sm b/src/client/sysint/sys-mkdir.sm index bd3dfb5..4dad827 100644 --- a/src/client/sysint/sys-mkdir.sm +++ b/src/client/sysint/sys-mkdir.sm @@ -45,9 +45,8 @@ static int mkdir_crdirent_comp_fn( void *v_p, struct PVFS_server_resp *resp_p, int index); static int mkdir_delete_handle_comp_fn( void *v_p, struct PVFS_server_resp *resp_p, int index); -static int create_collection_comp_fn(void *v_p, - struct PVFS_server_resp *resp_p, - int index); +static int create_collection_comp_fn( + void *v_p, struct PVFS_server_resp *resp_p, int index); %% @@ -92,7 +91,7 @@ machine pvfs2_client_mkdir_sm run mkdir_msg_failure; default => cleanup; } - + state create_collection { run create_collection_setup_msgpair; @@ -672,7 +671,7 @@ static PINT_sm_action mkdir_cleanup( directory_ref.handle = sm_p->u.mkdir.metafile_handle; directory_ref.fs_id = sm_p->object_ref.fs_id; - + sm_p->u.mkdir.mkdir_resp->ref.handle = directory_ref.handle; sm_p->u.mkdir.mkdir_resp->ref.fs_id = directory_ref.fs_id; diff --git a/src/client/sysint/sys-setattr.sm b/src/client/sysint/sys-setattr.sm index b49a81b..b369bd5 100644 --- a/src/client/sysint/sys-setattr.sm +++ b/src/client/sysint/sys-setattr.sm @@ -339,7 +339,7 @@ static PINT_sm_action setattr_msg_setup_msgpair( gossip_err("Failed to map meta server address\n"); js_p->error_code = ret; } - + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); return SM_ACTION_COMPLETE; } @@ -362,7 +362,6 @@ static PINT_sm_action setattr_cleanup( /* either update acache or invalidate depending on if we were successful * or not */ - if(sm_p->error_code == 0) { PINT_CONVERT_ATTR(&attr, &sm_p->u.setattr.sys_attr, 0); diff --git a/src/client/usrint/iocommon.c b/src/client/usrint/iocommon.c index 3951167..4060b06 100644 --- a/src/client/usrint/iocommon.c +++ b/src/client/usrint/iocommon.c @@ -1,5 +1,5 @@ -/* - * (C) 2011 Clemson University and The University of Chicago +/* we will keep a copy and keep one in the environment */ +/* (C) 2011 Clemson University and The University of Chicago * * See COPYING in top-level directory. */ @@ -14,54 +14,18 @@ #include "posix-ops.h" #include "openfile-util.h" #include "iocommon.h" +#if PVFS_UCACHE_ENABLE #include "ucache.h" +#endif +#include +#include -/* Functions in this file generally define a label errorout - * for cleanup before exit and return an int rc which is -1 - * on error with the error code in errno, 0 on success. - * IOCOMMON_RETURN_ERR checks a return code from a function - * returns the same protocol and goto errorout: if less than 0 - * IOCOMMON_CHECK_ERR assumes the return code contains the - * negative of the error code as encoded by PVFS sysint - * functions and decodes these before jumping to errorout. - * PVFS sysint calls always return error codes in the return - * value, but system calls inside them might set errno to - * a value that may or may not have meaning for the programmer - * calling this library. Steps are taken to ensure errno - * is not modified unless the code in this lib wants to - * modify it. CHECK_ERR should be called after each sysint - * call to correctly pass error codes. - */ -extern PVFS_error PINT_errno_mapping[]; -#define IOCOMMON_RETURN_ERR(rc) \ -do { \ - if ((rc) < 0) \ - { \ - goto errorout; \ - } \ -} while (0) - -#define IOCOMMON_CHECK_ERR(rc) \ -do { \ - errno = orig_errno; \ - if ((rc) < 0) \ - { \ - if (IS_PVFS_NON_ERRNO_ERROR(-(rc))) \ - { \ - pvfs_errno = -rc; \ - errno = EIO; \ - } \ - else if (IS_PVFS_ERROR(-(rc))) \ - { \ - errno = PINT_errno_mapping[(-(rc)) & 0x7f]; \ - } \ - rc = -1; \ - goto errorout; \ - } \ -} while (0) +static int iocommon_parse_serverlist(char *serverlist, + struct PVFS_sys_server_list *slist, + PVFS_fs_id fsid); /** this is a global analog of errno for pvfs specific - * errors errno is set to EIO and this si set to the + * errors errno is set to EIO and this is set to the * original code */ int pvfs_errno; @@ -94,12 +58,19 @@ int iocommon_fsync(pvfs_descriptor *pd) errno = EBADF; return -1; } - iocommon_cred(&credentials); - if(ucache!=0 && ucache_locks!=0) + iocommon_cred(&credentials); +#if PVFS_UCACHE_ENABLE + if (ucache_enabled) { - ucache_flush(pd); + rc = ucache_flush_file(pd->s->fent); + if(rc != 0) + { + goto errorout; + } } - rc = PVFS_sys_flush(pd->pvfs_ref, credentials, PVFS_HINT_NULL); +#endif + errno = 0; + rc = PVFS_sys_flush(pd->s->pvfs_ref, credentials, PVFS_HINT_NULL); IOCOMMON_CHECK_ERR(rc); errorout: @@ -129,13 +100,24 @@ int iocommon_lookup_absolute(const char *abs_path, iocommon_cred(&credentials); /* Determine the fs_id and pvfs_path */ + errno = 0; rc = PVFS_util_resolve(abs_path, &lookup_fs_id, pvfs_path, PVFS_PATH_MAX); - IOCOMMON_CHECK_ERR(rc); + if (rc < 0) + { + if (rc == -PVFS_ENOENT) + { + errno = ESTALE; /* this signals open that resolve failed */ + rc = -1; + goto errorout; + } + IOCOMMON_CHECK_ERR(rc); + } /* set up buffer to return partially looked up path */ /* in failure. This is most likely a non-PVFS path */ - /* Set up error path */ + /* Set up error path + TODO: orange-security if (error_path) { memset(error_path, 0, error_path_size); @@ -147,7 +129,9 @@ int iocommon_lookup_absolute(const char *abs_path, resp_lookup.error_path = NULL; resp_lookup.error_path_size = 0; } + */ + errno = 0; rc = PVFS_sys_lookup(lookup_fs_id, pvfs_path, credentials, &resp_lookup, PVFS2_LOOKUP_LINK_FOLLOW, NULL); @@ -190,7 +174,8 @@ int iocommon_lookup_relative(const char *rel_path, /* Set credentials */ iocommon_cred(&credentials); - /* Set up error path */ + /* Set up error path + TODO: orange-security if (error_path) { memset(error_path, 0, error_path_size); @@ -202,6 +187,7 @@ int iocommon_lookup_relative(const char *rel_path, resp_lookup.error_path = NULL; resp_lookup.error_path_size = 0; } + */ current_seg_ref = parent_ref; cur = (char *)rel_path; @@ -246,6 +232,7 @@ int iocommon_lookup_relative(const char *rel_path, last = cur; /* Contact server */ + errno = 0; rc = PVFS_sys_ref_lookup(parent_ref.fs_id, current_seg_path, current_seg_ref, @@ -268,6 +255,73 @@ int iocommon_lookup_relative(const char *rel_path, return rc; } +/** + * Parses a simple string to find the number and select of servers + * for the LIST layout method + */ +static int iocommon_parse_serverlist(char *serverlist, + struct PVFS_sys_server_list *slist, + PVFS_fs_id fsid) +{ + PVFS_BMI_addr_t *server_array; + int count; + char *tok, *save_ptr; + int i; + + /* expects slist->servers to be NULL */ + if (!slist || slist->servers) + { + errno = EINVAL; + return -1; + } + tok = strtok_r(serverlist, ":", &save_ptr); + if (!tok) + { + errno = EINVAL; + return -1; + } + slist->count = atoi(tok); + PINT_cached_config_count_servers(fsid, PINT_SERVER_TYPE_IO, &count); + if (slist->count < 1 || slist->count > count) + { + errno = EINVAL; + return -1; + } + slist->servers = (PVFS_BMI_addr_t *)malloc(sizeof(PVFS_BMI_addr_t) * + slist->count); + if (!slist->servers) + { + errno = ENOMEM; + return -1; + } + server_array = (PVFS_BMI_addr_t *)malloc(sizeof(PVFS_BMI_addr_t)*count); + if (!server_array) + { + free(slist->servers); + slist->servers = NULL; + errno = ENOMEM; + return -1; + } + PINT_cached_config_get_server_array(fsid, PINT_SERVER_TYPE_IO, + server_array, &count); + for (i = 0; i < slist->count; i++) + { + tok = strtok_r(NULL, ":", &save_ptr); + if (!tok || atoi(tok) < 0 || atoi(tok) >= count) + { + free(slist->servers); + slist->servers = NULL; + free(server_array); + errno = EINVAL; + return -1; + } + slist->servers[i] = server_array[atoi(tok)]; + } + free(server_array); + return 0; +} + + /** * Create a file via the PVFS system interface */ @@ -286,26 +340,13 @@ int iocommon_create_file(const char *filename, PVFS_sysresp_create resp_create; PVFS_sys_dist *dist = NULL; PVFS_sys_layout *layout = NULL; + PVFS_hint hints = NULL; /* Initialize */ pvfs_sys_init(); memset(&attr, 0, sizeof(attr)); memset(&resp_create, 0, sizeof(resp_create)); - /* this is not right - need to pull parameters out of hints */ - /* investigate PVFS hint mechanism */ -#if 0 - if (file_creation_param.striping_unit > 0) - { - dist = PVFS_sys_dist_lookup("simple_stripe"); - if (PVFS_sys_dist_setparam(dist, "strip_size", - &(file_creation_param.striping_unit)) < 0) - { - fprintf(stderr, "Error: failed to set striping_factor\n"); - } - } -#endif - attr.owner = geteuid(); attr.group = getegid(); attr.atime = time(NULL); @@ -313,12 +354,78 @@ int iocommon_create_file(const char *filename, attr.ctime = attr.atime; attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; -#if 0 - if (file_creation_param.striping_factor > 0){ - attributes.dfile_count = file_creation_param.striping_factor; - attributes.mask |= PVFS_ATTR_SYS_DFILE_COUNT; + if (file_creation_param) /* these are hints */ + { + int length; + void *value; + /* check for distribution */ + value = PINT_hint_get_value_by_type(file_creation_param, + PINT_HINT_DISTRIBUTION, + &length); + if (value) + { + dist = PVFS_sys_dist_lookup((char *)value); + if (!dist) /* distribution not found */ + { + rc = EINVAL; + goto errorout; + } + } + /* check for dfile count */ + value = PINT_hint_get_value_by_type(file_creation_param, + PINT_HINT_DFILE_COUNT, + &length); + if (value) + { + attr.dfile_count = *(int *)value; + attr.mask |= PVFS_ATTR_SYS_DFILE_COUNT; + } + /* check for layout */ + value = PINT_hint_get_value_by_type(file_creation_param, + PINT_HINT_LAYOUT, + &length); + if (value) + { + layout = (PVFS_sys_layout *)malloc(sizeof(PVFS_sys_layout)); + layout->algorithm = *(int *)value; + layout->server_list.count = 0; + layout->server_list.servers = NULL; + } + /* check for server list */ + value = PINT_hint_get_value_by_type(file_creation_param, + PINT_HINT_SERVERLIST, + &length); + if (value) + { + if(!layout) + { + /* serverlist makes no sense without a layout */ + rc = EINVAL; + goto errorout; + } + layout->server_list.count = 0; + layout->server_list.servers = NULL; + rc = iocommon_parse_serverlist(value, &layout->server_list, + parent_ref.fs_id); + if (rc < 0) + { + return rc; + } + } + /* check for nocache flag */ + value = PINT_hint_get_value_by_type(file_creation_param, + PINT_HINT_NOCACHE, + &length); + if (value) + { + /* this should probably move into the open routine */ + } + /* look for hints handled on the server */ + if (PVFS_hint_check_transfer(&file_creation_param)) + { + hints = file_creation_param; + } } -#endif /* Extract the users umask (and restore it to the original value) */ mode_mask = umask(0); @@ -367,6 +474,7 @@ int iocommon_create_file(const char *filename, iocommon_cred(&credentials); /* Contact server */ + errno = 0; rc = PVFS_sys_create((char*)filename, parent_ref, attr, @@ -374,7 +482,7 @@ int iocommon_create_file(const char *filename, dist, &resp_create, layout, - NULL); + hints); IOCOMMON_CHECK_ERR(rc); *ref = resp_create.ref; @@ -383,6 +491,10 @@ int iocommon_create_file(const char *filename, { PVFS_sys_dist_free(dist); } + if (layout) + { + free(layout); + } return rc; } @@ -435,15 +547,29 @@ pvfs_descriptor *iocommon_open(const char *path, /* Get reference for the parent directory */ if (pdir == NULL) { + errno = 0; rc = iocommon_lookup_absolute(directory, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); + if (rc < 0) + { + if (errno == ESTALE) + { + /* special case we are opening the root dir of PVFS */ + errno = 0; + rc = iocommon_lookup_absolute(path, &file_ref, NULL, 0); + /* in this case we don't need to look up anything else */ + /* jump right to found the file code */ + goto foundfile; + } + IOCOMMON_RETURN_ERR(rc); + } } else { if (directory) { + errno = 0; rc = iocommon_lookup_relative(directory, - pdir->pvfs_ref, + pdir->s->pvfs_ref, follow_link, &parent_ref, NULL, @@ -452,19 +578,21 @@ pvfs_descriptor *iocommon_open(const char *path, } else { - parent_ref = pdir->pvfs_ref; + parent_ref = pdir->s->pvfs_ref; } } /* An open procedure safe for multiprocessing */ /* Attempt to find file */ + errno = 0; rc = iocommon_lookup_relative(filename, parent_ref, follow_link, &file_ref, error_path, sizeof(error_path)); +foundfile: if ((rc == 0) && (flags & O_EXCL) && (flags & O_CREAT)) { /* File was found but EXCLUSIVE so fail */ @@ -482,12 +610,14 @@ pvfs_descriptor *iocommon_open(const char *path, /* try to open using glibc */ rc = (*glibc_ops.open)(error_path, flags & 01777777, mode); IOCOMMON_RETURN_ERR(rc); - pd = pvfs_alloc_descriptor(&glibc_ops, -1, NULL); + pd = pvfs_alloc_descriptor(&glibc_ops, -1, NULL, 0); pd->is_in_use = PVFS_FS; /* indicate fd is valid! */ pd->true_fd = rc; - pd->flags = flags; /* open flags */ + pd->s->flags = flags; /* open flags */ fstat(rc, &sbuf); - pd->mode = sbuf.st_mode; + pd->s->mode = sbuf.st_mode; + gen_mutex_unlock(&pd->s->lock); + gen_mutex_unlock(&pd->lock); goto errorout; /* not really an error, but bailing out */ } if (errno != ENOENT || !(flags & O_CREAT)) @@ -499,6 +629,7 @@ pvfs_descriptor *iocommon_open(const char *path, /* file not found but create flag */ /* clear errno, it was not an error */ errno = orig_errno; + errno = 0; rc = iocommon_create_file(filename, mode, file_creation_param, @@ -515,6 +646,7 @@ pvfs_descriptor *iocommon_open(const char *path, * created by a different process * just open it */ + errno = 0; rc = iocommon_lookup_relative(filename, parent_ref, follow_link, @@ -529,52 +661,56 @@ pvfs_descriptor *iocommon_open(const char *path, /* Translate the pvfs reference into a file descriptor */ /* Set the file information */ /* create fd object */ - pd = pvfs_alloc_descriptor(&pvfs_ops, -1, &file_ref); + pd = pvfs_alloc_descriptor(&pvfs_ops, -1, &file_ref, 0); if (!pd) { rc = -1; goto errorout; } - pd->flags = flags; /* open flags */ + pd->s->flags = flags; /* open flags */ pd->is_in_use = PVFS_FS; /* indicate fd is valid! */ /* Get the file's type information from its attributes */ - rc = PVFS_sys_getattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_getattr(pd->s->pvfs_ref, PVFS_ATTR_SYS_ALL_NOHINT, credentials, &attributes_resp, NULL); IOCOMMON_CHECK_ERR(rc); - pd->mode = attributes_resp.attr.perms; /* this may change */ + pd->s->mode = attributes_resp.attr.perms; /* this may change */ if (attributes_resp.attr.objtype == PVFS_TYPE_METAFILE) { - pd->mode |= S_IFREG; + pd->s->mode |= S_IFREG; } if (attributes_resp.attr.objtype == PVFS_TYPE_DIRECTORY) { - pd->mode |= S_IFDIR; + pd->s->mode |= S_IFDIR; if (pdir) { - pd->dpath = (char *)malloc(strlen(pdir->dpath) + strlen(path) + 2); - strcpy(pd->dpath, pdir->dpath); - strcat(pd->dpath, "/"); - strcat(pd->dpath, path); + pd->s->dpath = (char *)malloc(strlen(pdir->s->dpath) + strlen(path) + 2); + strcpy(pd->s->dpath, pdir->s->dpath); + strcat(pd->s->dpath, "/"); + strcat(pd->s->dpath, path); } else { - pd->dpath = (char *)malloc(strlen(path) + 1); - strcpy(pd->dpath, path); + pd->s->dpath = (char *)malloc(strlen(path) + 1); + strcpy(pd->s->dpath, path); } } if (attributes_resp.attr.objtype == PVFS_TYPE_SYMLINK) { - pd->mode |= S_IFLNK; + pd->s->mode |= S_IFLNK; } + gen_mutex_unlock(&pd->s->lock); + gen_mutex_unlock(&pd->lock); /* Truncate the file if neccesary */ if (flags & O_TRUNC) { + errno = 0; rc = PVFS_sys_truncate(file_ref, 0, credentials, NULL); IOCOMMON_CHECK_ERR(rc); } @@ -618,6 +754,7 @@ int iocommon_truncate(PVFS_object_ref file_ref, off64_t length) pvfs_sys_init(); iocommon_cred(&credentials); + errno = 0; rc = PVFS_sys_truncate(file_ref, length, credentials, NULL); IOCOMMON_CHECK_ERR(rc); @@ -640,16 +777,17 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, errno = EBADF; return -1; } + gen_mutex_lock(&pd->s->lock); switch(whence) { case SEEK_SET: { - pd->file_pointer = (offset * unit_size); + pd->s->file_pointer = (offset * unit_size); break; } case SEEK_CUR: { - pd->file_pointer += (offset * unit_size); + pd->s->file_pointer += (offset * unit_size); break; } case SEEK_END: @@ -660,13 +798,14 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, memset(&attributes_resp, 0, sizeof(attributes_resp)); iocommon_cred(&credentials); /* Get the file's size in bytes as the ending offset */ - rc = PVFS_sys_getattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_getattr(pd->s->pvfs_ref, PVFS_ATTR_SYS_SIZE, credentials, &attributes_resp, NULL); IOCOMMON_CHECK_ERR(rc); - pd->file_pointer = attributes_resp.attr.size + (offset * unit_size); + pd->s->file_pointer = attributes_resp.attr.size + (offset * unit_size); break; } default: @@ -674,9 +813,10 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, errno = EINVAL; goto errorout; } - } + + /* Sum the individal segment sizes */} /* if this is a directory adjust token, the hard way */ - if (S_ISDIR(pd->mode)) + if (S_ISDIR(pd->s->mode)) { int dirent_no; PVFS_credentials *credentials; @@ -684,23 +824,25 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, memset(&readdir_resp, 0, sizeof(readdir_resp)); iocommon_cred(&credentials); - dirent_no = pd->file_pointer / sizeof(PVFS_dirent); - pd->file_pointer = dirent_no * sizeof(PVFS_dirent); - pd->token = PVFS_READDIR_START; + dirent_no = pd->s->file_pointer / sizeof(PVFS_dirent); + pd->s->file_pointer = dirent_no * sizeof(PVFS_dirent); + pd->s->token = PVFS_READDIR_START; if(dirent_no) { - rc = PVFS_sys_readdir(pd->pvfs_ref, - pd->token, + errno = 0; + rc = PVFS_sys_readdir(pd->s->pvfs_ref, + pd->s->token, dirent_no, credentials, &readdir_resp, NULL); IOCOMMON_CHECK_ERR(rc); - pd->token = readdir_resp.token; + pd->s->token = readdir_resp.token; free(readdir_resp.dirent_array); } } - return pd->file_pointer; + gen_mutex_unlock(&pd->s->lock); + return pd->s->file_pointer; errorout: return -1; @@ -737,6 +879,7 @@ int iocommon_remove (const char *path, if (!pdir) { + errno = 0; rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -744,6 +887,7 @@ int iocommon_remove (const char *path, { if (parentdir) { + errno = 0; rc = iocommon_lookup_relative(parentdir, *pdir, PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -755,10 +899,12 @@ int iocommon_remove (const char *path, } /* need to verify this is a file or symlink */ + errno = 0; rc = iocommon_lookup_relative(file, parent_ref, PVFS2_LOOKUP_LINK_NO_FOLLOW, &file_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); + errno = 0; rc = iocommon_getattr(file_ref, &attr, PVFS_ATTR_SYS_TYPE); IOCOMMON_RETURN_ERR(rc); @@ -775,6 +921,7 @@ int iocommon_remove (const char *path, /* should check to see if any process has file open */ /* but at themoment we don't have a way to do that */ + errno = 0; rc = PVFS_sys_remove(file, parent_ref, credentials, PVFS_HINT_NULL); IOCOMMON_CHECK_ERR(rc); @@ -836,6 +983,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, if (!oldpdir) { + errno = 0; rc = iocommon_lookup_absolute(olddir, &oldref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -843,6 +991,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, { if (olddir) { + errno = 0; rc = iocommon_lookup_relative(olddir, *oldpdir, PVFS2_LOOKUP_LINK_FOLLOW, &oldref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -856,6 +1005,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, IOCOMMON_RETURN_ERR(rc); if (!newpdir) { + errno = 0; rc = iocommon_lookup_absolute(newdir, &newref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -863,6 +1013,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, { if (newdir) { + errno = 0; rc = iocommon_lookup_relative(newdir, *newpdir, PVFS2_LOOKUP_LINK_FOLLOW, &newref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -872,6 +1023,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, newref = *newpdir; } } + errno = 0; rc = PVFS_sys_rename(oldname, oldref, newname, newref, creds, hints); IOCOMMON_CHECK_ERR(rc); @@ -895,260 +1047,529 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, return rc; } -/*The Wrapper Fuction calls to the "nocache" version of - * io_common_readorwrite (below) +#if PVFS_UCACHE_ENABLE +/* Returns how many copy operations to/from the ucache will need to be + * completed. */ -/** do a blocking read or write, possibly utilizing the user cache. - * - */ -int iocommon_readorwrite(enum PVFS_io_type which, - pvfs_descriptor *pd, - PVFS_size offset, - void *buf, - PVFS_Request mem_req, - PVFS_Request file_req, - size_t count, - const struct iovec *vector) +static int calc_copy_op_cnt( + off64_t offset, /* offset into file where transfer should begin */ + size_t req_size, /* total Request Size */ + int req_blk_cnt, /* requested Block Count */ + size_t iovec_count, /* number of iovecs in vector */ + const struct iovec *vector /* pointer to array of iovecs */ +) { - /* Incorporate this elsewhere to enable/disable caching */ - int USE_CACHE = (int)(ucache!=0 && ucache_locks!=0); - /* Eventually, a per file flag */ - int CACHE_FILE = 1; - - if(!USE_CACHE || !CACHE_FILE) - { - /* Bypass the ucache */ - return iocommon_readorwrite_nocache(which, pd, offset, buf, mem_req, - file_req); - } - int rc = 0; - int tag_cnt = 0; - uint64_t remainder = 0; - uint32_t blk_size = CACHE_BLOCK_SIZE_K * 1024; - uint64_t pos = 0; - uint64_t end = offset + count; - PVFS_fs_id *fs_id = &(pd->pvfs_ref.fs_id); - PVFS_handle *handle = &(pd->pvfs_ref.handle); - /* Used to determine if we finished writing a block without filling up the - * current io segment - */ - unsigned char scratch = 0; - /* The offset into the last io semgment that was partially used (so use - * this ptr then move on to the next io segment) . - */ - void *scratch_ptr = 0; - uint64_t scratch_left = 0; - int iovec_ndx = 0; - uint32_t block_ndx = 0; + int copy_count = 0; /* The number of memcpy operations to be completed */ + size_t size_left = req_size; /* Bytes left to convert to copy ops */ + size_t iovec_left = vector[0].iov_len; /* bytes left in this iovec */ + int vec_ndx = 0; /* Index into iovec array */ + /* Compute the size of the first block to be transfered */ + size_t block_size_to_transfer = CACHE_BLOCK_SIZE - (offset % CACHE_BLOCK_SIZE); - /* How many tags? */ - tag_cnt = count / (CACHE_BLOCK_SIZE_K * 1024); - - /* Add 2 to be sure we have enough tags (may not need them) */ - tag_cnt += 2; - - /* Array of the tags we need to read/write to */ - uint64_t tags[tag_cnt]; - - remainder = offset % blk_size; - - /* Block Aligned */ - if(remainder == 0) - { - tags[0] = offset; - } - else - { - tags[0] = offset - remainder; - } - - /* Loop over positions storing tags (ment identifiers) */ - pos = tags[0] + blk_size; int i; - for(i = 1; pos < end; i++) + /* For every block identify source and destination locations in memory and + * size of transfer between the ucache and memory buffer while maintaining: + * the size left in the request, the size left in the current iovec + * segment, the size left in the current block, and which iovec segment is + * currently being considered. + */ + for(i = 0; i < req_blk_cnt; i++) { - tags[i] = pos; - pos += blk_size; - } + size_t block_left = block_size_to_transfer; + while(block_left != 0) + { + /* block_left is the limiting factor */ + if(iovec_left > block_left) + { + size_left -= block_left; + iovec_left -= block_left; + block_left = 0; /* Done with this block */ + } + /* iovec_left is the limiting factor */ + else if(iovec_left < block_left) + { + size_left -= iovec_left; + block_left -= iovec_left; + vec_ndx++; /* Done with this iovec */ + if(vec_ndx < iovec_count) + { + iovec_left = vector[vec_ndx].iov_len; + } + } + /* This transfer operation would complete both */ + else /* They must be equal */ + { + size_left -= iovec_left; + block_left = 0; + vec_ndx++; /* Done with this iovec and block */ - /* This should represent the number of blks */ - tag_cnt = i - 1; + /* Only set the next iovec_left if one is available */ + if(vec_ndx < iovec_count) + { + iovec_left = vector[vec_ndx].iov_len; + } + } + /* Increment the number of the memcpy calls that will need to be + * performed + */ + copy_count++; + } - /* Now that tags are set build array of lookup responses*/ - unsigned char hits[tag_cnt]; - for(i = 0; i < tag_cnt; i++) - { - /* if lookup returns nil set char to 0, otherwise 1 */ - if(ucache_lookup(fs_id, handle, tags[i], NULL) == (void *)NIL) + /* Break when there are no more bytes to be read/written so that the + * following if/else code block won't been run unless there is another + * block of data to be transfered. */ + if(size_left == 0) + { + break; + } + + if(size_left >= CACHE_BLOCK_SIZE) { - hits[tag_cnt] = 0; /* miss */ + /* Must transfer full block */ + block_size_to_transfer = CACHE_BLOCK_SIZE; } - else{ - hits[tag_cnt] = 1; /* hit */ + else + { + /* size_left is less than a full block's size, so size_left is all + * that needs to be transfered to/from this block + */ + block_size_to_transfer = size_left; } } + /* Finally, return the number of memcpy operations that must be completed + * to satisfy this request. + */ + return copy_count; +} - //Could do this serially or in parallel - uint64_t block_loc = 0; - for(i = 0; i < tag_cnt; i++) +/** + * Provided two ucache related structures ureq and ucop, determine the + * reads/writes to be completed between the ucache and user memory (vector). + */ +void calc_copy_ops( + off64_t offset, + size_t req_size, + struct ucache_req_s *ureq, + struct ucache_copy_s *ucop, + int copy_count, + const struct iovec *vector +) +{ + int ureq_ndx = 0; + int vec_ndx = 0; + size_t size_left = req_size; + size_t blk_tfer_size = CACHE_BLOCK_SIZE - (offset % CACHE_BLOCK_SIZE); + size_t blk_left = blk_tfer_size; + size_t vec_left = vector[0].iov_len; + int i; + for(i = 0; i < copy_count; i++) { - if(which == 1) /* Read */ + /* Record necessary info for the future memcpy operation */ + if(i == 0) { - if(hits[i] == 1) /* Hit */ + ucop[i].cache_pos = ureq[ureq_ndx].ublk_ptr + + (offset % CACHE_BLOCK_SIZE); + } + else + { + ucop[i].cache_pos = ureq[ureq_ndx].ublk_ptr + + (blk_tfer_size - blk_left); + } + ucop[i].buff_pos = vector[vec_ndx].iov_base + + (vector[vec_ndx].iov_len - vec_left); + ucop[i].hit = ureq[ureq_ndx].ublk_hit; + ucop[i].blk_index = ureq[ureq_ndx].ublk_index; + + if(vec_left > blk_left) /* Finish block */ + { + ucop[i].size = blk_left; + vec_left -= blk_left; + size_left -= blk_left; + if(size_left >= CACHE_BLOCK_SIZE) { - /* Read from Cache */ - //instead of looking up again, save lookup somehow - block_loc = (voidp_t)ucache_lookup(fs_id, handle, tags[i], &block_ndx); - lock_lock(ucache_lock); - lock_lock(&ucache_block_lock[block_ndx]); - rc = place_data(1, block_loc, vector, &iovec_ndx, - &scratch, &scratch_ptr, &scratch_left); - lock_unlock(&ucache_block_lock[block_ndx]); - lock_unlock(ucache_lock); + blk_tfer_size = CACHE_BLOCK_SIZE; + blk_left = blk_tfer_size; } - else /* Miss */ + else { - /* read from fs into user mem */ - rc = iocommon_readorwrite_nocache(which, pd, offset, - buf, mem_req, file_req); - if(rc > 0) - { - block_loc = (voidp_t)ucache_insert(fs_id, handle, tags[i], - &block_ndx); - } - /* Copy into cache if possible */ - if(block_loc != (uint64_t)NIL) - { - lock_lock(ucache_lock); - lock_lock(&ucache_block_lock[block_ndx]); - rc = place_data(2, block_loc, vector, &iovec_ndx, - &scratch, &scratch_ptr, &scratch_left); - lock_unlock(&ucache_block_lock[block_ndx]); - lock_unlock(ucache_lock); - } + blk_tfer_size = size_left; + blk_left = blk_tfer_size; } + ureq_ndx++; + } + else if(vec_left < blk_left) /* Finish iovec */ + { + ucop[i].size = vec_left; + blk_left -= vec_left; + size_left -= vec_left; + vec_ndx++; + vec_left = vector[vec_ndx].iov_len; } - else if(which == 2) /* Write */ + else /* They must be equal - finish both */ { - if(hits[i] == 1) /* Hit */ + ucop[i].size = blk_left; + size_left -= blk_left; + if(size_left >= CACHE_BLOCK_SIZE) { - /* Overwrite block in cache */ - /* //or use previous return value */ - block_loc = (voidp_t)ucache_lookup(fs_id, handle, tags[i], &block_ndx); - lock_lock(ucache_lock); - lock_lock(&ucache_block_lock[block_ndx]); - rc = place_data(2, block_loc, vector, &iovec_ndx, - &scratch, &scratch_ptr, &scratch_left); - lock_unlock(&ucache_block_lock[block_ndx]); - lock_unlock(ucache_lock); + blk_tfer_size = CACHE_BLOCK_SIZE; + blk_left = blk_tfer_size; } - else /* Miss */ + else { - /* Attempt ucache insert, on fail, send to file system */ - block_loc = (voidp_t)ucache_insert(fs_id, handle, tags[i], &block_ndx); - if(block_loc != (uint64_t)NIL) - { - lock_lock(ucache_lock); - lock_lock(&ucache_block_lock[block_ndx]); - rc = place_data(2, block_loc, vector, &iovec_ndx, - &scratch, &scratch_ptr, &scratch_left); - lock_unlock(&ucache_block_lock[block_ndx]); - lock_unlock(ucache_lock); - } - else - { - rc = iocommon_readorwrite_nocache(which, pd, offset, - buf, mem_req, file_req); - } + blk_tfer_size = size_left; + blk_left = blk_tfer_size; } + vec_ndx++; + vec_left = vector[vec_ndx].iov_len; + ureq_ndx++; } } - return rc; } -/** TODO - * 1: read, read from user cache and write to user mem - * 2: write, read from user mem and write to user cache - */ -uint32_t place_data(enum PVFS_io_type which, const uint64_t block, - const struct iovec *vector, - int *iovec_ndx, unsigned char *scratch, - void **scratch_ptr, uint64_t *scratch_left) +static int cache_readorwrite( + enum PVFS_io_type which, + struct ucache_copy_s * ucop +) { - const uint64_t block_size = CACHE_BLOCK_SIZE_K * 1024; - /* Bytes of block remaining to be read/written */ - uint64_t left = CACHE_BLOCK_SIZE_K * 1024; - void *user_mem = 0; /* Where to read/write */ - uint64_t user_mem_size = 0; /* How much to read/write */ + int rc = 0; + if(which == PVFS_IO_READ) + { + /* Copy from cache to user mem */ + memcpy(ucop->buff_pos, ucop->cache_pos, ucop->size); + rc = (int)ucop->size; + } + else + { + /* Copy from user mem to cache */ + memcpy(ucop->cache_pos, ucop->buff_pos, ucop->size); + rc = (int)ucop->size; + } + return rc; +} - /* Continue read/writing strips of data until the whole block completed */ - while(left != 0) +int calc_req_blk_cnt(uint64_t offset, size_t req_size) +{ + /* Check for zero sized request */ + if(req_size == 0) + { + return 0; + } + /* Check to see if request is less than a full block */ + if(req_size < CACHE_BLOCK_SIZE && (offset % CACHE_BLOCK_SIZE) == 0) + { + return 1; + } + /* Count next blocks */ + size_t req_left = req_size - (CACHE_BLOCK_SIZE - + (offset % CACHE_BLOCK_SIZE)); + int blk_cnt = req_left / CACHE_BLOCK_SIZE; + + /* Account for last block if necessary */ + if((req_left - (blk_cnt * CACHE_BLOCK_SIZE)) != 0) + { + blk_cnt++; + } + + return (blk_cnt + 1); /* Add one to account for first block */ +} + +#endif /* PVFS_UCACHE_ENABLE */ + +/** Do a blocking read or write, possibly utilizing the user cache. + * Returns -1 on error, some positive value on success; + */ +int iocommon_readorwrite(enum PVFS_io_type which, + pvfs_descriptor *pd, + PVFS_size offset, + size_t iovec_count, + const struct iovec *vector) +{ + int rc = 0; +#if PVFS_UCACHE_ENABLE + if(ucache_enabled) { - /* Do we need to use the scratch_ptr or a fresh segment */ - if(*scratch) + if(!pd->s->fent) { - /* Use a previously used buffer that wasn't quite filled by the - * previous cache block. - */ - user_mem = *scratch_ptr; - user_mem_size = *scratch_left; - *scratch = 0; + lock_lock(ucache_lock); + ucache_stats->pseudo_misses++; /* could overflow */ + these_stats.pseudo_misses++; + lock_unlock(ucache_lock); } - else + } + + if(!ucache_enabled || !pd->s->fent) + { +#endif /* PVFS_UCACHE_ENABLE */ + + /* Bypass the ucache */ + errno = 0; + rc = iocommon_vreadorwrite(which, &pd->s->pvfs_ref, offset, + iovec_count, vector); + return rc; +#if PVFS_UCACHE_ENABLE + } + + + /* define all the values we'll need to fill the ucache_req_s struct */ + int i; /* index used for 'for loops' */ + int req_blk_cnt = 0; /* how many blocks to r/w */ + size_t req_size = 0; /* size in bytes of r/w */ + + /* How many bytes is the request? */ + /* These will be contiguous in file starting at offset. */ + /* Also, they may be spread in out memory */ + /* Sum the individal segment sizes */ + for (i = 0; i < iovec_count; i++) + { + req_size += vector[i].iov_len; + } + + if(req_size == 0) + { + return 0; + } + + struct file_ent_s *fent = pd->s->fent; + struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + int mtbl_data_size = 0; + if(which == PVFS_IO_WRITE) + { + mtbl_data_size = CACHE_BLOCK_SIZE * mtbl->num_blocks; + } + + /* If the ucache request threshold is exceeded, flush and evict file, then + * peform nocache version of readorwrite */ + if((mtbl_data_size + req_size) > UCACHE_MAX_REQ) + { + /* Flush dirty blocks */ + rc = ucache_flush_file(pd->s->fent); + if(rc != 0) { - user_mem = vector[*iovec_ndx].iov_base; - user_mem_size = vector[*iovec_ndx].iov_len; + rc = -1; } - /* Will this transfer complete the block but not the user mem segment */ - if(user_mem_size > left) + /*TODO Possibly remove the file - bad idea? What if it's referenced? */ + + /* Bypass the ucache */ + rc = iocommon_vreadorwrite(which, &pd->s->pvfs_ref, offset, + iovec_count, vector); + return rc; + } + + /* Keep a running count of the bytes transfered */ + int transfered = 0; + + /* How many tags? */ + uint64_t start_tag = offset - (offset % CACHE_BLOCK_SIZE); + /* End_tag isn't really the last tag if the blk is alligned. + * This value is used to determine the req_blk_cnt only. + */ + uint64_t end_tag = 0; + end_tag = (offset + req_size) - ((offset + req_size) % CACHE_BLOCK_SIZE); + req_blk_cnt = calc_req_blk_cnt(offset, req_size); + + /* Now that we know the req_blk_cnt, allocate the required + * space for tags, hits boolean, and ptr to block in ucache shared memory. + */ + struct ucache_req_s ureq[req_blk_cnt]; + ureq[0].ublk_tag = start_tag; + /* Loop over positions storing tags (ment identifiers) */ + for(i = 1; i < req_blk_cnt; i++) + { + ureq[i].ublk_tag = ureq[ (i - 1) ].ublk_tag + CACHE_BLOCK_SIZE; + } + + /* Now that tags are set fill in array of lookup responses */ + for(i = 0; i < req_blk_cnt; i++) + { + /* if lookup returns nil set char to 0, otherwise 1 */ + ureq[i].ublk_ptr = ucache_lookup(pd->s->fent, ureq[i].ublk_tag, + &(ureq[i].ublk_index)); + if(ureq[i].ublk_ptr == (void *)NIL) { - /* Save a reference to where we left off with this segment*/ - *scratch_ptr = (void *)(user_mem + left); - *scratch_left = user_mem_size - left; - *scratch = 1; + lock_lock(ucache_lock); + ucache_stats->misses++; /* could overflow */ + these_stats.misses++; + lock_unlock(ucache_lock); + ureq[i].ublk_hit = 0; /* miss */ + /* Find a place for the block */ + ureq[i].ublk_ptr = ucache_insert(pd->s->fent, ureq[i].ublk_tag, + &(ureq[i].ublk_index)); + if((uint64_t)ureq[i].ublk_ptr == -1) + { + /* Cannot cache the rest of this file */ + } + assert(ureq[i].ublk_ptr != (void *)NILP); } else { - /* We're done with this user mem segment */ - (*iovec_ndx)++; + lock_lock(ucache_lock); + ucache_stats->hits++; /* could overflow */ + these_stats.hits++; + lock_unlock(ucache_lock); + ureq[i].ublk_hit = 1; /* hit */ } + } - /* More Data! */ - if(which == 1) + if(which == PVFS_IO_READ) + { + /* Loop over ureq structure and perform reads on misses */ + for(i = 0; i < req_blk_cnt; i++) { - /* Read */ - memcpy(user_mem, (void *)(voidp_t)(block + (block_size - left)), (size_t)user_mem_size); + if(ureq[i].ublk_hit == 0) + { + /* Perform read */ + /* read single block from fs and write into ucache */ + struct iovec cache_vec = {ureq[i].ublk_ptr, CACHE_BLOCK_SIZE}; + lock_lock(get_lock(ureq[i].ublk_index)); + rc = iocommon_vreadorwrite(PVFS_IO_READ, + &pd->s->pvfs_ref, + ureq[i].ublk_tag, + 1, + &cache_vec); + lock_unlock(get_lock(ureq[i].ublk_index)); + } } - else + } + + /* Read beginning and end blks into cache before writing if + * either end of the request are unalligned. + */ + if(which == PVFS_IO_WRITE) /* Write */ + { + /* Consult ureq to see if block was hit or missed */ + /* Also see if block was alligned or not */ + if((ureq[0].ublk_hit == 0) && (offset != ureq[0].ublk_tag)) + { + /* Read first block from fs into ucache */ + struct iovec vector = {ureq[0].ublk_ptr, CACHE_BLOCK_SIZE}; + lock_lock(get_lock(ureq[0].ublk_index)); + rc = iocommon_vreadorwrite(PVFS_IO_READ, + &pd->s->pvfs_ref, + ureq[0].ublk_tag, + 1, + &vector); + lock_unlock(get_lock(ureq[0].ublk_index)); + } + if( req_blk_cnt > 1 && + (ureq[req_blk_cnt - 1].ublk_hit == 0) && + (((offset + req_size) % CACHE_BLOCK_SIZE) != 0) + ) { - /* Write */ - memcpy((void*)(voidp_t)(block + (block_size - left)), user_mem, (size_t)user_mem_size); + /* Read last block from fs into ucache */ + struct iovec vector = {ureq[req_blk_cnt - 1].ublk_ptr, + CACHE_BLOCK_SIZE}; + lock_lock(get_lock(ureq[req_blk_cnt - 1].ublk_index)); + rc = iocommon_vreadorwrite(PVFS_IO_READ, + &pd->s->pvfs_ref, + ureq[req_blk_cnt - 1].ublk_tag, + 1, + &vector); + lock_unlock(get_lock(ureq[req_blk_cnt - 1].ublk_index)); } + } + + /* At this point we know how many blocks the request will cover, the tags + * (indexes into file) of the blocks, whether the corresponding block was + * hit, and the ptr to the corresponding blk in memory. The blocks are also + * locked at this point. They will be unlocked as reads/writes happen. + */ + + /* If only one iovec then we can assume there will be req_blk_cnt + * memcpy operations, otherwise we need to determine how many + * memcpy operations will be required so we can create the ucache_copy_s + * struct array of proper length. + */ + int copy_count = 0; + if(iovec_count == 1) + { + copy_count = req_blk_cnt; + } + else + { + copy_count = calc_copy_op_cnt(offset, req_size, req_blk_cnt, + iovec_count, vector); + } + + /* Create copy structure and fill with appropriate values */ + struct ucache_copy_s ucop[copy_count]; + calc_copy_ops(offset, req_size, &ureq[0], &ucop[0], copy_count, vector); + + /* The ucache copy structure should now be filled and we can procede with + * the necessary memcpy operations. + */ + for(i = 0; i < copy_count; i++) + { + /* perform copy operation */ + lock_lock(get_lock(ureq[i].ublk_index)); + transfered += cache_readorwrite(which, &ucop[i]); + /* Unlock the block */ + lock_unlock(get_lock(ureq[i].ublk_index)); + } + rc = transfered; + +#endif /* PVFS_UCACHE_ENABLE */ + return rc; +} + +/** do a blocking read or write from an iovec + * this just converts to PVFS Request notation + * other interfaces can still do direct reads to + * RorW_nocache below + */ +int iocommon_vreadorwrite(enum PVFS_io_type which, + PVFS_object_ref *por, + PVFS_size offset, + size_t count, + const struct iovec *vector) +{ + int rc = 0; + int i, size = 0; + void *buf; + PVFS_Request mem_req; + PVFS_Request file_req; - left -= user_mem_size; + for(i = 0; i < count; i++) + { + size += vector[i].iov_len; } - return 1; + + if(size == 0) + { + return 0; + } + + rc = PVFS_Request_contiguous(size, PVFS_BYTE, &file_req); + rc = pvfs_convert_iovec(vector, count, &mem_req, &buf); + rc = iocommon_readorwrite_nocache(which, + por, + offset, + buf, + mem_req, + file_req); + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); + + return rc; } /** do a blocking read or write - * + * all sync reads or writes to disk come here */ int iocommon_readorwrite_nocache(enum PVFS_io_type which, - pvfs_descriptor *pd, + PVFS_object_ref *por, PVFS_size offset, void *buf, PVFS_Request mem_req, PVFS_Request file_req) - //returned by nonblocking operations { int rc = 0; int orig_errno = errno; PVFS_credentials *creds; PVFS_sysresp_io io_resp; - if (!pd || pd->is_in_use != PVFS_FS) + if (!por) { errno = EBADF; return -1; @@ -1156,17 +1577,10 @@ int iocommon_readorwrite_nocache(enum PVFS_io_type which, /* Initialize */ memset(&io_resp, 0, sizeof(io_resp)); - //Ensure descriptor is used for the correct type of access - if ((which==PVFS_IO_READ && (O_WRONLY == (pd->flags & O_ACCMODE))) || - (which==PVFS_IO_WRITE && (O_RDONLY == (pd->flags & O_ACCMODE)))) - { - errno = EBADF; - return -1; - } - iocommon_cred(&creds); - rc = PVFS_sys_io(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_io(*por, file_req, offset, buf, @@ -1244,8 +1658,8 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, return -1; } //Ensure descriptor is used for the correct type of access - if ((which==PVFS_IO_READ && (O_WRONLY == (pd->flags & O_ACCMODE))) || - (which==PVFS_IO_WRITE && (O_RDONLY == (pd->flags & O_ACCMODE)))) + if ((which==PVFS_IO_READ && (O_WRONLY == (pd->s->flags & O_ACCMODE))) || + (which==PVFS_IO_WRITE && (O_RDONLY == (pd->s->flags & O_ACCMODE)))) { errno = EBADF; return PVFS_FD_FAILURE; @@ -1256,9 +1670,10 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, iocommon_cred(&credentials); - rc = PVFS_isys_io(pd->pvfs_ref, + errno = 0; + rc = PVFS_isys_io(pd->s->pvfs_ref, file_req, - pd->file_pointer+extra_offset, + pd->s->file_pointer+extra_offset, buf, contig_memory_req, credentials, @@ -1272,7 +1687,9 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, assert(*ret_op_id!=-1);//TODO: handle this PVFS_Request_size(contig_memory_req, &req_size); - pd->file_pointer += req_size; + gen_mutex_lock(&pd->s->lock); + pd->s->file_pointer += req_size; + gen_mutex_unlock(&pd->s->lock); *ret_memory_req = contig_memory_req; return 0; @@ -1297,6 +1714,7 @@ int iocommon_getattr(PVFS_object_ref obj, PVFS_sys_attr *attr, uint32_t mask) iocommon_cred(&credentials); /* now get attributes */ + errno = 0; rc = PVFS_sys_getattr(obj, mask, credentials, @@ -1341,12 +1759,13 @@ int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask) /* Initialize */ memset(&attr, 0, sizeof(attr)); - rc = iocommon_getattr(pd->pvfs_ref, &attr, mask); + errno = 0; + rc = iocommon_getattr(pd->s->pvfs_ref, &attr, mask); IOCOMMON_RETURN_ERR(rc); /* copy attributes into standard stat struct */ - buf->st_dev = pd->pvfs_ref.fs_id; - buf->st_ino = pd->pvfs_ref.handle; + buf->st_dev = pd->s->pvfs_ref.fs_id; + buf->st_ino = pd->s->pvfs_ref.handle; buf->st_mode = attr.perms; if (attr.objtype == PVFS_TYPE_METAFILE) { @@ -1366,7 +1785,10 @@ int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask) buf->st_rdev = 0; /* no dev special files */ buf->st_size = attr.size; buf->st_blksize = attr.blksize; - buf->st_blocks = 0; /* don't have blocks at this time */ + if (attr.blksize) + { + buf->st_blocks = (attr.size + (attr.blksize - 1)) / attr.blksize; + } buf->st_atime = attr.atime; buf->st_mtime = attr.mtime; buf->st_ctime = attr.ctime; @@ -1392,12 +1814,13 @@ int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask) /* Initialize */ memset(&attr, 0, sizeof(attr)); - rc = iocommon_getattr(pd->pvfs_ref, &attr, mask); + errno = 0; + rc = iocommon_getattr(pd->s->pvfs_ref, &attr, mask); IOCOMMON_RETURN_ERR(rc); /* copy attributes into standard stat struct */ - buf->st_dev = pd->pvfs_ref.fs_id; - buf->st_ino = pd->pvfs_ref.handle; + buf->st_dev = pd->s->pvfs_ref.fs_id; + buf->st_ino = pd->s->pvfs_ref.handle; buf->st_mode = attr.perms; if (attr.objtype == PVFS_TYPE_METAFILE) { @@ -1417,7 +1840,10 @@ int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask) buf->st_rdev = 0; /* no dev special files */ buf->st_size = attr.size; buf->st_blksize = attr.blksize; - buf->st_blocks = 0; /* don't have blocks at this time */ + if (attr.blksize) + { + buf->st_blocks = (attr.size + (attr.blksize - 1)) / attr.blksize; + } buf->st_atime = attr.atime; buf->st_mtime = attr.mtime; buf->st_ctime = attr.ctime; @@ -1450,7 +1876,8 @@ int iocommon_chown(pvfs_descriptor *pd, uid_t owner, gid_t group) attr.mask |= PVFS_ATTR_SYS_GID; } - rc = iocommon_setattr(pd->pvfs_ref, &attr); + errno = 0; + rc = iocommon_setattr(pd->s->pvfs_ref, &attr); return rc; } @@ -1470,7 +1897,8 @@ int iocommon_chmod(pvfs_descriptor *pd, mode_t mode) attr.perms = mode & 07777; /* mask off any stray bits */ attr.mask = PVFS_ATTR_SYS_PERM; - rc = iocommon_setattr(pd->pvfs_ref, &attr); + errno = 0; + rc = iocommon_setattr(pd->s->pvfs_ref, &attr); return rc; } @@ -1505,6 +1933,7 @@ int iocommon_make_directory(const char *pvfs_path, /* lookup parent */ if (!pdir) { + errno = 0; rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -1512,6 +1941,7 @@ int iocommon_make_directory(const char *pvfs_path, { if (parentdir) { + errno = 0; rc = iocommon_lookup_relative(parentdir, *pdir, PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -1528,6 +1958,7 @@ int iocommon_make_directory(const char *pvfs_path, attr.perms = mode & 07777; /* mask off stray bits */ attr.mask = (PVFS_ATTR_SYS_ALL_SETABLE); + errno = 0; rc = PVFS_sys_mkdir(filename, parent_ref, attr, @@ -1559,8 +1990,9 @@ int iocommon_readlink(pvfs_descriptor *pd, char *buf, int size) } /* Initialize any variables */ memset(&attr, 0, sizeof(attr)); - - rc = iocommon_getattr(pd->pvfs_ref, &attr, PVFS_ATTR_SYS_TYPE | + + errno = 0; + rc = iocommon_getattr(pd->s->pvfs_ref, &attr, PVFS_ATTR_SYS_TYPE | PVFS_ATTR_SYS_LNK_TARGET); IOCOMMON_RETURN_ERR(rc); @@ -1609,6 +2041,7 @@ int iocommon_symlink(const char *pvfs_path, /* where new linkis created */ /* lookup parent */ if (!pdir) { + errno = 0; rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -1616,6 +2049,7 @@ int iocommon_symlink(const char *pvfs_path, /* where new linkis created */ { if (parentdir) { + errno = 0; rc = iocommon_lookup_relative(parentdir, *pdir, PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -1632,6 +2066,7 @@ int iocommon_symlink(const char *pvfs_path, /* where new linkis created */ attr.perms = 0777; attr.mask = (PVFS_ATTR_SYS_ALL_SETABLE); + errno = 0; rc = PVFS_sys_symlink(filename, parent_ref, (char *)link_target, @@ -1671,12 +2106,12 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ errno = EBADF; return -1; } - if (pd->token == PVFS_READDIR_END) + if (pd->s->token == PVFS_READDIR_END) { - return -1; /* EOF */ + return 0; /* EOF */ } - if (!S_ISDIR(pd->mode)) + if (!S_ISDIR(pd->s->mode)) { errno = ENOENT; return -1; @@ -1687,7 +2122,8 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ iocommon_cred(&credentials); - token = pd->token == 0 ? PVFS_READDIR_START : pd->token; + gen_mutex_lock(&pd->s->lock); + token = pd->s->token == 0 ? PVFS_READDIR_START : pd->s->token; /* posix deals in bytes in buffer and bytes read */ /* PVFS deals in number of records to read or were read */ @@ -1696,7 +2132,8 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ { count = PVFS_REQ_LIMIT_DIRENT_COUNT; } - rc = PVFS_sys_readdir(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_readdir(pd->s->pvfs_ref, token, count, credentials, @@ -1704,24 +2141,26 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ NULL); IOCOMMON_CHECK_ERR(rc); - pd->token = readdir_resp.token; + pd->s->token = readdir_resp.token; name_max = PVFS_util_min(NAME_MAX, PVFS_NAME_MAX); for(i = 0; i < readdir_resp.pvfs_dirent_outcount; i++) { /* copy a PVFS_dirent to a struct dirent */ dirp->d_ino = (long)readdir_resp.dirent_array[i].handle; - dirp->d_off = pd->file_pointer; + dirp->d_off = pd->s->file_pointer; dirp->d_reclen = sizeof(PVFS_dirent); memcpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); dirp->d_name[name_max] = 0; - pd->file_pointer += sizeof(struct dirent); + pd->s->file_pointer += sizeof(struct dirent); bytes += sizeof(struct dirent); dirp++; } + gen_mutex_unlock(&pd->s->lock); free(readdir_resp.dirent_array); return bytes; errorout: + gen_mutex_unlock(&pd->s->lock); return rc; } @@ -1743,12 +2182,12 @@ int iocommon_getdents64(pvfs_descriptor *pd, errno = EBADF; return -1; } - if (pd->token == PVFS_READDIR_END) + if (pd->s->token == PVFS_READDIR_END) { - return -1; /* EOF */ + return 0; /* EOF */ } - if (!S_ISDIR(pd->mode)) + if (!S_ISDIR(pd->s->mode)) { errno = ENOENT; return -1; @@ -1759,14 +2198,16 @@ int iocommon_getdents64(pvfs_descriptor *pd, iocommon_cred(&credentials); - token = pd->token == 0 ? PVFS_READDIR_START : pd->token; + gen_mutex_lock(&pd->s->lock); + token = pd->s->token == 0 ? PVFS_READDIR_START : pd->s->token; count = size / sizeof(struct dirent64); if (count > PVFS_REQ_LIMIT_DIRENT_COUNT) { count = PVFS_REQ_LIMIT_DIRENT_COUNT; } - rc = PVFS_sys_readdir(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_readdir(pd->s->pvfs_ref, token, count, credentials, @@ -1774,24 +2215,26 @@ int iocommon_getdents64(pvfs_descriptor *pd, NULL); IOCOMMON_CHECK_ERR(rc); - pd->token = readdir_resp.token; + pd->s->token = readdir_resp.token; name_max = PVFS_util_min(NAME_MAX, PVFS_NAME_MAX); for(i = 0; i < readdir_resp.pvfs_dirent_outcount; i++) { /* copy a PVFS_dirent to a struct dirent64 */ dirp->d_ino = (uint64_t)readdir_resp.dirent_array[i].handle; - dirp->d_off = (off64_t)pd->file_pointer; + dirp->d_off = (off64_t)pd->s->file_pointer; dirp->d_reclen = sizeof(struct dirent64); memcpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); dirp->d_name[name_max] = 0; - pd->file_pointer += sizeof(struct dirent64); + pd->s->file_pointer += sizeof(struct dirent64); bytes += sizeof(struct dirent64); dirp++; } + gen_mutex_unlock(&pd->s->lock); free(readdir_resp.dirent_array); return bytes; errorout: + gen_mutex_unlock(&pd->s->lock); return rc; } @@ -1858,6 +2301,7 @@ int iocommon_access(const char *pvfs_path, if (!pdir) { + errno = 0; rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); } @@ -1865,6 +2309,7 @@ int iocommon_access(const char *pvfs_path, { if (parentdir) { + errno = 0; rc = iocommon_lookup_relative(parentdir, *pdir, PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); IOCOMMON_RETURN_ERR(rc); @@ -1879,6 +2324,7 @@ int iocommon_access(const char *pvfs_path, { followflag = PVFS2_LOOKUP_LINK_NO_FOLLOW; } + errno = 0; rc = iocommon_lookup_relative(file, parent_ref, followflag, @@ -1887,6 +2333,7 @@ int iocommon_access(const char *pvfs_path, 0); IOCOMMON_CHECK_ERR(rc); /* Get file atributes */ + errno = 0; rc = iocommon_getattr(file_ref, &attr, PVFS_ATTR_SYS_COMMON_ALL); IOCOMMON_RETURN_ERR(rc); @@ -1965,7 +2412,8 @@ int iocommon_statfs(pvfs_descriptor *pd, struct statfs *buf) iocommon_cred(&credentials); memset(&statfs_resp, 0, sizeof(statfs_resp)); - rc = PVFS_sys_statfs(pd->pvfs_ref.fs_id, + errno = 0; + rc = PVFS_sys_statfs(pd->s->pvfs_ref.fs_id, credentials, &statfs_resp, NULL); @@ -2005,7 +2453,8 @@ int iocommon_statfs64(pvfs_descriptor *pd, struct statfs64 *buf) iocommon_cred(&credentials); memset(&statfs_resp, 0, sizeof(statfs_resp)); - rc = PVFS_sys_statfs(pd->pvfs_ref.fs_id, + errno = 0; + rc = PVFS_sys_statfs(pd->s->pvfs_ref.fs_id, credentials, &statfs_resp, NULL); @@ -2045,8 +2494,13 @@ int iocommon_sendfile(int sockfd, pvfs_descriptor *pd, PVFS_Request_contiguous(buffer_size, PVFS_BYTE, &mem_req); file_req = PVFS_BYTE; - rc = iocommon_readorwrite_nocache(PVFS_IO_READ, pd, *offset + bytes_read, - buffer, mem_req, file_req); + errno = 0; + rc = iocommon_readorwrite_nocache(PVFS_IO_READ, + &pd->s->pvfs_ref, + *offset + bytes_read, + buffer, + mem_req, + file_req); while(rc > 0) { int flags = 0; @@ -2060,8 +2514,13 @@ int iocommon_sendfile(int sockfd, pvfs_descriptor *pd, { break; } - rc = iocommon_readorwrite_nocache(PVFS_IO_READ, pd, *offset + bytes_read, - buffer, mem_req, file_req); + errno = 0; + rc = iocommon_readorwrite_nocache(PVFS_IO_READ, + &pd->s->pvfs_ref, + *offset + bytes_read, + buffer, + mem_req, + file_req); } PVFS_Request_free(&mem_req); free(buffer); @@ -2110,11 +2569,24 @@ int iocommon_geteattr(pvfs_descriptor *pd, val.buffer_sz = size; /* now get attributes */ - rc = PVFS_sys_geteattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_geteattr(pd->s->pvfs_ref, credentials, &key, &val, NULL); + switch (rc) + { + case -PVFS_ENOENT: + /* file exists if we have a pd */ + /* either attr does not exist or */ + /* we do not have access to it */ + rc = -PVFS_ENODATA; + break; + case -PVFS_EMSGSIZE: + /* buffer was too small for the attribute value */ + rc = -PVFS_ERANGE; + } IOCOMMON_CHECK_ERR(rc); rc = val.read_sz; @@ -2170,12 +2642,20 @@ int iocommon_seteattr(pvfs_descriptor *pd, } /* now set attributes */ - rc = PVFS_sys_seteattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_seteattr(pd->s->pvfs_ref, credentials, &key, &val, pvfs_flag, NULL); + if (rc == -PVFS_ENOENT) + { + /* file exists if we have a pd */ + /* either attr does not exist or */ + /* we do not have access to it */ + rc = -PVFS_ENODATA; + } IOCOMMON_CHECK_ERR(rc); errorout: @@ -2211,10 +2691,18 @@ int iocommon_deleattr(pvfs_descriptor *pd, key.buffer_sz = strlen(key_p) + 1; /* now set attributes */ - rc = PVFS_sys_deleattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_deleattr(pd->s->pvfs_ref, credentials, &key, NULL); + if (rc == -PVFS_ENOENT) + { + /* file exists if we have a pd */ + /* either attr does not exist or */ + /* we do not have access to it */ + rc = -PVFS_ENODATA; + } IOCOMMON_CHECK_ERR(rc); errorout: @@ -2234,7 +2722,7 @@ int iocommon_deleattr(pvfs_descriptor *pd, int iocommon_listeattr(pvfs_descriptor *pd, char *list, int size, - int *numkeys) + int *retsize) { int rc = 0; int orig_errno = errno; @@ -2260,25 +2748,27 @@ int iocommon_listeattr(pvfs_descriptor *pd, iocommon_cred(&credentials); /* find number of attributes */ - rc = PVFS_sys_listeattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_listeattr(pd->s->pvfs_ref, token, nkey, credentials, &listeattr_resp, NULL); + if (rc == -PVFS_ENOENT) + { + /* file exists if we have a pd */ + /* either attr does not exist or */ + /* we do not have access to it */ + rc = -PVFS_ENODATA; + } IOCOMMON_CHECK_ERR(rc); /* get available keys */ nkey = listeattr_resp.nkey; - if (size == 0) - { - *numkeys = nkey; - goto errorout; - } - /* allocate key_array */ - if (nkey < PVFS_MAX_XATTR_LISTLEN) + if (nkey > PVFS_MAX_XATTR_LISTLEN) { max_keys = PVFS_MAX_XATTR_LISTLEN; } @@ -2300,30 +2790,44 @@ int iocommon_listeattr(pvfs_descriptor *pd, { token = listeattr_resp.token; listeattr_resp.nkey = max_keys; - rc = PVFS_sys_listeattr(pd->pvfs_ref, + errno = 0; + rc = PVFS_sys_listeattr(pd->s->pvfs_ref, token, nkey, credentials, &listeattr_resp, NULL); + if (rc == -PVFS_ENOENT) + { + /* file exists if we have a pd */ + /* either attr does not exist or */ + /* we do not have access to it */ + rc = -PVFS_ENODATA; + } IOCOMMON_CHECK_ERR(rc); /* copy keys out to caller */ for (k = 0; k < listeattr_resp.nkey; k++) { - if (total_size + listeattr_resp.key_array[k].read_sz > size) + if (size > 0) { - total_size = size; - break; /* ran out of buffer space */ + if (total_size + listeattr_resp.key_array[k].read_sz > size) + { + total_size = size; + errno = ERANGE; + rc = -1; + break; /* ran out of buffer space */ + } + strncpy(list, listeattr_resp.key_array[k].buffer, + listeattr_resp.key_array[k].read_sz); + list += listeattr_resp.key_array[k].read_sz; } - strncpy(list, listeattr_resp.key_array[k].buffer, - listeattr_resp.key_array[k].read_sz); - list += listeattr_resp.key_array[k].read_sz; total_size += listeattr_resp.key_array[k].read_sz; } total_keys += listeattr_resp.nkey; } while (total_keys < nkey && listeattr_resp.nkey > 0 && total_size < size); + *retsize = total_size; /* free key_array */ for (k = 0; k < max_keys; k++) { diff --git a/src/client/usrint/iocommon.h b/src/client/usrint/iocommon.h index ac07a63..296e804 100644 --- a/src/client/usrint/iocommon.h +++ b/src/client/usrint/iocommon.h @@ -29,6 +29,26 @@ #define PVFS_NULL_OBJ ((PVFS_object_ref *)NULL) +/** A structure used in the cache enabled version of iocommon_readorwrite. + */ +struct ucache_req_s +{ + uint64_t ublk_tag; /* ucache block tag (byte index into file) */ + unsigned char ublk_hit; /* boolean indicating 'block found in cache' */ + void *ublk_ptr; /* where in ucache memory to read block from or write to */ + uint16_t ublk_index; /* index of ucache block in shared memory segment */ +}; + +struct ucache_copy_s +{ + void * cache_pos; + void * buff_pos; + size_t size; + unsigned char hit; + uint16_t blk_index; +}; + + /* this global is set when a pvfs specific error is returned * and errno is set to EIO */ @@ -41,13 +61,13 @@ void iocommon_ensure_init(void); void iocommon_cred(PVFS_credentials **credentials); -int iocommon_fsync(pvfs_descriptor *pvfs_info); +extern int iocommon_fsync(pvfs_descriptor *pvfs_info); /* * Find the PVFS handle to an object (file, dir sym) * assumes an absoluate path */ -int iocommon_lookup_absolute(const char *abs_path, +extern int iocommon_lookup_absolute(const char *abs_path, PVFS_object_ref *ref, char *error_path, int error_path_size); @@ -55,7 +75,7 @@ int iocommon_lookup_absolute(const char *abs_path, /* * Lookup a file via the PVFS system interface */ -int iocommon_lookup_relative(const char *rel_path, +extern int iocommon_lookup_relative(const char *rel_path, PVFS_object_ref parent_ref, int follow_links, PVFS_object_ref *ref, @@ -65,7 +85,7 @@ int iocommon_lookup_relative(const char *rel_path, /* * Create a file via the PVFS system interface */ -int iocommon_create_file(const char *filename, +extern int iocommon_create_file(const char *filename, mode_t file_permission, PVFS_hint file_creation_param, PVFS_object_ref parent_ref, @@ -75,15 +95,15 @@ int iocommon_create_file(const char *filename, /* pvfs_open implementation, return file info in fd */ /* assumes path is fully qualified */ /* if pdir is not NULL, it is the parent directory */ -pvfs_descriptor *iocommon_open(const char *pathname, int flag, +extern pvfs_descriptor *iocommon_open(const char *pathname, int flag, PVFS_hint file_creation_param, mode_t file_permission, pvfs_descriptor *pdir); -int iocommon_truncate(PVFS_object_ref file_ref, +extern int iocommon_truncate(PVFS_object_ref file_ref, off64_t length); -off64_t iocommon_lseek(pvfs_descriptor *pd, +extern off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, PVFS_size unit_size, int whence); @@ -93,66 +113,62 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, * need to verify this is a file or symlink * use rmdir for directory */ -int iocommon_remove (const char *pathname, PVFS_object_ref *pdir, int dirflag); +extern int iocommon_remove (const char *pathname, PVFS_object_ref *pdir, int dirflag); -int iocommon_unlink(const char *pathname, PVFS_object_ref *pdir); +extern int iocommon_unlink(const char *pathname, PVFS_object_ref *pdir); -int iocommon_rmdir(const char *pathname, PVFS_object_ref *pdir); +extern int iocommon_rmdir(const char *pathname, PVFS_object_ref *pdir); /* if dir(s) are NULL, assume name is absolute */ -int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldname, - PVFS_object_ref *newpdir, const char *newname); +extern int iocommon_rename(PVFS_object_ref *oldpdir, + const char *oldname, + PVFS_object_ref *newpdir, + const char *newname); -/* R/W Wrapper Functions, possibly utilizing user cache */ -/* do a blocking read or write +/* R/W Wrapper Functions, possibly utilizing user cache + * do a blocking read or write */ -int iocommon_readorwrite(enum PVFS_io_type which, +extern int iocommon_readorwrite(enum PVFS_io_type which, pvfs_descriptor *pd, PVFS_size offset, - void *buf, - PVFS_Request mem_req, - PVFS_Request file_req, - size_t count, + size_t iovec_count, const struct iovec *vector); -/* Read or write block data to/from cache */ -uint32_t place_data(enum PVFS_io_type which, const uint64_t block, const struct iovec *vector, - int *iovec_ndx, unsigned char *scratch, void **scratch_ptr, - uint64_t *scratch_left); - +extern int iocommon_vreadorwrite(enum PVFS_io_type which, + PVFS_object_ref *por, + PVFS_size offset, + size_t count, + const struct iovec *vector); -/* [Do a nonblocking read or write] */ -int iocommon_ireadorwrite_nocache(enum PVFS_io_type which, - pvfs_descriptor *pd, +extern int iocommon_ireadorwrite(enum PVFS_io_type which, + pvfs_descriptor *pd, PVFS_size extra_offset, void *buf, PVFS_Request etype_req, PVFS_Request file_req, size_t count, - PVFS_sys_op_id *ret_op_id, + PVFS_sys_op_id *ret_op_id, PVFS_sysresp_io *ret_resp, PVFS_Request *ret_memory_req); - /* do a blocking read or write - * extra_offset = extra padding to the pd's offset, independent of the pd's offset */ -int iocommon_readorwrite_nocache(enum PVFS_io_type which, - pvfs_descriptor *pd, - PVFS_size offset, - void *buf, - PVFS_Request mem_req, - PVFS_Request file_req); - //returned by nonblocking operations + */ +extern int iocommon_readorwrite_nocache(enum PVFS_io_type which, + PVFS_object_ref *por, + PVFS_size offset, + void *buf, + PVFS_Request mem_req, + PVFS_Request file_req); /* - * [Do a nonblocking read or write] + * Do a nonblocking read or write * extra_offset = extra padding to the pd's offset, * independent of the pd's offset * Returns an op_id, response, and ret_mem_request * (which represents an etype_req*count region) * Note that the none of the PVFS_Requests are freed */ -int iocommon_ireadorwrite_nocache(enum PVFS_io_type which, +extern int iocommon_ireadorwrite_nocache(enum PVFS_io_type which, pvfs_descriptor *pd, PVFS_size extra_offset, void *buf, @@ -163,61 +179,108 @@ int iocommon_ireadorwrite_nocache(enum PVFS_io_type which, PVFS_sysresp_io *ret_resp, PVFS_Request *ret_memory_req); -int iocommon_getattr(PVFS_object_ref obj, PVFS_sys_attr *attr, uint32_t mask); +extern int iocommon_getattr(PVFS_object_ref obj, PVFS_sys_attr *attr, uint32_t mask); -int iocommon_setattr(PVFS_object_ref obj, PVFS_sys_attr *attr); +extern int iocommon_setattr(PVFS_object_ref obj, PVFS_sys_attr *attr); -int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask); +extern int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask); /* * The only difference here is that buf is stat64 which * means some of its fields are defined as different types */ -int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask); +extern int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask); -int iocommon_statfs(pvfs_descriptor *pd, struct statfs *buf); +extern int iocommon_statfs(pvfs_descriptor *pd, struct statfs *buf); -int iocommon_statfs64(pvfs_descriptor *pd, struct statfs64 *buf); +extern int iocommon_statfs64(pvfs_descriptor *pd, struct statfs64 *buf); -int iocommon_seteattr(pvfs_descriptor *pd, const char *key, const void *val, int size, int flag); +extern int iocommon_seteattr(pvfs_descriptor *pd, const char *key, const void *val, int size, int flag); -int iocommon_geteattr(pvfs_descriptor *pd, const char *key, void *val, int size); +extern int iocommon_geteattr(pvfs_descriptor *pd, const char *key, void *val, int size); -int iocommon_listeattr(pvfs_descriptor *pd, char *list, int size, int *numkeys); +extern int iocommon_listeattr(pvfs_descriptor *pd, char *list, int size, int *numkeys); -int iocommon_deleattr(pvfs_descriptor *pd, const char * key); +extern int iocommon_deleattr(pvfs_descriptor *pd, const char * key); -int iocommon_chown(pvfs_descriptor *pd, uid_t owner, gid_t group); +extern int iocommon_chown(pvfs_descriptor *pd, uid_t owner, gid_t group); -int iocommon_chmod(pvfs_descriptor *pd, mode_t mode); +extern int iocommon_chmod(pvfs_descriptor *pd, mode_t mode); -int iocommon_make_directory(const char *pvfs_path, +extern int iocommon_make_directory(const char *pvfs_path, int mode, PVFS_object_ref *pdir); -int iocommon_readlink(pvfs_descriptor *pd, char *buf, int size); +extern int iocommon_readlink(pvfs_descriptor *pd, char *buf, int size); -int iocommon_symlink(const char *pvfs_path, - const char *link_target, - PVFS_object_ref *pdir); +extern int iocommon_symlink(const char *pvfs_path, + const char *link_target, + PVFS_object_ref *pdir); -int iocommon_getdents(pvfs_descriptor *pd, +extern int iocommon_getdents(pvfs_descriptor *pd, struct dirent *dirp, unsigned int count); -int iocommon_getdents64(pvfs_descriptor *pd, +extern int iocommon_getdents64(pvfs_descriptor *pd, struct dirent64 *dirp, unsigned int count); -int iocommon_access(const char *pvfs_path, - int mode, - int flags, - PVFS_object_ref *pdir); +extern int iocommon_access(const char *pvfs_path, + int mode, + int flags, + PVFS_object_ref *pdir); -int iocommon_sendfile(int sockfd, +extern int iocommon_sendfile(int sockfd, pvfs_descriptor *pd, off64_t *offset, size_t count); + + +/* Functions in this file generally define a label errorout + * for cleanup before exit and return an int rc which is -1 + * on error with the error code in errno, 0 on success. + * IOCOMMON_RETURN_ERR checks a return code from a function + * returns the same protocol and goto errorout: if less than 0 + * IOCOMMON_CHECK_ERR assumes the return code contains the + * negative of the error code as encoded by PVFS sysint + * functions and decodes these before jumping to errorout. + * PVFS sysint calls always return error codes in the return + * value, but system calls inside them might set errno to + * a value that may or may not have meaning for the programmer + * calling this library. Steps are taken to ensure errno + * is not modified unless the code in this lib wants to + * modify it. CHECK_ERR should be called after each sysint + * call to correctly pass error codes. + */ +extern PVFS_error PINT_errno_mapping[]; +#define IOCOMMON_RETURN_ERR(rc) \ +do { \ + if ((rc) < 0) \ + { \ + goto errorout; \ + } \ +} while (0) + +#define IOCOMMON_CHECK_ERR(rc) \ +do { \ + errno = orig_errno; \ + if ((rc) < 0) \ + { \ + if (IS_PVFS_NON_ERRNO_ERROR(-(rc))) \ + { \ + pvfs_errno = -rc; \ + errno = EIO; \ + } \ + else if (IS_PVFS_ERROR(-(rc))) \ + { \ + errno = PINT_errno_mapping[(-(rc)) & 0x7f]; \ + } \ + rc = -1; \ + goto errorout; \ + } \ +} while (0) + + /* * Local variables: * c-indent-level: 4 diff --git a/src/client/usrint/openfile-util.c b/src/client/usrint/openfile-util.c index 934963d..705086d 100644 --- a/src/client/usrint/openfile-util.c +++ b/src/client/usrint/openfile-util.c @@ -18,7 +18,13 @@ #include "posix-ops.h" #include "openfile-util.h" #include "posix-pvfs.h" +#ifdef PVFS_AIO_ENABLE +#include "aiocommon.h" +#endif + +#if PVFS_UCACHE_ENABLE #include "ucache.h" +#endif static struct glibc_redirect_s { @@ -35,9 +41,8 @@ static struct glibc_redirect_s } glibc_redirect; #define PREALLOC 3 -static char logfilepath[25]; +static char logfilepath[30]; static int logfile; -static int pvfs_initializing_flag = 0; static int descriptor_table_count = 0; static int descriptor_table_size = 0; static pvfs_descriptor **descriptor_table; @@ -45,11 +50,10 @@ static char rstate[256]; /* used for random number generation */ posix_ops glibc_ops; -pvfs_descriptor pvfs_stdin = +pvfs_descriptor_status pvfs_stdin_status = { - .fd = 0, + .dup_cnt = 1, .fsops = &glibc_ops, - .true_fd = STDIN_FILENO, .pvfs_ref.fs_id = 0, .pvfs_ref.handle = 0, .flags = O_RDONLY, @@ -57,14 +61,22 @@ pvfs_descriptor pvfs_stdin = .file_pointer = 0, .token = 0, .dpath = NULL, - .is_in_use = PVFS_FS + .fent = NULL }; -pvfs_descriptor pvfs_stdout = +pvfs_descriptor pvfs_stdin = { - .fd = 1, + .is_in_use = PVFS_FS, + .fd = 0, + .true_fd = STDIN_FILENO, + .fdflags = 0, + .s = &pvfs_stdin_status +}; + +pvfs_descriptor_status pvfs_stdout_status = +{ + .dup_cnt = 1, .fsops = &glibc_ops, - .true_fd = STDOUT_FILENO, .pvfs_ref.fs_id = 0, .pvfs_ref.handle = 0, .flags = O_WRONLY | O_APPEND, @@ -72,14 +84,22 @@ pvfs_descriptor pvfs_stdout = .file_pointer = 0, .token = 0, .dpath = NULL, - .is_in_use = PVFS_FS + .fent = NULL }; -pvfs_descriptor pvfs_stderr = +pvfs_descriptor pvfs_stdout = { - .fd = 2, + .is_in_use = PVFS_FS, + .fd = 1, + .true_fd = STDOUT_FILENO, + .fdflags = 0, + .s = &pvfs_stdout_status +}; + +pvfs_descriptor_status pvfs_stderr_status = +{ + .dup_cnt = 1, .fsops = &glibc_ops, - .true_fd = STDERR_FILENO, .pvfs_ref.fs_id = 0, .pvfs_ref.handle = 0, .flags = O_WRONLY | O_APPEND, @@ -87,57 +107,68 @@ pvfs_descriptor pvfs_stderr = .file_pointer = 0, .token = 0, .dpath = NULL, - .is_in_use = PVFS_FS + .fent = NULL +}; + +pvfs_descriptor pvfs_stderr = +{ + .is_in_use = PVFS_FS, + .fd = 2, + .true_fd = STDERR_FILENO, + .fdflags = 0, + .s = &pvfs_stderr_status }; static int my_glibc_stat(const char *path, struct stat *buf) { - return glibc_redirect.stat(3, path, buf); + int rc = glibc_redirect.stat(_STAT_VER, path, buf); + return rc; } static int my_glibc_stat64(const char *path, struct stat64 *buf) { - return glibc_redirect.stat64(3, path, buf); + int rc = glibc_redirect.stat64(_STAT_VER, path, buf); + return rc; } static int my_glibc_fstat(int fd, struct stat *buf) { - return glibc_redirect.fstat(3, fd, buf); + return glibc_redirect.fstat(_STAT_VER, fd, buf); } static int my_glibc_fstat64(int fd, struct stat64 *buf) { - return glibc_redirect.fstat64(3, fd, buf); + return glibc_redirect.fstat64(_STAT_VER, fd, buf); } static int my_glibc_fstatat(int fd, const char *path, struct stat *buf, int flag) { - return glibc_redirect.fstatat(3, fd, path, buf, flag); + return glibc_redirect.fstatat(_STAT_VER, fd, path, buf, flag); } static int my_glibc_fstatat64(int fd, const char *path, struct stat64 *buf, int flag) { - return glibc_redirect.fstatat64(3, fd, path, buf, flag); + return glibc_redirect.fstatat64(_STAT_VER, fd, path, buf, flag); } static int my_glibc_lstat(const char *path, struct stat *buf) { - return glibc_redirect.lstat(3, path, buf); + return glibc_redirect.lstat(_STAT_VER, path, buf); } static int my_glibc_lstat64(const char *path, struct stat64 *buf) { - return glibc_redirect.lstat64(3, path, buf); + return glibc_redirect.lstat64(_STAT_VER, path, buf); } static int my_glibc_mknod(const char *path, mode_t mode, dev_t dev) { - return glibc_redirect.mknod(1, path, mode, dev); + return glibc_redirect.mknod(_MKNOD_VER, path, mode, dev); } static int my_glibc_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) { - return glibc_redirect.mknodat(1, dirfd, path, mode, dev); + return glibc_redirect.mknodat(_MKNOD_VER, dirfd, path, mode, dev); } static int my_glibc_getdents(u_int fd, struct dirent *dirp, u_int count) @@ -160,204 +191,308 @@ static int my_glibc_fadvise(int fd, off_t offset, off_t len, int advice) return my_glibc_fadvise64(fd, (off64_t)offset, (off64_t)len, advice); } -static int my_glibc_flush(int fd) -{ - errno = ENOSYS; - return -1; -} - static int my_glibc_readdir(u_int fd, struct dirent *dirp, u_int count) { return syscall(SYS_readdir, fd, dirp, count); } +static int my_glibc_getcwd(char *buf, unsigned long size) +{ + return syscall(SYS_getcwd, buf, size); +} + void load_glibc(void) { + void *libc_handle; + libc_handle = dlopen("libc.so.6", RTLD_LAZY|RTLD_GLOBAL); + if (!libc_handle) + { + fprintf(stderr,"Failed to open libc.so\n"); + libc_handle = RTLD_NEXT; + } memset((void *)&glibc_ops, 0, sizeof(glibc_ops)); - glibc_ops.open = dlsym(RTLD_NEXT, "open"); - glibc_ops.open64 = dlsym(RTLD_NEXT, "open64"); - glibc_ops.openat = dlsym(RTLD_NEXT, "openat"); - glibc_ops.openat64 = dlsym(RTLD_NEXT, "openat64"); - glibc_ops.creat = dlsym(RTLD_NEXT, "creat"); - glibc_ops.creat64 = dlsym(RTLD_NEXT, "creat64"); - glibc_ops.unlink = dlsym(RTLD_NEXT, "unlink"); - glibc_ops.unlinkat = dlsym(RTLD_NEXT, "unlinkat"); - glibc_ops.rename = dlsym(RTLD_NEXT, "rename"); - glibc_ops.renameat = dlsym(RTLD_NEXT, "renameat"); - glibc_ops.read = dlsym(RTLD_NEXT, "read"); - glibc_ops.pread = dlsym(RTLD_NEXT, "pread"); - glibc_ops.readv = dlsym(RTLD_NEXT, "readv"); - glibc_ops.pread64 = dlsym(RTLD_NEXT, "pread64"); - glibc_ops.write = dlsym(RTLD_NEXT, "write"); - glibc_ops.pwrite = dlsym(RTLD_NEXT, "pwrite"); - glibc_ops.writev = dlsym(RTLD_NEXT, "writev"); - glibc_ops.pwrite64 = dlsym(RTLD_NEXT, "pwrite64"); - glibc_ops.lseek = dlsym(RTLD_NEXT, "lseek"); - glibc_ops.lseek64 = dlsym(RTLD_NEXT, "lseek64"); - glibc_ops.truncate = dlsym(RTLD_NEXT, "truncate"); - glibc_ops.truncate64 = dlsym(RTLD_NEXT, "truncate64"); - glibc_ops.ftruncate = dlsym(RTLD_NEXT, "ftruncate"); - glibc_ops.ftruncate64 = dlsym(RTLD_NEXT, "ftruncate64"); - glibc_ops.fallocate = dlsym(RTLD_NEXT, "posix_fallocate"); - glibc_ops.close = dlsym(RTLD_NEXT, "close"); - glibc_ops.flush = my_glibc_flush; + glibc_ops.open = dlsym(libc_handle, "open"); + glibc_ops.open64 = dlsym(libc_handle, "open64"); + glibc_ops.openat = dlsym(libc_handle, "openat"); + glibc_ops.openat64 = dlsym(libc_handle, "openat64"); + glibc_ops.creat = dlsym(libc_handle, "creat"); + glibc_ops.creat64 = dlsym(libc_handle, "creat64"); + glibc_ops.unlink = dlsym(libc_handle, "unlink"); + glibc_ops.unlinkat = dlsym(libc_handle, "unlinkat"); + glibc_ops.rename = dlsym(libc_handle, "rename"); + glibc_ops.renameat = dlsym(libc_handle, "renameat"); + glibc_ops.read = dlsym(libc_handle, "read"); + glibc_ops.pread = dlsym(libc_handle, "pread"); + glibc_ops.readv = dlsym(libc_handle, "readv"); + glibc_ops.pread64 = dlsym(libc_handle, "pread64"); + glibc_ops.write = dlsym(libc_handle, "write"); + glibc_ops.pwrite = dlsym(libc_handle, "pwrite"); + glibc_ops.writev = dlsym(libc_handle, "writev"); + glibc_ops.pwrite64 = dlsym(libc_handle, "pwrite64"); + glibc_ops.lseek = dlsym(libc_handle, "lseek"); + glibc_ops.lseek64 = dlsym(libc_handle, "lseek64"); + glibc_ops.truncate = dlsym(libc_handle, "truncate"); + glibc_ops.truncate64 = dlsym(libc_handle, "truncate64"); + glibc_ops.ftruncate = dlsym(libc_handle, "ftruncate"); + glibc_ops.ftruncate64 = dlsym(libc_handle, "ftruncate64"); + glibc_ops.fallocate = dlsym(libc_handle, "posix_fallocate"); + glibc_ops.close = dlsym(libc_handle, "close"); glibc_ops.stat = my_glibc_stat; - glibc_redirect.stat = dlsym(RTLD_NEXT, "__xstat"); + glibc_redirect.stat = dlsym(libc_handle, "__xstat"); glibc_ops.stat64 = my_glibc_stat64; - glibc_redirect.stat64 = dlsym(RTLD_NEXT, "__xstat64"); + glibc_redirect.stat64 = dlsym(libc_handle, "__xstat64"); glibc_ops.fstat = my_glibc_fstat; - glibc_redirect.fstat = dlsym(RTLD_NEXT, "__fxstat"); + glibc_redirect.fstat = dlsym(libc_handle, "__fxstat"); glibc_ops.fstat64 = my_glibc_fstat64; - glibc_redirect.fstat64 = dlsym(RTLD_NEXT, "__fxstat64"); + glibc_redirect.fstat64 = dlsym(libc_handle, "__fxstat64"); glibc_ops.fstatat = my_glibc_fstatat; - glibc_redirect.fstatat = dlsym(RTLD_NEXT, "__fxstatat"); + glibc_redirect.fstatat = dlsym(libc_handle, "__fxstatat"); glibc_ops.fstatat64 = my_glibc_fstatat64; - glibc_redirect.fstatat64 = dlsym(RTLD_NEXT, "__fxstatat64"); + glibc_redirect.fstatat64 = dlsym(libc_handle, "__fxstatat64"); glibc_ops.lstat = my_glibc_lstat; - glibc_redirect.lstat = dlsym(RTLD_NEXT, "__lxstat"); + glibc_redirect.lstat = dlsym(libc_handle, "__lxstat"); glibc_ops.lstat64 = my_glibc_lstat64; - glibc_redirect.lstat64 = dlsym(RTLD_NEXT, "__lxstat64"); - glibc_ops.dup = dlsym(RTLD_NEXT, "dup"); - glibc_ops.dup2 = dlsym(RTLD_NEXT, "dup2"); - glibc_ops.chown = dlsym(RTLD_NEXT, "chown"); - glibc_ops.fchown = dlsym(RTLD_NEXT, "fchown"); - glibc_ops.fchownat = dlsym(RTLD_NEXT, "fchownat"); - glibc_ops.lchown = dlsym(RTLD_NEXT, "lchown"); - glibc_ops.chmod = dlsym(RTLD_NEXT, "chmod"); - glibc_ops.fchmod = dlsym(RTLD_NEXT, "fchmod"); - glibc_ops.fchmodat = dlsym(RTLD_NEXT, "fchmodat"); - glibc_ops.mkdir = dlsym(RTLD_NEXT, "mkdir"); - glibc_ops.mkdirat = dlsym(RTLD_NEXT, "mkdirat"); - glibc_ops.rmdir = dlsym(RTLD_NEXT, "rmdir"); - glibc_ops.readlink = dlsym(RTLD_NEXT, "readlink"); - glibc_ops.readlinkat = dlsym(RTLD_NEXT, "readlinkat"); - glibc_ops.symlink = dlsym(RTLD_NEXT, "symlink"); - glibc_ops.symlinkat = dlsym(RTLD_NEXT, "symlinkat"); - glibc_ops.link = dlsym(RTLD_NEXT, "link"); - glibc_ops.linkat = dlsym(RTLD_NEXT, "linkat"); + glibc_redirect.lstat64 = dlsym(libc_handle, "__lxstat64"); + glibc_ops.futimesat = dlsym(libc_handle, "futimesat"); + glibc_ops.utimes = dlsym(libc_handle, "utimes"); + glibc_ops.utime = dlsym(libc_handle, "utime"); + glibc_ops.futimes = dlsym(libc_handle, "futimes"); + glibc_ops.dup = dlsym(libc_handle, "dup"); + glibc_ops.dup2 = dlsym(libc_handle, "dup2"); + glibc_ops.chown = dlsym(libc_handle, "chown"); + glibc_ops.fchown = dlsym(libc_handle, "fchown"); + glibc_ops.fchownat = dlsym(libc_handle, "fchownat"); + glibc_ops.lchown = dlsym(libc_handle, "lchown"); + glibc_ops.chmod = dlsym(libc_handle, "chmod"); + glibc_ops.fchmod = dlsym(libc_handle, "fchmod"); + glibc_ops.fchmodat = dlsym(libc_handle, "fchmodat"); + glibc_ops.mkdir = dlsym(libc_handle, "mkdir"); + glibc_ops.mkdirat = dlsym(libc_handle, "mkdirat"); + glibc_ops.rmdir = dlsym(libc_handle, "rmdir"); + glibc_ops.readlink = dlsym(libc_handle, "readlink"); + glibc_ops.readlinkat = dlsym(libc_handle, "readlinkat"); + glibc_ops.symlink = dlsym(libc_handle, "symlink"); + glibc_ops.symlinkat = dlsym(libc_handle, "symlinkat"); + glibc_ops.link = dlsym(libc_handle, "link"); + glibc_ops.linkat = dlsym(libc_handle, "linkat"); glibc_ops.readdir = my_glibc_readdir; glibc_ops.getdents = my_glibc_getdents; glibc_ops.getdents64 = my_glibc_getdents64; - glibc_ops.access = dlsym(RTLD_NEXT, "access"); - glibc_ops.faccessat = dlsym(RTLD_NEXT, "faccessat"); - glibc_ops.flock = dlsym(RTLD_NEXT, "flock"); - glibc_ops.fcntl = dlsym(RTLD_NEXT, "fcntl"); - glibc_ops.sync = dlsym(RTLD_NEXT, "sync"); - glibc_ops.fsync = dlsym(RTLD_NEXT, "fsync"); - glibc_ops.fdatasync = dlsym(RTLD_NEXT, "fdatasync"); + glibc_ops.access = dlsym(libc_handle, "access"); + glibc_ops.faccessat = dlsym(libc_handle, "faccessat"); + glibc_ops.flock = dlsym(libc_handle, "flock"); + glibc_ops.fcntl = dlsym(libc_handle, "fcntl"); + glibc_ops.sync = dlsym(libc_handle, "sync"); + glibc_ops.fsync = dlsym(libc_handle, "fsync"); + glibc_ops.fdatasync = dlsym(libc_handle, "fdatasync"); glibc_ops.fadvise = my_glibc_fadvise; glibc_ops.fadvise64 = my_glibc_fadvise64; - glibc_ops.statfs = dlsym(RTLD_NEXT, "statfs"); - glibc_ops.statfs64 = dlsym(RTLD_NEXT, "statfs64"); - glibc_ops.fstatfs = dlsym(RTLD_NEXT, "fstatfs"); - glibc_ops.fstatfs64 = dlsym(RTLD_NEXT, "fstatfs64"); + glibc_ops.statfs = dlsym(libc_handle, "statfs"); + glibc_ops.statfs64 = dlsym(libc_handle, "statfs64"); + glibc_ops.fstatfs = dlsym(libc_handle, "fstatfs"); + glibc_ops.fstatfs64 = dlsym(libc_handle, "fstatfs64"); + glibc_ops.statvfs = dlsym(libc_handle, "statvfs"); + glibc_ops.fstatvfs = dlsym(libc_handle, "fstatvfs"); glibc_ops.mknod = my_glibc_mknod; - glibc_redirect.mknod = dlsym(RTLD_NEXT, "__xmknod"); + glibc_redirect.mknod = dlsym(libc_handle, "__xmknod"); glibc_ops.mknodat = my_glibc_mknodat; - glibc_redirect.mknodat = dlsym(RTLD_NEXT, "__xmknodat"); - glibc_ops.sendfile = dlsym(RTLD_NEXT, "sendfile"); - glibc_ops.sendfile64 = dlsym(RTLD_NEXT, "sendfile64"); + glibc_redirect.mknodat = dlsym(libc_handle, "__xmknodat"); + glibc_ops.sendfile = dlsym(libc_handle, "sendfile"); + glibc_ops.sendfile64 = dlsym(libc_handle, "sendfile64"); #ifdef HAVE_ATTR_XATTR_H - glibc_ops.setxattr = dlsym(RTLD_NEXT, "setxattr"); - glibc_ops.lsetxattr = dlsym(RTLD_NEXT, "lsetxattr"); - glibc_ops.fsetxattr = dlsym(RTLD_NEXT, "fsetxattr"); - glibc_ops.getxattr = dlsym(RTLD_NEXT, "getxattr"); - glibc_ops.lgetxattr = dlsym(RTLD_NEXT, "lgetxattr"); - glibc_ops.fgetxattr = dlsym(RTLD_NEXT, "fgetxattr"); - glibc_ops.listxattr = dlsym(RTLD_NEXT, "listxattr"); - glibc_ops.llistxattr = dlsym(RTLD_NEXT, "llistxattr"); - glibc_ops.flistxattr = dlsym(RTLD_NEXT, "flistxattr"); - glibc_ops.removexattr = dlsym(RTLD_NEXT, "removexattr"); - glibc_ops.lremovexattr = dlsym(RTLD_NEXT, "lremovexattr"); - glibc_ops.fremovexattr = dlsym(RTLD_NEXT, "fremovexattr"); + glibc_ops.setxattr = dlsym(libc_handle, "setxattr"); + glibc_ops.lsetxattr = dlsym(libc_handle, "lsetxattr"); + glibc_ops.fsetxattr = dlsym(libc_handle, "fsetxattr"); + glibc_ops.getxattr = dlsym(libc_handle, "getxattr"); + glibc_ops.lgetxattr = dlsym(libc_handle, "lgetxattr"); + glibc_ops.fgetxattr = dlsym(libc_handle, "fgetxattr"); + glibc_ops.listxattr = dlsym(libc_handle, "listxattr"); + glibc_ops.llistxattr = dlsym(libc_handle, "llistxattr"); + glibc_ops.flistxattr = dlsym(libc_handle, "flistxattr"); + glibc_ops.removexattr = dlsym(libc_handle, "removexattr"); + glibc_ops.lremovexattr = dlsym(libc_handle, "lremovexattr"); + glibc_ops.fremovexattr = dlsym(libc_handle, "fremovexattr"); +#endif + glibc_ops.socket = dlsym(libc_handle, "socket"); + glibc_ops.accept = dlsym(libc_handle, "accept"); + glibc_ops.bind = dlsym(libc_handle, "bind"); + glibc_ops.connect = dlsym(libc_handle, "connect"); + glibc_ops.getpeername = dlsym(libc_handle, "getpeername"); + glibc_ops.getsockname = dlsym(libc_handle, "getsockname"); + glibc_ops.getsockopt = dlsym(libc_handle, "getsockopt"); + glibc_ops.setsockopt = dlsym(libc_handle, "setsockopt"); + glibc_ops.ioctl = dlsym(libc_handle, "ioctl"); + glibc_ops.listen = dlsym(libc_handle, "listen"); + glibc_ops.recv = dlsym(libc_handle, "recv"); + glibc_ops.recvfrom = dlsym(libc_handle, "recvfrom"); + glibc_ops.recvmsg = dlsym(libc_handle, "recvmsg"); + //glibc_ops.select = dlsym(libc_handle, "select"); + //glibc_ops.FD_CLR = dlsym(libc_handle, "FD_CLR"); + //glibc_ops.FD_ISSET = dlsym(libc_handle, "FD_ISSET"); + //glibc_ops.FD_SET = dlsym(libc_handle, "FD_SET"); + //glibc_ops.FD_ZERO = dlsym(libc_handle, "FD_ZERO"); + //glibc_ops.pselect = dlsym(libc_handle, "pselect"); + glibc_ops.send = dlsym(libc_handle, "send"); + glibc_ops.sendto = dlsym(libc_handle, "sendto"); + glibc_ops.sendmsg = dlsym(libc_handle, "sendmsg"); + glibc_ops.shutdown = dlsym(libc_handle, "shutdown"); + glibc_ops.socketpair = dlsym(libc_handle, "socketpair"); + glibc_ops.pipe = dlsym(libc_handle, "pipe"); + glibc_ops.umask = dlsym(libc_handle, "umask"); + glibc_ops.getumask = dlsym(libc_handle, "getumask"); + glibc_ops.getdtablesize = dlsym(libc_handle, "getdtablesize"); + glibc_ops.mmap = dlsym(libc_handle, "mmap"); + glibc_ops.munmap = dlsym(libc_handle, "munmap"); + glibc_ops.msync = dlsym(libc_handle, "msync"); +#if 0 + glibc_ops.acl_delete_def_file = dlsym(libc_handle, "acl_delete_def_file"); + glibc_ops.acl_get_fd = dlsym(libc_handle, "acl_get_fd"); + glibc_ops.acl_get_file = dlsym(libc_handle, "acl_get_file"); + glibc_ops.acl_set_fd = dlsym(libc_handle, "acl_set_fd"); + glibc_ops.acl_set_file = dlsym(libc_handle, "acl_set_file"); #endif - glibc_ops.socket = dlsym(RTLD_NEXT, "socket"); - glibc_ops.accept = dlsym(RTLD_NEXT, "accept"); - glibc_ops.bind = dlsym(RTLD_NEXT, "bind"); - glibc_ops.connect = dlsym(RTLD_NEXT, "connect"); - glibc_ops.getpeername = dlsym(RTLD_NEXT, "getpeername"); - glibc_ops.getsockname = dlsym(RTLD_NEXT, "getsockname"); - glibc_ops.getsockopt = dlsym(RTLD_NEXT, "getsockopt"); - glibc_ops.setsockopt = dlsym(RTLD_NEXT, "setsockopt"); - glibc_ops.ioctl = dlsym(RTLD_NEXT, "ioctl"); - glibc_ops.listen = dlsym(RTLD_NEXT, "listen"); - glibc_ops.recv = dlsym(RTLD_NEXT, "recv"); - glibc_ops.recvfrom = dlsym(RTLD_NEXT, "recvfrom"); - glibc_ops.recvmsg = dlsym(RTLD_NEXT, "recvmsg"); - //glibc_ops.select = dlsym(RTLD_NEXT, "select"); - //glibc_ops.FD_CLR = dlsym(RTLD_NEXT, "FD_CLR"); - //glibc_ops.FD_ISSET = dlsym(RTLD_NEXT, "FD_ISSET"); - //glibc_ops.FD_SET = dlsym(RTLD_NEXT, "FD_SET"); - //glibc_ops.FD_ZERO = dlsym(RTLD_NEXT, "FD_ZERO"); - //glibc_ops.pselect = dlsym(RTLD_NEXT, "pselect"); - glibc_ops.send = dlsym(RTLD_NEXT, "send"); - glibc_ops.sendto = dlsym(RTLD_NEXT, "sendto"); - glibc_ops.sendmsg = dlsym(RTLD_NEXT, "sendmsg"); - glibc_ops.shutdown = dlsym(RTLD_NEXT, "shutdown"); - glibc_ops.socketpair = dlsym(RTLD_NEXT, "socketpair"); - glibc_ops.pipe = dlsym(RTLD_NEXT, "pipe"); - glibc_ops.umask = dlsym(RTLD_NEXT, "umask"); - glibc_ops.getumask = dlsym(RTLD_NEXT, "getumask"); - glibc_ops.getdtablesize = dlsym(RTLD_NEXT, "getdtablesize"); /* PVFS does not implement socket ops */ - pvfs_ops.socket = dlsym(RTLD_NEXT, "socket"); - pvfs_ops.accept = dlsym(RTLD_NEXT, "accept"); - pvfs_ops.bind = dlsym(RTLD_NEXT, "bind"); - pvfs_ops.connect = dlsym(RTLD_NEXT, "connect"); - pvfs_ops.getpeername = dlsym(RTLD_NEXT, "getpeername"); - pvfs_ops.getsockname = dlsym(RTLD_NEXT, "getsockname"); - pvfs_ops.getsockopt = dlsym(RTLD_NEXT, "getsockopt"); - pvfs_ops.setsockopt = dlsym(RTLD_NEXT, "setsockopt"); - pvfs_ops.ioctl = dlsym(RTLD_NEXT, "ioctl"); - pvfs_ops.listen = dlsym(RTLD_NEXT, "listen"); - pvfs_ops.recv = dlsym(RTLD_NEXT, "recv"); - pvfs_ops.recvfrom = dlsym(RTLD_NEXT, "recvfrom"); - pvfs_ops.recvmsg = dlsym(RTLD_NEXT, "recvmsg"); - //pvfs_ops.select = dlsym(RTLD_NEXT, "select"); - //pvfs_ops.FD_CLR = dlsym(RTLD_NEXT, "FD_CLR"); - //pvfs_ops.FD_ISSET = dlsym(RTLD_NEXT, "FD_ISSET"); - //pvfs_ops.FD_SET = dlsym(RTLD_NEXT, "FD_SET"); - //pvfs_ops.FD_ZERO = dlsym(RTLD_NEXT, "FD_ZERO"); - //pvfs_ops.pselect = dlsym(RTLD_NEXT, "pselect"); - pvfs_ops.send = dlsym(RTLD_NEXT, "send"); - pvfs_ops.sendto = dlsym(RTLD_NEXT, "sendto"); - pvfs_ops.sendmsg = dlsym(RTLD_NEXT, "sendmsg"); - pvfs_ops.shutdown = dlsym(RTLD_NEXT, "shutdown"); - pvfs_ops.socketpair = dlsym(RTLD_NEXT, "socketpair"); - pvfs_ops.pipe = dlsym(RTLD_NEXT, "pipe"); + pvfs_ops.socket = dlsym(libc_handle, "socket"); + pvfs_ops.accept = dlsym(libc_handle, "accept"); + pvfs_ops.bind = dlsym(libc_handle, "bind"); + pvfs_ops.connect = dlsym(libc_handle, "connect"); + pvfs_ops.getpeername = dlsym(libc_handle, "getpeername"); + pvfs_ops.getsockname = dlsym(libc_handle, "getsockname"); + pvfs_ops.getsockopt = dlsym(libc_handle, "getsockopt"); + pvfs_ops.setsockopt = dlsym(libc_handle, "setsockopt"); + pvfs_ops.ioctl = dlsym(libc_handle, "ioctl"); + pvfs_ops.listen = dlsym(libc_handle, "listen"); + pvfs_ops.recv = dlsym(libc_handle, "recv"); + pvfs_ops.recvfrom = dlsym(libc_handle, "recvfrom"); + pvfs_ops.recvmsg = dlsym(libc_handle, "recvmsg"); + //pvfs_ops.select = dlsym(libc_handle, "select"); + //pvfs_ops.FD_CLR = dlsym(libc_handle, "FD_CLR"); + //pvfs_ops.FD_ISSET = dlsym(libc_handle, "FD_ISSET"); + //pvfs_ops.FD_SET = dlsym(libc_handle, "FD_SET"); + //pvfs_ops.FD_ZERO = dlsym(libc_handle, "FD_ZERO"); + //pvfs_ops.pselect = dlsym(libc_handle, "pselect"); + pvfs_ops.send = dlsym(libc_handle, "send"); + pvfs_ops.sendto = dlsym(libc_handle, "sendto"); + pvfs_ops.sendmsg = dlsym(libc_handle, "sendmsg"); + pvfs_ops.shutdown = dlsym(libc_handle, "shutdown"); + pvfs_ops.socketpair = dlsym(libc_handle, "socketpair"); + pvfs_ops.pipe = dlsym(libc_handle, "pipe"); + + /* should have been previously opened */ + /* this decrements the reference count */ + if (libc_handle != RTLD_NEXT) + { + dlclose(libc_handle); + } } +/* + * runs on exit to do any cleanup + */ static void usrint_cleanup(void) { /* later check for an error that might want us */ /* to keep this - for now it is empty */ glibc_ops.unlink(logfilepath); + /* cache cleanup? */ +#if 0 + if (ucache_enabled) + { + ucache_finalize(); + } +#endif + PVFS_sys_finalize(); } -/* - * Perform PVFS initialization tasks - */ +#if PVFS_UCACHE_ENABLE +/* + * access function to see if cache is currently enabled + * only used by code ouside of this module + */ +int pvfs_ucache_enabled(void) +{ + return ucache_enabled; +} +#endif + +void pvfs_sys_init_doit(void); + +int pvfs_sys_init(void) +{ + static int pvfs_initializing_flag = 0; + static int pvfs_lib_lock_initialized = 0; /* recursive lock init flag */ + static int pvfs_lib_init_flag = 0; + + int rc = 0; -void pvfs_sys_init(void) { - struct rlimit rl; - int rc; - static int pvfs_lib_init_flag = 0; + /* Mutex protecting initialization of recursive mutex */ + static gen_mutex_t mutex_mutex = GEN_MUTEX_INITIALIZER; + /* The recursive mutex */ + static pthread_mutex_t rec_mutex; - if (pvfs_lib_init_flag) + if(pvfs_lib_init_flag) + return 0; + + if(!pvfs_lib_lock_initialized) { - return; + rc = gen_mutex_lock(&mutex_mutex); + if(!pvfs_lib_lock_initialized) + { + //init recursive mutex + pthread_mutexattr_t rec_attr; + rc = pthread_mutexattr_init(&rec_attr); + rc = pthread_mutexattr_settype(&rec_attr, PTHREAD_MUTEX_RECURSIVE); + rc = pthread_mutex_init(&rec_mutex, &rec_attr); + rc = pthread_mutexattr_destroy(&rec_attr); + pvfs_lib_lock_initialized = 1; + } + rc = gen_mutex_unlock(&mutex_mutex); + } + + rc = pthread_mutex_lock(&rec_mutex); + if(pvfs_lib_init_flag || pvfs_initializing_flag) + { + rc = pthread_mutex_unlock(&rec_mutex); + return 1; } - pvfs_lib_init_flag = 1; /* should only run this once */ + + /* set this to prevent pvfs_sys_init from running recursively (indirect) */ pvfs_initializing_flag = 1; + //Perform Init + pvfs_sys_init_doit(); + pvfs_initializing_flag = 0; + pvfs_lib_init_flag = 1; + rc = pthread_mutex_unlock(&rec_mutex); + return 0; +} + +/* + * Perform PVFS initialization tasks + */ +void pvfs_sys_init_doit(void) { + struct rlimit rl; + int rc; + char curdir[PVFS_PATH_MAX]; + /* this allows system calls to run */ load_glibc(); PINT_initrand(); - /* if this fails no much we can do about it */ + /* if this fails not much we can do about it */ atexit(usrint_cleanup); + /* set up current working dir */ + memset(curdir, 0, sizeof(curdir)); + rc = my_glibc_getcwd(curdir, PVFS_PATH_MAX); + if (rc < 0) + { + perror("failed to get CWD"); + exit(-1); + } + pvfs_cwd_init(curdir, PVFS_PATH_MAX); + rc = getrlimit(RLIMIT_NOFILE, &rl); /* need to check for "INFINITY" */ @@ -366,14 +501,28 @@ void pvfs_sys_init(void) { descriptor_table = (pvfs_descriptor **)malloc(sizeof(pvfs_descriptor *) * descriptor_table_size); + if (!descriptor_table) + { + perror("failed to malloc descriptor table"); + exit(-1); + } memset(descriptor_table, 0, (sizeof(pvfs_descriptor *) * descriptor_table_size)); descriptor_table[0] = &pvfs_stdin; + gen_mutex_init(&pvfs_stdin.lock); + gen_mutex_init(&pvfs_stdin.s->lock); descriptor_table[1] = &pvfs_stdout; + gen_mutex_init(&pvfs_stdout.lock); + gen_mutex_init(&pvfs_stdin.s->lock); descriptor_table[2] = &pvfs_stderr; + gen_mutex_init(&pvfs_stderr.lock); + gen_mutex_init(&pvfs_stdin.s->lock); descriptor_table_count = PREALLOC; - sprintf(logfilepath, "/tmp/pvfsuid-%05d.log", (int)(getuid())); + /* open log file */ + /* we dupe this FD to get FD's for pvfs files */ + memset(logfilepath, 0, sizeof(logfilepath)); + snprintf(logfilepath, 25, "/tmp/pvfsuid-%05d.log", (int)(getuid())); logfile = glibc_ops.open(logfilepath, O_RDWR|O_CREAT, 0600); if (logfile < 0) { @@ -382,6 +531,9 @@ void pvfs_sys_init(void) { } /* initalize PVFS */ + /* this is very complex so most stuff needs to work + * before we do this + */ PVFS_util_init_defaults(); if (errno == EINPROGRESS) { @@ -390,14 +542,31 @@ void pvfs_sys_init(void) { /* call other initialization routines */ - /* Initialize User Cache */ - if(ucache && ucache_locks) +#if PVFS_UCACHE_ENABLE + //gossip_enable_file(UCACHE_LOG_FILE, "a"); + //gossip_enable_stderr(); + + /* ucache initialization - assumes shared memory previously + * aquired (using ucache daemon) + */ + rc = ucache_initialize(); + if (rc < 0) { - ucache_initialize(); + /* ucache failed to initialize, so continue without it */ + /* Write a warning message in the ucache.log letting programmer know */ + ucache_enabled = 0; + + /* Enable the writing of the error message and write the message to file. */ + //gossip_set_debug_mask(1, GOSSIP_UCACHE_DEBUG); + //gossip_debug(GOSSIP_UCACHE_DEBUG, + // "WARNING: client caching configured enabled but couldn't inizialize\n"); } +#endif - //PVFS_perror_gossip_silent(); - pvfs_initializing_flag = 0; +#ifdef PVFS_AIO_ENABLE + /* initialize aio interface */ + aiocommon_init(); +#endif } int pvfs_descriptor_table_size(void) @@ -409,18 +578,20 @@ int pvfs_descriptor_table_size(void) * Allocate a new pvfs_descriptor * initialize fsops to the given set */ - pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, int fd, - PVFS_object_ref *file_ref - ) + pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, + int fd, + PVFS_object_ref *file_ref, + int use_cache) { - int newfd, flags = 0; + int newfd, flags = 0; + pvfs_descriptor *pd; + + pvfs_sys_init(); if (fsops == NULL) { errno = EINVAL; return NULL; } - pvfs_sys_init(); - if (fd == -1) { /* PVFS file allocate a real descriptor for it */ @@ -435,56 +606,90 @@ int pvfs_descriptor_table_size(void) { return NULL; } + if (descriptor_table[newfd] != NULL) + { + errno = EINVAL; + return NULL; + } } + + /* allocate new descriptor */ descriptor_table_count++; - descriptor_table[newfd] = - (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); - if (!descriptor_table[newfd]) + pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); + + if (!pd) + { + return NULL; + } + memset(pd, 0, sizeof(pvfs_descriptor)); + + gen_mutex_init(&pd->lock); + gen_mutex_lock(&pd->lock); + descriptor_table[newfd] = pd; + + pd->s = (pvfs_descriptor_status *)malloc(sizeof(pvfs_descriptor_status)); + if (!pd->s) { + free(pd); return NULL; } + memset(pd->s, 0, sizeof(pvfs_descriptor_status)); + + gen_mutex_init(&pd->s->lock); + gen_mutex_lock(&pd->s->lock); /* fill in descriptor */ - /* add reference to chache objects here */ - descriptor_table[newfd]->fd = newfd; - descriptor_table[newfd]->dup_cnt = 1; - descriptor_table[newfd]->fsops = fsops; - descriptor_table[newfd]->true_fd = newfd; - descriptor_table[newfd]->pvfs_ref.fs_id = file_ref->fs_id; - descriptor_table[newfd]->pvfs_ref.handle = file_ref->handle; - descriptor_table[newfd]->flags = flags; - descriptor_table[newfd]->mode = 0; - descriptor_table[newfd]->file_pointer = 0; - descriptor_table[newfd]->token = 0; - descriptor_table[newfd]->dpath = NULL; - descriptor_table[newfd]->is_in_use = PVFS_FS; - descriptor_table[newfd]->mtbl = NULL; + pd->is_in_use = PVFS_FS; + pd->fd = newfd; + pd->true_fd = newfd; + pd->fdflags = 0; -#if 0 - /* File reference won't always be passed in */ - if(file_ref != NULL) - { - /* We have the file identifiers, so insert file info into ucache */ - rc = ucache_open_file(&(file_ref->fs_id), &(file_ref->handle), - descriptor_table[newfd]->mtbl); - /* Unique Entry */ - if(rc > 0) - { - descriptor_table[newfd]->mtbl->ref_cnt = 1; - } - /* File already in Cache */ - else if(rc == 0){ - descriptor_table[newfd]->mtbl->ref_cnt++; - } - /* Could not insert */ - else + /* + if (!use_cache) + { + pd->fdflags |= PVFS_FD_NOCACHE; + } + */ + pd->s->dup_cnt = 1; + pd->s->fsops = fsops; + if (file_ref) + { + pd->s->pvfs_ref.fs_id = file_ref->fs_id; + pd->s->pvfs_ref.handle = file_ref->handle; + } + else + { + /* if this is not a PVFS file then the file_ref will be NULL */ + pd->s->pvfs_ref.fs_id = 0; + pd->s->pvfs_ref.handle = 0LL; + } + + pd->s->flags = flags; + pd->s->mode = 0; /* this should be filled in by caller */ + pd->s->file_pointer = 0; + pd->s->token = 0; + pd->s->dpath = NULL; + pd->s->fent = NULL; /* not caching if left NULL */ + +#if PVFS_UCACHE_ENABLE + if (ucache_enabled /* && use_cache*/ ) + { + /* File reference won't always be passed in */ + if(file_ref != NULL) { - /* TODO: probably need modify this */ + /* We have the file identifiers + * so insert file info into ucache + * this fills in mtbl + */ + ucache_open_file(&(file_ref->fs_id), + &(file_ref->handle), + &(pd->s->fent)); } } -#endif +#endif /* PVFS_UCACHE_ENABLE */ - return descriptor_table[newfd]; + /* NEW PD IS STILL LOCKED */ + return pd; } /* @@ -493,12 +698,15 @@ int pvfs_descriptor_table_size(void) int pvfs_dup_descriptor(int oldfd, int newfd) { int rc = 0; + pvfs_descriptor *pd; + + pvfs_sys_init(); if (oldfd < 0 || oldfd >= descriptor_table_size) { errno = EBADF; return -1; } - if (newfd == -1) + if (newfd == -1) /* dup */ { newfd = glibc_ops.dup(logfile); if (newfd < 0) @@ -506,10 +714,16 @@ int pvfs_dup_descriptor(int oldfd, int newfd) return newfd; } } - else + else /* dup2 */ { + /* see if requested fd is in use */ if (descriptor_table[newfd] != NULL) { + /* check for special case */ + if (newfd == oldfd) + { + return oldfd; + } /* close old file in new slot */ rc = pvfs_free_descriptor(newfd); if (rc < 0) @@ -517,15 +731,35 @@ int pvfs_dup_descriptor(int oldfd, int newfd) return rc; } } + /* continuing with dup2 */ + rc = glibc_ops.dup2(oldfd, newfd); + if (rc < 0) + { + return rc; + } } - rc = glibc_ops.dup2(oldfd, newfd); - if (rc < 0) + /* new set up new pvfs_descfriptor */ + descriptor_table_count++; + pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); + if (!pd) { - return rc; + return -1; } - descriptor_table[newfd] = descriptor_table[oldfd]; - descriptor_table[newfd]->dup_cnt++; - descriptor_table_count++; + memset(pd, 0, sizeof(pvfs_descriptor)); + gen_mutex_init(&pd->lock); + gen_mutex_lock(&pd->lock); + descriptor_table[newfd] = pd; + + pd->is_in_use = PVFS_FS; + pd->fd = newfd; + pd->true_fd = newfd; + pd->fdflags = 0; + /* share the pvfs_desdriptor_status info */ + pd->s = descriptor_table[oldfd]->s; + gen_mutex_lock(&pd->s->lock); + pd->s->dup_cnt++; + gen_mutex_unlock(&pd->s->lock); + gen_mutex_unlock(&pd->lock); return 0; } @@ -536,7 +770,9 @@ int pvfs_dup_descriptor(int oldfd, int newfd) */ pvfs_descriptor *pvfs_find_descriptor(int fd) { - pvfs_descriptor *pd; + pvfs_descriptor *pd = NULL; + + pvfs_sys_init(); if (fd < 0 || fd >= descriptor_table_size) { errno = EBADF; @@ -545,41 +781,72 @@ pvfs_descriptor *pvfs_find_descriptor(int fd) pd = descriptor_table[fd]; if (!pd) { - int flags; + int flags = 0; /* see if glibc opened this file without our knowing */ flags = glibc_ops.fcntl(fd, F_GETFL); - if (flags < 0) + if (flags == -1) { - errno = EBADF; + /* apparently not */ return NULL; } + /* allocate a descriptor */ + descriptor_table_count++; pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); + if (!pd) + { + return NULL; + } + memset(pd, 0, sizeof(pvfs_descriptor)); + gen_mutex_init(&pd->lock); + gen_mutex_lock(&pd->lock); + descriptor_table[fd] = pd; + + pd->s = + (pvfs_descriptor_status *)malloc(sizeof(pvfs_descriptor_status)); + if (!pd->s) + { + free(pd); + return NULL; + } + memset(pd->s, 0, sizeof(pvfs_descriptor_status)); + gen_mutex_init(&pd->s->lock); + /* fill in descriptor */ + pd->is_in_use = PVFS_FS; pd->fd = fd; - pd->dup_cnt = 1; - pd->fsops = &glibc_ops; pd->true_fd = fd; - pd->pvfs_ref.fs_id = 0; - pd->pvfs_ref.handle = 0; - pd->flags = flags; - pd->mode = 0; - pd->file_pointer = 0; - pd->token = 0; - pd->dpath = NULL; - pd->is_in_use = PVFS_FS; - descriptor_table[fd] = pd; + pd->fdflags = 0; + pd->s->dup_cnt = 1; + pd->s->fsops = &glibc_ops; + pd->s->pvfs_ref.fs_id = 0; + pd->s->pvfs_ref.handle = 0LL; + pd->s->flags = flags; + pd->s->mode = 0; + pd->s->file_pointer = 0; + pd->s->token = 0; + pd->s->dpath = NULL; + pd->s->fent = NULL; /* not caching if left NULL */ } - else if (pd->is_in_use != PVFS_FS) + else { - errno = EBADF; - return NULL; + /* locks here prevent a thread from getting */ + /* a pd that is not finish being allocated yet */ + gen_mutex_lock(&pd->lock); + if (pd->is_in_use != PVFS_FS) + { + errno = EBADF; + gen_mutex_unlock(&pd->lock); + return NULL; + } } + gen_mutex_unlock(&pd->lock); return pd; } int pvfs_free_descriptor(int fd) { - pvfs_descriptor *pd; + int dup_cnt; + pvfs_descriptor *pd = NULL; debug("pvfs_free_descriptor called with %d\n", fd); pd = pvfs_find_descriptor(fd); @@ -596,27 +863,42 @@ int pvfs_free_descriptor(int fd) descriptor_table_count--; /* check if last copy */ - if (--(pd->dup_cnt) <= 0) + gen_mutex_lock(&pd->s->lock); + dup_cnt = --(pd->s->dup_cnt); + gen_mutex_unlock(&pd->s->lock); + if (dup_cnt <= 0) { - if (pd->dpath) + if (pd->s->dpath) { - free(pd->dpath); + free(pd->s->dpath); } -#if 0 - /* release cache objects here */ - pd->mtbl->ref_cnt--; - if(pd->mtbl->ref_cnt == 0) +#if PVFS_UCACHE_ENABLE + if (pd->s->fent) { - /* Flush dirty blocks before file removal from cache */ - ucache_flush(&(pd->pvfs_ref.fs_id), &(pd->pvfs_ref.handle)); - /* remove all of this file's associated data from cache */ - ucache_close_file(&(pd->pvfs_ref.fs_id), &(pd->pvfs_ref.handle)); + int rc = 0; + rc = ucache_close_file(pd->s->fent); + if(rc == -1) + { + return rc; + } } -#endif +#endif /* PVFS_UCACHE_ENABLE */ - /* free descriptor - wipe memory first */ - memset(pd, 0, sizeof(pvfs_descriptor)); + /* free descriptor status - wipe memory first */ + memset(pd->s, 0, sizeof(pvfs_descriptor_status)); + + /* first 3 descriptors not malloc'd */ + if (fd > 2) + { + free(pd->s); + } + } + /* free descriptor - wipe memory first */ + memset(pd, 0, sizeof(pvfs_descriptor)); + /* first 3 descriptors not malloc'd */ + if (fd > 2) + { free(pd); } @@ -630,27 +912,46 @@ int pvfs_free_descriptor(int fd) */ char *pvfs_qualify_path(const char *path) { - int cdsz; - int psz; - char *curdir = NULL; + int cdsz, psz, msz; + char *rc; char *newpath = NULL; + char curdir[PVFS_PATH_MAX]; if(path[0] != '/') { - curdir = get_current_dir_name(); + memset(curdir, 0, PVFS_PATH_MAX); + rc = getcwd(curdir, PVFS_PATH_MAX); if (curdir == NULL) { + /* ERANGE if need a larger buffer */ /* error, bail out */ return NULL; } cdsz = strlen(curdir); psz = strlen(path); + msz = cdsz + psz + 2; + if (msz < 2) + { + errno = EINVAL; + return NULL; + } /* allocate buffer for whole path and copy */ - newpath = (char *)malloc(cdsz + psz + 2); - strncpy(newpath, curdir, cdsz); - free(curdir); + newpath = (char *)malloc(msz); + if (!newpath) + { + return NULL; + } + memset(newpath, 0, msz); + if (cdsz >= 0) /* zero size copy is bad */ + { + strncpy(newpath, curdir, cdsz); + } + /* free(curdir); */ strncat(newpath, "/", 1); - strncat(newpath, path, psz); + if (psz >= 0) /* zero size copy is bad */ + { + strncat(newpath, path, psz); + } } else { @@ -667,44 +968,66 @@ char *pvfs_qualify_path(const char *path) int is_pvfs_path(const char *path) { -#ifdef PVFS_ASSUME_MOUNT - struct statfs file_system; -#endif int rc = 0; - PVFS_fs_id fs_id; - char pvfs_path[256]; char *newpath = NULL ; - - if (pvfs_initializing_flag) +#if PVFS_USRINT_KMOUNT + int npsize; + struct stat sbuf; + struct statfs fsbuf; +#else + PVFS_fs_id fs_id; + char pvfs_path[PVFS_PATH_MAX]; +#endif + + if(pvfs_sys_init()) { - /* we cannot open a PVFS file while - * initializing PVFS - */ return 0; } - pvfs_sys_init(); -#ifdef PVFS_ASSUME_MOUNT - memset(&file_system, 0, sizeof(file_system)); + if (!path) + { + errno = EINVAL; + return 0; /* let glibc sort out the error */ + } +#if PVFS_USRINT_KMOUNT + memset(&sbuf, 0, sizeof(sbuf)); + memset(&fsbuf, 0, sizeof(fsbuf)); + npsize = strnlen(path, PVFS_PATH_MAX) + 1; + newpath = (char *)malloc(npsize); + if (!newpath) + { + return 0; /* let glibc sort out the error */ + } + strncpy(newpath, path, npsize); - newpath = pvfs_qualify_path(path); - /* lop off the last segment of the path */ - int count; - for(count = strlen(newpath) -2; count > 0; count--) + /* first try to stat the path */ + /* this must call standard glibc stat */ + rc = glibc_ops.stat(newpath, &sbuf); + if (rc < 0) { - if(newpath[count] == '/') + int count; + /* path doesn't exist, try removing last segment */ + for(count = strlen(newpath) - 2; count > 0; count--) { - newpath[count] = '\0'; - break; + if(newpath[count] == '/') + { + newpath[count] = '\0'; + break; + } + } + /* this must call standard glibc stat */ + rc = glibc_ops.stat(newpath, &sbuf); + if (rc < 0) + { + /* can't find the path must be an error */ + free(newpath); + return 0; /* let glibc sort out the error */ } } /* this must call standard glibc statfs */ - glibc_ops.statfs(newpath, &file_system); - if (newpath != path) - { - free(newpath); - } - if(file_system.f_type == PVFS_FS) + rc = glibc_ops.statfs(newpath, &fsbuf); + free(newpath); + if(fsbuf.f_type == PVFS_FS) { return 1; /* PVFS */ } @@ -713,10 +1036,15 @@ int is_pvfs_path(const char *path) return 0; /* not PVFS assume the kernel can handle it */ } /***************************************************************/ -#else +#else /* PVFS_USRINT_KMOUNT */ /***************************************************************/ + /* we might not be able to stat the file direcly + * so we will use our resolver to look up the path + * prefix in the mount tab files + */ + memset(pvfs_path, 0 , PVFS_PATH_MAX); newpath = pvfs_qualify_path(path); - rc = PVFS_util_resolve(newpath, &fs_id, pvfs_path, 256); + rc = PVFS_util_resolve(newpath, &fs_id, pvfs_path, PVFS_PATH_MAX); if (newpath != path) { free(newpath); @@ -732,7 +1060,7 @@ int is_pvfs_path(const char *path) // return -1; /* an error returned */ } return 1; /* a PVFS path */ -#endif +#endif /* PVFS_USRINT_KMOUNT */ } /** diff --git a/src/client/usrint/openfile-util.h b/src/client/usrint/openfile-util.h index 75d55e2..b3c8a05 100644 --- a/src/client/usrint/openfile-util.h +++ b/src/client/usrint/openfile-util.h @@ -18,49 +18,52 @@ #define PVFS_FD_SUCCESS 0 #define PVFS_FD_FAILURE -1 -int split_pathname(const char *path, +extern int split_pathname(const char *path, int dirflag, char **directory, char **filename); -void pvfs_sys_init(void); +int pvfs_ucache_enabled(void); -char *pvfs_qualify_path(const char *path); +extern int pvfs_sys_init(void); -int is_pvfs_path(const char *path); +extern char *pvfs_qualify_path(const char *path); -void pvfs_debug(char *fmt, ...); +extern int is_pvfs_path(const char *path); -void load_glibc(void); +extern void pvfs_debug(char *fmt, ...); -int pvfs_lookup_dir(const char *directory, +extern void load_glibc(void); + +extern int pvfs_lookup_dir(const char *directory, PVFS_object_ref *ref, int *fs_id); -int pvfs_lookup_file(const char *filename, +extern int pvfs_lookup_file(const char *filename, int fs_id, PVFS_object_ref parent_ref, int follow_links, PVFS_object_ref *ref); -pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, - int fd, - PVFS_object_ref *file_ref); +extern pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, + int fd, + PVFS_object_ref *file_ref, + int use_cache); -pvfs_descriptor *pvfs_find_descriptor(int fd); +extern pvfs_descriptor *pvfs_find_descriptor(int fd); -int pvfs_dup_descriptor(int oldfd, int newfd); +extern int pvfs_dup_descriptor(int oldfd, int newfd); -int pvfs_free_descriptor(int fd); +extern int pvfs_free_descriptor(int fd); -int pvfs_descriptor_table_size(void); +extern int pvfs_descriptor_table_size(void); -int pvfs_create_file(const char *filename, +extern int pvfs_create_file(const char *filename, mode_t mode, PVFS_object_ref parent_ref, PVFS_object_ref *ref); -void PINT_initrand(void); +extern void PINT_initrand(void); -long int PINT_random(void); +extern long int PINT_random(void); #endif diff --git a/src/client/usrint/posix-pvfs.c b/src/client/usrint/posix-pvfs.c index 39802bd..2d68311 100644 --- a/src/client/usrint/posix-pvfs.c +++ b/src/client/usrint/posix-pvfs.c @@ -278,11 +278,11 @@ int pvfs_unlinkat(int dirfd, const char *path, int flags) } if (flags & AT_REMOVEDIR) { - rc = iocommon_rmdir(path, &pd->pvfs_ref); + rc = iocommon_rmdir(path, &pd->s->pvfs_ref); } else { - rc = iocommon_unlink(path, &pd->pvfs_ref); + rc = iocommon_unlink(path, &pd->s->pvfs_ref); } } return rc; @@ -357,7 +357,7 @@ int pvfs_renameat(int olddirfd, const char *oldpath, errno = EBADF; return -1; } - olddirref = &pd->pvfs_ref; + olddirref = &pd->s->pvfs_ref; absoldpath = (char *)oldpath; } if (oldpath[0] == '/' || newdirfd == AT_FDCWD) @@ -382,7 +382,7 @@ int pvfs_renameat(int olddirfd, const char *oldpath, errno = EBADF; return -1; } - newdirref = &pd->pvfs_ref; + newdirref = &pd->s->pvfs_ref; absnewpath = (char *)newpath; } rc = iocommon_rename(olddirref, absoldpath, newdirref, absnewpath); @@ -414,12 +414,14 @@ ssize_t pvfs_read(int fd, void *buf, size_t count) { return -1; } - rc = pvfs_prdwr64(fd, buf, count, pd->file_pointer, PVFS_IO_READ); + rc = pvfs_prdwr64(fd, buf, count, pd->s->file_pointer, PVFS_IO_READ); if (rc < 0) { return -1; } - pd->file_pointer += rc; + gen_mutex_lock(&pd->s->lock); + pd->s->file_pointer += rc; + gen_mutex_unlock(&pd->s->lock); return rc; } @@ -453,6 +455,7 @@ ssize_t pvfs_pread64( int fd, void *buf, size_t count, off64_t offset ) ssize_t pvfs_write(int fd, const void *buf, size_t count) { int rc; + off64_t offset; if (fd < 0) { @@ -464,12 +467,25 @@ ssize_t pvfs_write(int fd, const void *buf, size_t count) { return -1; } - rc = pvfs_prdwr64(fd, (void *)buf, count, pd->file_pointer, PVFS_IO_WRITE); + /* check for append mode */ + if (pd->s->flags & O_APPEND) + { + struct stat sbuf; + pvfs_fstat(fd, &sbuf); + offset = sbuf.st_size; + } + else + { + offset = pd->s->file_pointer; + } + rc = pvfs_prdwr64(fd, (void *)buf, count, offset, PVFS_IO_WRITE); if (rc < 0) { return -1; } - pd->file_pointer += rc; + gen_mutex_lock(&pd->s->lock); + pd->s->file_pointer += rc; + gen_mutex_unlock(&pd->s->lock); return rc; } @@ -502,16 +518,13 @@ ssize_t pvfs_pwrite64(int fd, const void *buf, size_t count, off64_t offset) */ static ssize_t pvfs_prdwr64(int fd, void *buf, - size_t count, + size_t size, off64_t offset, int which) { int rc; pvfs_descriptor* pd; - PVFS_Request freq, mreq; - - memset(&freq, 0, sizeof(freq)); - memset(&mreq, 0, sizeof(mreq)); + struct iovec vector[1]; /* Find the descriptor */ pd = pvfs_find_descriptor(fd); @@ -521,18 +534,21 @@ static ssize_t pvfs_prdwr64(int fd, return -1; } - rc = PVFS_Request_contiguous(count, PVFS_BYTE, &freq); - rc = PVFS_Request_contiguous(count, PVFS_BYTE, &mreq); + /* Ensure descriptor is used for the correct type of access */ + if ((which == PVFS_IO_READ && + (O_WRONLY == (pd->s->flags & O_ACCMODE))) || + (which == PVFS_IO_WRITE && + (O_RDONLY == (pd->s->flags & O_ACCMODE)))) + { + errno = EBADF; + return -1; + } /* place contiguous buff and count into an iovec array of length 1 */ - struct iovec vector[1]; vector[0].iov_base = buf; - vector[0].iov_len = count; - - rc = iocommon_readorwrite(which, pd, offset, buf, mreq, freq, count, &vector[0]); + vector[0].iov_len = size; - PVFS_Request_free(&freq); - PVFS_Request_free(&mreq); + rc = iocommon_readorwrite(which, pd, offset, 1, vector); return rc; } @@ -545,14 +561,9 @@ static ssize_t pvfs_rdwrv(int fd, size_t count, int which) { - int rc; + int rc = 0; pvfs_descriptor* pd; - PVFS_Request freq, mreq; off64_t offset; - void *buf; - - memset(&freq, 0, sizeof(freq)); - memset(&mreq, 0, sizeof(mreq)); /* Find the descriptor */ pd = pvfs_find_descriptor(fd); @@ -560,21 +571,27 @@ static ssize_t pvfs_rdwrv(int fd, { return -1; } - offset = pd->file_pointer; + offset = pd->s->file_pointer; - rc = PVFS_Request_contiguous(count, PVFS_BYTE, &freq); - rc = pvfs_convert_iovec(vector, count, &mreq, &buf); + /* Ensure descriptor is used for the correct type of access */ + if ((which == PVFS_IO_READ && + (O_WRONLY == (pd->s->flags & O_ACCMODE))) || + (which == PVFS_IO_WRITE && + (O_RDONLY == (pd->s->flags & O_ACCMODE)))) + { + errno = EBADF; + return -1; + } - rc = iocommon_readorwrite(which, pd, offset, buf, mreq, freq, count, vector); + rc = iocommon_readorwrite(which, pd, offset, count, vector); if (rc >= 0) { - pd->file_pointer += rc; + gen_mutex_lock(&pd->s->lock); + pd->s->file_pointer += rc; + gen_mutex_unlock(&pd->s->lock); } - PVFS_Request_free(&freq); - PVFS_Request_free(&mreq); - return rc; } @@ -608,7 +625,7 @@ off64_t pvfs_lseek64(int fd, off64_t offset, int whence) iocommon_lseek(pd, offset, 1, whence); - return pd->file_pointer; + return pd->s->file_pointer; } /** @@ -637,7 +654,7 @@ int pvfs_truncate64(const char *path, off64_t length) { return -1; } - rc = iocommon_truncate(pd->pvfs_ref, length); + rc = iocommon_truncate(pd->s->pvfs_ref, length); pvfs_close(pd->fd); return rc; } @@ -691,7 +708,7 @@ int pvfs_ftruncate64(int fd, off64_t length) { return -1; } - return iocommon_truncate(pd->pvfs_ref, length); + return iocommon_truncate(pd->s->pvfs_ref, length); } /** @@ -720,7 +737,7 @@ int pvfs_close(int fd) } /* flush buffers */ - if (S_ISREG(pd->mode)) + if (S_ISREG(pd->s->mode)) { rc = iocommon_fsync(pd); if (rc < 0) @@ -740,35 +757,6 @@ int pvfs_close(int fd) return rc; } -/** - * pvfs_flush - */ -int pvfs_flush(int fd) -{ - int rc = 0; - pvfs_descriptor* pd; - - debug("pvfs_flush: called with %d\n", fd); - - if (fd < 0) - { - errno = EBADF; - return -1; - } - /* Find the descriptor */ - pd = pvfs_find_descriptor(fd); - if (!pd) - { - errno = EBADF; - return -1; - } - - /* tell the server to flush data to disk */ - rc = iocommon_fsync(pd); - debug("pvfs_flush: returns %d\n", rc); - return rc; -} - /* various flavors of stat */ /** * pvfs_stat @@ -1049,6 +1037,111 @@ int pvfs_lstat64(const char *path, struct stat64 *buf) return rc; } +/** + * pvfs_futimesat + */ +int pvfs_futimesat(int dirfd, + const char *path, + const struct timeval times[2]) +{ + int rc = 0; + pvfs_descriptor *pd=NULL, *pd2=NULL; + PVFS_sys_attr attr; + + if (dirfd < 0) + { + errno = EBADF; + return -1; + } + pd = pvfs_find_descriptor(dirfd); + if (!pd) + { + return -1; + } + if (path) + { + pd2 = iocommon_open(path, O_RDONLY, PVFS_HINT_NULL, 0, pd); + } + else + { + pd2 = pd; /* allow null path to work */ + } + if (!pd2) + { + return -1; + } + memset(&attr, 0, sizeof(attr)); + if (!times) + { + struct timeval curtime; + gettimeofday(&curtime, NULL); + attr.atime = curtime.tv_sec; + attr.mtime = curtime.tv_sec; + } + else + { + attr.atime = times[0].tv_sec; + attr.mtime = times[1].tv_sec; + } + attr.mask = PVFS_ATTR_SYS_ATIME | PVFS_ATTR_SYS_MTIME; + rc = iocommon_setattr(pd2->s->pvfs_ref, &attr); + if (path) + { + pvfs_close(pd2->fd); + } + return rc; +} + +int pvfs_utimes(const char *path, const struct timeval times[2]) +{ + return pvfs_futimesat(AT_FDCWD, path, times); +} + +int pvfs_utime(const char *path, const struct utimbuf *buf) +{ + struct timeval times[2]; + times[0].tv_sec = buf->actime; + times[0].tv_usec = 0; + times[1].tv_sec = buf->modtime; + times[1].tv_usec = 0; + return pvfs_futimesat(AT_FDCWD, path, times); +} + +int pvfs_futimes(int fd, const struct timeval times[2]) +{ + int rc = 0; + pvfs_descriptor *pd=NULL; + PVFS_sys_attr attr; + + if (fd < 0) + { + errno = EBADF; + return -1; + } + pd = pvfs_find_descriptor(fd); + if (!pd) + { + return -1; + } + memset(&attr, 0, sizeof(attr)); + if (!times) + { + struct timeval curtime; + gettimeofday(&curtime, NULL); + attr.atime = curtime.tv_sec; + attr.mtime = curtime.tv_sec; + } + else + { + attr.atime = times[0].tv_sec; + attr.mtime = times[1].tv_sec; + } + attr.mask = PVFS_ATTR_SYS_ATIME | PVFS_ATTR_SYS_MTIME; + rc = iocommon_setattr(pd->s->pvfs_ref, &attr); + pvfs_close(pd->fd); + return rc; +} + /** * pvfs_dup */ @@ -1331,7 +1424,7 @@ int pvfs_mkdirat(int dirfd, const char *path, mode_t mode) } rc = iocommon_make_directory(path, (mode & ~mask_val & 0777), - &pd->pvfs_ref); + &pd->s->pvfs_ref); } return rc; } @@ -1378,7 +1471,7 @@ ssize_t pvfs_readlink(const char *path, char *buf, size_t bufsiz) rc = -1; goto errorout; } - debug("pvfs_readlink mode is %o\n", pd->mode); + debug("pvfs_readlink mode is %o\n", pd->s->mode); /* this checks that it is a valid symlink and sets errno if not */ rc = iocommon_readlink(pd, buf, bufsiz); /* need to close if readlink succeeds or not */ @@ -1392,7 +1485,7 @@ ssize_t pvfs_readlink(const char *path, char *buf, size_t bufsiz) return rc; } -int pvfs_readlinkat(int fd, const char *path, char *buf, size_t bufsiz) +ssize_t pvfs_readlinkat(int fd, const char *path, char *buf, size_t bufsiz) { int rc; pvfs_descriptor *pd, *pd2; @@ -1464,13 +1557,13 @@ int pvfs_symlinkat(const char *oldpath, int newdirfd, const char *newpath) return -1; } } - return iocommon_symlink(newpath, oldpath, &pd->pvfs_ref); + return iocommon_symlink(newpath, oldpath, &pd->s->pvfs_ref); } /** * PVFS does not have hard links */ -ssize_t pvfs_link(const char *oldpath, const char *newpath) +int pvfs_link(const char *oldpath, const char *newpath) { fprintf(stderr, "pvfs_link not implemented\n"); errno = ENOSYS; @@ -1576,7 +1669,7 @@ int pvfs_faccessat(int fd, const char *path, int mode, int flags) return -1; } } - return iocommon_access(path, mode, flags, &pd->pvfs_ref); + return iocommon_access(path, mode, flags, &pd->s->pvfs_ref); } int pvfs_flock(int fd, int op) @@ -1606,16 +1699,16 @@ int pvfs_fcntl(int fd, int cmd, ...) { case F_DUPFD : case F_GETFD : + rc = pd->fdflags; + break; case F_SETFD : - errno = ENOSYS; - fprintf(stderr, "pvfs_fcntl not implemented\n"); - rc = -1; + pd->fdflags = va_arg(ap, int); break; case F_GETFL : - rc = pd->flags; + rc = pd->s->flags; break; case F_SETFL : - pd->flags = va_arg(ap, int); + pd->s->flags = va_arg(ap, int); break; case F_GETLK : case F_SETLK : @@ -1630,7 +1723,7 @@ int pvfs_fcntl(int fd, int cmd, ...) case F_NOTIFY : default : errno = ENOSYS; - fprintf(stderr, "pvfs_fcntl not implemented\n"); + fprintf(stderr, "pvfs_fcntl command not implemented\n"); rc = -1; break; } @@ -1646,12 +1739,34 @@ void pvfs_sync(void ) return; } -/* sync file, but not dir it is in */ +/** + * pvfs_fsync + * sync file, but not dir it is in + * as close as we have for now + */ int pvfs_fsync(int fd) { int rc = 0; + pvfs_descriptor* pd; - rc = pvfs_flush(fd); /* as close as we have for now */ + debug("pvfs_fsync: called with %d\n", fd); + + if (fd < 0) + { + errno = EBADF; + return -1; + } + /* Find the descriptor */ + pd = pvfs_find_descriptor(fd); + if (!pd) + { + errno = EBADF; + return -1; + } + + /* tell the server to flush data to disk */ + rc = iocommon_fsync(pd); + debug("pvfs_fsync: returns %d\n", rc); return rc; } @@ -1660,7 +1775,7 @@ int pvfs_fdatasync(int fd) { int rc = 0; - rc = pvfs_flush(fd); /* as close as we have for now */ + rc = pvfs_fsync(fd); /* as close as we have for now */ return rc; } @@ -1746,7 +1861,7 @@ int pvfs_statfs64(const char *path, struct statfs64 *buf) } return rc; } - + int pvfs_fstatfs(int fd, struct statfs *buf) { pvfs_descriptor *pd; @@ -1783,6 +1898,86 @@ int pvfs_fstatfs64(int fd, struct statfs64 *buf) return iocommon_statfs64(pd, buf); } +int pvfs_statvfs(const char *path, struct statvfs *buf) +{ + int rc = 0; + pvfs_descriptor *pd; + struct statfs buf2; + char *newpath; + + newpath = pvfs_qualify_path(path); + if (!newpath) + { + return -1; + } + pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); + if (!pd) + { + rc = -1; + goto errorout; + } + rc = iocommon_statfs(pd, &buf2); + pvfs_close(pd->fd); + if (rc < 0) + { + goto errorout; + } + buf->f_bsize = buf2.f_bsize; + /* buf->f_rsize */ + buf->f_blocks = buf2.f_blocks; + buf->f_bfree = buf2.f_bfree; + buf->f_bavail = buf2.f_bavail; + buf->f_files = buf2.f_files; + buf->f_ffree = buf2.f_ffree; + /* buf->f_favail */ + buf->f_fsid = (unsigned long)buf2.f_fsid.__val[0]; + /* buf->f_flag */ + buf->f_namemax = buf2.f_namelen; + +errorout: + if (newpath != path) + { + free(newpath); + } + return rc; +} + +int pvfs_fstatvfs(int fd, struct statvfs *buf) +{ + int rc = 0; + pvfs_descriptor *pd; + struct statfs buf2; + + if (fd < 0) + { + errno = EBADF; + return -1; + } + pd = pvfs_find_descriptor(fd); + if (!pd) + { + errno = EBADF; + return -1; + } + rc = iocommon_statfs(pd, &buf2); + if (rc < 0) + { + return -1; + } + buf->f_bsize = buf2.f_bsize; + /* buf->f_rsize */ + buf->f_blocks = buf2.f_blocks; + buf->f_bfree = buf2.f_bfree; + buf->f_bavail = buf2.f_bavail; + buf->f_files = buf2.f_files; + buf->f_ffree = buf2.f_ffree; + /* buf->f_favail */ + buf->f_fsid = (unsigned long)buf2.f_fsid.__val[0]; + /* buf->f_flag */ + buf->f_namemax = buf2.f_namelen; + return rc; +} + int pvfs_mknod(const char *path, mode_t mode, dev_t dev) { return pvfs_mknodat(AT_FDCWD, path, mode, dev); @@ -1888,10 +2083,10 @@ int pvfs_fsetxattr(int fd, return rc; } -int pvfs_getxattr(const char *path, - const char *name, - void *value, - size_t size) +ssize_t pvfs_getxattr(const char *path, + const char *name, + void *value, + size_t size) { int fd, rc = 0; @@ -1905,10 +2100,10 @@ int pvfs_getxattr(const char *path, return rc; } -int pvfs_lgetxattr(const char *path, - const char *name, - void *value, - size_t size) +ssize_t pvfs_lgetxattr(const char *path, + const char *name, + void *value, + size_t size) { int fd, rc = 0; @@ -1922,10 +2117,10 @@ int pvfs_lgetxattr(const char *path, return rc; } -int pvfs_fgetxattr(int fd, - const char *name, - void *value, - size_t size) +ssize_t pvfs_fgetxattr(int fd, + const char *name, + void *value, + size_t size) { pvfs_descriptor *pd; @@ -1938,9 +2133,9 @@ int pvfs_fgetxattr(int fd, return iocommon_geteattr(pd, name, value, size); } -int pvfs_listxattr(const char *path, - char *list, - size_t size) +ssize_t pvfs_listxattr(const char *path, + char *list, + size_t size) { int fd, rc = 0; @@ -1954,9 +2149,9 @@ int pvfs_listxattr(const char *path, return rc; } -int pvfs_llistxattr(const char *path, - char *list, - size_t size) +ssize_t pvfs_llistxattr(const char *path, + char *list, + size_t size) { int fd, rc = 0; @@ -1970,11 +2165,11 @@ int pvfs_llistxattr(const char *path, return rc; } -int pvfs_flistxattr(int fd, - char *list, - size_t size) +ssize_t pvfs_flistxattr(int fd, + char *list, + size_t size) { - int numkeys, rc = 0; + int retsize, rc = 0; pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); @@ -1983,12 +2178,12 @@ int pvfs_flistxattr(int fd, errno = EBADF; return -1; } - rc = iocommon_listeattr(pd, list, size, &numkeys); + rc = iocommon_listeattr(pd, list, size, &retsize); if (rc < 0) { return -1; } - return numkeys; + return retsize; } int pvfs_removexattr(const char *path, @@ -2035,26 +2230,74 @@ int pvfs_fremovexattr(int fd, return iocommon_deleattr(pd, name); } +/* These functions simulate management of the current + * working directory given than the kernel may not + * be aware of PVFS virtual mounts + */ +int pvfs_cwd_init(const char *buf, size_t size) +{ + char *rv; + memset(pvfs_cwd, 0, PVFS_PATH_MAX); + rv = strncpy(pvfs_cwd, buf, PVFS_util_min(size, PVFS_PATH_MAX)); + if (!rv) + { + return -1; + } + return 0; +} + /** * pvfs chdir */ int pvfs_chdir(const char *path) { - int plen; + int rc = 0, plen = 0; + struct stat sbuf; + char *newpath = NULL; if (!path) { errno = EINVAL; return -1; } - plen = strlen(path); + /* we really need to resolve this to a cannonical path */ + newpath = pvfs_qualify_path(path); + if (!newpath) + { + return -1; + } + /* basic path length check */ + plen = strlen(newpath); if (plen > PVFS_PATH_MAX) { errno = ENAMETOOLONG; - return -1; + rc = -1; + goto errout; } - strcpy(pvfs_cwd, path); - return 0; + /* if it is a valid path we can stat it and see what it is */ + rc = stat(newpath, &sbuf); /* this will get most errors */ + if (rc < 0) + { + rc = -1; + goto errout; + } + /* path must be a directory */ + if (!S_ISDIR(sbuf.st_mode)) + { + errno = ENOTDIR; + rc = -1; + goto errout; + } + /* we will keep a copy and keep one in the environment */ + strncpy(pvfs_cwd, newpath, PVFS_PATH_MAX); + setenv("PWD", newpath, 1); + +errout: + if (newpath != path) + { + free(newpath); + } + return rc; } int pvfs_fchdir(int fd) @@ -2062,19 +2305,23 @@ int pvfs_fchdir(int fd) int plen; pvfs_descriptor *pd; + /* path is already opened, make sure it is a dir */ pd = pvfs_find_descriptor(fd); - if (!pd || !pd->dpath) + if (!pd || !S_ISDIR(pd->s->mode) || !pd->s->dpath) { errno = EBADF; return -1; } - plen = strlen(pd->dpath); + /* basic check for overflow */ + plen = strlen(pd->s->dpath); if (plen > PVFS_PATH_MAX) { errno = ENAMETOOLONG; return -1; } - strcpy(pvfs_cwd, pd->dpath); + /* we will keep a copy and keep one in the environment */ + strncpy(pvfs_cwd, pd->s->dpath, PVFS_PATH_MAX); + setenv("PWD", pd->s->dpath, 1); return 0; } @@ -2082,10 +2329,17 @@ char *pvfs_getcwd(char *buf, size_t size) { int plen; plen = strnlen(pvfs_cwd, PVFS_PATH_MAX); + /* implement Linux variation */ if (!buf) { + int bsize = size ? size : plen + 1; + if (bsize < plen + 1) + { + errno = ERANGE; + return NULL; + } /* malloc space */ - buf = (char *)malloc(plen + 1); + buf = (char *)malloc(bsize); if (!buf) { errno = ENOMEM; @@ -2123,7 +2377,10 @@ char *pvfs_get_current_dir_name(void) strcpy(buf, pvfs_cwd); return buf; } - +/* + * This is the no-frills old-fashioned version + * Use at own risk + */ char *pvfs_getwd(char *buf) { if (!buf) @@ -2138,6 +2395,10 @@ char *pvfs_getwd(char *buf) /** * pvfs_umask + * + * Manage a umask ourselves just in case we need to + * Probably the standard version works fine but + * In case we get a problem we have it */ mode_t pvfs_umask(mode_t mask) { @@ -2156,6 +2417,9 @@ int pvfs_getdtablesize(void) return pvfs_descriptor_table_size(); } +/* + * Table of PVFS system call versions for use by posix.c + */ posix_ops pvfs_ops = { .open = pvfs_open, @@ -2184,7 +2448,6 @@ posix_ops pvfs_ops = .ftruncate64 = pvfs_ftruncate64, .fallocate = pvfs_fallocate, .close = pvfs_close, - .flush = pvfs_flush, .stat = pvfs_stat, .stat64 = pvfs_stat64, .fstat = pvfs_fstat, @@ -2193,6 +2456,10 @@ posix_ops pvfs_ops = .fstatat64 = pvfs_fstatat64, .lstat = pvfs_lstat, .lstat64 = pvfs_lstat64, + .futimesat = pvfs_futimesat, + .utimes = pvfs_utimes, + .utime = pvfs_utime, + .futimes = pvfs_futimes, .dup = pvfs_dup, .dup2 = pvfs_dup2, .chown = pvfs_chown, @@ -2227,6 +2494,8 @@ posix_ops pvfs_ops = .statfs64 = pvfs_statfs64, .fstatfs = pvfs_fstatfs, .fstatfs64 = pvfs_fstatfs64, + .statvfs = statvfs, /* this one is probably special */ + .fstatvfs = pvfs_fstatvfs, .mknod = pvfs_mknod, .mknodat = pvfs_mknodat, .sendfile = pvfs_sendfile, @@ -2243,9 +2512,21 @@ posix_ops pvfs_ops = .removexattr = pvfs_removexattr, .lremovexattr = pvfs_lremovexattr, .fremovexattr = pvfs_fremovexattr, + .getdtablesize = pvfs_getdtablesize, .umask = pvfs_umask, .getumask = pvfs_getumask, - .getdtablesize = pvfs_getdtablesize, + .mmap = pvfs_mmap, + .munmap = pvfs_munmap, + .msync = pvfs_msync, +/* these are defined in acl.c and do not really need */ +/* a PVFS specific implementation */ +#if 0 + .acl_delete_def_file = pvfs_acl_delete_def_file, + .acl_get_fd = pvfs_acl_get_fd, + .acl_get_file = pvfs_acl_get_file, + .acl_set_fd = pvfs_acl_set_fd, + .acl_set_file = pvfs_acl_set_file, +#endif }; /* diff --git a/src/client/usrint/posix-pvfs.h b/src/client/usrint/posix-pvfs.h index c95ed2b..b33e4d1 100644 --- a/src/client/usrint/posix-pvfs.h +++ b/src/client/usrint/posix-pvfs.h @@ -13,227 +13,266 @@ #ifndef POSIX_PVFS_H #define POSIX_PVFS_H 1 +/* define FD flags unique to PVFS here */ +#define PVFS_FD_NOCACHE 0x10000 + /* pvfs_open */ -int pvfs_open(const char *path, int flags, ...); +extern int pvfs_open(const char *path, int flags, ...); /* pvfs_open64 */ -int pvfs_open64(const char *path, int flags, ...); +extern int pvfs_open64(const char *path, int flags, ...); /* pvfs_openat */ -int pvfs_openat(int dirfd, const char *path, int flags, ...); +extern int pvfs_openat(int dirfd, const char *path, int flags, ...); /* pvfs_openat64 */ -int pvfs_openat64(int dirfd, const char *path, int flags, ...); +extern int pvfs_openat64(int dirfd, const char *path, int flags, ...); -int pvfs_creat(const char *path, mode_t mode, ...); +extern int pvfs_creat(const char *path, mode_t mode, ...); -int pvfs_creat64(const char *path, mode_t mode, ...); +extern int pvfs_creat64(const char *path, mode_t mode, ...); /* pvfs_unlink */ -int pvfs_unlink (const char *path); +extern int pvfs_unlink (const char *path); -int pvfs_unlinkat (int dirfd, const char *path, int flags); +extern int pvfs_unlinkat (int dirfd, const char *path, int flags); -int pvfs_rename(const char *oldpath, const char *newpath); +extern int pvfs_rename(const char *oldpath, const char *newpath); -int pvfs_renameat(int olddirfd, const char *oldpath, +extern int pvfs_renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* pvfs_read */ -ssize_t pvfs_read( int fd, void *buf, size_t count ); +extern ssize_t pvfs_read( int fd, void *buf, size_t count ); /* pvfs_pread */ -ssize_t pvfs_pread( int fd, void *buf, size_t count, off_t offset ); +extern ssize_t pvfs_pread( int fd, void *buf, size_t count, off_t offset ); -ssize_t pvfs_readv(int fd, const struct iovec *vector, int count); +extern ssize_t pvfs_readv(int fd, const struct iovec *vector, int count); /* pvfs_pread64 */ -ssize_t pvfs_pread64( int fd, void *buf, size_t count, off64_t offset ); +extern ssize_t pvfs_pread64( int fd, void *buf, size_t count, off64_t offset ); /* pvfs_write */ -ssize_t pvfs_write( int fd, const void *buf, size_t count ); +extern ssize_t pvfs_write( int fd, const void *buf, size_t count ); /* pvfs_pwrite */ -ssize_t pvfs_pwrite( int fd, const void *buf, size_t count, off_t offset ); +extern ssize_t pvfs_pwrite( int fd, const void *buf, size_t count, off_t offset ); -ssize_t pvfs_writev( int fd, const struct iovec *vector, int count ); +extern ssize_t pvfs_writev( int fd, const struct iovec *vector, int count ); /* pvfs_pwrite64 */ -ssize_t pvfs_pwrite64( int fd, const void *buf, size_t count, off64_t offset ); +extern ssize_t pvfs_pwrite64( int fd, const void *buf, size_t count, off64_t offset ); /* pvfs_lseek */ -off_t pvfs_lseek(int fd, off_t offset, int whence); +extern off_t pvfs_lseek(int fd, off_t offset, int whence); /* pvfs_lseek64 */ -off64_t pvfs_lseek64(int fd, off64_t offset, int whence); +extern off64_t pvfs_lseek64(int fd, off64_t offset, int whence); -int pvfs_truncate(const char *path, off_t length); +extern int pvfs_truncate(const char *path, off_t length); -int pvfs_truncate64 (const char *path, off64_t length); +extern int pvfs_truncate64 (const char *path, off64_t length); -int pvfs_fallocate(int fd, off_t offset, off_t length); +extern int pvfs_fallocate(int fd, off_t offset, off_t length); -int pvfs_ftruncate (int fd, off_t length); +extern int pvfs_ftruncate (int fd, off_t length); -int pvfs_ftruncate64 (int fd, off64_t length); +extern int pvfs_ftruncate64 (int fd, off64_t length); /* pvfs_close */ -int pvfs_close( int fd ); +extern int pvfs_close( int fd ); -int pvfs_flush(int fd); +extern int pvfs_flush(int fd); /* various flavors of stat */ -int pvfs_stat(const char *path, struct stat *buf); +extern int pvfs_stat(const char *path, struct stat *buf); + +extern int pvfs_stat64(const char *path, struct stat64 *buf); + +extern int pvfs_stat_mask(const char *path, struct stat *buf, uint32_t mask); + +extern int pvfs_fstat(int fd, struct stat *buf); + +extern int pvfs_fstat64(int fd, struct stat64 *buf); -int pvfs_stat64(const char *path, struct stat64 *buf); +extern int pvfs_fstatat(int fd, const char *path, struct stat *buf, int flag); -int pvfs_stat_mask(const char *path, struct stat *buf, uint32_t mask); +extern int pvfs_fstatat64(int fd, const char *path, struct stat64 *buf, int flag); -int pvfs_fstat(int fd, struct stat *buf); +extern int pvfs_fstat_mask(int fd, struct stat *buf, uint32_t mask); -int pvfs_fstat64(int fd, struct stat64 *buf); +extern int pvfs_lstat(const char *path, struct stat *buf); -int pvfs_fstatat(int fd, const char *path, struct stat *buf, int flag); +extern int pvfs_lstat64(const char *path, struct stat64 *buf); -int pvfs_fstatat64(int fd, const char *path, struct stat64 *buf, int flag); +extern int pvfs_lstat_mask(const char *path, struct stat *buf, uint32_t mask); -int pvfs_fstat_mask(int fd, struct stat *buf, uint32_t mask); +extern int pvfs_futimesat(int dirfd, const char *path, const struct timeval times[2]); -int pvfs_lstat(const char *path, struct stat *buf); +extern int pvfs_utimes(const char *path, const struct timeval times[2]); -int pvfs_lstat64(const char *path, struct stat64 *buf); +extern int pvfs_utime(const char *path, const struct utimbuf *buf); -int pvfs_lstat_mask(const char *path, struct stat *buf, uint32_t mask); +extern int pvfs_futimes(int fd, const struct timeval times[2]); -int pvfs_dup(int oldfd); +extern int pvfs_dup(int oldfd); -int pvfs_dup2(int oldfd, int newfd); +extern int pvfs_dup2(int oldfd, int newfd); -int pvfs_chown (const char *path, uid_t owner, gid_t group); +extern int pvfs_chown (const char *path, uid_t owner, gid_t group); -int pvfs_fchown (int fd, uid_t owner, gid_t group); +extern int pvfs_fchown (int fd, uid_t owner, gid_t group); -int pvfs_fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); +extern int pvfs_fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); -int pvfs_lchown (const char *path, uid_t owner, gid_t group); +extern int pvfs_lchown (const char *path, uid_t owner, gid_t group); -int pvfs_chmod (const char *path, mode_t mode); +extern int pvfs_chmod (const char *path, mode_t mode); -int pvfs_fchmod (int fd, mode_t mode); +extern int pvfs_fchmod (int fd, mode_t mode); -int pvfs_fchmodat(int fd, const char *path, mode_t mode, int flag); +extern int pvfs_fchmodat(int fd, const char *path, mode_t mode, int flag); -int pvfs_mkdir (const char *path, mode_t mode); +extern int pvfs_mkdir (const char *path, mode_t mode); -int pvfs_mkdirat (int dirfd, const char *path, mode_t mode); +extern int pvfs_mkdirat (int dirfd, const char *path, mode_t mode); -int pvfs_rmdir (const char *path); +extern int pvfs_rmdir (const char *path); -ssize_t pvfs_readlink (const char *path, char *buf, size_t bufsiz); +extern ssize_t pvfs_readlink (const char *path, char *buf, size_t bufsiz); -int pvfs_readlinkat (int dirfd, const char *path, char *buf, size_t bufsiz); +extern ssize_t pvfs_readlinkat (int dirfd, const char *path, char *buf, size_t bufsiz); -int pvfs_symlink (const char *oldpath, const char *newpath); +extern int pvfs_symlink (const char *oldpath, const char *newpath); -int pvfs_symlinkat (const char *oldpath, int newdirfd, const char *newpath); +extern int pvfs_symlinkat (const char *oldpath, int newdirfd, const char *newpath); /* PVFS does not have hard links */ -ssize_t pvfs_link (const char *oldpath, const char *newpath); +extern int pvfs_link (const char *oldpath, const char *newpath); /* PVFS does not have hard links */ -int pvfs_linkat (int olddirfd, const char *oldpath, +extern int pvfs_linkat (int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags); /* this reads exactly one dirent, count is ignored */ -int pvfs_readdir(unsigned int fd, struct dirent *dirp, unsigned int count); +extern int pvfs_readdir(unsigned int fd, struct dirent *dirp, unsigned int count); /* this reads multiple dirents, up to count */ -int pvfs_getdents(unsigned int fd, struct dirent *dirp, unsigned int count); +extern int pvfs_getdents(unsigned int fd, struct dirent *dirp, unsigned int count); -int pvfs_getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int count); +extern int pvfs_getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int count); -int pvfs_access (const char * path, int mode); +extern int pvfs_access (const char * path, int mode); -int pvfs_faccessat (int dirfd, const char * path, int mode, int flags); +extern int pvfs_faccessat (int dirfd, const char * path, int mode, int flags); -int pvfs_flock(int fd, int op); +extern int pvfs_flock(int fd, int op); -int pvfs_fcntl(int fd, int cmd, ...); +extern int pvfs_fcntl(int fd, int cmd, ...); /* sync all disk data */ -void pvfs_sync(void ); +extern void pvfs_sync(void ); /* sync file, but not dir it is in */ -int pvfs_fsync(int fd); +extern int pvfs_fsync(int fd); /* does not sync file metadata */ -int pvfs_fdatasync(int fd); +extern int pvfs_fdatasync(int fd); + +extern int pvfs_fadvise(int fd, off_t offset, off_t len, int advice); + +extern int pvfs_fadvise64(int fd, off64_t offset, off64_t len, int advice); + +extern int pvfs_statfs(const char *path, struct statfs *buf); + +extern int pvfs_statfs64(const char *path, struct statfs64 *buf); -int pvfs_fadvise(int fd, off_t offset, off_t len, int advice); +extern int pvfs_fstatfs(int fd, struct statfs *buf); -int pvfs_fadvise64(int fd, off64_t offset, off64_t len, int advice); +extern int pvfs_fstatfs64(int fd, struct statfs64 *buf); -int pvfs_statfs(const char *path, struct statfs *buf); +extern int pvfs_statvfs(const char *path, struct statvfs *buf); -int pvfs_statfs64(const char *path, struct statfs64 *buf); +extern int pvfs_fstatvfs(int fd, struct statvfs *buf); -int pvfs_fstatfs(int fd, struct statfs *buf); +extern int pvfs_mknod(const char *path, mode_t mode, dev_t dev); -int pvfs_fstatfs64(int fd, struct statfs64 *buf); +extern int pvfs_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); -int pvfs_mknod(const char *path, mode_t mode, dev_t dev); +extern ssize_t pvfs_sendfile(int outfd, int infd, off_t *offset, size_t count); -int pvfs_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); +extern ssize_t pvfs_sendfile64(int outfd, int infd, off64_t *offset, size_t count); -ssize_t pvfs_sendfile(int outfd, int infd, off_t *offset, size_t count); +extern int pvfs_setxattr(const char *path, const char *name, + const void *value, size_t size, int flags); -ssize_t pvfs_sendfile64(int outfd, int infd, off64_t *offset, size_t count); +extern int pvfs_lsetxattr(const char *path, const char *name, + const void *value, size_t size, int flags); -int pvfs_setxattr(const char *path, const char *name, - const void *value, size_t size, int flags); +extern int pvfs_fsetxattr(int fd, const char *name, + const void *value, size_t size, int flags); -int pvfs_lsetxattr(const char *path, const char *name, - const void *value, size_t size, int flags); +extern ssize_t pvfs_getxattr(const char *path, const char *name, + void *value, size_t size); -int pvfs_fsetxattr(int fd, const char *name, - const void *value, size_t size, int flags); +extern ssize_t pvfs_lgetxattr(const char *path, const char *name, + void *value, size_t size); -int pvfs_getxattr(const char *path, const char *name, - void *value, size_t size); +extern ssize_t pvfs_fgetxattr(int fd, const char *name, + void *value, size_t size); -int pvfs_lgetxattr(const char *path, const char *name, - void *value, size_t size); +extern ssize_t pvfs_listxattr(const char *path, char *list, size_t size); -int pvfs_fgetxattr(int fd, const char *name, - void *value, size_t size); +extern ssize_t pvfs_llistxattr(const char *path, char *list, size_t size); -int pvfs_listxattr(const char *path, char *list, size_t size); +extern ssize_t pvfs_flistxattr(int fd, char *list, size_t size); -int pvfs_llistxattr(const char *path, char *list, size_t size); +extern int pvfs_removexattr(const char *path, const char *name); -int pvfs_flistxattr(int fd, char *list, size_t size); +extern int pvfs_lremovexattr(const char *path, const char *name); -int pvfs_removexattr(const char *path, const char *name); +extern int pvfs_fremovexattr(int fd, const char *name); -int pvfs_lremovexattr(const char *path, const char *name); +extern int pvfs_chdir(const char *path); -int pvfs_fremovexattr(int fd, const char *name); +extern int pvfs_fchdir(int fd); -int pvfs_chdir(const char *path); +extern int pvfs_cwd_init(const char *buf, size_t size); -int pvfs_fchdir(int fd); +extern char *pvfs_getcwd(char *buf, size_t size); -char *pvfs_getcwd(char *buf, size_t size); +extern char *pvfs_get_current_dir_name(void); -char *pvfs_get_current_dir_name(void); +extern char *pvfs_getwd(char *buf); -char *pvfs_getwd(char *buf); +extern mode_t pvfs_umask(mode_t mask); -mode_t pvfs_umask(mode_t mask); +extern mode_t pvfs_getumask(void); -mode_t pvfs_getumask(void); +extern int pvfs_getdtablesize(void); + +extern void *pvfs_mmap(void *start, size_t length, int prot, int flags, + int fd, off_t offset); + +extern int pvfs_munmap(void *start, size_t length); + +extern int pvfs_msync(void *start, size_t length, int flags); + +/* these are defined in acl.c and don't really need */ +/* a PVFS implementation */ +#if 0 +extern int pvfs_acl_delete_def_file(const char *path_p); + +extern acl_t pvfs_acl_get_fd(int fd); + +extern acl_t pvfs_acl_get_file(const char *path_p, acl_type_t type); + +extern int pvfs_acl_set_fd(int fd, acl_t acl); + +extern int pvfs_acl_set_file(const char *path_p, acl_type_t type, acl_t acl); +#endif -int pvfs_getdtablesize(void); #endif diff --git a/src/client/usrint/posix.c b/src/client/usrint/posix.c index e1a9f19..418c8bd 100644 --- a/src/client/usrint/posix.c +++ b/src/client/usrint/posix.c @@ -12,12 +12,22 @@ /* this prevents headers from using inlines for 64 bit calls */ -#define USERINT_SOURCE 1 +#define USRINT_SOURCE 1 #include "usrint.h" #include "posix-ops.h" #include "posix-pvfs.h" #include "openfile-util.h" +/** + * function prototypes not defined in libc, though it is a linux + * system call and we define it in the usr lib + */ + +int getdents(unsigned int, struct dirent *, unsigned int); +int getdents64(unsigned int, struct dirent64 *, unsigned int); +int flock(int, int); +int fadvise64(int, off64_t, off64_t, int); + /* * SYSTEM CALLS */ @@ -26,7 +36,7 @@ * open wrapper */ int open(const char *path, int flags, ...) -{ +{ va_list ap; mode_t mode = 0; PVFS_hint hints; /* need to figure out how to set default */ @@ -43,13 +53,14 @@ int open(const char *path, int flags, ...) hints = PVFS_HINT_NULL; va_end(ap); + if (!path) { errno = EFAULT; return -1; } if (is_pvfs_path(path)) - { + { /* this handles setup of the descriptor */ flags |= O_NOTPVFS; /* try to open non-pvfs files too */ return pvfs_open(path, flags, mode, hints); @@ -65,15 +76,17 @@ int open(const char *path, int flags, ...) return rc; } /* set up the descriptor manually */ - pd = pvfs_alloc_descriptor(&glibc_ops, rc, NULL); + pd = pvfs_alloc_descriptor(&glibc_ops, rc, NULL, 0); if (!pd) { return -1; } pd->is_in_use = PVFS_FS; - pd->flags = flags; + pd->s->flags = flags; glibc_ops.fstat(rc, &sbuf); - pd->mode = sbuf.st_mode; + pd->s->mode = sbuf.st_mode; + gen_mutex_unlock(&pd->s->lock); + gen_mutex_unlock(&pd->lock); return pd->fd; } } @@ -113,7 +126,7 @@ int openat(int dirfd, const char *path, int flags, ...) { mode = va_arg(ap, int); } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { fd = open(path, flags, mode); } @@ -122,7 +135,7 @@ int openat(int dirfd, const char *path, int flags, ...) pd = pvfs_find_descriptor(dirfd); if (pd) { - fd = pd->fsops->openat(pd->true_fd, path, flags, mode); + fd = pd->s->fsops->openat(pd->true_fd, path, flags, mode); } else { @@ -137,7 +150,7 @@ int openat(int dirfd, const char *path, int flags, ...) int openat64(int dirfd, const char *path, int flags, ...) { int fd; - int mode; + int mode = 0; va_list ap; va_start(ap, flags); if (flags & O_CREAT) @@ -195,7 +208,7 @@ int unlinkat(int dirfd, const char *path, int flag) errno = EFAULT; return -1; } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { unlink(path); } @@ -204,7 +217,7 @@ int unlinkat(int dirfd, const char *path, int flag) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->unlinkat(pd->true_fd, path, flag); + rc = pd->s->fsops->unlinkat(pd->true_fd, path, flag); } else { @@ -258,9 +271,9 @@ int renameat (int oldfd, const char *old, int newfd, const char *new) errno = EBADF; return -1; } - if (oldpd->fsops == newpd->fsops) + if (oldpd->s->fsops == newpd->s->fsops) { - return oldpd->fsops->renameat(oldpd->true_fd, old, newpd->true_fd, new); + return oldpd->s->fsops->renameat(oldpd->true_fd, old, newpd->true_fd, new); } else { @@ -282,7 +295,7 @@ ssize_t read(int fd, void *buf, size_t count) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->read(pd->true_fd, buf, count); + rc = pd->s->fsops->read(pd->true_fd, buf, count); } else { @@ -303,7 +316,7 @@ ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->pread(pd->true_fd, (void *)buf, nbytes, offset); + rc = pd->s->fsops->pread(pd->true_fd, (void *)buf, nbytes, offset); } else { @@ -324,7 +337,7 @@ ssize_t readv(int fd, const struct iovec *iov, int iovcnt) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->readv(pd->true_fd, iov, iovcnt); + rc = pd->s->fsops->readv(pd->true_fd, iov, iovcnt); } else { @@ -345,7 +358,7 @@ ssize_t pread64(int fd, void *buf, size_t nbytes, off64_t offset) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->pread64(pd->true_fd, (void *)buf, nbytes, offset); + rc = pd->s->fsops->pread64(pd->true_fd, (void *)buf, nbytes, offset); } else { @@ -366,7 +379,7 @@ ssize_t write(int fd, const void *buf, size_t count) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->write(pd->true_fd, (void *)buf, count); + rc = pd->s->fsops->write(pd->true_fd, (void *)buf, count); } else { @@ -387,7 +400,7 @@ ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->pwrite(pd->true_fd, buf, nbytes, offset); + rc = pd->s->fsops->pwrite(pd->true_fd, buf, nbytes, offset); } else { @@ -408,9 +421,13 @@ ssize_t writev(int fd, const struct iovec *iov, int iovcnt) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->writev(fd, iov, iovcnt); + rc = pd->s->fsops->writev(fd, iov, iovcnt); if (rc > 0) - pd->file_pointer += rc; + { + gen_mutex_lock(&pd->s->lock); + pd->s->file_pointer += rc; + gen_mutex_unlock(&pd->s->lock); + } } else { @@ -431,7 +448,7 @@ ssize_t pwrite64(int fd, const void *buf, size_t nbytes, off64_t offset) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->pwrite64(pd->true_fd, buf, nbytes, offset); + rc = pd->s->fsops->pwrite64(pd->true_fd, buf, nbytes, offset); } else { @@ -468,7 +485,7 @@ off64_t lseek64(int fd, off64_t offset, int whence) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->lseek64(pd->true_fd, offset, whence); + rc = pd->s->fsops->lseek64(pd->true_fd, offset, whence); } else { @@ -520,7 +537,7 @@ int ftruncate(int fd, off_t length) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->ftruncate(pd->true_fd, length); + rc = pd->s->fsops->ftruncate(pd->true_fd, length); } else { @@ -538,7 +555,7 @@ int ftruncate64(int fd, off64_t length) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->ftruncate64(pd->true_fd, length); + rc = pd->s->fsops->ftruncate64(pd->true_fd, length); } else { @@ -557,7 +574,7 @@ int posix_fallocate(int fd, off_t offset, off_t length) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fallocate(pd->true_fd, offset, length); + rc = pd->s->fsops->fallocate(pd->true_fd, offset, length); } else { @@ -579,6 +596,7 @@ int close(int fd) return rc; } +#if 0 int flush(int fd) { int rc = 0; @@ -587,7 +605,7 @@ int flush(int fd) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->flush(pd->true_fd); + rc = pd->s->fsops->flush(pd->true_fd); } else { @@ -596,6 +614,7 @@ int flush(int fd) } return rc; } +#endif /* various flavors of stat */ int stat(const char *path, struct stat *buf) @@ -650,7 +669,7 @@ int fstat(int fd, struct stat *buf) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstat(pd->true_fd, buf); + rc = pd->s->fsops->fstat(pd->true_fd, buf); } else { @@ -673,7 +692,7 @@ int fstat64(int fd, struct stat64 *buf) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstat64(pd->true_fd, buf); + rc = pd->s->fsops->fstat64(pd->true_fd, buf); } else { @@ -693,15 +712,15 @@ int fstatat(int fd, const char *path, struct stat *buf, int flag) int rc = 0; pvfs_descriptor *pd; - if (fd == AT_FDCWD || path[0] == '/') + if (fd == AT_FDCWD || (path && path[0] == '/')) { if (flag & AT_SYMLINK_NOFOLLOW) { - lstat(path, buf); + rc = pvfs_lstat(path, buf); } else { - stat(path, buf); + rc = pvfs_stat(path, buf); } } else @@ -709,7 +728,7 @@ int fstatat(int fd, const char *path, struct stat *buf, int flag) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstatat(pd->true_fd, path, buf, flag); + rc = pd->s->fsops->fstatat(pd->true_fd, path, buf, flag); } else { @@ -730,15 +749,15 @@ int fstatat64(int fd, const char *path, struct stat64 *buf, int flag) int rc = 0; pvfs_descriptor *pd; - if (fd == AT_FDCWD || path[0] == '/') + if (fd == AT_FDCWD || (path && path[0] == '/')) { if (flag & AT_SYMLINK_NOFOLLOW) { - lstat64(path, buf); + rc = pvfs_lstat64(path, buf); } else { - stat64(path, buf); + rc = pvfs_stat64(path, buf); } } else @@ -746,7 +765,7 @@ int fstatat64(int fd, const char *path, struct stat64 *buf, int flag) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstatat64(pd->true_fd, path, buf, flag); + rc = pd->s->fsops->fstatat64(pd->true_fd, path, buf, flag); } else { @@ -806,6 +825,83 @@ int __lxstat64(int ver, const char *path, struct stat64 *buf) return lstat64(path, buf); } +int futimesat(int dirfd, const char *path, const struct timeval times[2]) +{ + int rc = 0; + pvfs_descriptor *pd; + + if (dirfd == AT_FDCWD || (path && path[0] == '/')) + { + utimes(path, times); + } + else + { + pd = pvfs_find_descriptor(dirfd); + if (pd) + { + rc = pd->s->fsops->futimesat(pd->true_fd, path, times); + } + else + { + errno = EBADF; + rc = -1; + } + } + return rc; +} + +int utimes(const char *path, const struct timeval times[2]) +{ + if (!path) + { + errno = EFAULT; + return -1; + } + if(is_pvfs_path(path)) + { + return pvfs_utimes(path, times); + } + else + { + return glibc_ops.utimes(path, times); + } +} + +int utime(const char *path, const struct utimbuf *buf) +{ + if (!path || !buf) + { + errno = EFAULT; + return -1; + } + if(is_pvfs_path(path)) + { + return pvfs_utime(path, buf); + } + else + { + return glibc_ops.utime(path, buf); + } +} + +int futimes(int fd, const struct timeval times[2]) +{ + int rc = 0; + pvfs_descriptor *pd; + + pd = pvfs_find_descriptor(fd); + if (pd) + { + rc = pd->s->fsops->futimes(pd->true_fd, times); + } + else + { + errno = EBADF; + rc = -1; + } + return rc; +} + int dup(int oldfd) { int rc = 0; @@ -814,7 +910,7 @@ int dup(int oldfd) pd = pvfs_find_descriptor(oldfd); if (pd) { - rc = pd->fsops->dup(pd->true_fd); + rc = pd->s->fsops->dup(pd->true_fd); } else { @@ -832,7 +928,7 @@ int dup2(int oldfd, int newfd) pd = pvfs_find_descriptor(oldfd); if (pd) { - rc = pd->fsops->dup2(pd->true_fd, newfd); + rc = pd->s->fsops->dup2(pd->true_fd, newfd); } else { @@ -867,7 +963,7 @@ int fchown(int fd, uid_t owner, gid_t group) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fchown(pd->true_fd, owner, group); + rc = pd->s->fsops->fchown(pd->true_fd, owner, group); } else { @@ -882,7 +978,7 @@ int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flag) int rc = 0; pvfs_descriptor *pd; - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { chown(path, owner, group); } @@ -891,7 +987,7 @@ int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flag) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->fchownat(pd->true_fd, path, owner, group, flag); + rc = pd->s->fsops->fchownat(pd->true_fd, path, owner, group, flag); } else { @@ -944,7 +1040,7 @@ int fchmod(int fd, mode_t mode) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fchmod(pd->true_fd, mode); + rc = pd->s->fsops->fchmod(pd->true_fd, mode); } else { @@ -964,7 +1060,7 @@ int fchmodat(int dirfd, const char *path, mode_t mode, int flag) errno = EFAULT; return -1; } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { chmod(path, mode); } @@ -973,7 +1069,7 @@ int fchmodat(int dirfd, const char *path, mode_t mode, int flag) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->fchmodat(pd->true_fd, path, mode, flag); + rc = pd->s->fsops->fchmodat(pd->true_fd, path, mode, flag); } else { @@ -1011,7 +1107,7 @@ int mkdirat(int dirfd, const char *path, mode_t mode) errno = EFAULT; return -1; } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { mkdir(path, mode); } @@ -1020,7 +1116,7 @@ int mkdirat(int dirfd, const char *path, mode_t mode) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->mkdirat(pd->true_fd, path, mode); + rc = pd->s->fsops->mkdirat(pd->true_fd, path, mode); } else { @@ -1048,7 +1144,11 @@ int rmdir(const char *path) } } +#if __GLIBC_PREREQ (2,5) ssize_t readlink(const char *path, char *buf, size_t bufsiz) +#else +int readlink(const char *path, char *buf, size_t bufsiz) +#endif { if (!path || !buf) { @@ -1065,7 +1165,7 @@ ssize_t readlink(const char *path, char *buf, size_t bufsiz) } } -int readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) +ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) { int rc = 0; pvfs_descriptor *pd; @@ -1075,7 +1175,7 @@ int readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) errno = EFAULT; return -1; } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { readlink(path, buf, bufsiz); } @@ -1084,7 +1184,7 @@ int readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->readlinkat(pd->true_fd, path, buf, bufsiz); + rc = pd->s->fsops->readlinkat(pd->true_fd, path, buf, bufsiz); } else { @@ -1122,7 +1222,7 @@ int symlinkat(const char *oldpath, int newdirfd, const char *newpath) errno = EFAULT; return -1; } - if (newdirfd == AT_FDCWD || newpath[0] == '/') + if (newdirfd == AT_FDCWD || (newpath && newpath[0] == '/')) { symlink(oldpath, newpath); } @@ -1131,7 +1231,7 @@ int symlinkat(const char *oldpath, int newdirfd, const char *newpath) pd = pvfs_find_descriptor(newdirfd); if (pd) { - rc = pd->fsops->symlinkat(oldpath, pd->true_fd, newpath); + rc = pd->s->fsops->symlinkat(oldpath, pd->true_fd, newpath); } else { @@ -1142,7 +1242,7 @@ int symlinkat(const char *oldpath, int newdirfd, const char *newpath) return rc; } -ssize_t link(const char *oldpath, const char *newpath) +int link(const char *oldpath, const char *newpath) { if (!oldpath || !newpath) { @@ -1176,9 +1276,9 @@ int linkat(int olddirfd, const char *old, errno = EBADF; return -1; } - if (oldpd->fsops == newpd->fsops) + if (oldpd->s->fsops == newpd->s->fsops) { - return oldpd->fsops->linkat(oldpd->true_fd, old, + return oldpd->s->fsops->linkat(oldpd->true_fd, old, newpd->true_fd, new, flags); } else @@ -1189,7 +1289,7 @@ int linkat(int olddirfd, const char *old, } /** - * According to man page count is isgnored + * According to man page count is ignored */ int posix_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) { @@ -1204,7 +1304,7 @@ int posix_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->readdir(pd->true_fd, dirp, count); + rc = pd->s->fsops->readdir(pd->true_fd, dirp, count); } else { @@ -1214,6 +1314,7 @@ int posix_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) return rc; } + /** * man page calls last arg count but is ambiguous if it is number * of bytes or number of records to read. The former appears to be @@ -1232,7 +1333,7 @@ int getdents(unsigned int fd, struct dirent *dirp, unsigned int size) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->getdents(pd->true_fd, dirp, size); + rc = pd->s->fsops->getdents(pd->true_fd, dirp, size); } else { @@ -1255,7 +1356,7 @@ int getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int size) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->getdents64(pd->true_fd, dirp, size); + rc = pd->s->fsops->getdents64(pd->true_fd, dirp, size); } else { @@ -1297,7 +1398,7 @@ int faccessat(int dirfd, const char *path, int mode, int flags) errno = EFAULT; return -1; } - if (dirfd == AT_FDCWD || path[0] == '/') + if (dirfd == AT_FDCWD || (path && path[0] == '/')) { access(path, mode); } @@ -1306,7 +1407,7 @@ int faccessat(int dirfd, const char *path, int mode, int flags) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->faccessat(pd->true_fd, path, mode, flags); + rc = pd->s->fsops->faccessat(pd->true_fd, path, mode, flags); } else { @@ -1317,6 +1418,7 @@ int faccessat(int dirfd, const char *path, int mode, int flags) return rc; } + int flock(int fd, int op) { int rc = 0; @@ -1325,7 +1427,7 @@ int flock(int fd, int op) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->flock(pd->true_fd, op); + rc = pd->s->fsops->flock(pd->true_fd, op); } else { @@ -1353,11 +1455,11 @@ int fcntl(int fd, int cmd, ...) case F_SETLK: case F_SETLKW: lock = va_arg(ap, struct flock *); - rc = pd->fsops->fcntl(pd->true_fd, cmd, lock); + rc = pd->s->fsops->fcntl(pd->true_fd, cmd, lock); break; default: arg = va_arg(ap, long); - rc = pd->fsops->fcntl(pd->true_fd, cmd, arg); + rc = pd->s->fsops->fcntl(pd->true_fd, cmd, arg); break; } } @@ -1384,7 +1486,7 @@ int fsync(int fd) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fsync(pd->true_fd); + rc = pd->s->fsops->fsync(pd->true_fd); } else { @@ -1402,7 +1504,7 @@ int fdatasync(int fd) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fdatasync(pd->true_fd); + rc = pd->s->fsops->fdatasync(pd->true_fd); } else { @@ -1420,7 +1522,7 @@ int posix_fadvise(int fd, off_t offset, off_t length, int advice) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fadvise(pd->true_fd, offset, length, advice); + rc = pd->s->fsops->fadvise(pd->true_fd, offset, length, advice); } else { @@ -1430,6 +1532,13 @@ int posix_fadvise(int fd, off_t offset, off_t length, int advice) return rc; } +/** GlibC doesn't seem to have fadvise or fadvise64 + * It does have posix_fadvise Linux has system calls + * for fadvise and fadvise64. Coreutils defines its + * own fadvise as operating on a file pointer so this + * is commented out here - seems rather arbitrary though + */ +#if 0 int fadvise(int fd, off_t offset, off_t len, int advice) { int rc = 0; @@ -1438,7 +1547,7 @@ int fadvise(int fd, off_t offset, off_t len, int advice) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fadvise(pd->true_fd, offset, len, advice); + rc = pd->s->fsops->fadvise(pd->true_fd, offset, len, advice); } else { @@ -1447,6 +1556,7 @@ int fadvise(int fd, off_t offset, off_t len, int advice) } return rc; } +#endif int fadvise64(int fd, off64_t offset, off64_t len, int advice) { @@ -1456,7 +1566,7 @@ int fadvise64(int fd, off64_t offset, off64_t len, int advice) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fadvise64(pd->true_fd, offset, len, advice); + rc = pd->s->fsops->fadvise64(pd->true_fd, offset, len, advice); } else { @@ -1513,7 +1623,7 @@ int fstatfs(int fd, struct statfs *buf) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstatfs(pd->true_fd, buf); + rc = pd->s->fsops->fstatfs(pd->true_fd, buf); } else { @@ -1536,7 +1646,47 @@ int fstatfs64(int fd, struct statfs64 *buf) pd = pvfs_find_descriptor(fd); if (pd) { - rc = pd->fsops->fstatfs64(pd->true_fd, buf); + rc = pd->s->fsops->fstatfs64(pd->true_fd, buf); + } + else + { + errno = EBADF; + rc = -1; + } + return rc; +} + +int statvfs(const char *path, struct statvfs *buf) +{ + if (!path || !buf) + { + errno = EFAULT; + return -1; + } + if(is_pvfs_path(path)) + { + return pvfs_statvfs(path, buf); + } + else + { + return glibc_ops.statvfs(path, buf); + } +} + +int fstatvfs(int fd, struct statvfs *buf) +{ + int rc = 0; + pvfs_descriptor *pd; + + if (!buf) + { + errno = EFAULT; + return -1; + } + pd = pvfs_find_descriptor(fd); + if (pd) + { + rc = pd->s->fsops->fstatvfs(pd->true_fd, buf); } else { @@ -1582,7 +1732,7 @@ int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) pd = pvfs_find_descriptor(dirfd); if (pd) { - rc = pd->fsops->mknodat(pd->true_fd, path, mode, dev); + rc = pd->s->fsops->mknodat(pd->true_fd, path, mode, dev); } else { @@ -1607,7 +1757,7 @@ ssize_t sendfile64(int outfd, int infd, off64_t *offset, size_t count) outpd = pvfs_find_descriptor(outfd); if (inpd && outpd) { - rc = inpd->fsops->sendfile64(outpd->true_fd, inpd->true_fd, + rc = inpd->s->fsops->sendfile64(outpd->true_fd, inpd->true_fd, offset, count); } else @@ -1679,9 +1829,9 @@ int fsetxattr(int fd, const char *name, pd = pvfs_find_descriptor(fd); if (pd) { - if (pd->fsops->fsetxattr) + if (pd->s->fsops->fsetxattr) { - rc = pd->fsops->fsetxattr(pd->true_fd, name, value, size, flags); + rc = pd->s->fsops->fsetxattr(pd->true_fd, name, value, size, flags); } else { @@ -1697,7 +1847,7 @@ int fsetxattr(int fd, const char *name, return rc; } -int getxattr(const char *path, const char *name, +ssize_t getxattr(const char *path, const char *name, void *value, size_t size) { if (!path) @@ -1705,7 +1855,7 @@ int getxattr(const char *path, const char *name, errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if (is_pvfs_path(path)) { return pvfs_getxattr(path, name, value, size); } @@ -1723,7 +1873,7 @@ int getxattr(const char *path, const char *name, } } -int lgetxattr(const char *path, const char *name, +ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) { if (!path) @@ -1749,7 +1899,7 @@ int lgetxattr(const char *path, const char *name, } } -int fgetxattr(int fd, const char *name, void *value, +ssize_t fgetxattr(int fd, const char *name, void *value, size_t size) { int rc = 0; @@ -1758,9 +1908,9 @@ int fgetxattr(int fd, const char *name, void *value, pd = pvfs_find_descriptor(fd); if (pd) { - if (pd->fsops->fgetxattr) + if (pd->s->fsops->fgetxattr) { - rc = pd->fsops->fgetxattr(pd->true_fd, name, value, size); + rc = pd->s->fsops->fgetxattr(pd->true_fd, name, value, size); } else { @@ -1776,7 +1926,7 @@ int fgetxattr(int fd, const char *name, void *value, return rc; } -int listxattr(const char *path, char *list, size_t size) +ssize_t listxattr(const char *path, char *list, size_t size) { if (!path) { @@ -1801,7 +1951,7 @@ int listxattr(const char *path, char *list, size_t size) } } -int llistxattr(const char *path, char *list, size_t size) +ssize_t llistxattr(const char *path, char *list, size_t size) { if (!path) { @@ -1826,7 +1976,7 @@ int llistxattr(const char *path, char *list, size_t size) } } -int flistxattr(int fd, char *list, size_t size) +ssize_t flistxattr(int fd, char *list, size_t size) { int rc = 0; pvfs_descriptor *pd; @@ -1834,9 +1984,9 @@ int flistxattr(int fd, char *list, size_t size) pd = pvfs_find_descriptor(fd); if (pd) { - if (pd->fsops->flistxattr) + if (pd->s->fsops->flistxattr) { - rc = pd->fsops->flistxattr(pd->true_fd, list, size); + rc = pd->s->fsops->flistxattr(pd->true_fd, list, size); } else { @@ -1910,9 +2060,9 @@ int fremovexattr(int fd, const char *name) pd = pvfs_find_descriptor(fd); if (pd) { - if (pd->fsops->fremovexattr) + if (pd->s->fsops->fremovexattr) { - rc = pd->fsops->fremovexattr(pd->true_fd, name); + rc = pd->s->fsops->fremovexattr(pd->true_fd, name); } else { @@ -1928,6 +2078,17 @@ int fremovexattr(int fd, const char *name) return rc; } +/* these functions allow the library to take over +.* management of the currrent working directory + * all of the actual code is in the pvfs versions + * of these functions - these are only wrappers + * to catch calls to libc + * + * if the kernel module is used to mount the FS + * then there is no need for these + */ +#if PVFS_USRINT_CWD + int chdir(const char *path) { return pvfs_chdir(path); @@ -1968,6 +2129,8 @@ int getdtablesize(void) return pvfs_getdtablesize(); } +#endif /* PVFS_USRINT_CWD */ + /* * Local variables: * c-indent-level: 4 diff --git a/src/client/usrint/stdio-pvfs.h b/src/client/usrint/stdio-pvfs.h index 515c2aa..da650e4 100644 --- a/src/client/usrint/stdio-pvfs.h +++ b/src/client/usrint/stdio-pvfs.h @@ -1,21 +1,23 @@ +#ifdef REDEF_STD_STREAMS #ifdef stdin #undef stdin #endif -#define stdin (&pvfs_stdin) +#define stdin (&pvfs_stdin) /* this is wrong!!! */ #ifdef stdout #undef stdout #endif -#define stdout (&pvfs_stdout) +#define stdout (&pvfs_stdout) /* this is wrong!!! */ #ifdef stderr #undef stderr #endif -#define stderr (&pvfs_stderr) +#define stderr (&pvfs_stderr) /* this is wrong!!! */ +#endif #ifdef FILE #undef FILE diff --git a/src/client/usrint/stdio.c b/src/client/usrint/stdio.c index 770aeaf..55419eb 100644 --- a/src/client/usrint/stdio.c +++ b/src/client/usrint/stdio.c @@ -15,7 +15,29 @@ #include "openfile-util.h" #include "stdio-ops.h" -#define STDIO_DEBUG 0 +/* fdopendir not present until glibc2.5 */ +#if __GLIBC_PREREQ (2,5) +#else +extern DIR *fdopendir (int __fd); +#endif + + +#ifdef gossip_debug +#undef gossip_debug +#endif + +#ifdef GOSSIP_USRINT_DEBUG +#undef GOSSIP_USRINT_DEBUG +#endif + +#ifdef USRINT_DEBUG +#define GOSSIP_USRINT_DEBUG stderr +#define gossip_debug fprintf +#else +#define gossip_debug(__m, __f, ...) +#endif /* USRINT_DEBUG */ + +#define PVFS_STDIO_DEBUG 0 static void init_stdio(void); static struct stdio_ops_s stdio_ops; @@ -134,7 +156,8 @@ void funlockfile(FILE *stream) unlock_stream(stream); } -/** This function coverts from stream style mode to ssycall style flags +/** This function converts from stream style mode to syscall + * style flags * */ static int mode2flags(const char *mode) @@ -182,6 +205,7 @@ static int mode2flags(const char *mode) break; case 'b': /* this is ignored in POSIX */ case 'c': /* used in glibc ignored here */ + case 'e': /* used in glibc ignored here */ case 'm': /* used in glibc ignored here */ break; case 'x': /* glibc extension */ @@ -238,12 +262,13 @@ static int mode2flags(const char *mode) /** * fopen opens a file, then adds a stream to it */ -FILE *fopen(const char * path, const char * mode) +FILE *fopen(const char *path, const char *mode) { int fd = 0; int flags = 0; FILE *newfile = NULL; + gossip_debug(GOSSIP_USRINT_DEBUG, "fopen %s %s\n", path, mode); flags = mode2flags(mode); if (flags == -1) { @@ -261,6 +286,14 @@ FILE *fopen(const char * path, const char * mode) return newfile; } +/** + * fopen64 - not clear why there is an fopen64 but there is + */ +FILE *fopen64(const char *path, const char *modes) +{ + return fopen(path, modes); +} + /** this function sets up a new stream's buffer area * */ @@ -301,6 +334,7 @@ FILE *fdopen(int fd, const char *mode) FILE *newfile = NULL; int flags; + gossip_debug(GOSSIP_USRINT_DEBUG, "fdopen %d %s\n", fd, mode); /* need to check for valid mode here */ /* it must be compatible with the existing mode */ flags = mode2flags(mode); @@ -334,6 +368,15 @@ FILE *freopen(const char *path, const char *mode, FILE *stream) { int fd = 0; int flags = 0; + + gossip_debug(GOSSIP_USRINT_DEBUG, "freopen %s %s %p\n", path, mode, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.freopen(path, mode, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -378,6 +421,14 @@ FILE *freopen(const char *path, const char *mode, FILE *stream) return stream; } +/** + * freopen64 - again this appears useless but nevertheless ... + */ +FILE *freopen64 (const char *path, const char *modes, FILE *stream) +{ + return freopen(path, modes, stream); +} + /** * These functions do not need PVFS versions and thus * are not implemented here @@ -405,6 +456,16 @@ size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) { int rc = 0; + /* causing loops */ + /* gossip_debug(GOSSIP_USRINT_DEBUG, "fwrite %p %d %d %p\n", + ptr, size, nmemb, stream); */ +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fwrite(ptr, size, nmemb, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -413,7 +474,7 @@ size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) return stdio_ops.fwrite(ptr, size, nmemb, stream); } errno = EINVAL; - return -1; + return 0; } lock_stream(stream); rc = fwrite_unlocked(ptr, size, nmemb, stream); @@ -426,20 +487,30 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) off64_t rsz, rsz_buf, rsz_extra; int rc; + /* causing loops */ + /* gossip_debug(GOSSIP_USRINT_DEBUG, "fwrite_unlocked %p %d %d %p\n", + ptr, size, nmemb, stream); */ +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fwrite_unlocked(ptr, size, nmemb, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.fwrite(ptr, size, nmemb, stream); + return stdio_ops.fwrite_unlocked(ptr, size, nmemb, stream); } errno = EINVAL; - return -1; + return 0; } if (!ptr || size <= 0 || nmemb <= 0) { errno = EINVAL; - return -1; + return 0; } /* Check to see if switching from read to write */ @@ -471,7 +542,7 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) if (rsz_extra) { /* buffer is full - write the current buffer */ -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fwrite writing %d bytes to offset %d\n", (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); @@ -481,34 +552,36 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) if (rc == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; } + /* TODO: check for a short write */ /* reset buffer */ stream->_IO_write_ptr = stream->_IO_write_base; /* if there more data left in request than fits in a buffer */ if(rsz_extra > stream->_IO_buf_end - stream->_IO_buf_base) { -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fwrite writing %d bytes to offset %d\n", (int)rsz_extra, (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif /* write data directly */ - rc = write(stream->_fileno, ptr + rsz_buf, rsz_extra); + rc = write(stream->_fileno, (char *)ptr + rsz_buf, rsz_extra); if (rc == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; } + /* TODO: check for a short write */ } else { - memcpy(stream->_IO_write_ptr, ptr + rsz_buf, rsz_extra); + memcpy(stream->_IO_write_ptr, (char *)ptr + rsz_buf, rsz_extra); stream->_IO_write_ptr += rsz_extra; } } - return rsz; + return rsz / size; /* num items written */ } /* @@ -518,15 +591,24 @@ size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "fread %p %d %d %p\n", + ptr, size, nmemb, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fread(ptr, size, nmemb, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.fwrite(ptr, size, nmemb, stream); + return stdio_ops.fread(ptr, size, nmemb, stream); } errno = EINVAL; - return -1; + return 0; } lock_stream(stream); rc = fread_unlocked(ptr, size, nmemb, stream); @@ -540,27 +622,36 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) int bytes_read; int rc; + gossip_debug(GOSSIP_USRINT_DEBUG, "fread_unlocked %p %d %d %p\n", + ptr, size, nmemb, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fread_unlocked(ptr, size, nmemb, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.fread(ptr, size, nmemb, stream); + return stdio_ops.fread_unlocked(ptr, size, nmemb, stream); } errno = EINVAL; - return -1; + return 0; } if (!ptr || size < 0 || nmemb < 0) { errno = EINVAL; - return -1; + return 0; } /* Check to see if switching from write to read */ if (ISFLAGSET(stream, _IO_CURRENTLY_PUTTING)) { /* write buffer back */ -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fread writing %d bytes to offset %d\n", (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); @@ -570,7 +661,12 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (rc == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; + } + else if (rc < stream->_IO_write_ptr - stream->_IO_write_base) + { + /* short write but no error ??? */ + SETFLAG(stream, _IO_ERR_SEEN); } /* reset write pointer */ stream->_IO_write_ptr = stream->_IO_write_base; @@ -591,7 +687,11 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; + } + else if (bytes_read == 0) + { + SETFLAG(stream, _IO_EOF_SEEN); } /* indicate end of read area */ stream->_IO_read_end = stream->_IO_read_base + bytes_read; @@ -603,7 +703,7 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) * we assume there is a block in the buffer now * and that the current file pointer corresponds * to the end of the read buffer. The user has - * only up to the read pointer. + * only seen up to the read pointer. */ rsz = size * nmemb; /* total bytes requested */ rsz_buf = PVFS_util_min(rsz, stream->_IO_read_end - stream->_IO_read_ptr); @@ -616,7 +716,7 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) stream->_IO_read_ptr += rsz_buf; } - /* if more bytes requested */ + /* if more bytes requested */ if (rsz_extra) { /* if current buffer not at EOF */ @@ -626,11 +726,15 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (rsz_extra > (stream->_IO_buf_end - stream->_IO_buf_base)) { /* read directly from file for remainder of request */ - bytes_read = read(stream->_fileno, ptr+rsz_buf, rsz_extra); + bytes_read = read(stream->_fileno, (char *)ptr+rsz_buf, rsz_extra); if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; + } + else if (bytes_read == 0) + { + SETFLAG(stream, _IO_EOF_SEEN); } if (bytes_read == rsz_extra) { @@ -640,15 +744,19 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; + } + else if (bytes_read == 0) + { + SETFLAG(stream, _IO_EOF_SEEN); } stream->_IO_read_end = stream->_IO_read_base + bytes_read; stream->_IO_read_ptr = stream->_IO_read_base; - return rsz; + return rsz / size; /* num items read */ } - /* have read to EOF */ + /* MIGHT have read to EOF - check for pipe, tty */ SETFLAG(stream, _IO_EOF_SEEN); - return rsz_buf + bytes_read; + return (rsz_buf + bytes_read) / size; /* num items read */ } /* rest of request fits in a buffer - read next buffer */ bytes_read = read(stream->_fileno, stream->_IO_buf_base, @@ -656,7 +764,11 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); - return -1; + return 0; + } + else if (bytes_read == 0) + { + SETFLAG(stream, _IO_EOF_SEEN); } stream->_IO_read_end = stream->_IO_read_base + bytes_read; stream->_IO_read_ptr = stream->_IO_read_base; @@ -668,21 +780,22 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) memcpy(ptr, stream->_IO_read_ptr, rsz_extra); stream->_IO_read_ptr += rsz_extra; } + /* MIGHT have read to EOF - check for pipe, tty */ if (rsz_buf + rsz_extra < rsz) { SETFLAG(stream, _IO_EOF_SEEN); } - return rsz_buf + rsz_extra; + return (rsz_buf + rsz_extra) / size; /* num items read */ } else { /* at EOF so return bytes read */ SETFLAG(stream, _IO_EOF_SEEN); - return rsz_buf; + return rsz_buf / size; /* num items read */ } } /* request totally within current buffer */ - return rsz; + return rsz / size; /* num items read */ } /** @@ -691,6 +804,8 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) int fcloseall(void) { int rc = 0; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fcloseall\n"); while (open_files._chain) { rc = fclose(open_files._chain); @@ -705,6 +820,15 @@ int fclose(FILE *stream) { int rc = 0; FILE *f; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fclose %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fclose(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -721,7 +845,7 @@ int fclose(FILE *stream) { if (stream->_IO_write_ptr > stream->_IO_write_base) { -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fclose writing %d bytes to offset %d\n", (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); @@ -794,6 +918,16 @@ int fseeko64(FILE *stream, off64_t offset, int whence) int fseek64(FILE *stream, const off64_t offset, int whence) { int rc = 0; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fseek64 %p %llx %d\n", + stream, offset, whence); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fseek64(stream, offset, whence); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -882,7 +1016,7 @@ int fseek64(FILE *stream, const off64_t offset, int whence) stream->_IO_write_ptr > stream->_IO_write_base) { /* write buffer back */ -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fseek writing %d bytes to offset %d\n", (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); @@ -892,6 +1026,7 @@ int fseek64(FILE *stream, const off64_t offset, int whence) if (rc < 0) { SETFLAG(stream, _IO_ERR_SEEN); + rc = -1; goto exitout; } /* reset write pointer */ @@ -905,19 +1040,22 @@ int fseek64(FILE *stream, const off64_t offset, int whence) stream->_IO_read_ptr = stream->_IO_read_end; } rc = lseek64(stream->_fileno, offset, whence); -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fseek seeks to offset %d\n", (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif if (rc < 0) { SETFLAG(stream, _IO_ERR_SEEN); + rc = -1; goto exitout; } + /* fseek returns 0 on success */ + rc = 0; } exitout: /* successful call */ - lock_stream(stream); + unlock_stream(stream); CLEARFLAG(stream, _IO_EOF_SEEN); return rc; } @@ -967,6 +1105,15 @@ off64_t ftello64(FILE *stream) off64_t ftell64(FILE* stream) { int64_t filepos; + + gossip_debug(GOSSIP_USRINT_DEBUG, "ftell64 %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.ftell64(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1013,6 +1160,13 @@ int fflush(FILE *stream) { int rc = 0; +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fflush(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1032,12 +1186,21 @@ int fflush(FILE *stream) int fflush_unlocked(FILE *stream) { int rc; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fflush_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fflush_unlocked(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.fflush(stream); + return stdio_ops.fflush_unlocked(stream); } errno = EINVAL; return -1; @@ -1047,7 +1210,7 @@ int fflush_unlocked(FILE *stream) stream->_IO_write_ptr > stream->_IO_write_base) { /* write buffer back */ -#if STDIO_DEBUG +#if PVFS_STDIO_DEBUG fprintf(stderr,"fflush writing %d bytes to offset %d\n", (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); @@ -1072,6 +1235,14 @@ int fputc(int c, FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "fputc %c %p\n", c, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fputc(c, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1091,6 +1262,15 @@ int fputc(int c, FILE *stream) int fputc_unlocked(int c, FILE *stream) { int rc; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fputc_unlocked %c %p\n", c, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fputc_unlocked(c, stream); + } +#endif rc = fwrite_unlocked(&c, 1, 1, stream); if (ferror(stream)) { @@ -1106,6 +1286,14 @@ int fputs(const char *s, FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "fputs %s %p\n", s, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fputs(s, stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1126,6 +1314,15 @@ int fputs_unlocked(const char *s, FILE *stream) { size_t len; int rc; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fputs_unlocked %s %p\n", s, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fputs_unlocked(s, stream); + } +#endif if (!s) { errno = EINVAL; @@ -1172,12 +1369,20 @@ int putchar_unlocked(int c) int puts(const char *s) { int rc; + + gossip_debug(GOSSIP_USRINT_DEBUG, "puts %s\n", s); +#ifndef PVFS_STDIO_REDEFSTREAM + init_stdio(); + rc = stdio_ops.puts(s); + return rc; +#else rc = fputs(s, stdout); if (rc == EOF) { return EOF; } return fputs("\n", stdout); +#endif } /** @@ -1186,6 +1391,15 @@ int puts(const char *s) int putw(int wd, FILE *stream) { int rc; + + gossip_debug(GOSSIP_USRINT_DEBUG, "putw %d %p\n", wd, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.putw(wd, stream); + } +#endif rc = fwrite(&wd, sizeof(int), 1, stream); if (ferror(stream)) { @@ -1201,6 +1415,16 @@ char *fgets(char *s, int size, FILE *stream) { char *rc = NULL; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets %p %d %p\n", s, size, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.fgets(s, size, stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns %s\n", s); + return rc; + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1209,39 +1433,58 @@ char *fgets(char *s, int size, FILE *stream) return stdio_ops.fgets(s, size, stream); } errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns NULL\n"); return NULL; } lock_stream(stream); rc = fgets_unlocked(s, size, stream); - unlock_stream(stream); + unlock_stream(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns %s\n", rc); return rc; } char *fgets_unlocked(char *s, int size, FILE *stream) { char c, *p; + int feo, fer; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked %p %d %p\n", + s, size, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + s = stdio_ops.fgets_unlocked(s, size, stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns %s\n", s); + return s; + } +#endif if (!stream || !s || size < 1) { errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns NULL\n"); return NULL; } if (size == 1) { - *s = '\0'; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns \"\"\n"); return s; } p = s; - size--; + size--; /* for the trailing NULL char */ do { *p++ = c = fgetc_unlocked(stream); - } while (--size && c != '\n' && !feof_unlocked(stream) - && !ferror_unlocked(stream)); - if (ferror_unlocked(stream)) - { + /* reduce multiple func calls */ + feo = feof_unlocked(stream); + fer = ferror_unlocked(stream); + } while (--size && c != '\n' && !(feo || fer)); + /* if error or eof and read no chars */ + if (fer || (feo && p - s == 1)) + { + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns NULL\n"); return NULL; } - *p = '\0'; + *p = 0; /* add null terminating char */ + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns %s\n", s); return s; } @@ -1250,26 +1493,54 @@ char *fgets_unlocked(char *s, int size, FILE *stream) */ int fgetc(FILE *stream) { - int rc, ch; + int rc; + unsigned char ch; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.fgetc(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc returns %d(%c)\n", + rc, (char)rc); + return rc; + } +#endif rc = fread(&ch, 1, 1, stream); - if (ferror(stream)) + if (ferror(stream) || feof(stream)) { + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc returns %d\n", EOF); return EOF; } - return ch; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc returns %c\n", ch); + return (int)ch; } int fgetc_unlocked(FILE *stream) { - int rc, ch; + int rc; + char ch; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.fgetc_unlocked(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked returns %d(%c)\n", + rc, (char)rc); + return rc; + } +#endif rc = fread_unlocked(&ch, 1, 1, stream); - if (ferror(stream)) + if (ferror_unlocked(stream) || feof_unlocked(stream)) { + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked returns %d\n", EOF); return EOF; } - return ch; + gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked returns %c\n", ch); + return (int)ch; } /** @@ -1300,13 +1571,23 @@ int getchar_unlocked(void) /** * getw wrapper + * + * not sure if feof should return an EOF or not */ int getw(FILE *stream) { int rc, wd; + gossip_debug(GOSSIP_USRINT_DEBUG, "getw %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.getw(stream); + } +#endif rc = fread(&wd, sizeof(int), 1, stream); - if (ferror(stream)) + if (ferror(stream) || feof(stream)) { return EOF; } @@ -1318,8 +1599,15 @@ int getw(FILE *stream) */ char *gets(char * s) { +#ifdef PVFS_STDIO_REDEFSTREAM char c, *p; +#endif + gossip_debug(GOSSIP_USRINT_DEBUG, "gets %p\n", s); +#ifndef PVFS_STDIO_REDEFSTREAM + init_stdio(); + return stdio_ops.gets(s); +#else if (!s) { errno = EINVAL; @@ -1338,6 +1626,7 @@ char *gets(char * s) *(p-1) = 0; /* replace terminating char with null */ } return s; +#endif } /** @@ -1358,6 +1647,15 @@ ssize_t __getdelim(char **lnptr, size_t *n, int delim, FILE *stream) int i = 0; char c, *p; + gossip_debug(GOSSIP_USRINT_DEBUG, "getdelim %p, %d, %d, %p\n", + lnptr, *n, delim, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.getdelim(lnptr, n, delim, stream); + } +#endif if (!stream || !n) { errno = EINVAL; @@ -1365,11 +1663,12 @@ ssize_t __getdelim(char **lnptr, size_t *n, int delim, FILE *stream) } if (!*lnptr) { - if (*n <= 0) + *n = 256; + *lnptr = (char *)malloc(*n); + if (!*lnptr) { - *n = 256; + return -1; } - *lnptr = (char *)malloc(*n); } p = *lnptr; do { @@ -1405,6 +1704,15 @@ int ungetc(int c, FILE *stream) { int64_t rc; + gossip_debug(GOSSIP_USRINT_DEBUG, "ungetc %d, %p\n", + c, stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.ungetc(c, stream); + } +#endif rc = fseek64(stream, -1L, SEEK_CUR); if (rc < 0) { @@ -1442,7 +1750,7 @@ int dprintf(int fd, const char *format, ...) int vdprintf(int fd, const char *format, va_list ap) { char *buf; - int len, rc; + int len, rc = 0; len = vasprintf(&buf, format, ap); if (len < 0) @@ -1466,8 +1774,15 @@ int vdprintf(int fd, const char *format, va_list ap) int vfprintf(FILE *stream, const char *format, va_list ap) { char *buf; - int len, rc; + int len, rc = 0; +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.vfprintf(stream, format, ap); + } +#endif len = vasprintf(&buf, format, ap); if (len < 0) { @@ -1525,6 +1840,11 @@ int printf(const char *format, ...) */ void perror(const char *s) { +#ifndef PVFS_STDIO_REDEFSTREAM + init_stdio(); + stdio_ops.perror(s); + return; +#else char *msg; if (s && *s) { @@ -1533,6 +1853,7 @@ void perror(const char *s) msg = strerror(errno); fwrite(msg, strlen(msg), 1, stderr); fwrite("\n", 1, 1, stderr); +#endif } #if 0 @@ -1557,6 +1878,14 @@ vfscanf() */ void clearerr (FILE *stream) { + gossip_debug(GOSSIP_USRINT_DEBUG, "clearerr %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.clearerr(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1575,12 +1904,20 @@ void clearerr (FILE *stream) void clearerr_unlocked (FILE *stream) { + gossip_debug(GOSSIP_USRINT_DEBUG, "clearerr_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.clearerr_unlocked(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - stdio_ops.clearerr(stream); + stdio_ops.clearerr_unlocked(stream); return; } return; @@ -1596,6 +1933,16 @@ int feof (FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "feof %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.feof(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "feof returns %d\n", rc); + return rc; + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1604,27 +1951,44 @@ int feof (FILE *stream) return stdio_ops.feof(stream); } errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, "feof returns %d\n", -1); return -1; } lock_stream(stream); rc = ISFLAGSET(stream, _IO_EOF_SEEN); unlock_stream(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "feof returns %d\n", rc); return rc; } int feof_unlocked (FILE *stream) { + int rc = 0; + + gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.feof_unlocked(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked returns %d\n", rc); + return rc; + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.feof(stream); + return stdio_ops.feof_unlocked(stream); } errno = EBADF; + gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked returns %d\n", -1); return -1; } - return ISFLAGSET(stream, _IO_EOF_SEEN); + rc = ISFLAGSET(stream, _IO_EOF_SEEN); + gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked returns %d\n", rc); + return rc; } /** @@ -1634,6 +1998,16 @@ int ferror (FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc = stdio_ops.ferror(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror returns %d\n", rc); + return rc; + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1642,26 +2016,41 @@ int ferror (FILE *stream) return stdio_ops.ferror(stream); } errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror returns %d\n", -1); return -1; } lock_stream(stream); rc = ISFLAGSET(stream, _IO_ERR_SEEN); unlock_stream(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror returns %d\n", rc); return rc; } int ferror_unlocked (FILE *stream) { + int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + rc =stdio_ops.ferror_unlocked(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked returns %d\n", rc); + return rc; + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.ferror(stream); + return stdio_ops.ferror_unlocked(stream); } errno = EBADF; + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked returns %d\n", -1); return -1; } + gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked returns %d\n", rc); return ISFLAGSET(stream, _IO_ERR_SEEN); } @@ -1672,6 +2061,14 @@ int fileno (FILE *stream) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "fileno %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fileno(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1690,12 +2087,20 @@ int fileno (FILE *stream) int fileno_unlocked (FILE *stream) { + gossip_debug(GOSSIP_USRINT_DEBUG, "fileno_unlocked %p\n", stream); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.fileno_unlocked(stream); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { init_stdio(); - return stdio_ops.fileno(stream); + return stdio_ops.fileno_unlocked(stream); } errno = EBADF; return -1; @@ -1711,6 +2116,7 @@ int remove (const char *path) int rc; struct stat buf; + gossip_debug(GOSSIP_USRINT_DEBUG, "remove %s\n", path); rc = stat(path, &buf); if (S_ISDIR(buf.st_mode)) return rmdir (path); @@ -1748,6 +2154,15 @@ void setlinebuf (FILE *stream) */ int setvbuf (FILE *stream, char *buf, int mode, size_t size) { + gossip_debug(GOSSIP_USRINT_DEBUG, "setvbuf %p %p %d %d\n", + stream, buf, mode, size); +#ifndef PVFS_STDIO_REDEFSTREAM + if (stream == stdin || stream == stdout || stream == stderr) + { + init_stdio(); + return stdio_ops.setvbuf(stream, buf, mode, size); + } +#endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) @@ -1896,6 +2311,8 @@ FILE *tmpfile(void) DIR *opendir (const char *name) { int fd; + + gossip_debug(GOSSIP_USRINT_DEBUG, "opendir %s\n", name); if(!name) { errno = EINVAL; @@ -1915,6 +2332,8 @@ DIR *opendir (const char *name) DIR *fdopendir (int fd) { DIR *dstr; + + gossip_debug(GOSSIP_USRINT_DEBUG, "fdopendir %d\n", fd); dstr = (DIR *)malloc(sizeof(DIR)); if (dstr == NULL) { @@ -1941,6 +2360,7 @@ DIR *fdopendir (int fd) */ int dirfd (DIR *dir) { + gossip_debug(GOSSIP_USRINT_DEBUG, "dirfd %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -1956,6 +2376,7 @@ struct dirent *readdir (DIR *dir) { struct dirent64 *de64; + gossip_debug(GOSSIP_USRINT_DEBUG, "readdir %p\n", dir); de64 = readdir64(dir); if (de64 == NULL) { @@ -1963,6 +2384,7 @@ struct dirent *readdir (DIR *dir) } /* linux hard defines d_name to 256 bytes */ /* if others don't should replace with a define */ + memset(&dir->de, 0, sizeof(dir->de)); memcpy(dir->de.d_name, de64->d_name, 256); dir->de.d_ino = de64->d_ino; /* these are system specific fields from the dirent */ @@ -1994,6 +2416,8 @@ int getdents64(int fd, struct dirent64 *buf, size_t size); struct dirent64 *readdir64 (DIR *dir) { struct dirent64 *rval; + + gossip_debug(GOSSIP_USRINT_DEBUG, "readdir64 %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -2005,6 +2429,10 @@ struct dirent64 *readdir64 (DIR *dir) /* read a block of dirent64s into the buffer */ bytes_read = getdents64(dir->fileno, (struct dirent64 *)dir->buf_base, (dir->buf_end - dir->buf_base)); + if (bytes_read <= 0) + { + return NULL; /* EOF if errno == 0 */ + } dir->buf_act = dir->buf_base + bytes_read; dir->buf_ptr = dir->buf_base; } @@ -2023,6 +2451,8 @@ struct dirent64 *readdir64 (DIR *dir) void rewinddir (DIR *dir) { off64_t filepos; + + gossip_debug(GOSSIP_USRINT_DEBUG, "rewinddir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -2047,6 +2477,8 @@ void rewinddir (DIR *dir) void seekdir (DIR *dir, off_t offset) { off64_t filepos; + + gossip_debug(GOSSIP_USRINT_DEBUG, "seekdir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -2072,6 +2504,8 @@ void seekdir (DIR *dir, off_t offset) off_t telldir (DIR *dir) { off64_t filepos; + + gossip_debug(GOSSIP_USRINT_DEBUG, "telldir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -2090,6 +2524,7 @@ off_t telldir (DIR *dir) */ int closedir (DIR *dir) { + gossip_debug(GOSSIP_USRINT_DEBUG, "closedir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; @@ -2101,16 +2536,26 @@ int closedir (DIR *dir) return 0; } +#ifdef PVFS_SCANDIR_VOID +int scandir (const char *dir, + struct dirent ***namelist, + int(*filter)(const struct dirent *), + int(*compar)(const void *, + const void *)) +#else int scandir (const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), - int(*compar)(const void *, const void *)) + int(*compar)(const struct dirent **, + const struct dirent **)) +#endif { struct dirent *de; DIR *dp; int len, i, rc; int asz = ASIZE; + gossip_debug(GOSSIP_USRINT_DEBUG, "scandir %p\n", dir); /* open directory */ dp = opendir(dir); /* allocate namelist */ @@ -2129,7 +2574,7 @@ int scandir (const char *dir, struct dirent **darray; /* ran out of space, realloc */ darray = (struct dirent **)realloc(*namelist, asz + ASIZE); - if (!rc) + if (!darray) { int j; for (j = 0; j < i; j++) @@ -2151,7 +2596,7 @@ int scandir (const char *dir, } } /* now sort entries */ - qsort(*namelist, i, sizeof(struct dirent *), compar); + qsort(*namelist, i, sizeof(struct dirent *), (__compar_fn_t)compar); rc = closedir(dp); if (rc == -1) { @@ -2167,16 +2612,26 @@ int scandir (const char *dir, * and then call from two wrapper versions would be beter * pass in a flag to control the copy of the dirent into the array */ +#ifdef PVFS_SCANDIR_VOID int scandir64 (const char *dir, struct dirent64 ***namelist, int(*filter)(const struct dirent64 *), - int(*compar)(const void *, const void *)) + int(*compar)(const void *, + const void *)) +#else +int scandir64 (const char *dir, + struct dirent64 ***namelist, + int(*filter)(const struct dirent64 *), + int(*compar)(const struct dirent64 **, + const struct dirent64 **)) +#endif { struct dirent64 *de; DIR *dp; int len, i, rc; int asz = ASIZE; + gossip_debug(GOSSIP_USRINT_DEBUG, "scandir64 %p\n", dir); /* open directory */ dp = opendir(dir); /* allocate namelist */ @@ -2195,7 +2650,7 @@ int scandir64 (const char *dir, struct dirent64 **darray; /* ran out of space, realloc */ darray = (struct dirent64 **)realloc(*namelist, asz + ASIZE); - if (!rc) + if (!darray) { int j; for (j = 0; j < i; j++) @@ -2217,7 +2672,7 @@ int scandir64 (const char *dir, } } /* now sort entries */ - qsort(*namelist, i, sizeof(struct dirent64 *), compar); + qsort(*namelist, i, sizeof(struct dirent64 *), (__compar_fn_t)compar); rc = closedir(dp); if (rc == -1) { @@ -2229,11 +2684,19 @@ int scandir64 (const char *dir, static void init_stdio(void) { static int init_flag = 0; + static gen_mutex_t initlock = GEN_MUTEX_INITIALIZER; + /* if we've already done this bail right away */ if (init_flag) { return; } - init_flag = 1; + gen_mutex_lock(&initlock); + /* don't let more than one thread initialize */ + if (init_flag) + { + gen_mutex_unlock(&initlock); + return; + } /* init open file chain */ lock_init_stream(&open_files); /* init pointers to glibc stdio calls */ @@ -2241,7 +2704,9 @@ static void init_stdio(void) stdio_ops.fdopen = dlsym(RTLD_NEXT, "fdopen" ); stdio_ops.freopen = dlsym(RTLD_NEXT, "freopen" ); stdio_ops.fwrite = dlsym(RTLD_NEXT, "fwrite" ); - stdio_ops.fread = dlsym(RTLD_NEXT, "fread" ); + stdio_ops.fwrite_unlocked = dlsym(RTLD_NEXT, "fwrite_unlocked" ); + stdio_ops.fread = dlsym(RTLD_NEXT, "fread" ); + stdio_ops.fread_unlocked = dlsym(RTLD_NEXT, "fread_unlocked" ); stdio_ops.fclose = dlsym(RTLD_NEXT, "fclose" ); stdio_ops.fseek = dlsym(RTLD_NEXT, "fseek" ); stdio_ops.fseek64 = dlsym(RTLD_NEXT, "fseek64" ); @@ -2250,28 +2715,43 @@ static void init_stdio(void) stdio_ops.ftell = dlsym(RTLD_NEXT, "ftell" ); stdio_ops.ftell64 = dlsym(RTLD_NEXT, "ftell64" ); stdio_ops.fgetpos = dlsym(RTLD_NEXT, "fgetpos" ); - stdio_ops.fflush = dlsym(RTLD_NEXT, "fflush" ); - stdio_ops.fputc = dlsym(RTLD_NEXT, "fputc" ); - stdio_ops.fputs = dlsym(RTLD_NEXT, "fputs" ); - stdio_ops.putc = dlsym(RTLD_NEXT, "putc" ); - stdio_ops.putchar = dlsym(RTLD_NEXT, "putchar" ); + stdio_ops.fflush = dlsym(RTLD_NEXT, "fflush" ); + stdio_ops.fflush_unlocked = dlsym(RTLD_NEXT, "fflush_unlocked" ); + stdio_ops.fputc = dlsym(RTLD_NEXT, "fputc" ); + stdio_ops.fputc_unlocked = dlsym(RTLD_NEXT, "fputc_unlocked" ); + stdio_ops.fputs = dlsym(RTLD_NEXT, "fputs" ); + stdio_ops.fputs_unlocked = dlsym(RTLD_NEXT, "fputs_unlocked" ); + stdio_ops.putc = dlsym(RTLD_NEXT, "putc" ); + stdio_ops.putc_unlocked = dlsym(RTLD_NEXT, "putc_unlocked" ); + stdio_ops.putchar = dlsym(RTLD_NEXT, "putchar" ); + stdio_ops.putchar_unlocked = dlsym(RTLD_NEXT, "putchar_unlocked" ); stdio_ops.puts = dlsym(RTLD_NEXT, "puts" ); + stdio_ops.putw = dlsym(RTLD_NEXT, "putw" ); stdio_ops.fgets = dlsym(RTLD_NEXT, "fgets" ); stdio_ops.fgetc = dlsym(RTLD_NEXT, "fgetc" ); stdio_ops.getc = dlsym(RTLD_NEXT, "getc" ); + stdio_ops.getc_unlocked = dlsym(RTLD_NEXT, "getc_unlocked" ); stdio_ops.getchar = dlsym(RTLD_NEXT, "getchar" ); + stdio_ops.getchar_unlocked = dlsym(RTLD_NEXT, "getchar_unlocked" ); + stdio_ops.getw = dlsym(RTLD_NEXT, "getw" ); stdio_ops.gets = dlsym(RTLD_NEXT, "gets" ); + stdio_ops.getdelim = dlsym(RTLD_NEXT, "getdelim" ); stdio_ops.ungetc = dlsym(RTLD_NEXT, "ungetc" ); stdio_ops.vfprintf = dlsym(RTLD_NEXT, "vfprintf" ); stdio_ops.vprintf = dlsym(RTLD_NEXT, "vprintf" ); stdio_ops.fprintf = dlsym(RTLD_NEXT, "fprintf" ); stdio_ops.printf = dlsym(RTLD_NEXT, "printf" ); + stdio_ops.perror = dlsym(RTLD_NEXT, "perror" ); stdio_ops.fscanf = dlsym(RTLD_NEXT, "fscanf" ); stdio_ops.scanf = dlsym(RTLD_NEXT, "scanf" ); stdio_ops.clearerr = dlsym(RTLD_NEXT, "clearerr" ); + stdio_ops.clearerr_unlocked = dlsym(RTLD_NEXT, "clearerr_unlocked" ); stdio_ops.feof = dlsym(RTLD_NEXT, "feof" ); + stdio_ops.feof_unlocked = dlsym(RTLD_NEXT, "feof_unlocked" ); stdio_ops.ferror = dlsym(RTLD_NEXT, "ferror" ); + stdio_ops.ferror_unlocked = dlsym(RTLD_NEXT, "ferror_unlocked" ); stdio_ops.fileno = dlsym(RTLD_NEXT, "fileno" ); + stdio_ops.fileno_unlocked = dlsym(RTLD_NEXT, "fileno_unlocked" ); stdio_ops.remove = dlsym(RTLD_NEXT, "remove" ); stdio_ops.setbuf = dlsym(RTLD_NEXT, "setbuf" ); stdio_ops.setbuffer = dlsym(RTLD_NEXT, "setbuffer" ); @@ -2291,6 +2771,10 @@ static void init_stdio(void) stdio_ops.closedir = dlsym(RTLD_NEXT, "closedir" ); stdio_ops.scandir = dlsym(RTLD_NEXT, "scandir" ); stdio_ops.scandir64 = dlsym(RTLD_NEXT, "scandir64" ); + + /* Finish */ + init_flag = 1; + gen_mutex_unlock(&initlock); }; /* diff --git a/src/client/usrint/usrint.h b/src/client/usrint/usrint.h index 6042db8..4a27794 100644 --- a/src/client/usrint/usrint.h +++ b/src/client/usrint/usrint.h @@ -13,12 +13,22 @@ #define USRINT_H 1 #ifndef _GNU_SOURCE -#define _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif +#ifndef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +#endif +#ifndef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 #endif #ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1 #endif +/* + * This seems to control redirect of 32-bit IO to 64-bit IO + * We want to avoid this in our source + */ #ifdef USRINT_SOURCE #ifdef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS @@ -27,17 +37,58 @@ #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif +#ifdef __OPTIMIZE__ +#undef __OPTIMIZE__ +#endif +#define __NO_INLINE__ 1 #endif -#define __USE_MISC 1 -#define __USE_ATFILE 1 -#define __USE_GNU 1 +/* + * this defines __USE_LARGEFILE, __USE_LARGEFILE64, and + * __USE_FILE_OFFSET64 which control many of the other includes + */ +#ifdef HAVE_FEATURES_H +#include +#endif + +/* + * force this stuff off if the source requests + * the stuff controlling inlining and def'ing of + * functions in stdio is really mixed up and varies from + * one generation of the headers to another. + * I hate to whack all inlining and related stuff + * but it seems the only reliable way to turn it off. + * USRINT code can get this or not with the var below + * I question that header files should be doing + * optimization in the first place. WBL + */ +#ifdef USRINT_SOURCE +#ifdef __USE_FILE_OFFSET64 +#undef __USE_FILE_OFFSET64 +#endif +/* This seems to reappear on some systems, so whack it again */ +#ifdef __OPTIMIZE__ +#undef __OPTIMIZE__ +#endif +#ifdef __REDIRECT +#undef __REDIRECT +#endif +#ifdef __USE_EXTERN_INLINES +#undef __USE_EXTERN_INLINES +#endif +#ifdef __USE_FORTIFY_LEVEL +#undef __FORTIFY_LEVEL +#define __USE_FORTIFY_LEVEL 0 +#endif +#endif #include +#include #include #include #include +#include #ifdef HAVE_UNISTD_H #include #endif @@ -61,7 +112,9 @@ #include #endif #include +#ifdef HAVE_SYS_SENDFILE_H #include +#endif /* #include */ /* struct statfs on OS X */ #ifdef HAVE_SYS_VFS_H #include /* struct statfs on Linux */ @@ -69,9 +122,19 @@ #ifdef HAVE_SYS_STAT_H #include #endif +#include #include +#ifdef PVFS_HAVE_ACL_INCLUDES +#include +#include +#endif +#include +#include +#ifdef HAVE_LINUX_TYPES_H #include +#endif + #ifdef HAVE_ATTR_XATTR_H #include #else @@ -80,23 +143,23 @@ #else #define XATTR_CREATE 0x1 #define XATTR_REPLACE 0x2 -extern int (*setxattr)(const char *path, const char *name, +extern int setxattr(const char *path, const char *name, const void *value, size_t size, int flags); -extern int (*lsetxattr)(const char *path, const char *name, +extern int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); -extern int (*fsetxattr)(int fd, const char *name, +extern int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); -extern int (*getxattr)(const char *path, const char *name, +extern ssize_t getxattr(const char *path, const char *name, void *value, size_t size); -extern int (*lgetxattr)(const char *path, const char *name, +extern ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); -extern int (*fgetxattr)(int fd, const char *name, void *value, size_t size); -extern int (*listxattr)(const char *path, char *list, size_t size); -extern int (*llistxattr)(const char *path, char *list, size_t size); -extern int (*flistxattr)(int fd, char *list, size_t size); -extern int (*removexattr)(const char *path, const char *name); -extern int (*lremovexattr)(const char *path, const char *name); -extern int (*fremovexattr)(int fd, const char *name); +extern ssize_t fgetxattr(int fd, const char *name, void *value, size_t size); +extern ssize_t listxattr(const char *path, char *list, size_t size); +extern ssize_t llistxattr(const char *path, char *list, size_t size); +extern ssize_t flistxattr(int fd, char *list, size_t size); +extern int removexattr(const char *path, const char *name); +extern int lremovexattr(const char *path, const char *name); +extern int fremovexattr(int fd, const char *name); #endif #endif @@ -109,7 +172,10 @@ extern int (*fremovexattr)(int fd, const char *name); /* PVFS specific includes */ #include #include +#include +#include #include +#include /* magic numbers for PVFS filesystem */ #define PVFS_FS 537068840 @@ -122,6 +188,28 @@ extern int (*fremovexattr)(int fd, const char *name); #ifndef O_NOFOLLOW #define O_NOFOLLOW 0 #endif + +/* Define AT_FDCWD and related flags on older systems */ +#ifndef AT_FDCWD +# define AT_FDCWD -100 /* Special value used to indicate + the *at functions should use the + current working directory. */ +#endif +#ifndef AT_SYMLINK_NOFOLLOW +# define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ +#endif +#ifndef AT_REMOVDIR +# define AT_REMOVEDIR 0x200 /* Remove directory instead of + unlinking file. */ +#endif +#ifndef AT_SYMLINK_FOLLOW +# define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ +#endif +#ifndef AT_EACCESS +# define AT_EACCESS 0x200 /* Test access permitted for + effective IDs, not real IDs. */ +#endif + #define true 1 #define false 0 #define O_HINTS 02000000 /* PVFS hints are present */ @@ -132,14 +220,18 @@ extern int (*fremovexattr)(int fd, const char *name); #define PVFS_BUFSIZE (1024*1024) /* extra function prototypes */ -int fseek64(FILE *stream, const off64_t offset, int whence); -off64_t ftell64(FILE *stream); +extern int posix_readdir(unsigned int fd, struct dirent *dirp, + unsigned int count); -int pvfs_convert_iovec(const struct iovec *vector, - int count, - PVFS_Request *req, - void **buf); +extern int fseek64(FILE *stream, const off64_t offset, int whence); + +extern off64_t ftell64(FILE *stream); + +extern int pvfs_convert_iovec(const struct iovec *vector, + int count, + PVFS_Request *req, + void **buf); /* MPI functions */ //int MPI_File_open(MPI_Comm comm, char *filename, @@ -152,14 +244,34 @@ int pvfs_convert_iovec(const struct iovec *vector, /* debugging */ //#define USRINT_DEBUG -#ifdef USRINT_DEBUG +#ifdef PVFS_USRINT_DEBUG #define debug(s,v) fprintf(stderr,s,v) #else #define debug(s,v) #endif -/* FD sets */ +/* USRINT Configuration Defines - Defaults */ +/* These should be defined in pvfs2-config.h */ +#ifndef PVFS_USRINT_BUILD +#define PVFS_USRINT_BUILD 1 +#endif + +#ifndef PVFS_USRINT_CWD +#define PVFS_USRINT_CWD 1 +#endif + +#ifndef PVFS_USRINT_KMOUNT +#define PVFS_USRINT_KMOUNT 0 +#endif + +#ifndef PVFS_UCACHE_ENABLE +#define PVFS_UCACHE_ENABLE 1 +#endif + + +/* FD sets */ +#if 0 #ifdef FD_SET #undef FD_SET #endif @@ -198,12 +310,10 @@ do { \ __FD_ISSET(pd->true_fd,(fdset));\ } \ } while(0) - - -//typedef uint64_t off64_t; - #endif +#endif /* USRINT_H */ + /* * Local variables: * c-indent-level: 4 diff --git a/src/common/gen-locks/gen-locks.h b/src/common/gen-locks/gen-locks.h index 7859fe5..ac8f98f 100644 --- a/src/common/gen-locks/gen-locks.h +++ b/src/common/gen-locks/gen-locks.h @@ -21,6 +21,9 @@ #define __GEN_LOCKS_H #include +#ifndef WIN32 +#include +#endif /* we will make posix locks the default unless turned off for now. */ /* this is especially important for development in which case the locks @@ -63,6 +66,29 @@ typedef pthread_t gen_thread_t; typedef pthread_cond_t gen_cond_t; #define GEN_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER; #define GEN_COND_INITIALIZER PTHREAD_COND_INITIALIZER; + +#ifdef __USE_GNU +/* Support for custom static initializer for a processor-shared pthread mutex.*/ +# if _POSIX_THREAD_PROCESS_SHARED != -1 +# if __WORDSIZE == 64 +# define GEN_SHARED_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, 128, 0, { 0, 0 } } } +# else +# define GEN_SHARED_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, 128, { 0 } } } +# endif /* __WORDSIZE */ +# endif /* _POSIX_THREAD_PROCESS_SHARED */ + +/* Support for custom static initializer for a recursive pthread mutex */ +# if __WORDSIZE == 64 +# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } +# else +# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } +# endif /* __WORDSIZE */ +#endif /* __USE_GNU */ + #define gen_mutex_lock(m) gen_posix_mutex_lock(m) #define gen_mutex_unlock(m) gen_posix_mutex_unlock(m) #define gen_mutex_trylock(m) gen_posix_mutex_trylock(m) @@ -147,6 +173,8 @@ typedef unsigned long gen_thread_t; typedef int gen_cond_t; #define GEN_MUTEX_INITIALIZER 0 +#define GEN_SHARED_MUTEX_INITIALIZER_NP 0 +#define GEN_RECURSIVE_MUTEX_INITIALIZER_NP 0 #define GEN_COND_INITIALIZER 0 static inline int gen_mutex_lock( diff --git a/src/common/misc/digest.c b/src/common/misc/digest.c index 5229b5e..f0b8e63 100644 --- a/src/common/misc/digest.c +++ b/src/common/misc/digest.c @@ -26,7 +26,9 @@ #ifdef __GEN_POSIX_LOCKING__ #include +#ifdef HAVE_LINUX_UNISTD_H #include +#endif #include #include #include diff --git a/src/common/misc/extent-utils.c b/src/common/misc/extent-utils.c index ce03d70..87e70f9 100644 --- a/src/common/misc/extent-utils.c +++ b/src/common/misc/extent-utils.c @@ -45,7 +45,7 @@ PINT_llist *PINT_create_extent_list(char *extent_str) new_extent->first = cur_extent.first; new_extent->last = cur_extent.last; - + PINT_llist_add_to_tail(extent_list,(void *)new_extent); } } diff --git a/src/common/misc/msgpairarray.h b/src/common/misc/msgpairarray.h index e43e8b0..abbe0c4 100644 --- a/src/common/misc/msgpairarray.h +++ b/src/common/misc/msgpairarray.h @@ -13,7 +13,6 @@ #include "job.h" #include "command.h" - extern struct PINT_state_machine_s pvfs2_msgpairarray_sm; extern struct PINT_state_machine_s pvfs2_osd_msgpairarray_sm; @@ -63,9 +62,9 @@ typedef struct PINT_sm_msgpair_state_s /* request when talking to an OSD server */ struct osd_command osd_command; - /* point to things that may need freed during clean up */ - void *osd_iov; - void *osd_sgl; + /* point to things that may need freed during clean up */ + void *osd_iov; + void *osd_sgl; /* the encoding type to use for the req */ enum PVFS_encoding_type enc_type; diff --git a/src/common/misc/pint-cached-config.c b/src/common/misc/pint-cached-config.c index bf9a4ae..67ab1f1 100644 --- a/src/common/misc/pint-cached-config.c +++ b/src/common/misc/pint-cached-config.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ +#include #include #include #include @@ -16,6 +17,9 @@ #ifndef WIN32 #include #endif +#ifdef HAVE_OPENSSL_SHA_H +#include +#endif #include "pvfs2-types.h" #include "pvfs2-attr.h" @@ -52,6 +56,11 @@ struct config_fs_cache_s /* index into fs->data_handle_ranges obj (see server-config.h) */ PINT_llist *data_server_cursor; + /* copy of server_configuration_s/host_id (see server-config.h) */ + char *data_local_alias; + /* handle mapping of local server (see server-config.h) */ + struct host_handle_mapping_s *data_local_mapping; + /* the following fields are used to cache arrays of unique physical server addresses, of particular use to the mgmt interface @@ -82,8 +91,9 @@ const struct handle_lookup_entry* find_handle_lookup_entry( static int load_handle_lookup_table( struct config_fs_cache_s *cur_config_fs_cache); +/* removed by WBL when selection algorithm rewritten static int meta_randomized = 0; -static int io_randomized = 0; +static int io_randomized = 0; */ /* PINT_cached_config_initialize() * @@ -94,7 +104,10 @@ static int io_randomized = 0; int PINT_cached_config_initialize(void) { struct timeval tv; + unsigned int pid = 0; + unsigned int hostmix = 0; unsigned int seed = 0; + unsigned char *hashseed = NULL; char hostname[HOST_NAME_MAX]; int ret; int i; @@ -105,30 +118,53 @@ int PINT_cached_config_initialize(void) PINT_fsid_config_cache_table = qhash_init(hash_fsid_compare,hash_fsid,11); } - + /* include time, pid, and hostname in random seed in order to help avoid * collisions on object placement when many clients are launched * concurrently */ gettimeofday(&tv, NULL); - seed += tv.tv_sec; - seed += tv.tv_usec; #ifdef WIN32 - seed += GetCurrentProcessId(); + pid = GetCurrentProcessId(); #else - seed += getpid(); + pid = getpid(); #endif ret = gethostname(hostname, HOST_NAME_MAX); if(ret == 0) { + hostmix = 0; hostnamelen = strlen(hostname); for(i=0; ifs = (struct filesystem_configuration_s *)fs; cur_config_fs_cache->meta_server_cursor = - cur_config_fs_cache->fs->meta_handle_ranges; + cur_config_fs_cache->fs->meta_handle_ranges; cur_config_fs_cache->data_server_cursor = - cur_config_fs_cache->fs->data_handle_ranges; - + cur_config_fs_cache->fs->data_handle_ranges; + cur_config_fs_cache->data_local_alias = + config->host_id; + /* find handle mapping of local host */ + if (cur_config_fs_cache->data_local_alias) + { + cur_config_fs_cache->data_local_mapping = + PINT_get_handle_mapping(fs->data_handle_ranges, + cur_config_fs_cache->data_local_alias); + } + else + { + cur_config_fs_cache->data_local_mapping = NULL; + } + /* populate table used to speed up mapping of handle values * to servers */ @@ -277,7 +328,7 @@ int PINT_cached_config_handle_load_mapping( gossip_err("Error: failed to load handle lookup table.\n"); return(ret); } - + qhash_add(PINT_fsid_config_cache_table, &(cur_config_fs_cache->fs->coll_id), &(cur_config_fs_cache->hash_link)); @@ -353,14 +404,14 @@ int PINT_cached_config_get_server( server_cursor = cur_config_cache->fs->data_handle_ranges; } - + cur_mapping = PINT_cached_config_find_server(server_cursor, host); /* didn't find the server */ if(!cur_mapping) { return(-PVFS_ENOENT); } - + ext_array->extent_count = cur_mapping->handle_extent_array.extent_count; ext_array->extent_array = @@ -391,7 +442,7 @@ int PINT_cached_config_get_next_meta( PVFS_handle_extent_array *ext_array, int is_directory) { - int ret = -PVFS_EINVAL, jitter = 0, num_meta_servers = 0; + int ret = -PVFS_EINVAL, randsrv = 0, num_meta_servers = 0; char *meta_server_bmi_str = NULL; struct host_handle_mapping_s *cur_mapping = NULL; struct qlist_head *hash_link = NULL; @@ -399,107 +450,113 @@ int PINT_cached_config_get_next_meta( struct server_configuration_s *config; int want_osd; - if (ext_array) + if (!ext_array) { - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); - if (hash_link) - { - config = PINT_get_server_config_struct(fsid); + gossip_err("PINT_cached_config_get_next_meta called with " + "NULL ext_array.\n"); + return -PVFS_EINVAL; + } + hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + if (!hash_link) + { + gossip_err("Hash search failed to return configuration.\n"); + return -PVFS_EINVAL; + } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + config = PINT_get_server_config_struct(fsid); + cur_config_cache = qlist_entry( + hash_link, struct config_fs_cache_s, hash_link); - assert(cur_config_cache); - assert(cur_config_cache->fs); - assert(cur_config_cache->meta_server_cursor); + assert(cur_config_cache); + assert(cur_config_cache->fs); + assert(cur_config_cache->meta_server_cursor); - /* figure out if we want or do not want an OSD based on - * type settings and if a directory server was requested - * (from mkdir). - */ - want_osd = 0; /* 0 == give me a pvfs */ - switch (config->osd_type) { - case OSD_NONE: - if (config->osd_dir_type == OSD_DIR_PVFS) - want_osd = 0; - else - want_osd = is_directory; - break; - case OSD_DATAFILE: - if (config->osd_dir_type == OSD_DIR_PVFS) - want_osd = 0; - else - want_osd = is_directory; - break; - case OSD_METAFILE: - if (config->osd_dir_type == OSD_DIR_PVFS) - want_osd = !is_directory; - else - want_osd = 1; - break; - case OSD_MDFILE: - if (config->osd_dir_type == OSD_DIR_PVFS) - want_osd = !is_directory; /* never called */ - else - want_osd = 1; - break; - } + /* figure out if we want or do not want an OSD based on + * type settings and if a directory server was requested + * (from mkdir). + */ + want_osd = 0; /* 0 == give me a pvfs */ + switch (config->osd_type) { + case OSD_NONE: + if (config->osd_dir_type == OSD_DIR_PVFS) + want_osd = 0; + else + want_osd = is_directory; + break; + case OSD_DATAFILE: + if (config->osd_dir_type == OSD_DIR_PVFS) + want_osd = 0; + else + want_osd = is_directory; + break; + case OSD_METAFILE: + if (config->osd_dir_type == OSD_DIR_PVFS) + want_osd = !is_directory; + else + want_osd = 1; + break; + case OSD_MDFILE: + if (config->osd_dir_type == OSD_DIR_PVFS) + want_osd = !is_directory; /* never called */ + else + want_osd = 1; + break; + } - num_meta_servers = PINT_llist_count( - cur_config_cache->fs->meta_handle_ranges); + num_meta_servers = PINT_llist_count( + cur_config_cache->fs->meta_handle_ranges); - /* pick random starting point, then round robin */ - if(!meta_randomized) - { - jitter = (rand() % num_meta_servers); - meta_randomized = 1; - } - else - { - /* we let the jitter loop below increment the cursor by one */ - jitter = 0; - } - while(jitter-- > -1) - { - cur_mapping = PINT_llist_head( - cur_config_cache->meta_server_cursor); - if (!cur_mapping) - { - cur_config_cache->meta_server_cursor = - cur_config_cache->fs->meta_handle_ranges; - cur_mapping = PINT_llist_head( - cur_config_cache->meta_server_cursor); - assert(cur_mapping); - } - cur_config_cache->meta_server_cursor = PINT_llist_next( - cur_config_cache->meta_server_cursor); - /* first jitter across all, regardless of acceptability, then - * keep looping until find one that matches */ - if (jitter == 0) - if (want_osd ^ - alias_is_osd(cur_mapping->alias_mapping->bmi_address)) - continue; - --jitter; - } - meta_server_bmi_str = cur_mapping->alias_mapping->bmi_address; - - ext_array->extent_count = - cur_mapping->handle_extent_array.extent_count; - ext_array->extent_array = - cur_mapping->handle_extent_array.extent_array; - - if (meta_addr != NULL) - { - ret = BMI_addr_lookup(meta_addr,meta_server_bmi_str); - } - else - { - ret = 0; - } - - PINT_put_server_config_struct(config); + randsrv = (rand() % num_meta_servers); + + /* set cursor at beginning of list */ + cur_config_cache->meta_server_cursor = + cur_config_cache->fs->meta_handle_ranges; + + while(randsrv--) + { + cur_config_cache->meta_server_cursor = PINT_llist_next( + cur_config_cache->meta_server_cursor); + if (!cur_config_cache->meta_server_cursor) + { + /* found end of list before we should have */ + gossip_err("Found end of list of metaservers " + "before expected in " + "PINT_cached_config_get_next_meta\n"); + /* return first metaserver */ + cur_config_cache->meta_server_cursor = + cur_config_cache->fs->meta_handle_ranges; + break; } + + /* first jitter across all, regardless of acceptability, then + * keep looping until find one that matches */ + if (randsrv == 0) + if (want_osd ^ alias_is_osd(cur_mapping->alias_mapping->bmi_address)) + continue; + --randsrv; } + + cur_mapping = PINT_llist_head( + cur_config_cache->meta_server_cursor); + + meta_server_bmi_str = cur_mapping->alias_mapping->bmi_address; + + ext_array->extent_count = + cur_mapping->handle_extent_array.extent_count; + ext_array->extent_array = + cur_mapping->handle_extent_array.extent_array; + + if (meta_addr != NULL) + { + ret = BMI_addr_lookup(meta_addr,meta_server_bmi_str); + } + else + { + ret = 0; + } + + PINT_put_server_config_struct(config); + return ret; } #endif @@ -519,12 +576,13 @@ static int PINT_cached_config_get_extents( hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); if(!hash_link) { - gossip_err("Failed to find a file system matching fsid: %d\n", fsid); + gossip_err("Failed to find a file system matching fsid: %d\n", + fsid); return -PVFS_EINVAL; } cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + hash_link, struct config_fs_cache_s, hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -538,7 +596,7 @@ static int PINT_cached_config_get_extents( server_list = PINT_llist_next(server_list); ret = BMI_addr_lookup( - &tmp_addr, cur_mapping->alias_mapping->bmi_address); + &tmp_addr, cur_mapping->alias_mapping->bmi_address); if(ret < 0) { return ret; @@ -547,9 +605,9 @@ static int PINT_cached_config_get_extents( if(tmp_addr == *addr) { handle_extents->extent_count = - cur_mapping->handle_extent_array.extent_count; + cur_mapping->handle_extent_array.extent_count; handle_extents->extent_array = - cur_mapping->handle_extent_array.extent_array; + cur_mapping->handle_extent_array.extent_array; return 0; } @@ -564,14 +622,16 @@ int PINT_cached_config_map_servers( PVFS_BMI_addr_t *addr_array, PVFS_handle_extent_array *handle_extent_array) { - struct qhash_head *hash_link; - struct PINT_llist *server_list; - struct host_handle_mapping_s *cur_mapping = NULL; + struct qhash_head *hash_link = NULL; + struct PINT_llist *server_list = NULL; + struct PINT_llist *server_list_head = NULL; + struct host_handle_mapping_s *sv = NULL; struct config_fs_cache_s *cur_config_cache = NULL; - int num_io_servers, i, ret; + int num_io_servers, i, df, ret; + int current_sv = -1; int start_index = -1; - int index; - int random_attempts; + int *random_array = NULL; + int *server_array = NULL; assert(inout_num_datafiles); @@ -588,152 +648,234 @@ int PINT_cached_config_map_servers( assert(cur_config_cache); assert(cur_config_cache->fs); - server_list = cur_config_cache->fs->data_handle_ranges; - num_io_servers = PINT_llist_count(server_list); + server_list_head = cur_config_cache->fs->data_handle_ranges; + num_io_servers = PINT_llist_count(server_list_head); switch(layout->algorithm) { - case PVFS_SYS_LAYOUT_LIST: + case PVFS_SYS_LAYOUT_LIST: - if(*inout_num_datafiles < layout->server_list.count) - { - gossip_err("The specified datafile layout is larger" - " than the number of requested datafiles\n"); - return -PVFS_EINVAL; - } + if(*inout_num_datafiles < layout->server_list.count) + { + gossip_err("The specified datafile layout is larger" + " than the number of requested datafiles\n"); + return -PVFS_EINVAL; + } - *inout_num_datafiles = layout->server_list.count; - for(i = 0; i < layout->server_list.count; ++i) + *inout_num_datafiles = layout->server_list.count; + for(i = 0; i < layout->server_list.count; ++i) + { + if(handle_extent_array) { - if(handle_extent_array) - { - ret = PINT_cached_config_get_extents( + ret = PINT_cached_config_get_extents( fsid, &layout->server_list.servers[i], &handle_extent_array[i]); - if(ret < 0) - { - gossip_err("The address specified in the datafile " - "layout is invalid\n"); - return ret; - } + if(ret < 0) + { + gossip_err("The address specified in the datafile " + "layout is invalid\n"); + return ret; } + } - addr_array[i] = layout->server_list.servers[i]; + addr_array[i] = layout->server_list.servers[i]; + } + break; + + case PVFS_SYS_LAYOUT_LOCAL: + /* + * This layout puts the one datafile on the local + * machine, assuming the local machine is a server. + * This should have been determined when the config + * is parsed. If this machine is not a server then + * use the default. + */ + if (cur_config_cache->data_local_alias) + { + /* lookup addresses */ + ret = BMI_addr_lookup(&addr_array[0], + cur_config_cache->data_local_alias); + if (!ret) + { + struct host_handle_mapping_s *mapping; + mapping = cur_config_cache->data_local_mapping; + if (mapping && handle_extent_array) + { + handle_extent_array[0].extent_count = + mapping->handle_extent_array.extent_count; + handle_extent_array[0].extent_array = + mapping->handle_extent_array.extent_array; + } + /* local layout is only for one data file */ + *inout_num_datafiles = 1; } break; - - case PVFS_SYS_LAYOUT_NONE: + } + /* else random */ + if(start_index == -1) + { + start_index = rand() % num_io_servers; + } + /* fall through */ + + case PVFS_SYS_LAYOUT_NONE: + /* + * This layout is just like Round Robin except + * it does not randomly set the start_index with + * a random call but uses zero. If start_index + * is already set, just fall through. + */ + if (start_index == -1) + { start_index = 0; - /* fall through */ + } + /* fall through */ + + case PVFS_SYS_LAYOUT_ROUND_ROBIN: + /* + * This layout generates a random number from + * zero to num_io_servers - 1 and then allocates + * inout_num_datafiles servers starting with that + * as the first. Other parts of the code ensure + * that inout_num_datafiles < num_io_servers but + * this code should correctly allocate multiple + * datafiles per server round robin - though that + * won't happen with the current caode base + */ - case PVFS_SYS_LAYOUT_ROUND_ROBIN: - if(num_io_servers < *inout_num_datafiles) + if(num_io_servers < *inout_num_datafiles) + { + *inout_num_datafiles = num_io_servers; + } + + if(start_index == -1) + { + start_index = rand() % num_io_servers; + } + + /* start at beginning of server list */ + server_list = server_list_head; + /* search for the start_index server */ + for (i = 0; i < start_index; i++) + { + server_list = PINT_llist_next(server_list); + } + sv = PINT_llist_head(server_list); + assert(sv); + /* for each data file */ + for(df = 0; df < *inout_num_datafiles; df++) + { + /* lookup addresses */ + ret = BMI_addr_lookup(&addr_array[df], + sv->alias_mapping->bmi_address); + if (ret) { - *inout_num_datafiles = num_io_servers; + return ret; } - if(start_index == -1) + /* no one uses this but we get it anyway */ + if(handle_extent_array) { - start_index = rand() % *inout_num_datafiles; + handle_extent_array[df].extent_count = + sv->handle_extent_array.extent_count; + handle_extent_array[df].extent_array = + sv->handle_extent_array.extent_array; } - - for(i = 0; i < *inout_num_datafiles; ++i) + /* go to next server in list */ + server_list = PINT_llist_next(server_list); + sv = PINT_llist_head(server_list); + if (!sv) { - cur_mapping = PINT_llist_head(server_list); - assert(cur_mapping); - server_list = PINT_llist_next(server_list); - - index = (i + start_index) % *inout_num_datafiles; - ret = BMI_addr_lookup( - &addr_array[index], - cur_mapping->alias_mapping->bmi_address); - if (ret) - { - return ret; - } - - if(handle_extent_array) - { - handle_extent_array[index].extent_count = - cur_mapping->handle_extent_array.extent_count; - handle_extent_array[index].extent_array = - cur_mapping->handle_extent_array.extent_array; - } + server_list = server_list_head; + sv = PINT_llist_head(server_list); } - break; + assert(sv); + } + break; - case PVFS_SYS_LAYOUT_RANDOM: - /* this layout randomizes the order but still uses each server - * only once - */ + case PVFS_SYS_LAYOUT_RANDOM: + /* this layout randomizes the order but still uses each server + * only once + */ - /* limit this layout to a number of datafiles no greater than - * the number of servers - */ - if(num_io_servers < *inout_num_datafiles) + /* limit this layout to a number of datafiles no greater than + * the number of servers + */ + if(num_io_servers < *inout_num_datafiles) + { + *inout_num_datafiles = num_io_servers; + } + /* init all the addrs to 0, so we know whether we've set an + * address at a particular index or not + */ + random_array = (int *)malloc(*inout_num_datafiles * sizeof(int)); + server_array = (int *)malloc(num_io_servers * sizeof(int)); + memset(random_array, 0, (*inout_num_datafiles)*sizeof(*addr_array)); + memset(server_array, 0, (num_io_servers)*sizeof(*addr_array)); + + /* generate list of unique random numbers from 0 to */ + /* inout_num_datafiles - 1 */ + for(df = 0; df < *inout_num_datafiles; df++) + { + int server = rand() % num_io_servers; + while (server_array[server]) { - *inout_num_datafiles = num_io_servers; + /* if we get a conflict skip on down to next entry */ + server = (server + 1) % num_io_servers; } + server_array[server] = 1; + random_array[df] = server; + } + /* server array is only to make sure we don't duplicate */ + free(server_array); - /* init all the addrs to 0, so we know whether we've set an - * address at a particular index or not - */ - memset(addr_array, 0, (*inout_num_datafiles)*sizeof(*addr_array)); - - for(i = 0; i < *inout_num_datafiles; ++i) + current_sv = 0; + server_list = server_list_head; + /* go through data file list in order */ + for(df = 0; df < *inout_num_datafiles; df++) + { + /* if we're already past the next one on the list */ + /* go back to head of the list */ + if (random_array[df] < current_sv) + { + server_list = server_list_head; + current_sv = 0; + } + /* skip down the list to the one we want */ + while(current_sv < random_array[df]) { - /* go through server list in order */ - cur_mapping = PINT_llist_head(server_list); - assert(cur_mapping); server_list = PINT_llist_next(server_list); - - /* select random index into caller's list */ - index = rand() % *inout_num_datafiles; - random_attempts = 1; - - /* if we have already filled that index, try another random - * index - */ - while(addr_array[index] != 0 && random_attempts < 6) - { - index = rand() % *inout_num_datafiles; - random_attempts++; - } - - /* if we exhausted a max number of randomization attempts, - * then just go linearly through list - */ - while(addr_array[index] != 0) - { - index = (index + 1) % *inout_num_datafiles; - } - - /* found an unused index */ - ret = BMI_addr_lookup( - &addr_array[index], - cur_mapping->alias_mapping->bmi_address); - if (ret) - { - return ret; - } - - if(handle_extent_array) - { - handle_extent_array[index].extent_count = - cur_mapping->handle_extent_array.extent_count; - handle_extent_array[index].extent_array = - cur_mapping->handle_extent_array.extent_array; - } + current_sv++; } - break; - default: - gossip_err("Unknown datafile mapping algorithm\n"); - return -PVFS_EINVAL; + /* get the server info */ + sv = PINT_llist_head(server_list); + assert(sv); + /* lookup addresses */ + ret = BMI_addr_lookup(&addr_array[df], + sv->alias_mapping->bmi_address); + /* no one uses this but we get it anyway */ + if(handle_extent_array) + { + handle_extent_array[df].extent_count = + sv->handle_extent_array.extent_count; + handle_extent_array[df].extent_array = + sv->handle_extent_array.extent_array; + } + } + /* done with this so free it */ + free(random_array); + break; + + default: + gossip_err("Unknown datafile mapping algorithm\n"); + return -PVFS_EINVAL; } return 0; } +/* THIS APPEARS TO BE SUPERCEDED BY THE PREVIOUS FUNCTION*/ +#if 0 /* PINT_cached_config_get_next_io() * * returns the address of a set of servers that should be used to @@ -846,6 +988,7 @@ int PINT_cached_config_get_next_io( } return ret; } +#endif /* PINT_cached_config_map_addr() * @@ -1099,6 +1242,7 @@ int PINT_cached_config_map_to_server( PVFS_fs_id fs_id) { struct handle_lookup_entry* tmp_entry; + tmp_entry = find_handle_lookup_entry(handle, fs_id); if(!tmp_entry) @@ -1109,6 +1253,7 @@ int PINT_cached_config_map_to_server( } *server_addr = tmp_entry->server_addr; + return(0); } @@ -1166,7 +1311,7 @@ int PINT_cached_config_get_num_dfiles( gossip_err("Error: distribution failure for %d servers and %d requested datafiles.\n", num_io_servers, num_dfiles_requested); return(-PVFS_EINVAL); } - + if (*num_dfiles > num_io_servers) { gossip_err("%s: Distribution requires more datafiles(%d) than I/O servers(%d) currently defined in the system. Capping " @@ -1462,6 +1607,7 @@ int PINT_cached_config_get_server_list( } *server_count = num_io_servers; } + free(server_addrs); *server_names = servers; @@ -1713,7 +1859,7 @@ static int handle_lookup_entry_compare(const void *p1, const void *p2) */ const struct handle_lookup_entry* find_handle_lookup_entry( PVFS_handle handle, PVFS_fs_id fsid) -{ +{ struct qlist_head *hash_link = NULL; struct config_fs_cache_s *cur_config_cache = NULL; int high, low, mid; @@ -1768,6 +1914,7 @@ const struct handle_lookup_entry* find_handle_lookup_entry( /* osd address might be wrong, since the handle lookup table doesn't call BMI_addr_lookup for osd server */ BMI_addr_lookup(&cur_config_cache->handle_lookup_table[table_index].server_addr, cur_config_cache->handle_lookup_table[table_index].server_name); } + return(&cur_config_cache->handle_lookup_table[table_index]); } @@ -1795,7 +1942,7 @@ static int load_handle_lookup_table( int i; int j; PINT_llist* range_list[2] = - { + { cur_config_fs_cache->fs->meta_handle_ranges, cur_config_fs_cache->fs->data_handle_ranges }; @@ -1845,12 +1992,11 @@ static int load_handle_lookup_table( = cur_mapping->handle_extent_array.extent_array[i]; cur_config_fs_cache->handle_lookup_table[table_offset].server_name = cur_mapping->alias_mapping->bmi_address; - + #ifndef __PVFS2_SERVER__ ret = BMI_addr_lookup( &cur_config_fs_cache->handle_lookup_table[table_offset].server_addr, cur_config_fs_cache->handle_lookup_table[table_offset].server_name); - if(ret < 0) { free(cur_config_fs_cache->handle_lookup_table); @@ -1859,7 +2005,6 @@ static int load_handle_lookup_table( return(ret); } #endif - table_offset++; } server_cursor = PINT_llist_next(server_cursor); diff --git a/src/common/misc/pint-cached-config.h b/src/common/misc/pint-cached-config.h index f970914..e4e96bb 100644 --- a/src/common/misc/pint-cached-config.h +++ b/src/common/misc/pint-cached-config.h @@ -29,7 +29,8 @@ int PINT_cached_config_initialize(void); int PINT_cached_config_finalize(void); int PINT_cached_config_handle_load_mapping( - struct filesystem_configuration_s *fs); + struct filesystem_configuration_s *fs, + struct server_configuration_s *config); int PINT_cached_config_map_alias( const char *alias, @@ -53,11 +54,14 @@ int PINT_cached_config_get_io( PVFS_BMI_addr_t *io_addr, PVFS_handle_extent_array *ext_array); +/* This appears to be obsolete */ +#if 0 int PINT_cached_config_get_next_io( PVFS_fs_id fsid, int num_servers, PVFS_BMI_addr_t *io_addr_array, PVFS_handle_extent_array *io_handle_extent_array); +#endif const char *PINT_cached_config_map_addr( PVFS_fs_id fsid, @@ -106,7 +110,7 @@ int PINT_cached_config_get_server_name( int max_server_name_len, PVFS_handle handle, PVFS_fs_id fsid); - + int PINT_cached_config_update_first_handle( PVFS_handle handle, PVFS_fs_id fsid); @@ -151,7 +155,7 @@ int PINT_cached_config_io_server_names( char ***list, int *size, PVFS_fs_id fsid); - + int PINT_cached_config_store_new_oid( PVFS_BMI_addr_t *addr, PVFS_fs_id fs_id, diff --git a/src/common/misc/pint-hint.c b/src/common/misc/pint-hint.c index 4108790..8b533ff 100644 --- a/src/common/misc/pint-hint.c +++ b/src/common/misc/pint-hint.c @@ -25,7 +25,7 @@ struct PINT_hint_info { enum PINT_hint_type type; int flags; - const char * name; + const char *name; void (*encode)(char **pptr, void *value); void (*decode)(char **pptr, void *value); int length; @@ -77,6 +77,41 @@ static const struct PINT_hint_info hint_types[] = { decode_func_uint32_t, sizeof(uint32_t)}, + {PINT_HINT_DISTRIBUTION, + 0, + PVFS_HINT_DISTRIBUTION_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_DFILE_COUNT, + 0, + PVFS_HINT_DFILE_COUNT_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_LAYOUT, + 0, + PVFS_HINT_LAYOUT_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_SERVERLIST, + 0, + PVFS_HINT_SERVERLIST_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + + {PINT_HINT_NOCACHE, + 0, + PVFS_HINT_NOCACHE_NAME, + encode_func_uint32_t, + decode_func_uint32_t, + sizeof(uint32_t)}, + {0} }; @@ -164,18 +199,18 @@ int PVFS_hint_add_internal( int PVFS_hint_replace( PVFS_hint *hint, - const char *type, + const char *name, int length, void *value) { const struct PINT_hint_info *info; - info = PINT_hint_get_info_by_name(type); + info = PINT_hint_get_info_by_name(name); if(info) { return PVFS_hint_replace_internal(hint, info->type, length, value); } - return PVFS_hint_add(hint, type, length, value); + return PVFS_hint_add(hint, name, length, value); } int PVFS_hint_replace_internal( @@ -214,7 +249,7 @@ int PVFS_hint_replace_internal( int PVFS_hint_add( PVFS_hint *hint, - const char *type, + const char *name, int length, void *value) { @@ -222,7 +257,7 @@ int PVFS_hint_add( const struct PINT_hint_info *info; PINT_hint *new_hint; - info = PINT_hint_get_info_by_name(type); + info = PINT_hint_get_info_by_name(name); if(info) { ret = PINT_hint_check(hint, info->type); @@ -258,7 +293,7 @@ int PVFS_hint_add( else { new_hint->type = PINT_HINT_UNKNOWN; - new_hint->type_string = strdup(type); + new_hint->type_string = strdup(name); /* always transfer unknown hints */ new_hint->flags = PINT_HINT_TRANSFER; @@ -272,11 +307,11 @@ int PVFS_hint_add( return 0; } -int PVFS_hint_check(PVFS_hint *hints, const char *type) +int PVFS_hint_check(PVFS_hint *hints, const char *name) { const struct PINT_hint_info *info; - info = PINT_hint_get_info_by_name(type); + info = PINT_hint_get_info_by_name(name); return PINT_hint_check(hints, info->type); } @@ -284,7 +319,10 @@ static int PINT_hint_check(PVFS_hint *hints, enum PINT_hint_type type) { PINT_hint *tmp; - if(!hints) return 0; + if(!hints) + { + return 0; + } tmp = *hints; while(tmp) @@ -298,6 +336,28 @@ static int PINT_hint_check(PVFS_hint *hints, enum PINT_hint_type type) return 0; } +int PVFS_hint_check_transfer(PVFS_hint *hints) +{ + PINT_hint *tmp; + + if(!hints) + { + return 0; + } + + tmp = *hints; + while(tmp) + { + if (PINT_hint_get_info_by_type(tmp->type)->flags & + PINT_HINT_TRANSFER) + { + return 1; + } + tmp = tmp->next; + } + return 0; +} + void encode_PINT_hint(char **pptr, const PINT_hint *hint) { int transfer_count = 0; @@ -442,7 +502,7 @@ void PVFS_hint_free(PVFS_hint hint) * PVFS2_HINTS = *'pvfs.hint.request_id:10+pvfs.hint.client_id:30' */ -int PVFS_hint_import_env(PVFS_hint * out_hint) +int PVFS_hint_import_env(PVFS_hint *out_hint) { char * env; char * env_copy; diff --git a/src/common/misc/pint-hint.h b/src/common/misc/pint-hint.h index 8f52126..4b2ea0f 100644 --- a/src/common/misc/pint-hint.h +++ b/src/common/misc/pint-hint.h @@ -24,7 +24,12 @@ enum PINT_hint_type PINT_HINT_HANDLE, PINT_HINT_OP_ID, PINT_HINT_RANK, - PINT_HINT_SERVER_ID + PINT_HINT_SERVER_ID, + PINT_HINT_DISTRIBUTION, + PINT_HINT_LAYOUT, + PINT_HINT_DFILE_COUNT, + PINT_HINT_SERVERLIST, + PINT_HINT_NOCACHE }; typedef struct PVFS_hint_s diff --git a/src/common/misc/pvfs2-util.c b/src/common/misc/pvfs2-util.c index 9474bc8..4dba566 100644 --- a/src/common/misc/pvfs2-util.c +++ b/src/common/misc/pvfs2-util.c @@ -97,12 +97,6 @@ static int parse_encoding_string( static int parse_num_dfiles_string(const char* cp, int* num_dfiles); -static int PINT_util_resolve_absolute( - const char* local_path, - PVFS_fs_id* out_fs_id, - char* out_fs_path, - int out_fs_path_max); - struct PVFS_sys_mntent* PVFS_util_gen_mntent( char* config_server, char* fs_name) @@ -1016,7 +1010,7 @@ int PVFS_util_resolve( /* the most common case first; just try to resolve the path that we * were given */ - ret = PINT_util_resolve_absolute(local_path, out_fs_id, out_fs_path, + ret = PVFS_util_resolve_absolute(local_path, out_fs_id, out_fs_path, out_fs_path_max); if(ret == 0) { @@ -1074,7 +1068,7 @@ int PVFS_util_resolve( return(-PVFS_ENOENT); } - ret = PINT_util_resolve_absolute(tmp_path, out_fs_id, out_fs_path, + ret = PVFS_util_resolve_absolute(tmp_path, out_fs_id, out_fs_path, out_fs_path_max); free(tmp_path); @@ -1769,7 +1763,7 @@ static int parse_num_dfiles_string(const char* cp, int* num_dfiles) return 0; } -/* PINT_util_resolve_absolute() +/* PVFS_util_resolve_absolute() * * given a local path of a file that may reside on a pvfs2 volume, * determine what the fsid and fs relative path is. Makes no attempt @@ -1777,7 +1771,7 @@ static int parse_num_dfiles_string(const char* cp, int* num_dfiles) * * returns 0 on succees, -PVFS_error on failure */ -static int PINT_util_resolve_absolute( +int PVFS_util_resolve_absolute( const char* local_path, PVFS_fs_id* out_fs_id, char* out_fs_path, diff --git a/src/common/misc/realpath.c b/src/common/misc/realpath.c index b93fdf0..389ea7f 100644 --- a/src/common/misc/realpath.c +++ b/src/common/misc/realpath.c @@ -32,12 +32,14 @@ #endif #ifndef WIN32 #include +#include #endif #include #include #include #include "realpath.h" -#include "pvfs2-types.h" +#include +#include "pvfs2-util.h" #define MAX_READLINKS 32 @@ -82,6 +84,7 @@ int PINT_realpath( char *resolved_path, int maxreslth) { + PVFS_fs_id fs_id; int readlinks = 0; char *npath; char link_path[PATH_MAX + 1]; @@ -152,7 +155,29 @@ int PINT_realpath( /* See if last pathname component is a symlink. */ *npath = '\0'; + +#ifndef BUILD_USRINT + /* see if this part of the path has a PVFS mount point */ + ret = PVFS_util_resolve_absolute(resolved_path, &fs_id, + link_path, PATH_MAX); + /* we don't care about the output of resolve */ + /* link_path was just a placeholder */ + memset(link_path, 0, PATH_MAX); + if (ret == 0) + { + n = readlink(resolved_path, link_path, PATH_MAX); + } + else + { + n = syscall(SYS_readlink, resolved_path, link_path, PATH_MAX); +#if 0 + /* this doesn't work, a syscall should certainly work */ + n = glibc_ops.readlink(resolved_path, link_path, PATH_MAX); +#endif + } +#else n = readlink(resolved_path, link_path, PATH_MAX); +#endif /* BUILD_USRINT */ if (n < 0) { /* EINVAL means the file exists but isn't a symlink. */ diff --git a/src/common/misc/server-config-mgr.c b/src/common/misc/server-config-mgr.c index 2cf06c0..42fe030 100644 --- a/src/common/misc/server-config-mgr.c +++ b/src/common/misc/server-config-mgr.c @@ -192,8 +192,10 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) gossip_debug(GOSSIP_CLIENT_DEBUG, "Reloading handle mappings for fs_id %d\n", cur_fs->coll_id); - - ret = PINT_cached_config_handle_load_mapping(cur_fs); + + ret = + PINT_cached_config_handle_load_mapping(cur_fs, + config->server_config); if (ret) { PVFS_perror( diff --git a/src/common/misc/server-config.c b/src/common/misc/server-config.c index f558ae8..169d806 100644 --- a/src/common/misc/server-config.c +++ b/src/common/misc/server-config.c @@ -131,6 +131,8 @@ static DOTCONF_CB(get_small_file_size); static DOTCONF_CB(directio_thread_num); static DOTCONF_CB(directio_ops_per_queue); static DOTCONF_CB(directio_timeout); +static DOTCONF_CB(tree_width); +static DOTCONF_CB(tree_threshhold); static FUNC_ERRORHANDLER(errorhandler); const char *contextchecker(command_t *cmd, unsigned long mask); @@ -1051,6 +1053,14 @@ static const configoption_t options[] = {"DirectIOTimeout", ARG_INT, directio_timeout, NULL, CTX_STORAGEHINTS, "1000"}, + /* Specifies the number of partitions to use for tree communication. */ + {"TreeWidth", ARG_INT, tree_width, NULL, + CTX_FILESYSTEM, "2"}, + + /* Specifies the minimum number of servers to contact before tree communication kicks in. */ + {"TreeThreshhold", ARG_INT, tree_threshhold, NULL, + CTX_FILESYSTEM, "2"}, + LAST_OPTION }; @@ -1061,7 +1071,9 @@ static const configoption_t options[] = * global_config_filename - common config file for all servers * and clients * server_alias_name - alias (if any) provided for this server - * (ignored on client side) + * client side can provide to check + * for a local server + * server_flag - true if running on a server * * Returns: 0 on success; 1 on failure * @@ -1069,7 +1081,8 @@ static const configoption_t options[] = int PINT_parse_config( struct server_configuration_s *config_obj, char *global_config_filename, - char *server_alias_name) + char *server_alias_name, + int server_flag) { struct server_configuration_s *config_s; configfile_t *configfile = (configfile_t *)0; @@ -1084,6 +1097,11 @@ int PINT_parse_config( config_s = config_obj; memset(config_s, 0, sizeof(struct server_configuration_s)); + if (server_flag && !server_alias_name) + { + gossip_err("Server alias not provided for server config\n"); + return 1; + } config_s->server_alias = server_alias_name; /* set some global defaults for optional parameters */ config_s->logstamp_type = GOSSIP_LOGSTAMP_DEFAULT; @@ -1130,21 +1148,28 @@ int PINT_parse_config( config_s, server_alias_name, &config_s->host_index); if (!halias || !halias->bmi_address) { - gossip_err("Configuration file error. " + if (server_flag) + { + gossip_err("Configuration file error. " "No host ID specified for alias %s.\n", server_alias_name); - return 1; + return 1; + } + } + else + { + /* save alias bmi_address */ + config_s->host_id = strdup(halias->bmi_address); } - config_s->host_id = strdup(halias->bmi_address); } - if (server_alias_name && !config_s->data_path) + if (server_flag && !config_s->data_path) { gossip_err("Configuration file error. " "No data storage path specified for alias %s.\n", server_alias_name); return 1; } - if (server_alias_name && !config_s->meta_path) + if (server_flag && !config_s->meta_path) { gossip_err("Configuration file error. " "No metadata storage path specified for alias %s.\n", server_alias_name); @@ -2714,8 +2739,13 @@ DOTCONF_CB(get_alias_list) struct server_configuration_s *config_s = (struct server_configuration_s *)cmd->context; struct host_alias_s *cur_alias = NULL; + int i = 0; + int len = 0; + char *ptr; - assert(cmd->arg_count == 2); + if (cmd->arg_count < 2) { + return "Error: alias must include at least one bmi address"; + } /* prevent users from adding the same alias twice */ if(config_s->host_aliases && @@ -2729,7 +2759,17 @@ DOTCONF_CB(get_alias_list) cur_alias = (host_alias_s *) malloc(sizeof(host_alias_s)); cur_alias->host_alias = strdup(cmd->data.list[0]); - cur_alias->bmi_address = strdup(cmd->data.list[1]); + + cur_alias->bmi_address = (char *)calloc(1, 2048); + ptr = cur_alias->bmi_address; + for (i=1; i < cmd->arg_count; i++) { + strncat(ptr, cmd->data.list[i], 2048 - len); + len += strlen(cmd->data.list[i]); + if (i+1 < cmd->arg_count) { + strncat(ptr, ",", 2048 - len); + } + len++; + } if (!config_s->host_aliases) { @@ -3057,7 +3097,9 @@ static DOTCONF_CB(get_osd_type) else if (!strcmp(str, "metafile")) config->osd_type = OSD_METAFILE; else if (!strcmp(str, "mdfile")) + { config->osd_type = OSD_MDFILE; + } else ret = "get_osd_type: unknown FileSystem OSDType option\n"; return ret; @@ -3137,6 +3179,26 @@ DOTCONF_CB(directio_timeout) return NULL; } +DOTCONF_CB(tree_width) +{ + struct server_configuration_s *config_s = + (struct server_configuration_s *)cmd->context; + + config_s->tree_width = cmd->data.value; + + return NULL; +} + +DOTCONF_CB(tree_threshhold) +{ + struct server_configuration_s *config_s = + (struct server_configuration_s *)cmd->context; + + config_s->tree_threshhold = cmd->data.value; + + return NULL; +} + /* * Function: PINT_config_release * @@ -3729,6 +3791,27 @@ static host_alias_s *find_host_alias_ptr_by_alias( return ret; } +/* the static function below allocates a new mapping structure + * if one is not found. This wrapper removes it and returns + * NULL if not found + */ +struct host_handle_mapping_s *PINT_get_handle_mapping( + PINT_llist *list, + char *alias) +{ + struct host_handle_mapping_s *mapping; + mapping = get_or_add_handle_mapping(list, alias); + if (mapping && mapping->alias_mapping) + { + return mapping; + } + else + { + free(mapping); + return NULL; + } +} + static struct host_handle_mapping_s *get_or_add_handle_mapping( PINT_llist *list, char *alias) @@ -4108,7 +4191,7 @@ char *PINT_config_get_merged_handle_range_str( char *merged_range = NULL; char *mrange = get_handle_range_str(config_s,fs,1); char *drange = get_handle_range_str(config_s,fs,0); - + if (mrange && drange) { merged_range = PINT_merge_handle_range_strs(mrange, drange); @@ -4263,8 +4346,8 @@ static char *get_handle_range_str( assert(cur_h_mapping->alias_mapping); assert(cur_h_mapping->alias_mapping->host_alias); assert(cur_h_mapping->handle_range); - - if (strcmp(cur_h_mapping->alias_mapping->host_alias, + + if (strcmp(cur_h_mapping->alias_mapping->host_alias, my_alias) == 0 || !strncmp(cur_h_mapping->alias_mapping->bmi_address, "osd", 3)) { ret = cur_h_mapping->handle_range; @@ -4274,7 +4357,6 @@ static char *get_handle_range_str( } } } - return ret; } diff --git a/src/common/misc/server-config.h b/src/common/misc/server-config.h index db23a3f..e64c9f1 100644 --- a/src/common/misc/server-config.h +++ b/src/common/misc/server-config.h @@ -141,7 +141,7 @@ typedef struct distribution_configuration_s typedef struct server_configuration_s { - char *host_id; + char *host_id; /* bmi_address of this server */ int host_index; char *server_alias; /* the command line server-alias parameter */ int my_server_options; @@ -202,6 +202,7 @@ typedef struct server_configuration_s */ int trove_method; + enum { OSD_NONE, /* stock pvfs */ OSD_DATAFILE, /* datafiles stored on OSDs */ @@ -233,12 +234,15 @@ typedef struct server_configuration_s int econumnodes; void *private_data; + int32_t tree_width; + int32_t tree_threshhold; } server_configuration_s; int PINT_parse_config( struct server_configuration_s *config_s, char *global_config_filename, - char *server_alias_name); + char *server_alias_name, + int server_flag); void PINT_config_release( struct server_configuration_s *config_s); @@ -283,7 +287,7 @@ char *PINT_config_get_data_handle_range_str( char *PINT_config_get_merged_handle_range_str( struct server_configuration_s *config_s, struct filesystem_configuration_s *fs); - + int PINT_config_is_valid_configuration( struct server_configuration_s *config_s); @@ -303,6 +307,10 @@ PVFS_fs_id PINT_config_get_fs_id_by_fs_name( struct server_configuration_s *config_s, char *fs_name); +struct host_handle_mapping_s *PINT_get_handle_mapping( + PINT_llist *list, + char *alias); + PINT_llist *PINT_config_get_filesystems( struct server_configuration_s *config_s); diff --git a/src/common/misc/state-machine-fns.c b/src/common/misc/state-machine-fns.c index 021e55d..b316f61 100644 --- a/src/common/misc/state-machine-fns.c +++ b/src/common/misc/state-machine-fns.c @@ -213,7 +213,7 @@ PINT_sm_action PINT_state_machine_start(struct PINT_smcb *smcb, job_status_s *r) /* keep running until state machine deferrs or terminates */ ret = PINT_state_machine_continue(smcb, r); } - + if(ret == SM_ACTION_DEFERRED) { /* this state machine isn't completing immediately */ @@ -337,14 +337,13 @@ PINT_sm_action PINT_state_machine_continue(struct PINT_smcb *smcb, job_status_s PINT_sm_action ret; ret = PINT_state_machine_next(smcb, r); - - + if(ret == SM_ACTION_TERMINATE) { /* process terminating SM */ PINT_state_machine_terminate(smcb, r); } - + return ret; } diff --git a/src/common/statecomp/scanner.l b/src/common/statecomp/scanner.l index 7c32ffd..0de18bf 100644 --- a/src/common/statecomp/scanner.l +++ b/src/common/statecomp/scanner.l @@ -46,7 +46,6 @@ int yyget_lineno(void); FILE *yyget_in(void); FILE *yyget_out(void); -int yyget_leng(void); char *yyget_text(void); void yyset_lineno(int line_number); void yyset_in(FILE *in_str ); diff --git a/src/io/bmi/bmi.c b/src/io/bmi/bmi.c index 47556b0..19d5942 100644 --- a/src/io/bmi/bmi.c +++ b/src/io/bmi/bmi.c @@ -249,8 +249,14 @@ int BMI_initialize(const char *method_list, goto bmi_initialize_failure; } + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_initialize: " + "method_list=%s\n", method_list); + /* Today is that day! */ addr_count = PINT_split_string_list(&listen_addrs, listen_addr); + + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_initialize: " + "listen_addr=%s\n", listen_addr); for (i=0; ifinalize(); @@ -1026,7 +1034,6 @@ int BMI_testunexpected(int incount, bmi_check_addr_force_drop(); gen_mutex_lock(&active_method_count_mutex); - tmp_active_method_count = active_method_count; gen_mutex_unlock(&active_method_count_mutex); @@ -1068,7 +1075,7 @@ int BMI_testunexpected(int incount, } for (i = 0; i < (*outcount); i++) - { + { info_array[i].error_code = sub_info[i].error_code; info_array[i].buffer = sub_info[i].buffer; info_array[i].size = sub_info[i].size; @@ -1139,10 +1146,10 @@ int BMI_testcontext(int incount, *outcount = 0; - if(tmp_active_method_count < 1) + if (tmp_active_method_count < 1) { /* nothing active yet, just snooze and return */ - if(max_idle_time_ms > 0) + if (max_idle_time_ms > 0) { #ifdef WIN32 Sleep(2); @@ -1189,7 +1196,7 @@ int BMI_testcontext(int incount, /* return 1 if anything completed */ if (ret == 0 && *outcount > 0) { - for(i=0; i<*outcount; i++) + for (i = 0; i < *outcount; i++) { gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_testcontext completing: %llu\n", llu(out_id_array[i])); @@ -1218,15 +1225,14 @@ const char* BMI_addr_rev_lookup(BMI_addr_t addr) tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (NULL); + gen_mutex_unlock(&ref_mutex); + return (NULL); } gen_mutex_unlock(&ref_mutex); - + tmp_str = tmp_ref->id_string; return(tmp_str); - } /** Performs a reverse lookup, returning a string @@ -1633,6 +1639,7 @@ int BMI_query_addr_range (BMI_addr_t addr, const char *id_string, int netmask) int BMI_addr_lookup(BMI_addr_t * new_addr, const char *id_string) { + ref_st_p new_ref = NULL; bmi_method_addr_p meth_addr = NULL; int ret = -1; @@ -1664,7 +1671,6 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, * responds successfully. It is assumed that they are already * listed in order of preference */ - i = 0; gen_mutex_lock(&active_method_count_mutex); while ((i < active_method_count) && @@ -1679,7 +1685,7 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, for (i=0; i - method_addr_lookup(id_string); + meth_addr = known_method_table[i]-> + method_addr_lookup(id_string); i = active_method_count - 1; /* point at the new one */ break; } } } - gen_mutex_unlock(&active_method_count_mutex); if (failed) return bmi_errno_to_pvfs(ret); @@ -2192,6 +2197,11 @@ activate_method(const char *name, const char *listen_addr, int flags) /* this is a bit of a hack */ new_addr->method_type = active_method_count - 1; } + + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "activate_method: " + "listen_addr=%s, active_method_count-1=%d, flags=%d\n", + listen_addr, active_method_count-1, flags); + ret = meth->initialize(new_addr, active_method_count - 1, flags); if (ret < 0) { gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, diff --git a/src/io/bmi/bmi_ib/ib.c b/src/io/bmi/bmi_ib/ib.c index 19fcb0a..0808797 100644 --- a/src/io/bmi/bmi_ib/ib.c +++ b/src/io/bmi/bmi_ib/ib.c @@ -123,23 +123,26 @@ static int ib_check_cq(void) debug(4, "%s: found something", __func__); ++ret; if (wc.status != 0) { + struct buf_head *bh = ptr_from_int64(wc.id); /* opcode is not necessarily valid; only wr_id, status, qp_num, * and vendor_err can be relied upon */ if (wc.opcode == BMI_IB_OP_SEND) { - debug(0, "%s: entry id 0x%llx SEND error %s", __func__, - llu(wc.id), wc_status_string(wc.status)); + debug(0, "%s: entry id 0x%llx SEND error %s to %s", __func__, + llu(wc.id), wc_status_string(wc.status), bh->c->peername); if (wc.id) { ib_connection_t *c = ptr_from_int64(wc.id); if (c->cancelled) { debug(0, "%s: ignoring send error on cancelled conn to %s", - __func__, c->peername); + __func__, bh->c->peername); } } } else { - error("%s: entry id 0x%llx opcode %s error %s", __func__, + warning("%s: entry id 0x%llx opcode %s error %s from %s", + __func__, llu(wc.id), wc_opcode_string(wc.opcode), - wc_status_string(wc.status)); + wc_status_string(wc.status), bh->c->peername); + continue; } } @@ -611,19 +614,24 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len } } - bmi_ib_assert(rq, "%s: mop_id %llx in RTS_DONE message not found", - __func__, llu(mh_rts_done.mop_id)); - + if (rq == NULL) { + warning("%s: mop_id %llx in RTS_DONE message not found", + __func__, llu(mh_rts_done.mop_id)); + } + else { #if MEMCACHE_BOUNCEBUF - memcpy_to_buflist(&rq->buflist, reg_recv_buflist_buf, + memcpy_to_buflist(&rq->buflist, reg_recv_buflist_buf, rq->buflist.tot_len); #else - memcache_deregister(ib_device->memcache, &rq->buflist); + memcache_deregister(ib_device->memcache, &rq->buflist); #endif + } post_rr(c, bh); - rq->state.recv = RQ_RTS_WAITING_USER_TEST; + if (rq) { + rq->state.recv = RQ_RTS_WAITING_USER_TEST; + } } else if (type == MSG_BYE) { /* diff --git a/src/io/bmi/bmi_ib/openib.c b/src/io/bmi/bmi_ib/openib.c index 2cc2d49..94f1fe3 100644 --- a/src/io/bmi/bmi_ib/openib.c +++ b/src/io/bmi/bmi_ib/openib.c @@ -38,6 +38,9 @@ struct openib_device_priv { int nic_max_sge; int nic_max_wr; + /* max MTU reported by NIC port */ + int max_mtu; + /* * Temp array for filling scatter/gather lists to pass to IB functions, * allocated once at start to max size defined as reported by the qp. @@ -91,6 +94,7 @@ static void openib_post_rr(const ib_connection_t *c, struct buf_head *bh); int openib_ib_initialize(void); static void openib_ib_finalize(void); + /* * Build new conneciton. */ @@ -301,10 +305,16 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.max_dest_rd_atomic = 1; attr.ah_attr.dlid = remote_lid; attr.ah_attr.port_num = od->nic_port; - attr.path_mtu = IBV_MTU; + if (od->max_mtu > IBV_MTU) { + attr.path_mtu = od->max_mtu; + } + else { + attr.path_mtu = IBV_MTU; + } attr.rq_psn = 0; attr.dest_qp_num = remote_qp_num; attr.min_rnr_timer = 31; + debug(1, "%s: attr.path_mtu=%d", __func__, attr.path_mtu); ret = ibv_modify_qp(qp, &attr, mask); if (ret) error_xerrno(ret, "%s: ibv_modify_qp INIT -> RTR", __func__); @@ -322,8 +332,10 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.sq_psn = 0; attr.max_rd_atomic = 1; attr.timeout = 26; /* 4.096us * 2^26 = 5 min */ - attr.retry_cnt = 20; - attr.rnr_retry = 20; + attr.retry_cnt = 7; + attr.rnr_retry = 7; + debug(1, "%s: attr.timeout=%d, attr.retry_cnt=%d, attr.rnr_retry=%d", + __func__, attr.timeout, attr.retry_cnt, attr.rnr_retry); ret = ibv_modify_qp(qp, &attr, mask); if (ret) error_xerrno(ret, "%s: ibv_modify_qp RTR -> RTS", __func__); @@ -691,6 +703,7 @@ static const char *openib_wc_status_string(int status) return s; } +#ifdef HAVE_IBV_GET_DEVICES static const char *openib_port_state_string(enum ibv_port_state state) { const char *s = "(UNKNOWN)"; @@ -705,6 +718,7 @@ static const char *openib_port_state_string(enum ibv_port_state state) } return s; } +#endif /* HAVE_IBV_GET_DEVICES */ static const char *async_event_type_string(enum ibv_event_type event_type) { @@ -731,6 +745,7 @@ static const char *async_event_type_string(enum ibv_event_type event_type) #ifdef HAVE_IBV_EVENT_CLIENT_REREGISTER CASE(IBV_EVENT_CLIENT_REREGISTER); #endif + CASE(IBV_EVENT_GID_CHANGE); } return s; } @@ -796,6 +811,7 @@ static void openib_mem_deregister(memcache_entry_t *c) c->buf, lld(c->len), c->memkeys.lkey, c->memkeys.rkey); } +#ifdef HAVE_IBV_GET_DEVICES static struct ibv_device *get_nic_handle(void) { struct ibv_device *nic_handle; @@ -830,6 +846,7 @@ static struct ibv_device *get_nic_handle(void) return nic_handle; } +#endif /* HAVE_IBV_GET_DEVICES */ static int openib_check_async_events(void) { @@ -849,14 +866,104 @@ static int openib_check_async_events(void) } +/* function like the original get_nic_handle, only for newer OFED + * versions that accept get_device_list. This function returns + * the first active HCA device which returns a valid IBV_PORT_ACTIVE. + * + * This is going to make the customizable IBV_PORT funcunality a pita. + * Inputs: + * od* : preallocated from openib_ib_initialize + * ctx* : allocated by ibv_open_device inside this func, but located + * at od->ctx + * hca_port* : hca_port attributes + * Returns : + * od* : possibly filled out by ibv_query_port + * ret : 0 on good, !0 on failure (FATAL) + * hca_port : queried, comes in empty + */ + +static int return_active_nic_handle (struct openib_device_priv* od, struct ibv_port_attr * hca_port ) +{ + int ret = 0, i=0; + struct ibv_device *nic_handle = NULL; + struct ibv_device **hca_list; + int num_devs = 0; + struct ibv_context *ctx; + + /* make this configurable once we decide how + * adding more than one HCA REALLY complicates the configuable + * nature that we had discussed */ + od->nic_port = IBV_PORT; + + hca_list = ibv_get_device_list(&num_devs); + + if(num_devs <= 0) // FATAL!! + { + error("%s : NO IB DEVICES FOUND ", __func__); + } + else + { // return a device which is active + for(i=0;ictx=ctx; + if (!od->ctx || ctx==NULL || !ctx) { + error("%s: ibv_open_device", __func__); + return -ENOSYS; + } + ret = ibv_query_port(ctx, od->nic_port, hca_port ); + +// ret = ibv_query_port(od->ctx, od->nic_port, hca_port ); + if(ret) + error_xerrno(ret, "%s: ibv_query_port", __func__); + + if(hca_port->state != IBV_PORT_ACTIVE) + { + // in this case, continue, delete old hca_port info + ret = ibv_close_device(od->ctx); // not sure if this breaks + if(ret) + error_xerrno(ret,"%s: couldnt close device",__func__); + + memset(hca_port,0,sizeof(struct ibv_port_attr)); + warning("%s: found an inactive device/port",__func__); + + // if we get to num_devs, no valid devices found + if(i == (num_devs-1)) // FATAL + { + warning("%s: No Active IB ports/devices found", __func__); + return -ENOSYS; + } + + continue; + } + // if we get here, we had a valid device found, done searching + else { + od->max_mtu = hca_port->max_mtu; + break; + } + } + + } + + VALGRIND_MAKE_MEM_DEFINED(ctx, sizeof(*ctx)); + // cleanup + ibv_free_device_list(hca_list); + return 0; +} + /* * Startup, once per application. */ int openib_ib_initialize(void) { int flags, ret = 0; +#ifdef HAVE_IBV_GET_DEVICES struct ibv_device *nic_handle; struct ibv_context *ctx; +#endif /* HAVE_IBV_GET_DEVICES */ int cqe_num; /* local variables, mainly for debug */ struct openib_device_priv *od; struct ibv_port_attr hca_port; @@ -864,6 +971,10 @@ int openib_ib_initialize(void) debug(1, "%s: init", __func__); + od = bmi_ib_malloc(sizeof(*od)); + ib_device->priv = od; + +#ifdef HAVE_IBV_GET_DEVICES nic_handle = get_nic_handle(); if (!nic_handle) { warning("%s: no NIC found", __func__); @@ -877,30 +988,11 @@ int openib_ib_initialize(void) return -ENOSYS; } VALGRIND_MAKE_MEM_DEFINED(ctx, sizeof(*ctx)); - - od = bmi_ib_malloc(sizeof(*od)); - ib_device->priv = od; - - /* set the function pointers for openib */ - ib_device->func.new_connection = openib_new_connection; - ib_device->func.close_connection = openib_close_connection; - ib_device->func.drain_qp = openib_drain_qp; - ib_device->func.ib_initialize = openib_ib_initialize; - ib_device->func.ib_finalize = openib_ib_finalize; - ib_device->func.post_sr = openib_post_sr; - ib_device->func.post_rr = openib_post_rr; - ib_device->func.post_sr_rdmaw = openib_post_sr_rdmaw; - ib_device->func.check_cq = openib_check_cq; - ib_device->func.prepare_cq_block = openib_prepare_cq_block; - ib_device->func.ack_cq_completion_event = openib_ack_cq_completion_event; - ib_device->func.wc_status_string = openib_wc_status_string; - ib_device->func.mem_register = openib_mem_register; - ib_device->func.mem_deregister = openib_mem_deregister; - ib_device->func.check_async_events = openib_check_async_events; - od->ctx = ctx; od->nic_port = IBV_PORT; /* maybe let this be configurable */ + if(!od->ctx) warning("%s: CTX=0",__func__); + /* get the lid and verify port state */ ret = ibv_query_port(od->ctx, od->nic_port, &hca_port); if (ret) @@ -918,6 +1010,40 @@ int openib_ib_initialize(void) if (ret) error_xerrno(ret, "%s: ibv_query_device", __func__); VALGRIND_MAKE_MEM_DEFINED(&hca_cap, sizeof(hca_cap)); +#else + ret = return_active_nic_handle(od, &hca_port); + if(ret) + return -ENOSYS; +#endif + + //od->ctx = ctx; + od->nic_lid = hca_port.lid; + + /* Query the device for the max_ requests and such */ + ret = ibv_query_device(od->ctx, &hca_cap); + if (ret) + error_xerrno(ret, "%s: ibv_query_device", __func__); + VALGRIND_MAKE_MEM_DEFINED(&hca_cap, sizeof(hca_cap)); + + + /* set the function pointers for openib */ + ib_device->func.new_connection = openib_new_connection; + ib_device->func.close_connection = openib_close_connection; + ib_device->func.drain_qp = openib_drain_qp; + ib_device->func.ib_initialize = openib_ib_initialize; + ib_device->func.ib_finalize = openib_ib_finalize; + ib_device->func.post_sr = openib_post_sr; + ib_device->func.post_rr = openib_post_rr; + ib_device->func.post_sr_rdmaw = openib_post_sr_rdmaw; + ib_device->func.check_cq = openib_check_cq; + ib_device->func.prepare_cq_block = openib_prepare_cq_block; + ib_device->func.ack_cq_completion_event = openib_ack_cq_completion_event; + ib_device->func.wc_status_string = openib_wc_status_string; + ib_device->func.mem_register = openib_mem_register; + ib_device->func.mem_deregister = openib_mem_deregister; + ib_device->func.check_async_events = openib_check_async_events; + + debug(1, "%s: max %d completion queue entries", __func__, hca_cap.max_cq); cqe_num = IBV_NUM_CQ_ENTRIES; @@ -946,10 +1072,10 @@ int openib_ib_initialize(void) error("%s: ibv_create_cq failed", __func__); /* use non-blocking IO on the async fd and completion fd */ - flags = fcntl(ctx->async_fd, F_GETFL); + flags = fcntl(od->ctx->async_fd, F_GETFL); if (flags < 0) error_errno("%s: get async fd flags", __func__); - if (fcntl(ctx->async_fd, F_SETFL, flags | O_NONBLOCK) < 0) + if (fcntl(od->ctx->async_fd, F_SETFL, flags | O_NONBLOCK) < 0) error_errno("%s: set async fd nonblocking", __func__); flags = fcntl(od->channel->fd, F_GETFL); @@ -994,3 +1120,6 @@ static void openib_ib_finalize(void) ib_device->priv = NULL; } + + + diff --git a/src/io/dev/pint-dev.c b/src/io/dev/pint-dev.c index 7b5dc8b..a7181f6 100644 --- a/src/io/dev/pint-dev.c +++ b/src/io/dev/pint-dev.c @@ -322,11 +322,12 @@ void PINT_dev_put_mapped_regions(int ndesc, struct PVFS_dev_map_desc *desc) /* fixes a corruption issue on linux 2.4 kernels where the buffers are * not being pinned in memory properly */ +#ifndef WIN32 if(munlock( (const char *) ptr, desc[i].total_size) != 0) { gossip_err("Error: FAILED to munlock shared buffer\n"); } - +#endif PINT_mem_aligned_free(ptr); } } diff --git a/src/io/job/job-time-mgr.c b/src/io/job/job-time-mgr.c index 733927d..7f36a79 100644 --- a/src/io/job/job-time-mgr.c +++ b/src/io/job/job-time-mgr.c @@ -200,6 +200,9 @@ void job_time_mgr_rem(struct job_desc* jd) tmp_bucket = (struct time_bucket*)jd->time_bucket; + /* this item needs to be removed before the test. Otherwise, the removal + * of the bucket_link will never happen and the list will grow forever */ + qlist_del(&jd->job_time_link); if(qlist_empty(&tmp_bucket->jd_queue)) { /* no need for this bucket any longer; it is empty */ @@ -207,7 +210,6 @@ void job_time_mgr_rem(struct job_desc* jd) INIT_QLIST_HEAD(&tmp_bucket->jd_queue); free(tmp_bucket); } - qlist_del(&jd->job_time_link); jd->time_bucket = NULL; gen_mutex_unlock(&bucket_mutex); diff --git a/src/io/job/job.c b/src/io/job/job.c index 6b334d0..e95057d 100644 --- a/src/io/job/job.c +++ b/src/io/job/job.c @@ -27,7 +27,6 @@ #include "id-generator.h" #include "job-time-mgr.h" #include "pvfs2-internal.h" - #include "src/client/sysint/osd.h" /* contexts for use within the job interface */ @@ -598,6 +597,7 @@ int job_bmi_recv(PVFS_BMI_addr_t addr, jd->bmi_callback.data = (void*)jd; user_ptr_internal = &jd->bmi_callback; + ret = BMI_post_recv(&(jd->u.bmi.id), addr, buffer, size, &(jd->u.bmi.actual_size), buffer_type, tag, user_ptr_internal, @@ -874,7 +874,6 @@ int job_bmi_osd_submit(PVFS_BMI_addr_t addr, struct osd_command *command, } #endif - /* job_bmi_cancel() * * cancels a job handling a BMI message @@ -2342,7 +2341,6 @@ int job_trove_dspace_getattr(PVFS_fs_id coll_id, handle, out_ds_attr_ptr, 0 /* flags */ , user_ptr_internal, global_trove_context, &(jd->u.trove.id), hints); - #else gossip_err("Error: Trove support not enabled.\n"); ret = -ENOSYS; @@ -4681,7 +4679,7 @@ static void precreate_pool_fill_thread_mgr_callback( gen_mutex_lock(&initialized_mutex); if(initialized == 0) - { + { /* The job interface has been shutdown. Silently ignore callback. */ gen_mutex_unlock(&initialized_mutex); return; @@ -6374,6 +6372,7 @@ static struct fs_pool* find_fs(PVFS_fs_id fsid) return(NULL); } + #endif /* __PVFS2_TROVE_SUPPORT__ */ /* diff --git a/src/io/trove/trove-dbpf/dbpf-bstream-direct.c b/src/io/trove/trove-dbpf/dbpf-bstream-direct.c index 08026f7..dc9b782 100644 --- a/src/io/trove/trove-dbpf/dbpf-bstream-direct.c +++ b/src/io/trove/trove-dbpf/dbpf-bstream-direct.c @@ -206,13 +206,21 @@ static size_t direct_aligned_write(int fd, #ifndef NDEBUG /* if debug is enabled, check that fd was opened with O_DIRECT */ - +#ifdef HAVE_OPEN_O_DIRECT if(!(fcntl(fd, F_GETFL) & O_DIRECT)) { return -EINVAL; } #endif +#ifdef HAVE_FNCTL_F_NOCACHE + if (!(fcntl(fd, F_GETFL) & F_NOCACHE)) + { + return -EINVAL; + } +#endif +#endif + /* verify that the buffer is aligned properly */ assert(IS_ALIGNED_PTR(buf)); @@ -571,8 +579,13 @@ static size_t direct_aligned_read(int fd, #ifndef NDEBUG /* if debug is enabled, check that fd was opened with O_DIRECT */ - +#ifdef HAVE_OPEN_O_DIRECT if(!(fcntl(fd, F_GETFL) & O_DIRECT)) +#elif defined(HAVE_FNCTL_F_NOCACHE) + if (!(fcntl(fd, F_GETFL) & F_NOCACHE)) +#else + if (0) //TODO: error? fall back to madvise? +#endif { gossip_err("dbpf_direct_read: trying to do direct IO but file wasn't " "opened with O_DIRECT\n"); diff --git a/src/io/trove/trove-dbpf/dbpf-dspace.c b/src/io/trove/trove-dbpf/dbpf-dspace.c index d88f365..23c7afa 100644 --- a/src/io/trove/trove-dbpf/dbpf-dspace.c +++ b/src/io/trove/trove-dbpf/dbpf-dspace.c @@ -178,16 +178,15 @@ static int dbpf_dspace_create(TROVE_coll_id coll_id, memcpy(op_p->u.d_create.extent_array.extent_array, extent_array->extent_array, extent_array->extent_count * sizeof(TROVE_extent)); + op_p->u.d_create.out_handle_p = handle_p; op_p->u.d_create.type = type; PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS, 1, PINT_PERF_ADD); - ret = dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p, + return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p, event_type, event_id); - - return ret; } static int dbpf_dspace_create_op_svc(struct dbpf_op *op_p) @@ -237,7 +236,7 @@ static int dbpf_dspace_create_op_svc(struct dbpf_op *op_p) new_handle = trove_handle_alloc_from_range( op_p->coll_p->coll_id, &op_p->u.d_create.extent_array); } - + gossip_debug(GOSSIP_TROVE_DEBUG, "[%d extents] -- new_handle is %llu " "(cur_extent is %llu - %llu)\n", op_p->u.d_create.extent_array.extent_count, @@ -356,9 +355,8 @@ static int dbpf_dspace_create_list(TROVE_coll_id coll_id, PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS, 1, PINT_PERF_ADD); - ret = dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p, + return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p, event_type, event_id); - return ret; } static int dbpf_dspace_create_list_op_svc(struct dbpf_op *op_p) @@ -524,8 +522,11 @@ static int remove_one_handle( { case DB_NOTFOUND: gossip_err("tried to remove non-existant dataspace\n"); +/* ret = -TROVE_ENOENT; goto return_error; +*/ + break; default: coll_p->ds_db->err( coll_p->ds_db, ret, "dbpf_dspace_remove"); diff --git a/src/io/trove/trove-dbpf/dbpf-op-queue.c b/src/io/trove/trove-dbpf/dbpf-op-queue.c index bd1ffb7..cbbb878 100644 --- a/src/io/trove/trove-dbpf/dbpf-op-queue.c +++ b/src/io/trove/trove-dbpf/dbpf-op-queue.c @@ -287,7 +287,6 @@ int dbpf_op_init_queued_or_immediate( flags, context_id, 0); - *op_pp = op_p; } else diff --git a/src/io/trove/trove-dbpf/dbpf-open-cache.c b/src/io/trove/trove-dbpf/dbpf-open-cache.c index 65a6c89..66abc5a 100644 --- a/src/io/trove/trove-dbpf/dbpf-open-cache.c +++ b/src/io/trove/trove-dbpf/dbpf-open-cache.c @@ -553,12 +553,22 @@ static int open_fd( mode = TROVE_FD_MODE; } +#ifdef HAVE_OPEN_O_DIRECT if(type == DBPF_FD_DIRECT_WRITE || type == DBPF_FD_DIRECT_READ) { flags |= O_DIRECT; } +#endif *fd = DBPF_OPEN(filename, flags, mode); + +#ifdef HAVE_FCNTL_F_NOCACHE + if(type == DBPF_FD_DIRECT_WRITE || type == DBPF_FD_DIRECT_READ) + { + fcntl(*fd, F_NOCACHE, 1); + } +#endif + return ((*fd < 0) ? -trove_errno_to_trove_error(errno) : 0); } diff --git a/src/io/trove/trove-handle-mgmt/trove-extentlist.c b/src/io/trove/trove-handle-mgmt/trove-extentlist.c index cb9f9e2..20653f6 100644 --- a/src/io/trove/trove-handle-mgmt/trove-extentlist.c +++ b/src/io/trove/trove-handle-mgmt/trove-extentlist.c @@ -347,7 +347,7 @@ TROVE_handle extentlist_get_from_extent( TROVE_extent *extent) { TROVE_handle handle = TROVE_HANDLE_NULL; - + handle = avltree_extent_search_in_range(elist->index, extent); if (handle == TROVE_HANDLE_NULL) { @@ -670,7 +670,7 @@ static TROVE_handle avltree_extent_search_in_range( { right = (struct TROVE_handle_extent *)n->right->d; } - + /* request matches at one edge or the other of an existing extent */ if ((req_extent->first == e->first) || (req_extent->first == e->last)) diff --git a/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c b/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c index 2049e88..2fe119e 100644 --- a/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c +++ b/src/io/trove/trove-handle-mgmt/trove-handle-mgmt.c @@ -268,7 +268,6 @@ int trove_handle_mgmt_initialize() hash_fsid,67); ret = (s_fsid_to_ledger_table ? 0 : -1); } - gen_mutex_unlock(&trove_handle_mutex); return ret; } @@ -280,7 +279,7 @@ int trove_set_handle_ranges(TROVE_coll_id coll_id, int ret = -TROVE_EINVAL; PINT_llist *extent_list = NULL; handle_ledger_t *ledger = NULL; - + gen_mutex_lock(&trove_handle_mutex); if (handle_range_str) { @@ -389,7 +388,7 @@ TROVE_handle trove_handle_alloc_from_range( struct qlist_head *hash_link = NULL; TROVE_handle handle = TROVE_HANDLE_NULL; int i = 0; - + gen_mutex_lock(&trove_handle_mutex); hash_link = qhash_search(s_fsid_to_ledger_table, &(coll_id)); if (hash_link) diff --git a/src/io/trove/trove-mgmt.c b/src/io/trove/trove-mgmt.c index 77653b4..38b4629 100644 --- a/src/io/trove/trove-mgmt.c +++ b/src/io/trove/trove-mgmt.c @@ -104,7 +104,7 @@ int trove_initialize(TROVE_method_id method_id, { return ret; } - + if(!method_callback) { global_trove_method_callback = TROVE_default_method; diff --git a/src/kernel/linux-2.6/Makefile.in b/src/kernel/linux-2.6/Makefile.in index ece6c06..0280a46 100644 --- a/src/kernel/linux-2.6/Makefile.in +++ b/src/kernel/linux-2.6/Makefile.in @@ -80,6 +80,7 @@ EXTRA_CFLAGS = \ -I$(absolute_src_dir)/src/common/misc EXTRA_CFLAGS += @MMAP_RA_CACHE@ +EXTRA_CFLAGS += @RESET_FILE_POS@ EXTRA_CFLAGS += -DPVFS2_VERSION="\"@PVFS2_VERSION@\"" # uncomment the following line for kernel specific diff --git a/src/kernel/linux-2.6/acl.c b/src/kernel/linux-2.6/acl.c index 4011b1d..aed8f2a 100644 --- a/src/kernel/linux-2.6/acl.c +++ b/src/kernel/linux-2.6/acl.c @@ -279,7 +279,11 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) name = PVFS2_XATTR_NAME_ACL_ACCESS; if (acl) { +#ifdef HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T + umode_t mode = inode->i_mode; +#else mode_t mode = inode->i_mode; +#endif /* HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T */ /* can we represent this with the UNIXy permission bits? */ error = posix_acl_equiv_mode(acl, &mode); /* uh oh some error.. */ @@ -603,8 +607,14 @@ int pvfs2_init_acl(struct inode *inode, struct inode *dir) } if (get_acl_flag(inode) == 1 && acl) { - struct posix_acl *clone; +#ifdef HAVE_POSIX_ACL_CREATE + umode_t mode; +#elif defined(HAVE_POSIX_ACL_CLONE) + struct posix_acl *clone = NULL; mode_t mode; +#else + #error No posix_acl_create or posix_acl_clone defined +#endif /* HAVE_POSIX_ACL_CREATE */ if (S_ISDIR(inode->i_mode)) { @@ -616,6 +626,9 @@ int pvfs2_init_acl(struct inode *inode, struct inode *dir) goto cleanup; } } +#ifdef HAVE_POSIX_ACL_CREATE + error = posix_acl_create(&acl, GFP_KERNEL, &mode); +#elif defined(HAVE_POSIX_ACL_CLONE) clone = posix_acl_clone(acl, GFP_KERNEL); error = -ENOMEM; if (!clone) { @@ -625,10 +638,18 @@ int pvfs2_init_acl(struct inode *inode, struct inode *dir) } mode = inode->i_mode; error = posix_acl_create_masq(clone, &mode); +#else + #error No posix_acl_create or posix_acl_clone defined +#endif /* HAVE_POSIX_ACL_CREATE */ if (error >= 0) { +#ifdef HAVE_POSIX_ACL_CREATE + gossip_debug(GOSSIP_ACL_DEBUG, "posix_acl_create changed mode " + "from %o to %o\n", inode->i_mode, mode); +#else gossip_debug(GOSSIP_ACL_DEBUG, "posix_acl_create_masq changed mode " "from %o to %o\n", inode->i_mode, mode); +#endif /* HAVE_POSIX_ACL_CREATE */ /* * Dont do a needless ->setattr() if mode has not changed */ @@ -641,11 +662,19 @@ int pvfs2_init_acl(struct inode *inode, struct inode *dir) */ if (error > 0) { +#ifdef HAVE_POSIX_ACL_CREATE + error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); +#elif defined(HAVE_POSIX_ACL_CLONE) error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, clone); +#else + #error No posix_acl_create or posix_acl_clone defined +#endif /* HAVE_POSIX_ACL_CREATE */ gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl (access) returned %d\n", error); } } +#ifdef HAVE_POSIX_ACL_CLONE posix_acl_release(clone); +#endif /* HAVE_POSIX_ACL_CREATE */ } /* If mode of the inode was changed, then do a forcible ->setattr */ if (ModeFlag(pvfs2_inode)) @@ -664,7 +693,10 @@ int pvfs2_init_acl(struct inode *inode, struct inode *dir) */ int pvfs2_acl_chmod(struct inode *inode) { - struct posix_acl *acl, *clone; + struct posix_acl *acl = NULL; +#ifdef HAVE_POSIX_ACL_CLONE + struct posix_acl *clone = NULL; +#endif /* HAVE_POSIX_ACL_CLONE */ int error; if (get_acl_flag(inode) == 0) @@ -691,14 +723,36 @@ int pvfs2_acl_chmod(struct inode *inode) error = 0; goto out; } +#ifdef HAVE_POSIX_ACL_CHMOD + error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); +#else + error = posix_acl_chmod_masq(acl, inode->i_mode); +#endif /* HAVE_POSIX_ACL_CHMOD */ + if (!error) + { + error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); + gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_chmod: pvfs2 set acl " + "(access) returned %d\n", error); + } +#ifdef HAVE_POSIX_CLONE clone = posix_acl_clone(acl, GFP_KERNEL); - posix_acl_release(acl); if (!clone) { gossip_err("pvfs2_acl_chmod failed with ENOMEM\n"); error = -ENOMEM; goto out; } +#endif /* HAVE_POSIX_CLONE */ + +#ifdef HAVE_POSIX_ACL_CHMOD + error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); + if (!error) + { + error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); + gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_chmod: pvfs2 set acl " + "(access) returned %d\n", error); + } +#elif defined(HAVE_POSIX_ACL_CLONE) error = posix_acl_chmod_masq(clone, inode->i_mode); if (!error) { @@ -707,10 +761,17 @@ int pvfs2_acl_chmod(struct inode *inode) "(access) returned %d\n", error); } posix_acl_release(clone); +#else + #error No posix_acl_chmod or posix_acl_clone defined +#endif /* HAVE_POSIX_ACL_CHMOD */ + out: + posix_acl_release(acl); return error; } +#if defined(HAVE_THREE_PARAM_GENERIC_PERMISSION) || \ + defined(HAVE_FOUR_PARAM_GENERIC_PERMISSION) static int pvfs2_check_acl(struct inode *inode, int mask #ifdef HAVE_THREE_PARAM_ACL_CHECK , unsigned int flags @@ -742,6 +803,8 @@ static int pvfs2_check_acl(struct inode *inode, int mask gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl returning EAGAIN\n"); return -EAGAIN; } +#endif + #ifdef HAVE_TWO_PARAM_PERMISSION int pvfs2_permission(struct inode *inode, int mask) @@ -763,11 +826,15 @@ struct nameidata *nd) #ifdef HAVE_GENERIC_PERMISSION int ret; - ret = generic_permission(inode, mask, -#ifdef HAVE_FOUR_PARAM_GENERIC_PERMISSION - 0, -#endif /* HAVE_FOUR_PARAM_GENERIC_PERMISSION */ - pvfs2_check_acl); +#if defined(HAVE_TWO_PARAM_GENERIC_PERMISSION) + ret = generic_permission(inode, mask); +#elif defined(HAVE_THREE_PARAM_GENERIC_PERMISSION) + ret = generic_permission(inode, mask, pvfs2_check_acl); +#elif defined(HAVE_FOUR_PARAM_GENERIC_PERMISSION) + ret = generic_permission(inode, mask, 0, pvfs2_check_acl); +#else + #error generic_permission has an unknown number of parameters +#endif if (ret != 0) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission failed: inode: %llu mask = %o" @@ -791,7 +858,7 @@ struct nameidata *nd) llu(get_handle_from_ino(inode))); } return ret; -#else +#else /* We sort of duplicate the code below from generic_permission. */ int mode = inode->i_mode; int error; @@ -874,7 +941,7 @@ struct nameidata *nd) gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: disallowing access\n"); return -EACCES; -#endif +#endif /* HAVE_GENERIC_PERMISSION */ } #endif diff --git a/src/kernel/linux-2.6/devpvfs2-req.c b/src/kernel/linux-2.6/devpvfs2-req.c index b21c552..fd01139 100644 --- a/src/kernel/linux-2.6/devpvfs2-req.c +++ b/src/kernel/linux-2.6/devpvfs2-req.c @@ -632,7 +632,7 @@ static int pvfs2_devreq_release( { int unmounted = 0; - gossip_debug(GOSSIP_DEV_DEBUG, "pvfs2-client-core: exiting, closing device\n"); + gossip_debug(GOSSIP_DEV_DEBUG, "%s:pvfs2-client-core: exiting, closing device\n",__func__); down(&devreq_semaphore); pvfs_bufmap_finalize(); @@ -1121,8 +1121,13 @@ static unsigned int pvfs2_devreq_poll( { int poll_revent_mask = 0; + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:Is daemon in service(%d).\n" + ,__func__ + ,is_daemon_in_service()); + if (open_access_count == 1) { + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call poll_wait.\n",__func__); poll_wait(file, &pvfs2_request_list_waitq, poll_table); spin_lock(&pvfs2_request_list_lock); diff --git a/src/kernel/linux-2.6/dir.c b/src/kernel/linux-2.6/dir.c index f275042..6342513 100644 --- a/src/kernel/linux-2.6/dir.c +++ b/src/kernel/linux-2.6/dir.c @@ -124,221 +124,246 @@ static int pvfs2_readdir( pvfs2_kernel_op_t *new_op = NULL; pvfs2_inode_t *pvfs2_inode = PVFS2_I(dentry->d_inode); int buffer_full = 0; + readdir_handle_t rhandle; + int i = 0, len = 0; + ino_t current_ino = 0; + char *current_entry = NULL; + long bytes_decoded; + + gossip_ldebug(GOSSIP_DIR_DEBUG,"Entering %s.\n",__func__); + + gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->f_pos:%lld\n",__func__,lld(file->f_pos)); pos = (PVFS_ds_position)file->f_pos; + /* are we done? */ if (pos == PVFS_READDIR_END) { gossip_debug(GOSSIP_DIR_DEBUG, - "Skipping to graceful termination " - "path since we are done\n"); - return 0; + "Skipping to graceful termination path since we are done\n"); + return (0); } - gossip_debug(GOSSIP_DIR_DEBUG, "pvfs2_readdir called on %s (pos=%d)\n", - dentry->d_name.name, (int)pos); + gossip_debug(GOSSIP_DIR_DEBUG, "pvfs2_readdir called on %s (pos=%llu)\n", + dentry->d_name.name, llu(pos)); + + rhandle.buffer_index = -1; + rhandle.dents_buf = NULL; + memset(&rhandle.readdir_response, 0, sizeof(rhandle.readdir_response)); - switch ((uint32_t)pos) + new_op = op_alloc(PVFS2_VFS_OP_READDIR); + if (!new_op) + { + return (-ENOMEM); + } + + new_op->uses_shared_memory = 1; + + if (pvfs2_inode && (pvfs2_inode->refn.handle != PVFS_HANDLE_NULL) + && ( pvfs2_inode->refn.fs_id != PVFS_FS_ID_NULL) ) + { + new_op->upcall.req.readdir.refn = pvfs2_inode->refn; + gossip_debug(GOSSIP_DIR_DEBUG,"%s: upcall.req.readdir.refn.handle:%llu\n" + ,__func__ + ,llu(new_op->upcall.req.readdir.refn.handle)); + } + else { - /* - if we're just starting, populate the "." and ".." entries - of the current directory; these always appear - */ - case 0: - token_set = 1; - ino = get_ino_from_handle(dentry->d_inode); - gossip_debug(GOSSIP_DIR_DEBUG, - "calling filldir of . with pos = %llu\n", llu(pos)); - if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) - { - break; - } - file->f_pos++; - pos++; - /* drop through */ - case 1: - token_set = 1; - ino = get_parent_ino_from_dentry(dentry); - gossip_debug(GOSSIP_DIR_DEBUG, - "calling filldir of .. with pos = %llu\n", llu(pos)); - if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) - { - break; - } - file->f_pos++; - pos++; - /* drop through */ - default: - { - readdir_handle_t rhandle; - - rhandle.buffer_index = -1; - rhandle.dents_buf = NULL; - memset(&rhandle.readdir_response, 0, sizeof(rhandle.readdir_response)); - - /* handle the normal cases here */ - new_op = op_alloc(PVFS2_VFS_OP_READDIR); - if (!new_op) - { - return -ENOMEM; - } - - if (pvfs2_inode && pvfs2_inode->refn.handle != PVFS_HANDLE_NULL && - pvfs2_inode->refn.fs_id != PVFS_FS_ID_NULL) - { - new_op->upcall.req.readdir.refn = pvfs2_inode->refn; - } - else - { #if defined(HAVE_IGET5_LOCKED) || defined(HAVE_IGET4_LOCKED) - gossip_lerr("Critical error: i_ino cannot be relied " - "on when using iget4/5\n"); - op_release(new_op); - return -EINVAL; + gossip_lerr("Critical error: i_ino cannot be relied on when using iget4/5\n"); + op_release(new_op); + return -EINVAL; #endif - new_op->upcall.req.readdir.refn.handle = - get_handle_from_ino(dentry->d_inode); - new_op->upcall.req.readdir.refn.fs_id = - PVFS2_SB(dentry->d_inode->i_sb)->fs_id; - } - new_op->upcall.req.readdir.max_dirent_count = MAX_DIRENT_COUNT_READDIR; - - /* NOTE: - the position we send to the readdir upcall is out of - sync with file->f_pos since pvfs2 doesn't include the - "." and ".." entries that we added above. + new_op->upcall.req.readdir.refn.handle = get_handle_from_ino(dentry->d_inode); + new_op->upcall.req.readdir.refn.fs_id = PVFS2_SB(dentry->d_inode->i_sb)->fs_id; + gossip_debug(GOSSIP_DIR_DEBUG,"%s: upcall.req.readdir.refn.handle:%llu\n" + ,__func__ + ,llu(new_op->upcall.req.readdir.refn.handle)); + } + + new_op->upcall.req.readdir.max_dirent_count = MAX_DIRENT_COUNT_READDIR; + + /* NOTE: + * the position we send to the readdir upcall is out of sync with file->f_pos + * since pvfs2 doesn't include the "." and ".." entries that are added below. + */ + new_op->upcall.req.readdir.token = (pos == 0 ? PVFS_READDIR_START : pos); + +get_new_buffer_index: + ret = readdir_index_get(&buffer_index); + if (ret < 0) + { + gossip_lerr("pvfs2_readdir: readdir_index_get() failure (%d)\n", ret); + op_release(new_op); + return(ret); + } + new_op->upcall.req.readdir.buf_index = buffer_index; + + ret = service_operation( new_op, + "pvfs2_readdir", + get_interruptible_flag(dentry->d_inode)); + + gossip_debug(GOSSIP_DIR_DEBUG, "Readdir downcall status is %d. ret:%d\n", + new_op->downcall.status,ret); + + if ( ret == -EAGAIN && op_state_purged(new_op) ) + { + /* readdir shared memory aread has been wiped due to pvfs2-client-core restarting, so + * we must get a new index into the shared memory. */ - new_op->upcall.req.readdir.token = - (pos == 2 ? PVFS_READDIR_START : pos); + gossip_debug(GOSSIP_DIR_DEBUG,"%s: Getting new buffer_index for retry of readdir..\n",__func__); + goto get_new_buffer_index; + } - ret = readdir_index_get(&buffer_index); - if (ret < 0) - { - gossip_err("pvfs2_readdir: readdir_index_get() " - "failure (%d)\n", ret); - goto err; - } - new_op->upcall.req.readdir.buf_index = buffer_index; + if ( ret == -EIO && op_state_purged(new_op) ) + { + /* pvfs2-client is down. Readdir shared memory area has been wiped clean. No need to "put" + * back the buffer_index. + */ + gossip_err("%s: Client is down. Aborting readdir call. \n",__func__); + op_release(new_op); + return (ret); + } - ret = service_operation( - new_op, "pvfs2_readdir", - get_interruptible_flag(dentry->d_inode)); + if ( ret < 0 || new_op->downcall.status != 0 ) + { + gossip_debug(GOSSIP_DIR_DEBUG, + "Readdir request failed. Status:%d\n", + new_op->downcall.status); + readdir_index_put(buffer_index); + op_release(new_op); + return ( (ret < 0 ? ret : new_op->downcall.status) ); + } - gossip_debug(GOSSIP_DIR_DEBUG, "Readdir downcall status is %d\n", - new_op->downcall.status); + if ( (bytes_decoded = readdir_handle_ctor(&rhandle, + new_op->downcall.trailer_buf, + buffer_index)) < 0 ) + { + gossip_err("pvfs2_readdir: Could not decode trailer buffer " + " into a readdir response %d\n", ret); + ret = bytes_decoded; + readdir_index_put(buffer_index); + op_release(new_op); + return(ret); + } - if (new_op->downcall.status == 0) - { - int i = 0, len = 0; - ino_t current_ino = 0; - char *current_entry = NULL; - long bytes_decoded; - - if ((bytes_decoded = readdir_handle_ctor(&rhandle, - new_op->downcall.trailer_buf, - buffer_index)) < 0) - { - ret = bytes_decoded; - gossip_err("pvfs2_readdir: Could not decode trailer buffer " - " into a readdir response %d\n", ret); - goto err; - } + if (bytes_decoded != new_op->downcall.trailer_size) + { + gossip_err("pvfs2_readdir: # bytes " + "decoded (%ld) != trailer size (%ld)\n", + bytes_decoded, (long) new_op->downcall.trailer_size); + ret = -EINVAL; + readdir_handle_dtor(&rhandle); + op_release(new_op); + return (ret); + } - if (bytes_decoded != new_op->downcall.trailer_size) - { - gossip_err("pvfs2_readdir: # bytes " - "decoded (%ld) != trailer size (%ld)\n", - bytes_decoded, (long) new_op->downcall.trailer_size); - ret = -EINVAL; - goto err; - } + if (pos == 0) + { + token_set = 1; + ino = get_ino_from_handle(dentry->d_inode); + gossip_debug(GOSSIP_DIR_DEBUG,"%s: calling filldir of \".\" with pos = %llu\n" + ,__func__ + ,llu(pos)); + if ( (ret=filldir(dirent,".",1,pos,ino,DT_DIR)) < 0) + { + readdir_handle_dtor(&rhandle); + op_release(new_op); + return(ret); + } + file->f_pos++; + gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->f_pos:%lld\n",__func__,lld(file->f_pos)); + pos++; + } - for (i = 0; i < rhandle.readdir_response.pvfs_dirent_outcount; i++) - { - len = rhandle.readdir_response.dirent_array[i].d_length; - current_entry = rhandle.readdir_response.dirent_array[i].d_name; - current_ino = pvfs2_handle_to_ino( - rhandle.readdir_response.dirent_array[i].handle); - - gossip_debug(GOSSIP_DIR_DEBUG, - "calling filldir for %s with len %d, pos %ld\n", - current_entry, len, (unsigned long) pos); - if (filldir(dirent, current_entry, len, pos, - current_ino, DT_UNKNOWN) < 0) - { - gossip_debug(GOSSIP_DIR_DEBUG, "filldir() failed.\n"); - if(token_set && (i < 2)) - { - gossip_err("Filldir failed on one of the first two true PVFS directory entries.\n"); - gossip_err("Duplicate entries may appear.\n"); - } - buffer_full = 1; - ret = 0; - break; - } - file->f_pos++; - pos++; - } - /* For the first time around, use the token - * returned by the readdir response */ - if (token_set == 1) - { - /* this means that all of the filldir calls succeeded */ - if (i == rhandle.readdir_response.pvfs_dirent_outcount) - { - file->f_pos = rhandle.readdir_response.token; - } - else - { - /* this means a filldir call failed */ - if(rhandle.readdir_response.token == PVFS_READDIR_END) - { - /* If PVFS hit end of directory, then there is no - * way to do math on the token that it returned. - * Instead we go by the f_pos but back up to account for - * the artificial . and .. entries. The fact that - * "token_set" is non zero indicates that we are on - * the first iteration of getdents(). - */ - file->f_pos -= 3; - } - else - { - file->f_pos = rhandle.readdir_response.token - + if (pos == 1) + { + token_set = 1; + ino = get_parent_ino_from_dentry(dentry); + gossip_debug(GOSSIP_DIR_DEBUG,"%s: calling filldir of \"..\" with pos = %llu\n" + ,__func__ + ,llu(pos)); + if ( (ret=filldir(dirent,"..",2,pos,ino,DT_DIR)) < 0) + { + readdir_handle_dtor(&rhandle); + op_release(new_op); + return(ret); + } + file->f_pos++; + gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->pos:%lld\n",__func__,lld(file->f_pos)); + pos++; + } + + for (i = 0; i < rhandle.readdir_response.pvfs_dirent_outcount; i++) + { + len = rhandle.readdir_response.dirent_array[i].d_length; + current_entry = rhandle.readdir_response.dirent_array[i].d_name; + current_ino = pvfs2_handle_to_ino( rhandle.readdir_response.dirent_array[i].handle); + + gossip_debug(GOSSIP_DIR_DEBUG, + "calling filldir for %s with len %d, pos %ld\n", + current_entry, len, (unsigned long) pos); + if ( (ret=filldir(dirent, current_entry, len, pos, current_ino, DT_UNKNOWN)) < 0) + { + gossip_debug(GOSSIP_DIR_DEBUG, "filldir() failed. ret:%d\n",ret); + if (token_set && (i < 2)) + { + gossip_err("Filldir failed on one of the first two true PVFS directory entries.\n"); + gossip_err("Duplicate entries may appear.\n"); + } + buffer_full = 1; + break; + } + file->f_pos++; + gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->pos:%lld\n",__func__,lld(file->f_pos)); + + pos++; + } + + /* For the first time around, use the token returned by the readdir response */ + if (token_set == 1) + { + /* this means that all of the filldir calls succeeded */ + if (i == rhandle.readdir_response.pvfs_dirent_outcount) + { + file->f_pos = rhandle.readdir_response.token; + } + else + { + /* this means a filldir call failed */ + if(rhandle.readdir_response.token == PVFS_READDIR_END) + { + /* If PVFS hit end of directory, then there is no + * way to do math on the token that it returned. + * Instead we go by the f_pos but back up to account for + * the artificial . and .. entries. The fact that + * "token_set" is non zero indicates that we are on + * the first iteration of getdents(). + */ + file->f_pos -= 3; + } + else + { + file->f_pos = rhandle.readdir_response.token - (rhandle.readdir_response.pvfs_dirent_outcount - i + 1); - } - gossip_debug(GOSSIP_DIR_DEBUG, "at least one filldir call failed. " - "Setting f_pos to: %ld\n" - , (unsigned long) file->f_pos); - } - } + } + gossip_debug(GOSSIP_DIR_DEBUG, "at least one filldir call failed. " + "Setting f_pos to: %lld\n" + , lld(file->f_pos)); + } + }/*end if token_set to 1*/ - /* did we hit the end of the directory? */ - if(rhandle.readdir_response.token == PVFS_READDIR_END && !buffer_full) - { - gossip_debug(GOSSIP_DIR_DEBUG, + /* did we hit the end of the directory? */ + if(rhandle.readdir_response.token == PVFS_READDIR_END && !buffer_full) + { + gossip_debug(GOSSIP_DIR_DEBUG, "End of dir detected; setting f_pos to PVFS_READDIR_END.\n"); - file->f_pos = PVFS_READDIR_END; - } + file->f_pos = PVFS_READDIR_END; + } - gossip_debug(GOSSIP_DIR_DEBUG, - "pos = %llu, file->f_pos should have been %ld\n", - llu(pos), - (unsigned long) file->f_pos); - } - else - { - readdir_index_put(buffer_index); - gossip_debug(GOSSIP_DIR_DEBUG, - "Failed to readdir (downcall status %d)\n", - new_op->downcall.status); - } -err: - readdir_handle_dtor(&rhandle); - op_release(new_op); - break; - } /* end default: block */ - } /* end switch block */ + gossip_debug(GOSSIP_DIR_DEBUG,"pos = %llu, file->f_pos is %lld\n", + llu(pos), + lld(file->f_pos)); if (ret == 0) { @@ -351,9 +376,13 @@ static int pvfs2_readdir( mark_inode_dirty_sync(dentry->d_inode); } + readdir_handle_dtor(&rhandle); + op_release(new_op); + gossip_debug(GOSSIP_DIR_DEBUG, "pvfs2_readdir returning %d\n",ret); - return ret; -} + + return (ret); +}/*end pvfs2_readdir*/ #ifdef HAVE_READDIRPLUS_FILE_OPERATIONS diff --git a/src/kernel/linux-2.6/file.c b/src/kernel/linux-2.6/file.c index e3edcda..767d1ff 100644 --- a/src/kernel/linux-2.6/file.c +++ b/src/kernel/linux-2.6/file.c @@ -50,6 +50,9 @@ static ssize_t wait_for_iox(struct rw_options *rw, struct xtvec *xtvec, unsigned long xtnr_segs, size_t total_size); +#ifdef RESET_FILE_POS +static ssize_t do_readv_writev_wrapper( struct rw_options *rw); +#endif #define wake_up_daemon_for_return(op) \ do { \ @@ -176,6 +179,7 @@ struct rw_options { /* Contiguous file I/O operations use a single offset */ struct { loff_t *offset; + loff_t offset_before_request; } io; /* Non-contiguous file I/O operations use a vector of offsets */ struct { @@ -451,7 +455,7 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, || !rw->pvfs2_inode || !rw->inode || !rw->fnstr) { gossip_lerr("invalid parameters (rw: %p, vec: %p, nr_segs: %lu, " - "total_size: %zd)\n", rw, vec, nr_segs, total_size); + "total_size: %zd)\n", rw, vec, nr_segs, total_size); ret = -EINVAL; goto out; } @@ -482,6 +486,8 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, new_op->upcall.req.io.io_type = (rw->type == IO_READV) ? PVFS_IO_READ : PVFS_IO_WRITE; new_op->upcall.req.io.refn = rw->pvfs2_inode->refn; + +populate_shared_memory: /* get a shared buffer index */ ret = pvfs_bufmap_get(&buffer_index); if (ret < 0) @@ -490,24 +496,59 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, rw->fnstr, (long) ret); goto out; } - gossip_debug(GOSSIP_FILE_DEBUG, "GET op %p -> buffer_index %d\n", new_op, buffer_index); + gossip_debug(GOSSIP_FILE_DEBUG, "%s/%s(%llu): GET op %p -> buffer_index %d\n" + , __func__ + ,rw->fnstr + , llu(rw->pvfs2_inode->refn.handle) + , new_op, buffer_index); + new_op->uses_shared_memory = 1; new_op->upcall.req.io.buf_index = buffer_index; new_op->upcall.req.io.count = total_size; new_op->upcall.req.io.offset = *(rw->off.io.offset); - gossip_debug(GOSSIP_FILE_DEBUG, "%s: copy_to_user %d nr_segs %lu, " - "offset: %llu total_size: %zd\n", rw->fnstr, rw->copy_to_user_addresses, - nr_segs, llu(*(rw->off.io.offset)), total_size); + gossip_debug(GOSSIP_FILE_DEBUG, "%s/%s(%llu): copy_to_user %d nr_segs %lu, " + "offset: %llu total_size: %zd\n" + ,__func__ + ,rw->fnstr + ,llu(rw->pvfs2_inode->refn.handle) + ,rw->copy_to_user_addresses + ,nr_segs + ,llu(*(rw->off.io.offset)) + ,total_size); + + /* Stage 1: copy the buffers into client-core's address space */ + /* precopy_buffers only pertains to writes. */ if ((ret = precopy_buffers(buffer_index, rw, vec, nr_segs, total_size)) < 0) { goto out; } + + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): Calling post_io_request with tag(%d)\n" + ,__func__ + ,rw->fnstr + ,llu(rw->pvfs2_inode->refn.handle) + ,(int)new_op->tag); + /* Stage 2: Service the I/O operation */ ret = service_operation(new_op, rw->fnstr, get_interruptible_flag(rw->inode)); + /* If service_operation() returns -EAGAIN #and# the operation was purged from + * pvfs2_request_list or htable_ops_in_progress, then we know that the + * client was restarted, causing the shared memory area to be wiped clean. To restart a + * write operation in this case, we must re-copy the data from the user's iovec + * to a NEW shared memory location. To restart a read operation, we must get a new + * shared memory location. + */ + if ( ret == -EAGAIN && op_state_purged(new_op) ) + { + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:going to repopulate_shared_memory.\n",__func__); + goto populate_shared_memory; + } + + if (ret < 0) { /* this macro is defined in pvfs2-kernel.h */ @@ -537,7 +578,9 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, } goto out; } + /* Stage 3: Post copy buffers from client-core's address space */ + /* postcopy_buffers only pertains to reads. */ if ((ret = postcopy_buffers(buffer_index, rw, vec, nr_segs, new_op->downcall.resp.io.amt_complete)) < 0) { /* put error codes in downcall so that handle_io_error() @@ -547,8 +590,15 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, handle_io_error(); goto out; } + + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): Amount written as returned by the sys-io call:%d\n" + ,__func__ + ,rw->fnstr + ,llu(rw->pvfs2_inode->refn.handle) + ,(int)new_op->downcall.resp.io.amt_complete); + ret = new_op->downcall.resp.io.amt_complete; - gossip_debug(GOSSIP_FILE_DEBUG, "wait_for_io returning %ld\n", (long) ret); + /* tell the device file owner waiting on I/O that this read has completed and it can return now. in this exact case, on @@ -561,7 +611,10 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, if (buffer_index >= 0) { pvfs_bufmap_put(buffer_index); - gossip_debug(GOSSIP_FILE_DEBUG, "PUT buffer_index %d\n", buffer_index); + gossip_debug(GOSSIP_FILE_DEBUG, "%s(%llu): PUT buffer_index %d\n" + , rw->fnstr + , llu(rw->pvfs2_inode->refn.handle) + , buffer_index); buffer_index = -1; } if (new_op) @@ -569,7 +622,6 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, op_release(new_op); new_op = NULL; } - return ret; } @@ -1286,6 +1338,13 @@ static ssize_t do_readv_writev(struct rw_options *rw) , max_new_nr_segs); goto out; } + + gossip_debug(GOSSIP_FILE_DEBUG,"%s-BEGIN/%s(%llu): count(%d) after estimate_max_iovecs.\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)count); + if (rw->type == IO_WRITEV) { if (!file) @@ -1310,10 +1369,14 @@ static ssize_t do_readv_writev(struct rw_options *rw) gossip_err("%s: failed generic argument checks.\n", rw->fnstr); goto out; } - gossip_debug(GOSSIP_FILE_DEBUG, "%s: proceeding with offset : %llu, " - "size %zd\n", - rw->fnstr, llu(*offset), count); - } + + gossip_debug(GOSSIP_FILE_DEBUG, "%s/%s(%llu): proceeding with offset : %llu, size %d\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,llu(*offset), (int)count); + } /*endif IO_WRITEV*/ + if (count == 0) { ret = 0; @@ -1326,6 +1389,11 @@ static ssize_t do_readv_writev(struct rw_options *rw) * the kernel-set blocksize of PVFS2, then we split the iovecs * such that no iovec description straddles a block size limit */ + + gossip_debug(GOSSIP_FILE_DEBUG,"%s: pvfs_bufmap_size:%d\n" + ,rw->fnstr + ,pvfs_bufmap_size_query()); + if (count > pvfs_bufmap_size_query()) { /* @@ -1370,10 +1438,17 @@ static ssize_t do_readv_writev(struct rw_options *rw) } ptr = iovecptr; - gossip_debug(GOSSIP_FILE_DEBUG, "%s %zd@%llu\n", - rw->fnstr, count, llu(*offset)); - gossip_debug(GOSSIP_FILE_DEBUG, "%s: new_nr_segs: %lu, seg_count: %lu\n", - rw->fnstr, new_nr_segs, seg_count); + gossip_debug(GOSSIP_FILE_DEBUG, "%s/%s(%llu) %d@%llu\n" + , __func__ + , rw->fnstr + , llu(pvfs2_inode->refn.handle) + , (int)count, llu(*offset)); + gossip_debug(GOSSIP_FILE_DEBUG, "%s/%s(%llu): new_nr_segs: %lu, seg_count: %lu\n" + , __func__ + , rw->fnstr + , llu(pvfs2_inode->refn.handle) + , new_nr_segs, seg_count); + #ifdef PVFS2_KERNEL_DEBUG for (seg = 0; seg < new_nr_segs; seg++) { @@ -1412,12 +1487,31 @@ static ssize_t do_readv_writev(struct rw_options *rw) #endif /* PVFS2_LINUX_KERNEL_2_4 */ //{ /* push the I/O directly through to storage */ - ret = wait_for_direct_io(rw, ptr, seg_array[seg], each_count); - //} + + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): size of each_count(%d)\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)each_count); + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): BEFORE wait_for_io: offset is %d\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)*offset); + + ret = wait_for_direct_io(rw, ptr, seg_array[seg], each_count); + + gossip_debug(GOSSIP_FILE_DEBUG,"%s%s(%llu): return from wait_for_io:%d\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)ret); + if (ret < 0) { goto out; } + /* advance the iovec pointer */ ptr += seg_array[seg]; seg++; @@ -1425,6 +1519,12 @@ static ssize_t do_readv_writev(struct rw_options *rw) total_count += ret; amt_complete = ret; + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): AFTER wait_for_io: offset is %d\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)*offset); + /* if we got a short I/O operations, * fall out and return what we got so far */ @@ -1432,7 +1532,8 @@ static ssize_t do_readv_writev(struct rw_options *rw) { break; } - } + }/*end while*/ + if (total_count > 0) { ret = total_count; @@ -1457,6 +1558,13 @@ static ssize_t do_readv_writev(struct rw_options *rw) } mark_inode_dirty_sync(inode); } + + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): Value(%d) returned.\n" + ,__func__ + ,rw->fnstr + ,llu(pvfs2_inode->refn.handle) + ,(int)ret); + return ret; } @@ -1508,6 +1616,7 @@ ssize_t pvfs2_file_read( ,count ,(long long)*offset); + memset(&rw, 0, sizeof(rw)); rw.async = 0; rw.type = IO_READ; @@ -1526,7 +1635,11 @@ ssize_t pvfs2_file_read( rw.readahead_size = 0; g_pvfs2_stats.reads++; +#ifdef RESET_FILE_POS + return do_readv_writev_wrapper(&rw); +#else return do_readv_writev(&rw); +#endif } /** Write data from a contiguous user buffer into a file at a specified @@ -1558,7 +1671,12 @@ static ssize_t pvfs2_file_write( rw.dest.address.nr_segs = 1; rw.off.io.offset = offset; g_pvfs2_stats.writes++; + +#ifdef RESET_FILE_POS + return do_readv_writev_wrapper(&rw); +#else return do_readv_writev(&rw); +#endif } /* compat code, < 2.6.19 */ @@ -2699,7 +2817,13 @@ static ssize_t do_aio_read_write(struct rw_options *rw) /* synchronous I/O */ if (!rw->async) { + +#ifdef RESET_FILE_POS + error = do_readv_writev_wrapper(rw); +#else error = do_readv_writev(rw); +#endif + /* not sure this is the correct place or way to update ki_pos but it * definitely needs to occur somehow. otherwise, a write following * a synchronous writev will not write at the correct file position. @@ -3158,6 +3282,10 @@ int pvfs2_file_release( */ int pvfs2_fsync( struct file *file, +#ifdef HAVE_FSYNC_LOFF_T_PARAMS + loff_t start, + loff_t end, +#endif #ifdef HAVE_FSYNC_DENTRY_PARAM struct dentry *dentry, #endif @@ -3547,6 +3675,41 @@ static int pvfs2_precheck_file_write(struct file *file, struct inode *inode, } #endif + +#ifdef RESET_FILE_POS +/* This function wrapper imposes the rule that the user's + * request was either entirely fulfilled or it wasn't. If it wasn't, + * then errno will be set appropriately, -1 will be returned as the + * request's return value, and the file offset will be repositioned to + * the beginning of the request. If it was successfully completed, then + * the amount written/read will be returned and the file offset will be + * incremented the appropriate amount. + */ +static ssize_t do_readv_writev_wrapper( struct rw_options *rw) +{ + ssize_t ret; + + gossip_err("Wrapper called.\n"); + + /* Save the file's current offset before issuing this read/write + * request. + */ + rw->off.io.offset_before_request = *(rw->off.io.offset); + + /* If the return code from the request is negative, + * restore the offset to it's original value. + */ + ret = do_readv_writev(rw); + if (ret < 0) + { + *(rw->off.io.offset) = rw->off.io.offset_before_request; + } + return (ret); +} +#endif + + + /* * Local variables: * c-indent-level: 4 diff --git a/src/kernel/linux-2.6/inode.c b/src/kernel/linux-2.6/inode.c index 3693ef1..a094eca 100644 --- a/src/kernel/linux-2.6/inode.c +++ b/src/kernel/linux-2.6/inode.c @@ -628,7 +628,7 @@ struct inode *pvfs2_get_custom_inode_common( inode->i_fop = &pvfs2_dir_operations; /* dir inodes start with i_nlink == 2 (for "." entry) */ - inode->i_nlink++; + pvfs2_i_inc_nlink(inode); } else { diff --git a/src/kernel/linux-2.6/namei.c b/src/kernel/linux-2.6/namei.c index ce73cfd..2ec4c65 100644 --- a/src/kernel/linux-2.6/namei.c +++ b/src/kernel/linux-2.6/namei.c @@ -263,7 +263,7 @@ static int pvfs2_unlink( if (ret == 0) { pvfs2_inode_t *dir_pinode = PVFS2_I(dir); - inode->i_nlink--; + pvfs2_i_drop_nlink(inode); SetMtimeFlag(dir_pinode); pvfs2_update_inode_time(dir); @@ -372,7 +372,7 @@ static int pvfs2_rmdir( if (ret == 0) { pvfs2_inode_t *dir_pinode = PVFS2_I(dir); - inode->i_nlink--; + pvfs2_i_drop_nlink(inode); #if 0 /* NOTE: we have no good way to keep nlink consistent for directories * across clients; keep constant at 1 -Phil diff --git a/src/kernel/linux-2.6/pvfs2-bufmap.c b/src/kernel/linux-2.6/pvfs2-bufmap.c index 514cd57..60b7466 100644 --- a/src/kernel/linux-2.6/pvfs2-bufmap.c +++ b/src/kernel/linux-2.6/pvfs2-bufmap.c @@ -8,6 +8,9 @@ #include "pint-dev-shared.h" +DECLARE_WAIT_QUEUE_HEAD(pvfs2_bufmap_init_waitq); + + static int bufmap_page_count, pages_per_desc; static int32_t pvfs2_bufmap_desc_size, pvfs2_bufmap_desc_shift, @@ -48,6 +51,32 @@ static struct pvfs_bufmap_desc *desc_array = NULL; static DECLARE_WAIT_QUEUE_HEAD(bufmap_waitq); static DECLARE_WAIT_QUEUE_HEAD(readdir_waitq); +/* get_bufmap_init + * + * If bufmap_init is 1, then the shared memory system, including the + * buffer_index_array, is available. Otherwise, it is not. + * + * returns the value of bufmap_init + */ +int get_bufmap_init(void) +{ + int ret = -EINVAL; + int lock = 0; + + lock=down_read_trylock(&bufmap_init_sem); + + if (lock == 1) + { /* semaphore obtained */ + ret = bufmap_init; + up_read(&bufmap_init_sem); + return (ret); + } + + /* semaphore locked */ + /* value of lock will be zero */ + return(lock); +} + static int initialize_bufmap_descriptors(int ndescs) { int err; @@ -260,6 +289,17 @@ int pvfs_bufmap_initialize(struct PVFS_dev_map_desc *user_desc) bufmap_init = 1; up_write(&bufmap_init_sem); + /* If there are operations in pvfs2_bufmap_init_waitq, wake them up. + * This scenario occurs when the client-core is restarted and I/O + * requests in the in-progress or waiting tables are restarted. I/O + * requests cannot be restarted until the shared memory system is completely + * re-initialized, so we put the I/O requests in this waitq until + * initialization has completed. NOTE: the I/O requests are also on a + * timer, so they don't wait forever (just in case the client-core doesn't + * come back up. + */ + wake_up_interruptible(&pvfs2_bufmap_init_waitq); + gossip_debug(GOSSIP_BUFMAP_DEBUG, "pvfs_bufmap_initialize: exiting normally\n"); return 0; diff --git a/src/kernel/linux-2.6/pvfs2-bufmap.h b/src/kernel/linux-2.6/pvfs2-bufmap.h index 11e6a8e..27a7b9a 100644 --- a/src/kernel/linux-2.6/pvfs2-bufmap.h +++ b/src/kernel/linux-2.6/pvfs2-bufmap.h @@ -27,6 +27,8 @@ int pvfs_bufmap_shift_query(void); int pvfs_bufmap_initialize( struct PVFS_dev_map_desc *user_desc); +int get_bufmap_init(void); + void pvfs_bufmap_finalize(void); int pvfs_bufmap_get( diff --git a/src/kernel/linux-2.6/pvfs2-kernel.h b/src/kernel/linux-2.6/pvfs2-kernel.h index d2f89a9..9cb0958 100644 --- a/src/kernel/linux-2.6/pvfs2-kernel.h +++ b/src/kernel/linux-2.6/pvfs2-kernel.h @@ -135,6 +135,8 @@ typedef unsigned long sector_t; #define PVFS2_DEFAULT_OP_TIMEOUT_SECS 20 #endif +#define PVFS2_BUFMAP_WAIT_TIMEOUT_SECS 30 + #define PVFS2_DEFAULT_SLOT_TIMEOUT_SECS 1800 /* 30 minutes */ #define PVFS2_REQDEVICE_NAME "pvfs2-req" @@ -378,6 +380,11 @@ typedef struct enum pvfs2_vfs_op_states op_state; uint64_t tag; + /* Set uses_shared_memory to 1 if this operation uses shared memory. */ + /* If true, then a retry on the op must also get a new shared memory*/ + /* buffer and re-populate it. */ + int uses_shared_memory; + pvfs2_upcall_t upcall; pvfs2_downcall_t downcall; @@ -1017,6 +1024,8 @@ extern struct file_operations pvfs2_dir_operations; extern struct dentry_operations pvfs2_dentry_operations; extern struct file_operations pvfs2_devreq_file_operations; +extern wait_queue_head_t pvfs2_bufmap_init_waitq; + /************************************ * misc convenience macros ************************************/ @@ -1343,6 +1352,42 @@ static inline loff_t pvfs2_i_size_read(struct inode *inode) #endif } +static inline void pvfs2_i_set_nlink(struct inode *inode, unsigned int nlink) +{ +#ifdef HAVE_I_SET_NLINK + set_nlink(inode, nlink); +#else + inode->i_nlink = nlink; +#endif +} + +static inline void pvfs2_i_inc_nlink(struct inode *inode) +{ +#ifdef HAVE_I_INC_NLINK + inc_nlink(inode); +#else + inode->i_nlink++; +#endif +} + +static inline void pvfs2_i_drop_nlink(struct inode *inode) +{ +#ifdef HAVE_I_DROP_NLINK + drop_nlink(inode); +#else + inode->i_nlink--; +#endif +} + +static inline void pvfs2_i_clear_nlink(struct inode *inode) +{ +#ifdef HAVE_I_CLEAR_NLINK + clear_nlink(inode); +#else + inode->i_nlink = 0; +#endif +} + static inline unsigned int diff(struct timeval *end, struct timeval *begin) { if (end->tv_usec < begin->tv_usec) { diff --git a/src/kernel/linux-2.6/pvfs2-utils.c b/src/kernel/linux-2.6/pvfs2-utils.c index f12ddeb..cf034ff 100644 --- a/src/kernel/linux-2.6/pvfs2-utils.c +++ b/src/kernel/linux-2.6/pvfs2-utils.c @@ -286,7 +286,7 @@ int copy_attributes_to_inode( * directories across clients; keep constant at 1. Why 1? If * we go with 2, then find(1) gets confused and won't work * properly withouth the -noleaf option */ - inode->i_nlink = 1; + pvfs2_i_set_nlink(inode, 1); ret = 0; break; case PVFS_TYPE_SYMLINK: diff --git a/src/kernel/linux-2.6/super.c b/src/kernel/linux-2.6/super.c index 07329a8..df4f145 100644 --- a/src/kernel/linux-2.6/super.c +++ b/src/kernel/linux-2.6/super.c @@ -1237,6 +1237,7 @@ int pvfs2_fill_sb( PVFS2_SB(sb)->root_handle = mount_sb_info->root_handle; PVFS2_SB(sb)->fs_id = mount_sb_info->fs_id; PVFS2_SB(sb)->id = mount_sb_info->id; + memcpy(&PVFS2_SB(sb)->osd_info, &mount_sb_info->osd_info, sizeof(PVFS2_SB(sb)->osd_info)); @@ -1349,7 +1350,6 @@ struct super_block *pvfs2_get_sb( return ERR_PTR(ret); #endif } - strncpy(new_op->upcall.req.fs_mount.pvfs2_config_server, devname, PVFS_MAX_SERVER_ADDR_LEN); diff --git a/src/kernel/linux-2.6/upcall.h b/src/kernel/linux-2.6/upcall.h index 354001f..5a406cb 100644 --- a/src/kernel/linux-2.6/upcall.h +++ b/src/kernel/linux-2.6/upcall.h @@ -236,6 +236,7 @@ typedef struct { int32_t type; int32_t __pad1; + PVFS_credentials credentials; int pid; int tgid; diff --git a/src/kernel/linux-2.6/waitqueue.c b/src/kernel/linux-2.6/waitqueue.c index 4af05ef..f001123 100644 --- a/src/kernel/linux-2.6/waitqueue.c +++ b/src/kernel/linux-2.6/waitqueue.c @@ -16,6 +16,7 @@ #include "pvfs2-kernel.h" #include "pvfs2-internal.h" +#include "pvfs2-bufmap.h" /* What we do in this function is to walk the list of operations that are present @@ -56,12 +57,19 @@ int service_operation( { sigset_t orig_sigset; int ret = 0; - op->upcall.pid = current->pid; + + /* irqflags and wait_entry are only used IF the client-core aborts */ + unsigned long irqflags; + DECLARE_WAITQUEUE(wait_entry, current); + + #ifdef PVFS2_LINUX_KERNEL_2_4 op->upcall.tgid = -1; #else op->upcall.tgid = current->tgid; #endif + op->upcall.pid = current->pid; + retry_servicing: op->downcall.status = 0; @@ -89,12 +97,16 @@ int service_operation( return(ret); } } + + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call is_daemon_in_service().\n",__func__); if (is_daemon_in_service() < 0) { /* By incrementing the per-operation attempt counter, we directly go into the timeout logic * while waiting for the matching downcall to be read */ + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:client core is NOT in service(%d).\n",__func__ + ,is_daemon_in_service()); op->attempts++; } @@ -105,6 +117,7 @@ int service_operation( } else { + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call add_op_to_request_list().\n",__func__); add_op_to_request_list(op); } @@ -121,6 +134,7 @@ int service_operation( if(flags & PVFS2_OP_CANCELLATION) { + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call wait_for_cancellation_downcall().\n",__func__); ret = wait_for_cancellation_downcall(op); } else @@ -156,8 +170,56 @@ int service_operation( { gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2: tag %lld (%s) -- operation to be retried (%d attempt)\n", lld(op->tag), op_name, op->attempts + 1); - goto retry_servicing; - } + + if (!op->uses_shared_memory) + { + /* this operation doesn't use the shared memory system */ + goto retry_servicing; + } + + /* op uses shared memory */ + if (get_bufmap_init() == 0) + { + /* This operation uses the shared memory system AND the system is not yet ready. */ + /* This situation occurs when the client-core is restarted AND there were operations */ + /* waiting to be processed or were already in process. */ + gossip_debug(GOSSIP_WAIT_DEBUG,"uses_shared_memory is true.\n"); + gossip_debug(GOSSIP_WAIT_DEBUG,"Client core in-service status(%d).\n",is_daemon_in_service()); + gossip_debug(GOSSIP_WAIT_DEBUG,"bufmap_init:%d.\n",get_bufmap_init()); + gossip_debug(GOSSIP_WAIT_DEBUG,"operation's status is 0x%0x.\n",op->op_state); + + /* let process sleep for a few seconds so shared memory system can be initialized. */ + spin_lock_irqsave(&op->lock,irqflags); + add_wait_queue(&pvfs2_bufmap_init_waitq, &wait_entry); + spin_unlock_irqrestore(&op->lock,irqflags); + + set_current_state(TASK_INTERRUPTIBLE); + + /* Wait for pvfs_bufmap_initialize() to wake me up within the allotted time. */ + ret=schedule_timeout(MSECS_TO_JIFFIES(1000 * PVFS2_BUFMAP_WAIT_TIMEOUT_SECS)); + + gossip_debug(GOSSIP_WAIT_DEBUG,"Value returned from schedule_timeout:%d.\n",ret); + gossip_debug(GOSSIP_WAIT_DEBUG,"Is shared memory available? (%d).\n",get_bufmap_init()); + + spin_lock_irqsave(&op->lock,irqflags); + remove_wait_queue(&pvfs2_bufmap_init_waitq, &wait_entry); + spin_unlock_irqrestore(&op->lock,irqflags); + + if (get_bufmap_init() == 0) + { + gossip_err("%s:The shared memory system has not started in %d seconds after the " + "client core restarted. Aborting user's request(%s).\n" + ,__func__ + ,PVFS2_BUFMAP_WAIT_TIMEOUT_SECS + ,get_opname_string(op)); + return(-EIO); + } + + /* Return to the calling function and re-populate a shared memory buffer. */ + return(-EAGAIN); + }/*endif*/ + }/*endif*/ + gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2: service_operation %s returning: %d for %p.\n", op_name, ret, op); return(ret); } @@ -304,7 +366,7 @@ int wait_for_matching_downcall(pvfs2_kernel_op_t * op) pvfs2_clean_up_interrupted_operation(op); ret = -EINTR; break; - } + }/*end while*/ set_current_state(TASK_RUNNING); @@ -339,22 +401,42 @@ int wait_for_cancellation_downcall(pvfs2_kernel_op_t * op) spin_lock(&op->lock); if (op_state_serviced(op)) { + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:op-state is SERVICED.\n",__func__); spin_unlock(&op->lock); ret = 0; break; } spin_unlock(&op->lock); - if (!schedule_timeout - (MSECS_TO_JIFFIES(1000 * op_timeout_secs))) + if (signal_pending(current)) { - gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s: operation timed out: " - "(tag %lld, op %p)\n", __func__, lld(op->tag), op); + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:operation interrupted by a signal (tag %lld, op %p)\n" + ,__func__ + ,lld(op->tag) + ,op); + pvfs2_clean_up_interrupted_operation(op); + ret = -EINTR; + break; + } + + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call schedule_timeout.\n",__func__); + ret=schedule_timeout(MSECS_TO_JIFFIES(1000 * op_timeout_secs)); + + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:Value returned from schedule_timeout(%d).\n" + ,__func__,ret); + if (!ret) + { + gossip_debug(GOSSIP_WAIT_DEBUG, "%s:*** operation timed out: %p\n", __func__,op); pvfs2_clean_up_interrupted_operation(op); ret = -ETIMEDOUT; break; } - } + + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:Breaking out of loop, regardless of value returned by schedule_timeout.\n",__func__); + ret = -ETIMEDOUT; + break; + }/*end while*/ + set_current_state(TASK_RUNNING); @@ -362,6 +444,8 @@ int wait_for_cancellation_downcall(pvfs2_kernel_op_t * op) remove_wait_queue(&op->waitq, &wait_entry); spin_unlock(&op->lock); + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:returning ret(%d)\n",__func__,ret); + return ret; } diff --git a/src/proto/PINT-le-bytefield.c b/src/proto/PINT-le-bytefield.c index ede00e3..96576e8 100644 --- a/src/proto/PINT-le-bytefield.c +++ b/src/proto/PINT-le-bytefield.c @@ -276,6 +276,7 @@ static void lebf_initialize(void) resp.u.tree_get_file_size.error = NULL; resp.u.tree_get_file_size.handle_count = 0; resp.u.tree_get_file_size.caller_handle_index = 0; + reqsize = extra_size_PVFS_servreq_tree_get_file_size; respsize = extra_size_PVFS_servresp_tree_get_file_size; break; case PVFS_SERV_MGMT_GET_UID: @@ -519,9 +520,9 @@ static int lebf_encode_resp( /** we stand a good chance of segfaulting if we try to encode the response * after something bad happened reading data from disk. */ - if (resp->status == 0) { + /** extra encoding rules for particular responses */ switch (resp->op) { @@ -1065,7 +1066,7 @@ static void lebf_decode_rel(struct PINT_decoded_msg *msg, decode_free(resp->u.mgmt_get_uid.uid_info_array); break; } - + case PVFS_SERV_GETCONFIG: case PVFS_SERV_REMOVE: case PVFS_SERV_MGMT_REMOVE_OBJECT: diff --git a/src/proto/PINT-reqproto-encode.c b/src/proto/PINT-reqproto-encode.c index a3e4386..3e9d259 100644 --- a/src/proto/PINT-reqproto-encode.c +++ b/src/proto/PINT-reqproto-encode.c @@ -108,7 +108,7 @@ int PINT_encode(void* input_buffer, int ret = -PVFS_EINVAL; target_msg->dest = target_addr; target_msg->enc_type = enc_type; - + gossip_debug(GOSSIP_ENDECODE_DEBUG,"PINT_encode\n"); switch(enc_type) { diff --git a/src/proto/pvfs2-attr.h b/src/proto/pvfs2-attr.h index 54e8563..9f249b3 100644 --- a/src/proto/pvfs2-attr.h +++ b/src/proto/pvfs2-attr.h @@ -33,7 +33,7 @@ (PVFS_ATTR_COMMON_UID | PVFS_ATTR_COMMON_GID | \ PVFS_ATTR_COMMON_PERM | PVFS_ATTR_COMMON_ATIME | \ PVFS_ATTR_COMMON_CTIME | PVFS_ATTR_COMMON_MTIME | \ - PVFS_ATTR_COMMON_TYPE | PVFS_ATTR_COMMON_CID) + PVFS_ATTR_COMMON_TYPE | PVFS_ATTR_COMMON_CID) /* internal attribute masks for metadata objects */ #define PVFS_ATTR_META_DIST (1 << 10) diff --git a/src/proto/pvfs2-req-proto.h b/src/proto/pvfs2-req-proto.h index bafd938..8f25e43 100644 --- a/src/proto/pvfs2-req-proto.h +++ b/src/proto/pvfs2-req-proto.h @@ -233,7 +233,7 @@ endecode_fields_2a_struct( PVFS_handle, datafile_handles); #define extra_size_PVFS_servresp_create \ (PVFS_REQ_LIMIT_HANDLES_COUNT * sizeof(PVFS_handle)) - + /* batch_create *********************************************************/ /* - used to create new multiple metafile and datafile objects */ @@ -1553,9 +1553,9 @@ do { \ struct PVFS_servreq_mgmt_perf_mon { - uint32_t next_id; /* next time stamp id we want to retrieve */ + uint32_t next_id; /* next time stamp id we want to retrieve */ uint32_t key_count; /* how many counters per measurements we want */ - uint32_t count; /* how many measurements we want */ + uint32_t count; /* how many measurements we want */ }; endecode_fields_3_struct( PVFS_servreq_mgmt_perf_mon, diff --git a/src/server/create.sm b/src/server/create.sm index 9bfa124..3689867 100644 --- a/src/server/create.sm +++ b/src/server/create.sm @@ -20,6 +20,7 @@ enum { OSD_MSGPAIR = 2001, + OSD_MDFILE_MSGPAIR = 2002 }; %% @@ -37,6 +38,7 @@ machine pvfs2_create_sm { run create_metafile; success => check_stuffed; + OSD_MDFILE_MSGPAIR => setup_local_datafile_handles; default => setup_final_response; } @@ -158,6 +160,13 @@ static int create_metafile( job_id_t i; PVFS_handle_extent_array meta_handle_ext_array; server_configuration_s *config = get_server_config_struct(); + + if (config->osd_type == OSD_MDFILE) + { + /* Nothing to do here, go to the setup_local_datafile_handles to get a data handle_array_local */ + js_p->error_code = OSD_MDFILE_MSGPAIR; + return SM_ACTION_COMPLETE; + } /* first state to check in, make sure the attr mask contains the dist bit. * it's required later (not sure if we have to require it) but if we don't @@ -176,7 +185,7 @@ static int create_metafile( config->host_id, PINT_SERVER_TYPE_META, &meta_handle_ext_array); - + ret = job_trove_dspace_create( s_op->req->u.create.fs_id, &meta_handle_ext_array, @@ -188,7 +197,7 @@ static int create_metafile( js_p, &i, server_job_context, s_op->req->hints); - + return(ret); } @@ -211,15 +220,15 @@ static int check_stuffed( llu(js_p->handle)); assert(config); - + if(config->osd_type == OSD_DATAFILE) { js_p->error_code = 0; return SM_ACTION_COMPLETE; } - + layout = &s_op->req->u.create.layout; - + if(layout->algorithm == PVFS_SYS_LAYOUT_LIST) { for(i=0; iserver_list.count; i++) @@ -255,12 +264,15 @@ static int check_stuffed( } /* For now only support stuffing of ROUND_ROBIN layouts. - * As a performance enhancement, don't create a stuffed file when the current environment only has one server. + * As a performance enhancement, don't create a stuffed + * file when the current environment only has one server. * This prevents unstuffing from being called by the client sys-io machine. */ - if((server_type & PINT_SERVER_TYPE_IO) && fs_conf->file_stuffing && layout->algorithm == PVFS_SYS_LAYOUT_ROUND_ROBIN - && s_op->req->u.create.num_dfiles_req > 1 ) - { + if((server_type & PINT_SERVER_TYPE_IO) && + fs_conf->file_stuffing && + layout->algorithm == PVFS_SYS_LAYOUT_ROUND_ROBIN && + s_op->req->u.create.num_dfiles_req > 1 ) + { /* we can do a stuffed create here, only one datafile */ s_op->req->u.create.attr.u.meta.dfile_count = 1; s_op->resp.u.create.datafile_count = 1; @@ -276,7 +288,7 @@ static int check_stuffed( js_p->error_code = 0; return SM_ACTION_COMPLETE; } - + /* file will not be stuffed; need to allocate all datafiles */ s_op->u.create.num_io_servers = s_op->req->u.create.num_dfiles_req; s_op->resp.u.create.datafile_handles = malloc( @@ -329,7 +341,6 @@ static int check_stuffed( s_op->resp.u.create.stuffed = 0; js_p->error_code = 0; - return SM_ACTION_COMPLETE; } @@ -389,7 +400,6 @@ static int create_local_datafiles( config->host_id, PINT_SERVER_TYPE_IO, &data_handle_ext_array); - if(ret < 0) { js_p->error_code = ret; @@ -399,7 +409,6 @@ static int create_local_datafiles( /* deliberately not setting SYNC flag, because both the attrs and * keyvals will be synced in later states */ - ret = job_trove_dspace_create_list( s_op->req->u.create.fs_id, &data_handle_ext_array, @@ -414,7 +423,7 @@ static int create_local_datafiles( &tmp_id, server_job_context, s_op->req->hints); - + return(ret); } @@ -588,6 +597,7 @@ static PINT_sm_action remove_keyvals( static PINT_sm_action setup_local_datafile_handles( struct PINT_smcb *smcb, job_status_s *js_p) { + gossip_err("setup_local_datafile_handles\n"); struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int i; int tmp_index = 0; @@ -595,8 +605,8 @@ static PINT_sm_action setup_local_datafile_handles( PINT_llist *cur = NULL; struct host_alias_s *cur_alias; server_configuration_s *config = get_server_config_struct(); - - if(config->osd_type == OSD_DATAFILE) + + if(config->osd_type == OSD_DATAFILE || config->osd_type == OSD_MDFILE) { cur = config->host_aliases; while(cur) @@ -622,6 +632,11 @@ static PINT_sm_action setup_local_datafile_handles( s_op->resp.u.create.datafile_handles = malloc(sizeof(PVFS_handle)); s_op->resp.u.create.datafile_handles[0] = trove_handle_alloc_from_range(s_op->req->u.create.fs_id, &data_handle_ext_array); + + if (config->osd_type == OSD_MDFILE) + js_p->error_code = OSD_MDFILE_MSGPAIR; + else + js_p->error_code = 0; } else { if(s_op->resp.u.create.stuffed) { @@ -645,7 +660,6 @@ static PINT_sm_action setup_local_datafile_handles( } } - js_p->error_code = 0; return SM_ACTION_COMPLETE; } @@ -772,7 +786,7 @@ static PINT_sm_action setattr_setobj_attribs( dspace_a_p = &s_op->attr; a_p = &s_op->req->u.create.attr; - + /* * Remember that mtime is versioned on disk! so convert it here.. * It is better to do it here than change the PVFS_object_attr_overwrite_setable @@ -793,7 +807,6 @@ static PINT_sm_action setattr_setobj_attribs( and specified by the mask value in the request; macro defined in pvfs2-storage.h */ - PVFS_object_attr_overwrite_setable(dspace_a_p, a_p); gossip_debug( @@ -806,7 +819,7 @@ static PINT_sm_action setattr_setobj_attribs( llu(PINT_util_mkversion_time(dspace_a_p->mtime)), llu(dspace_a_p->ctime), (int)dspace_a_p->u.meta.dfile_count, (int)dspace_a_p->u.meta.dist_size); - + /* translate attrs to storage attr format */ ds_attr = &(s_op->ds_attr); PVFS_object_attr_to_ds_attr(dspace_a_p, ds_attr); @@ -825,10 +838,8 @@ static int setup_resp( struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - if (js_p->error_code == 0) { - s_op->resp.u.create.metafile_handle = js_p->handle; PINT_ACCESS_DEBUG(s_op, GOSSIP_ACCESS_DEBUG, "create: new metadata handle: %llu.\n", llu(s_op->resp.u.create.metafile_handle)); diff --git a/src/server/final-response.sm b/src/server/final-response.sm index e882892..ea48bf2 100644 --- a/src/server/final-response.sm +++ b/src/server/final-response.sm @@ -119,10 +119,9 @@ static PINT_sm_action final_response_send_resp( { gossip_lerr("Error: req_sched_release() failure; continuing...\n"); } - + ret = PINT_encode(&s_op->resp, PINT_ENCODE_RESP, &(s_op->encoded), s_op->addr, s_op->decoded.enc_type); - if (ret < 0) { gossip_lerr("Error: PINT_encode() failure.\n"); diff --git a/src/server/get-attr.sm b/src/server/get-attr.sm index 893e094..df150e0 100644 --- a/src/server/get-attr.sm +++ b/src/server/get-attr.sm @@ -245,8 +245,6 @@ machine pvfs2_get_attr_sm %% - - /* getattr_verify_attribs() * * We initialize the attribute mask that will be returned in this @@ -274,7 +272,7 @@ static PINT_sm_action getattr_verify_attribs( resp_attr->group = s_op->attr.group; resp_attr->perms = s_op->attr.perms; resp_attr->atime = s_op->attr.atime; - resp_attr->cid = s_op->attr.cid; + resp_attr->cid = s_op->attr.cid; resp_attr->mtime = PINT_util_mkversion_time(s_op->attr.mtime); if (resp_attr->mtime == 0) @@ -1287,7 +1285,7 @@ static PINT_sm_action interpret_metafile_distribution( static PINT_sm_action getattr_setup_resp( struct PINT_smcb *smcb, job_status_s *js_p) -{ +{ struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PVFS_object_attr *resp_attr = &s_op->resp.u.getattr.attr; @@ -1614,7 +1612,7 @@ static PINT_sm_action getattr_get_dir_hint( /* NOTE: memory allocations are released in the getattr_cleanup() * function */ - + if (!(s_op->u.getattr.attrmask & PVFS_ATTR_DIR_HINT)) { /* the caller didn't really want the dir hints; skip @@ -1802,7 +1800,6 @@ static PINT_sm_action getattr_interpret_dir_hint( js_p->error_code = 0; }/* end if val_a and key_a */ - return SM_ACTION_COMPLETE; } diff --git a/src/server/list-attr.sm b/src/server/list-attr.sm index 27ef8b2..684f895 100644 --- a/src/server/list-attr.sm +++ b/src/server/list-attr.sm @@ -83,7 +83,7 @@ static PINT_sm_action listattr_read_basic_attrs( int ret; struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); job_id_t tmp_id; - + s_op->u.listattr.ds_attr_a = (PVFS_ds_attributes *) calloc(s_op->req->u.listattr.nhandles * sizeof(PVFS_ds_attributes), 1); if (s_op->u.listattr.ds_attr_a == NULL) { @@ -133,7 +133,7 @@ static PINT_sm_action listattr_setup_getattr( s_op->u.listattr.parallel_sms = 0; js_p->error_code = 0; - + for(i=0; ireq->u.listattr.nhandles; i++) { if(s_op->u.listattr.errors[i]) @@ -221,7 +221,7 @@ static PINT_sm_action listattr_interpret_getattrs(struct PINT_smcb *smcb, assert(s_op); assert(s_op->op == PVFS_SERV_LISTATTR); - + gossip_debug(GOSSIP_SERVER_DEBUG, "listattr: trying to interpret results from %d nested parallel getattr machines.\n", s_op->u.listattr.parallel_sms); @@ -246,7 +246,7 @@ static PINT_sm_action listattr_interpret_getattrs(struct PINT_smcb *smcb, } } } - + /* if we reached this point, then we have a successful ack to send back; * set remaining response fields */ diff --git a/src/server/mkdir.sm b/src/server/mkdir.sm index b0127a0..451dce5 100644 --- a/src/server/mkdir.sm +++ b/src/server/mkdir.sm @@ -111,7 +111,7 @@ static PINT_sm_action mkdir_create( struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret; job_id_t i; - + gossip_debug(GOSSIP_MKDIR_DEBUG, " creating dspace on coll_id %d\n", s_op->u.mkdir.fs_id); @@ -120,7 +120,7 @@ static PINT_sm_action mkdir_create( "be in starting hrange[0] %llu-%llu\n", llu(s_op->u.mkdir.handle_extent_array.extent_array[0].first), llu(s_op->u.mkdir.handle_extent_array.extent_array[0].last)); - + ret = job_trove_dspace_create( s_op->u.mkdir.fs_id, &s_op->u.mkdir.handle_extent_array, PVFS_TYPE_DIRECTORY, NULL, @@ -284,7 +284,7 @@ static PINT_sm_action mkdir_prep_sm( struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PVFS_object_attr *a_p = NULL; PVFS_ds_attributes *ds_attr = NULL; - + PVFS_handle_extent_array data_handle_ext_array; PINT_llist *cur = NULL; struct host_alias_s *cur_alias; @@ -293,7 +293,7 @@ static PINT_sm_action mkdir_prep_sm( s_op->u.mkdir.fs_id = s_op->req->u.mkdir.fs_id; s_op->u.mkdir.handle_extent_array = s_op->req->u.mkdir.handle_extent_array; - + if(config->osd_type == OSD_DATAFILE) { cur = config->host_aliases; diff --git a/src/server/module.mk.in b/src/server/module.mk.in index 08db68b..175156d 100644 --- a/src/server/module.mk.in +++ b/src/server/module.mk.in @@ -64,6 +64,7 @@ ifdef BUILD_SERVER # to stat the fs, need to know about handle statistics MODCFLAGS_$(DIR)/statfs.c = \ -I$(srcdir)/src/io/trove/trove-handle-mgmt + MODCFLAGS_$(DIR)/create.c = \ -I$(srcdir)/src/io/trove/trove-handle-mgmt MODCFLAGS_$(DIR)/mkdir.c = \ diff --git a/src/server/prelude.sm b/src/server/prelude.sm index 36f05ab..ac7bc16 100644 --- a/src/server/prelude.sm +++ b/src/server/prelude.sm @@ -83,13 +83,12 @@ nested machine pvfs2_prelude_sm static PINT_sm_action prelude_setup( struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_debug(GOSSIP_MIRROR_DEBUG,"Executing pvfs2_prelude_sm:prelude_setup...\n"); gossip_debug(GOSSIP_MIRROR_DEBUG,"\tbase frame:%d\tframe count:%d\n" ,smcb->base_frame,smcb->frame_count); int ret; struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - + ret = PINT_server_req_get_object_ref( s_op->req, &s_op->target_fs_id, &s_op->target_handle); if( ret != 0 ) diff --git a/src/server/pvfs2-server.c b/src/server/pvfs2-server.c index c1a3244..e6ffcf6 100644 --- a/src/server/pvfs2-server.c +++ b/src/server/pvfs2-server.c @@ -217,7 +217,8 @@ int main(int argc, char **argv) s_server_options.server_alias, PVFS2_VERSION); /* code to handle older two config file format */ - ret = PINT_parse_config(&server_config, fs_conf, s_server_options.server_alias); + ret = PINT_parse_config(&server_config, fs_conf, + s_server_options.server_alias, 1); if (ret) { gossip_err("Error: Please check your config files.\n"); @@ -560,7 +561,7 @@ static int server_initialize( /* Post starting set of BMI unexpected msg buffers */ for (i = 0; i < server_config.initial_unexpected_requests; i++) { - ret = server_post_unexpected_recv(&job_status_structs[i]); + ret = server_post_unexpected_recv(); if (ret < 0) { gossip_err("Error posting unexpected recv\n"); @@ -810,7 +811,7 @@ static int server_initialize_subsystems( gossip_err("Error initializing cached_config interface.\n"); return(ret); } - + /* initialize the flow interface */ ret = PINT_flow_initialize(server_config.flow_modules, 0); @@ -831,7 +832,8 @@ static int server_initialize_subsystems( break; } - ret = PINT_cached_config_handle_load_mapping(cur_fs); + ret = PINT_cached_config_handle_load_mapping(cur_fs, + &server_config); if(ret) { PVFS_perror("Error: PINT_handle_load_mapping", ret); @@ -843,7 +845,6 @@ static int server_initialize_subsystems( can't error out since they're just hints. thus, we complain in logging and continue. */ - ret = trove_collection_setinfo( cur_fs->coll_id, 0, TROVE_DIRECTIO_THREADS_NUM, @@ -874,7 +875,7 @@ static int server_initialize_subsystems( ret = trove_collection_lookup( cur_fs->trove_method, cur_fs->file_system_name, &(orig_fsid), NULL, NULL); - + if (ret < 0) { gossip_err("Error initializing trove for filesystem %s\n", @@ -904,12 +905,11 @@ static int server_initialize_subsystems( cur_merged_handle_range = PINT_config_get_merged_handle_range_str( &server_config, cur_fs); - + /* * error out if we're not configured to house either a meta or * data handle range at all. */ - if (!cur_merged_handle_range) { gossip_err("Error: Invalid handle range for host %s " @@ -1327,7 +1327,8 @@ static void reload_config(void) gossip_debug(GOSSIP_SERVER_DEBUG, "Reloading configuration %s\n", fs_conf); /* We received a SIGHUP. Update configuration in place */ - if (PINT_parse_config(&sighup_server_config, fs_conf, s_server_options.server_alias) < 0) + if (PINT_parse_config(&sighup_server_config, fs_conf, + s_server_options.server_alias, 1) < 0) { gossip_err("Error: Please check your config files.\n"); gossip_err("Error: SIGHUP unable to update configuration.\n"); @@ -1925,44 +1926,59 @@ static int server_parse_cmd_line_args(int argc, char **argv) * * Returns 0 on success, -PVFS_error on failure. */ -int server_post_unexpected_recv(job_status_s *js_p) +int server_post_unexpected_recv(void) { int ret = -PVFS_EINVAL; /* job_id_t j_id; */ struct PINT_smcb *smcb = NULL; struct PINT_server_op *s_op; + /* The job status structure js that is sent into PINT_state_machine_start() below is used until + * the job_bmi_unexp() function call is executed in pvfs2_unexpected_sm.unexpected_post. Once + * job_bmi_unexp() puts the unexp job on the job queue, then a job_status_s structure will be + * assigned from the global structure, server_job_status_array, when the job system processes it. + * (The job system performs this task in a later call to job_testcontext()). It is THIS job_status_s + * structure that carries into the next state of pvfs2_unexpected_sm. Thus, the original js + * structure is ONLY used by job_bmi_unexp() to return an error if something within job_bmi_unexp() + * fails, like a memory issue. It is NOT forwarded through the job system. In the case of an error, + * ret (below) will be SM_ACTION_TERMINATE upon return from PINT_state_machine_start() and the error_code + * is then properly propagated. + * + * NOTE: If an error occurs when this function is called during server_initialize() time, then the + * server will not start. If an error occurs during the pvfs2_unexpected_sm.unexpected_map state, the + * error is noted but the system continues to run. + */ + job_status_s js={0}; + gossip_debug(GOSSIP_SERVER_DEBUG, "server_post_unexpected_recv\n"); - if (js_p) + ret = PINT_smcb_alloc(&smcb, BMI_UNEXPECTED_OP, + sizeof(struct PINT_server_op), + server_op_state_get_machine, + server_state_machine_terminate, + server_job_context); + if (ret < 0) { - ret = PINT_smcb_alloc(&smcb, BMI_UNEXPECTED_OP, - sizeof(struct PINT_server_op), - server_op_state_get_machine, - server_state_machine_terminate, - server_job_context); - if (ret < 0) - { - gossip_lerr("Error: failed to allocate SMCB " - "of op type %x\n", BMI_UNEXPECTED_OP); - return ret; - } - s_op = (struct PINT_server_op *)PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - memset(s_op, 0, sizeof(PINT_server_op)); - s_op->op = BMI_UNEXPECTED_OP; - s_op->target_handle = PVFS_HANDLE_NULL; - s_op->target_fs_id = PVFS_FS_ID_NULL; - /* Add an unexpected s_ops to the list */ - qlist_add_tail(&s_op->next, &posted_sop_list); - - ret = PINT_state_machine_start(smcb, js_p); - if(ret == SM_ACTION_TERMINATE) - { - /* error posting unexpected */ - PINT_smcb_free(smcb); - return js_p->error_code; - } + gossip_lerr("Error: failed to allocate SMCB " + "of op type %x\n", BMI_UNEXPECTED_OP); + return ret; + } + s_op = (struct PINT_server_op *)PINT_sm_frame(smcb, PINT_FRAME_CURRENT); + memset(s_op, 0, sizeof(PINT_server_op)); + s_op->op = BMI_UNEXPECTED_OP; + s_op->target_handle = PVFS_HANDLE_NULL; + s_op->target_fs_id = PVFS_FS_ID_NULL; + + /* Add an unexpected s_ops to the list */ + qlist_add_tail(&s_op->next, &posted_sop_list); + + ret = PINT_state_machine_start(smcb, &js); + if(ret == SM_ACTION_TERMINATE) + { + /* error posting unexpected */ + PINT_smcb_free(smcb); + return js.error_code; } return ret; } @@ -2040,10 +2056,13 @@ int server_state_machine_start( else if (ret == 0) { s_op->req = (struct PVFS_server_req *)s_op->decoded.buffer; + /* PINT_smcb_set_op returns 1 when the op's state machine has correctly + * been found and the first state has been set. + */ ret = PINT_smcb_set_op(smcb, s_op->req->op); s_op->op = s_op->req->op; PVFS_hint_add(&s_op->req->hints, PVFS_HINT_SERVER_ID_NAME, sizeof(uint32_t), &server_config.host_index); - PVFS_hint_add(&s_op->req->hints, PVFS_HINT_OP_ID_NAME, sizeof(uint32_t), &s_op->req->op); + PVFS_hint_add(&s_op->req->hints, PVFS_HINT_OP_ID_NAME, sizeof(uint32_t), &s_op->req->op); } else { @@ -2078,6 +2097,9 @@ int server_state_machine_start( if (!ret) { + /* ret will be zero when PINT_smcb_set_op cannot find the state machine associated + * with the request's op. + */ gossip_err("Error: server does not implement request type: %d\n", (int)s_op->req->op); PINT_decode_release(&(s_op->decoded),PINT_DECODE_REQ); diff --git a/src/server/pvfs2-server.h b/src/server/pvfs2-server.h index 6044026..7e3f4c3 100644 --- a/src/server/pvfs2-server.h +++ b/src/server/pvfs2-server.h @@ -768,7 +768,7 @@ extern struct PINT_state_machine_s pvfs2_call_msgpairarray_sm; struct server_configuration_s *get_server_config_struct(void); /* exported state machine resource reclamation function */ -int server_post_unexpected_recv(job_status_s *js_p); +int server_post_unexpected_recv(void); int server_state_machine_start( PINT_smcb *smcb, job_status_s *js_p); int server_state_machine_complete(PINT_smcb *smcb); int server_state_machine_terminate(PINT_smcb *smcb, job_status_s *js_p); diff --git a/src/server/set-attr.sm b/src/server/set-attr.sm index 5c7050e..4e28784 100644 --- a/src/server/set-attr.sm +++ b/src/server/set-attr.sm @@ -244,7 +244,7 @@ static PINT_sm_action setattr_setobj_attribs( dspace_a_p = &s_op->attr; a_p = &s_op->req->u.setattr.attr; - + a_p->cid = s_op->req->u.setattr.cid; dspace_a_p->cid = a_p->cid; @@ -364,7 +364,6 @@ static PINT_sm_action setattr_write_metafile_datafile_handles_if_required( /* we don't sync here since we're going to do it anyway in * write_metafile_distribution */ - ret = job_trove_keyval_write( s_op->req->u.setattr.fs_id, s_op->req->u.setattr.handle, &(s_op->key), &(s_op->val), diff --git a/src/server/statfs.sm b/src/server/statfs.sm index 62c174d..9e62503 100644 --- a/src/server/statfs.sm +++ b/src/server/statfs.sm @@ -12,6 +12,7 @@ #include #include "pvfs2-server.h" +#include "trove-handle-mgmt.h" #include "pint-cached-config.h" #ifdef HAVE_SYSINFO diff --git a/src/server/tree-communicate.sm b/src/server/tree-communicate.sm index fd4609f..f3da1d8 100644 --- a/src/server/tree-communicate.sm +++ b/src/server/tree-communicate.sm @@ -32,7 +32,7 @@ #include "pvfs2-internal.h" #include "extent-utils.h" -#define MAX_PARTITIONS 2 +//#define MAX_PARTITIONS 2 enum { @@ -246,13 +246,13 @@ static PINT_sm_action tree_communicate_partition_handles(struct PINT_smcb *smcb if (s_op->u.tree_communicate.handle_array_remote_count > 0) { - /* Decide how to divide the remote handles. If there are only a few (MAX_PARTITIONS or - fewer) then go ahead and send to each remaining server individually. */ - if (s_op->u.tree_communicate.handle_array_remote_count > MAX_PARTITIONS) + /* Decide how to divide the remote handles. If there are only a few (fewer than + tree_threshhold from the config file) then go ahead and send to each remaining server individually. */ + if (s_op->u.tree_communicate.handle_array_remote_count > server_config->tree_threshhold) { - num_partitions = MAX_PARTITIONS; + num_partitions = server_config->tree_width; num_files_per_server = s_op->u.tree_communicate.handle_array_remote_count / - MAX_PARTITIONS; + server_config->tree_width; if (num_partitions * num_files_per_server < s_op->u.tree_communicate.handle_array_remote_count) { num_files_per_server++; diff --git a/src/server/unexpected.sm b/src/server/unexpected.sm index 59b5311..f2b21f3 100644 --- a/src/server/unexpected.sm +++ b/src/server/unexpected.sm @@ -85,7 +85,7 @@ static PINT_sm_action unexpected_map( qlist_add_tail(&s_op->next, &inprogress_sop_list); /* start replacement unexpected recv */ - ret = server_post_unexpected_recv(js_p); + ret = server_post_unexpected_recv(); if (ret < 0) { /* TODO: do something here, the return value was @@ -93,7 +93,7 @@ static PINT_sm_action unexpected_map( * put something here to make it exit for the * moment. -Phil */ - gossip_lerr("Error: post unexpected failure when restarting.\n"); + PVFS_perror_gossip("pvfs2_unexpected_sm.unexpected_map: server_post_unexpected_recv() returned an error: ",ret); } /* restart as new request state machine */ diff --git a/test/configure b/test/configure index 6f01188..6dc7532 100755 --- a/test/configure +++ b/test/configure @@ -1,54 +1,25 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.59. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -58,43 +29,8 @@ else fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -108,19 +44,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -128,388 +63,157 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi -test \$exitcode = 0) || { (exit 1); exit 1; } + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + for as_base in sh bash ksh sh5; do + case $as_dir in /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || + chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -518,28 +222,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -548,27 +231,39 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH -exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` +exec 6>&1 + # # Initializations. # ac_default_prefix=/usr/local -ac_clean_files= ac_config_libobj_dir=. -LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -580,122 +275,42 @@ ac_unique_file="correctness/pts/pts.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include # include #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include +#else +# if HAVE_STDINT_H +# include +# endif #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -BUILD_ABSOLUTE_TOP -SRC_RELATIVE_TOP -SRC_ABSOLUTE_TOP -QUIET_COMPILE -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -HAVE_PERL -HAVE_FIND -HAVE_BISON -HAVE_FLEX -GREP -EGREP -INTELC -GNUC -PVFS2_SRC_RELATIVE_TOP -PVFS2_BUILD_RELATIVE_TOP -SERVERLIBS -PVFS2_TOP_PREFIX -MPICC -BUILD_MPI -MPI_INTELC -MPI_GNUC -DB_CFLAGS -DB_LIB -LIBOBJS -LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_ABSOLUTE_TOP SRC_RELATIVE_TOP SRC_ABSOLUTE_TOP QUIET_COMPILE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX EGREP INTELC GNUC PVFS2_SRC_RELATIVE_TOP PVFS2_BUILD_RELATIVE_TOP SERVERLIBS PVFS2_TOP_PREFIX MPICC BUILD_MPI MPI_INTELC MPI_GNUC DB_CFLAGS DB_LIB LIBOBJS LTLIBOBJS' ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - # Initialize some variables set by options. ac_init_help= @@ -722,48 +337,34 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' +datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +infodir='${prefix}/info' +mandir='${prefix}/man' ac_prev= -ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option + eval "$ac_prev=\$ac_option" ac_prev= continue fi - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -785,45 +386,33 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad) + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) datadir=$ac_optarg ;; - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -850,12 +439,6 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -880,16 +463,13 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -954,16 +534,6 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1016,20 +586,24 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -1060,7 +634,8 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) @@ -1080,19 +655,27 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - eval ac_val=\$$ac_var + eval ac_val=$`echo $ac_var` case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1119,76 +702,74 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then + if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP # # Report the --help message. @@ -1217,6 +798,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] +_ACEOF + + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -1234,22 +818,15 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF @@ -1288,95 +865,126 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF -ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. + ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d $ac_dir || continue ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } + fi + cd $ac_popdir done fi -test -n "$ac_init_help" && exit $ac_status +test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -configure -generated by GNU Autoconf 2.61 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit + exit 0 fi -cat >config.log <<_ACEOF +exec 5>config.log +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF -exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1395,7 +1003,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1409,7 +1017,6 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done -IFS=$as_save_IFS } >&5 @@ -1431,6 +1038,7 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= +ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1441,7 +1049,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *\'*) + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1463,7 +1071,9 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " ;; esac done @@ -1474,8 +1084,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1488,34 +1098,20 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done +{ (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) + esac; +} echo cat <<\_ASBOX @@ -1526,28 +1122,22 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## +## ------------- ## +## Output files. ## +## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi @@ -1559,24 +1149,26 @@ _ASBOX ## ----------- ## _ASBOX echo - cat confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status -' 0 + ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h # Predefined preprocessor variables. @@ -1607,17 +1199,14 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi -shift -for ac_site_file -do +for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1633,8 +1222,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; esac fi else @@ -1646,11 +1235,12 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1675,7 +1265,8 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1692,6 +1283,11 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (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 @@ -1708,45 +1304,35 @@ 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 -ac_config_headers="$ac_config_headers pvfs2-test-config.h" + + ac_config_headers="$ac_config_headers pvfs2-test-config.h" ac_aux_dir= -for ac_dir in maint "$srcdir"/maint; do - if test -f "$ac_dir/install-sh"; then +for ac_dir in maint $srcdir/maint; do + if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f "$ac_dir/install.sh"; then + elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f "$ac_dir/shtool"; then + elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint $srcdir/maint" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in maint $srcdir/maint" >&2;} { (exit 1); exit 1; }; } fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. USR_CFLAGS=$CFLAGS @@ -1762,13 +1348,13 @@ SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd` -# Check whether --enable-verbose-build was given. +# Check whether --enable-verbose-build or --disable-verbose-build was given. if test "${enable_verbose_build+set}" = set; then - enableval=$enable_verbose_build; QUIET_COMPILE=0 + enableval="$enable_verbose_build" + QUIET_COMPILE=0 else QUIET_COMPILE=1 -fi - +fi; @@ -1785,8 +1371,8 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1808,7 +1394,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1827,22 +1413,21 @@ case $as_dir/ in ;; esac done -IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL 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. + # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1860,8 +1445,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1874,34 +1459,32 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi 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; } + 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 "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +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 @@ -1914,51 +1497,36 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" 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_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; } + 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 - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi + CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1971,34 +1539,74 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done -IFS=$as_save_IFS fi 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; } + 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 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + fi if test -z "$CC"; then # 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; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2012,7 +1620,7 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2023,7 +1631,6 @@ do fi done done -IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2041,23 +1648,22 @@ fi 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; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe + for ac_prog in cl 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; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2070,38 +1676,36 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$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 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; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl.exe + for ac_prog in cl 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; } +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 @@ -2114,45 +1718,29 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$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_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; } + 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 - test -n "$ac_ct_CC" && break done - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi + CC=$ac_ct_CC fi fi @@ -2165,35 +1753,21 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 +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 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&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 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&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 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2218,77 +1792,47 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -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_default") 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext break;; * ) break;; esac done -test "$ac_cv_exeext" = no && ac_cv_exeext= - else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2300,21 +1844,19 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (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 + { (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 @@ -2333,27 +1875,22 @@ See \`config.log' for more details." >&2;} fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either +# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -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 +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +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); }; then @@ -2364,8 +1901,9 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext break;; * ) break;; esac @@ -2379,14 +1917,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2406,20 +1944,14 @@ main () } _ACEOF rm -f conftest.o conftest.obj -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>&5 +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 - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2437,12 +1969,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ 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; } +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_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2465,49 +1997,50 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +ac_compiler_gnu=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2523,118 +2056,38 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - 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 + (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=$? - 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 - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - 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 + (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=$? - 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 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=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.$ac_ext +ac_cv_prog_cc_g=no 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_c_werror_flag=$ac_save_c_werror_flag +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2650,12 +2103,12 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_c89=no + ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2689,17 +2142,12 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get + as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ + that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2714,100 +2162,248 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg + (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_prog_cc_stdc=$ac_arg +break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.$ac_objext done -rm -f conftest.$ac_ext +rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi -# 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; } ;; + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; *) - 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; } ;; + 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" ;; 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 - - -{ echo "$as_me:$LINENO: checking whether cc is gcc" >&5 -echo $ECHO_N "checking whether cc is gcc... $ECHO_C" >&6; } -if test "x$GCC" = "x"; then - { { echo "$as_me:$LINENO: error: pvfs2 currently requires gcc as the compiler" >&5 -echo "$as_me: error: pvfs2 currently requires gcc as the compiler" >&2;} - { (exit 1); exit 1; }; } -fi -CFLAGS=$USR_CFLAGS - -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:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +# 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 - # 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. */ +$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' +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:$LINENO: checking whether cc is gcc" >&5 +echo $ECHO_N "checking whether cc is gcc... $ECHO_C" >&6 +if test "x$GCC" = "x"; then + { { echo "$as_me:$LINENO: error: pvfs2 currently requires gcc as the compiler" >&5 +echo "$as_me: error: pvfs2 currently requires gcc as the compiler" >&2;} + { (exit 1); exit 1; }; } +fi +CFLAGS=$USR_CFLAGS + +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:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_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 @@ -2821,22 +2417,24 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 : else echo "$as_me: failed program was:" >&5 @@ -2845,10 +2443,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2858,22 +2455,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 # Broken: success on invalid input. continue else @@ -2884,7 +2483,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -2902,8 +2500,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2926,22 +2524,24 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 : else echo "$as_me: failed program was:" >&5 @@ -2950,10 +2550,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers + # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2963,22 +2562,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 # Broken: success on invalid input. continue else @@ -2989,7 +2590,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done @@ -3013,8 +2613,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # 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; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_HAVE_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3027,32 +2627,30 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_PERL="yes" 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_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" fi fi HAVE_PERL=$ac_cv_prog_HAVE_PERL if test -n "$HAVE_PERL"; then - { echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 -echo "${ECHO_T}$HAVE_PERL" >&6; } + echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 +echo "${ECHO_T}$HAVE_PERL" >&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 - # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_HAVE_FIND+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3065,32 +2663,30 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_FIND="yes" 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_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" fi fi HAVE_FIND=$ac_cv_prog_HAVE_FIND if test -n "$HAVE_FIND"; then - { echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 -echo "${ECHO_T}$HAVE_FIND" >&6; } + echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 +echo "${ECHO_T}$HAVE_FIND" >&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 - # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_HAVE_BISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3103,32 +2699,30 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_BISON="yes" 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_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" fi fi HAVE_BISON=$ac_cv_prog_HAVE_BISON if test -n "$HAVE_BISON"; then - { echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 -echo "${ECHO_T}$HAVE_BISON" >&6; } + echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 +echo "${ECHO_T}$HAVE_BISON" >&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 - # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_HAVE_FLEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3141,195 +2735,46 @@ 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 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_FLEX="yes" 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_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" fi fi HAVE_FLEX=$ac_cv_prog_HAVE_FLEX if test -n "$HAVE_FLEX"; then - { echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 -echo "${ECHO_T}$HAVE_FLEX" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - - - -{ 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 - 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 - -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 - + echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 +echo "${ECHO_T}$HAVE_FLEX" >&6 else - ac_cv_path_GREP=$GREP + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -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 "$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 $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 + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' 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" +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +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 @@ -3353,31 +2798,35 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no +ac_cv_header_stdc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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. @@ -3433,7 +2882,6 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3453,27 +2901,18 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - return 2; - return 0; + exit(2); + exit (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 +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' - { (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 + { (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 @@ -3486,14 +2925,12 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +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 @@ -3516,9 +2953,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.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 { 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 eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3532,35 +2969,38 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 - eval "$as_ac_Header=no" +eval "$as_ac_Header=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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 @@ -3575,19 +3015,18 @@ done for ac_header in openssl/evp.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -3598,37 +3037,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -3637,22 +3080,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -3660,10 +3105,9 @@ 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; } +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 @@ -3687,19 +3131,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -3715,19 +3165,18 @@ done for ac_header in openssl/crypto.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -3738,37 +3187,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -3777,22 +3230,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -3800,10 +3255,9 @@ 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; } +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 @@ -3827,19 +3281,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -3855,19 +3315,18 @@ done for ac_header in zlib.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -3878,37 +3337,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else + (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 +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; } +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; } +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 @@ -3917,22 +3380,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -3940,10 +3405,9 @@ 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; } +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 @@ -3967,19 +3431,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -3993,8 +3463,8 @@ done INTELC= GNUC= -{ echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 -echo $ECHO_N "checking whether cc is an Intel compiler... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 +echo $ECHO_N "checking whether cc is an Intel compiler... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4015,36 +3485,40 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 INTELC=1 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$INTELC = x ; then if test x$GCC = xyes ; then GNUC=1 @@ -4054,14 +3528,15 @@ fi -# Check whether --with-efence was given. +# Check whether --with-efence or --without-efence was given. if test "${with_efence+set}" = set; then - withval=$with_efence; if test x$withval != xyes ; then + withval="$with_efence" + if test x$withval != xyes ; then LDFLAGS="${LDFLAGS} -L$withval" fi -{ echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 -echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 +echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6 if test "${ac_cv_lib_efence_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4074,53 +3549,56 @@ 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. */ +/* 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 malloc (); int main () { -return malloc (); +malloc (); ; 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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_efence_malloc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_efence_malloc=no +ac_cv_lib_efence_malloc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +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_efence_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 +echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6 if test $ac_cv_lib_efence_malloc = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEFENCE 1 @@ -4131,20 +3609,19 @@ _ACEOF fi -fi - +fi; -# Check whether --with-zlib was given. +# Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then - withval=$with_zlib; if test x$withval != xyes ; then + withval="$with_zlib" + if test x$withval != xyes ; then LDFLAGS="${LDFLAGS} -L$withval" fi -fi - -{ echo "$as_me:$LINENO: checking for adler32 in -lz" >&5 -echo $ECHO_N "checking for adler32 in -lz... $ECHO_C" >&6; } +fi; +echo "$as_me:$LINENO: checking for adler32 in -lz" >&5 +echo $ECHO_N "checking for adler32 in -lz... $ECHO_C" >&6 if test "${ac_cv_lib_z_adler32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4157,53 +3634,56 @@ 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. */ +/* 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 adler32 (); int main () { -return adler32 (); +adler32 (); ; 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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_z_adler32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_adler32=no +ac_cv_lib_z_adler32=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +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_z_adler32" >&5 -echo "${ECHO_T}$ac_cv_lib_z_adler32" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_z_adler32" >&5 +echo "${ECHO_T}$ac_cv_lib_z_adler32" >&6 if test $ac_cv_lib_z_adler32 = yes; then LIBS="${LIBS} -lz" @@ -4217,9 +3697,10 @@ fi -# Check whether --with-mpi was given. +# Check whether --with-mpi or --without-mpi was given. if test "${with_mpi+set}" = set; then - withval=$with_mpi; if test x$withval = xyes; then + withval="$with_mpi" + if test x$withval = xyes; then { { echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5 echo "$as_me: error: --with-mpi must be given a pathname" >&2;} { (exit 1); exit 1; }; } @@ -4230,31 +3711,31 @@ echo "$as_me: error: --with-mpi must be given a pathname" >&2;} BUILD_MPI="1" fi -fi - +fi; -# Check whether --enable-thread-safety was given. +# Check whether --enable-thread-safety or --disable-thread-safety was given. if test "${enable_thread_safety+set}" = set; then - enableval=$enable_thread_safety; if test "x$enableval" = "xno" ; then + enableval="$enable_thread_safety" + if test "x$enableval" = "xno" ; then CFLAGS="$CFLAGS -D__GEN_NULL_LOCKING__" - { 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 else CFLAGS="$CFLAGS -D__GEN_POSIX_LOCKING__" - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -fi + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +fi; PVFS2_SRC_RELATIVE_TOP="${srcdir}/.." PVFS2_BUILD_RELATIVE_TOP=".." -# Check whether --with-pvfs2-src was given. +# Check whether --with-pvfs2-src or --without-pvfs2-src was given. if test "${with_pvfs2_src+set}" = set; then - withval=$with_pvfs2_src; if test x$withval = xyes; then + withval="$with_pvfs2_src" + if test x$withval = xyes; then { { echo "$as_me:$LINENO: error: --with-pvfs2-src must be given a pathname" >&5 echo "$as_me: error: --with-pvfs2-src must be given a pathname" >&2;} { (exit 1); exit 1; }; } @@ -4263,13 +3744,13 @@ echo "$as_me: error: --with-pvfs2-src must be given a pathname" >&2;} PVFS2_BUILD_RELATIVE_TOP="${withval}" fi -fi - +fi; -# Check whether --with-pvfs2-build was given. +# Check whether --with-pvfs2-build or --without-pvfs2-build was given. if test "${with_pvfs2_build+set}" = set; then - withval=$with_pvfs2_build; if test x$withval = xyes; then + withval="$with_pvfs2_build" + if test x$withval = xyes; then { { echo "$as_me:$LINENO: error: --with-pvfs2-build must be given a pathname" >&5 echo "$as_me: error: --with-pvfs2-build must be given a pathname" >&2;} { (exit 1); exit 1; }; } @@ -4277,14 +3758,14 @@ echo "$as_me: error: --with-pvfs2-build must be given a pathname" >&2;} PVFS2_BUILD_RELATIVE_TOP="${withval}" fi -fi - +fi; -# Check whether --enable-strict was given. +# Check whether --enable-strict or --disable-strict was given. if test "${enable_strict+set}" = set; then - enableval=$enable_strict; + enableval="$enable_strict" + if test "x$USR_CFLAGS_SET" = "xno"; then CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast" fi @@ -4295,25 +3776,24 @@ if test "x$USR_CFLAGS_SET" = "xno"; then CFLAGS="$CFLAGS -O2" fi -fi - +fi; LDFLAGS="${LDFLAGS} -L${PVFS2_BUILD_RELATIVE_TOP}/lib" CFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}" CPPFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}" if test "${ac_cv_header_pvfs2_config_h+set}" = set; then - { echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 -echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 +echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6 if test "${ac_cv_header_pvfs2_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6 else # Is the header compilable? -{ echo "$as_me:$LINENO: checking pvfs2-config.h usability" >&5 -echo $ECHO_N "checking pvfs2-config.h usability... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking pvfs2-config.h usability" >&5 +echo $ECHO_N "checking pvfs2-config.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4324,37 +3804,41 @@ $ac_includes_default #include _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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 pvfs2-config.h presence" >&5 -echo $ECHO_N "checking pvfs2-config.h presence... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking pvfs2-config.h presence" >&5 +echo $ECHO_N "checking pvfs2-config.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4363,22 +3847,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -4386,10 +3872,9 @@ 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; } +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 @@ -4413,18 +3898,25 @@ echo "$as_me: WARNING: pvfs2-config.h: section \"Present But Cannot Be Compi echo "$as_me: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: pvfs2-config.h: 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 pvfs2-config.h" >&5 -echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 +echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6 if test "${ac_cv_header_pvfs2_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_pvfs2_config_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6 fi if test $ac_cv_header_pvfs2_config_h = yes; then @@ -4445,8 +3937,8 @@ PVFS2_TOP_PREFIX=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-confi -{ echo "$as_me:$LINENO: checking for PVFS_sys_create in -lpvfs2" >&5 -echo $ECHO_N "checking for PVFS_sys_create in -lpvfs2... $ECHO_C" >&6; } +echo "$as_me:$LINENO: checking for PVFS_sys_create in -lpvfs2" >&5 +echo $ECHO_N "checking for PVFS_sys_create in -lpvfs2... $ECHO_C" >&6 if test "${ac_cv_lib_pvfs2_PVFS_sys_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4459,53 +3951,56 @@ 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. */ +/* 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 PVFS_sys_create (); int main () { -return PVFS_sys_create (); +PVFS_sys_create (); ; 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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_pvfs2_PVFS_sys_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pvfs2_PVFS_sys_create=no +ac_cv_lib_pvfs2_PVFS_sys_create=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +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_pvfs2_PVFS_sys_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pvfs2_PVFS_sys_create" >&6; } +echo "$as_me:$LINENO: result: $ac_cv_lib_pvfs2_PVFS_sys_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pvfs2_PVFS_sys_create" >&6 if test $ac_cv_lib_pvfs2_PVFS_sys_create = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPVFS2 1 @@ -4524,8 +4019,8 @@ fi MPI_INTELC= MPI_GNUC= if test x$BUILD_MPI = x1; then - { echo "$as_me:$LINENO: checking whether the mpicc compiler works" >&5 -echo $ECHO_N "checking whether the mpicc compiler works... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether the mpicc compiler works" >&5 +echo $ECHO_N "checking whether the mpicc compiler works... $ECHO_C" >&6 saveCC="$CC" CC="$MPICC" cat >conftest.$ac_ext <<_ACEOF @@ -4544,39 +4039,43 @@ int ret = MPI_Init(0, (void*)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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 { { echo "$as_me:$LINENO: error: $CC doesn't appear to be a valid MPI compiler" >&5 echo "$as_me: error: $CC doesn't appear to be a valid MPI compiler" >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: checking whether mpicc is an Intel compiler" >&5 -echo $ECHO_N "checking whether mpicc is an Intel compiler... $ECHO_C" >&6; } +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: checking whether mpicc is an Intel compiler" >&5 +echo $ECHO_N "checking whether mpicc is an Intel compiler... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4597,39 +4096,43 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MPI_INTELC=1 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$MPI_INTELC = x; then - { echo "$as_me:$LINENO: checking whether mpicc is a GNU compiler" >&5 -echo $ECHO_N "checking whether mpicc is a GNU compiler... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking whether mpicc is a GNU compiler" >&5 +echo $ECHO_N "checking whether mpicc is a GNU compiler... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4650,36 +4153,40 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 MPI_GNUC=1 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$saveCC" @@ -4689,14 +4196,15 @@ fi -# Check whether --with-db was given. +# Check whether --with-db or --without-db was given. if test "${with_db+set}" = set; then - withval=$with_db; + withval="$with_db" + dbpath=${withval} DB_LDFLAGS= - { echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for db library" >&5 +echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldlibs=$LIBS lib=notfound @@ -4707,32 +4215,35 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6; } #include "$dbpath/include/$dbheader/db.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 DB_CFLAGS="-I$dbpath/include/$dbheader/" break 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then @@ -4740,35 +4251,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include "$dbpath/include/db.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 DB_CFLAGS="-I$dbpath/include/" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. +{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -4793,32 +4308,34 @@ DB *dbp; db_create(&dbp, NULL, 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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 lib=db 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 \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags @@ -4842,32 +4359,34 @@ DB *dbp; db_create(&dbp, NULL, 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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 break 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 \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -4878,15 +4397,15 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - { echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6; } + echo "$as_me:$LINENO: result: $lib" >&5 +echo "${ECHO_T}$lib" >&6 fi - { echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -4918,24 +4437,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 @@ -4946,16 +4470,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_dbenv_parameter_to_db_error_callback=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - { echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4985,43 +4508,47 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + (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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - { echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5048,24 +4575,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -5076,17 +4608,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_db_stat_malloc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - { echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5112,24 +4643,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -5140,17 +4676,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_txnid_param_to_stat=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5180,24 +4715,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 @@ -5207,14 +4747,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5235,24 +4774,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 @@ -5262,14 +4806,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5291,24 +4834,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 @@ -5318,14 +4866,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5350,24 +4897,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 @@ -5377,12 +4929,72 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +echo $ECHO_N "checking Berkeley DB version... $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 + +int +main () +{ + + #if DB_VERSION_MAJOR < 4 || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ + DB_VERSION_PATCH < 30) + #error "Recommend version of Berkeley DB at least 4.8.30" + #endif + + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_DB_OLD=0 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + HAVE_DB_OLD=1 +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" else @@ -5390,8 +5002,8 @@ else dbpath="" DB_LDFLAGS= - { echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for db library" >&5 +echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldlibs=$LIBS lib=notfound @@ -5402,32 +5014,35 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6; } #include "$dbpath/include/$dbheader/db.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 DB_CFLAGS="-I$dbpath/include/$dbheader/" break 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then @@ -5435,35 +5050,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #include "$dbpath/include/db.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 DB_CFLAGS="-I$dbpath/include/" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. +{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -5488,32 +5107,34 @@ DB *dbp; db_create(&dbp, NULL, 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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 lib=db 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 \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags @@ -5537,32 +5158,34 @@ DB *dbp; db_create(&dbp, NULL, 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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (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 break 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 \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -5573,15 +5196,15 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - { echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6; } + echo "$as_me:$LINENO: result: $lib" >&5 +echo "${ECHO_T}$lib" >&6 fi - { echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -5613,25 +5236,30 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF @@ -5641,16 +5269,15 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_dbenv_parameter_to_db_error_callback=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - { echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5680,43 +5307,47 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + (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 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - { echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5743,24 +5374,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -5771,17 +5407,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_db_stat_malloc=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - { echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5807,24 +5442,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -5835,17 +5475,16 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 have_txnid_param_to_stat=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5875,24 +5514,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 @@ -5902,14 +5546,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5930,24 +5573,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 @@ -5957,14 +5605,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5986,24 +5633,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 @@ -6013,14 +5665,13 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6045,24 +5696,29 @@ main () } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 @@ -6072,27 +5728,87 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { 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 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +echo $ECHO_N "checking Berkeley DB version... $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. */ -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + #include - CFLAGS="$oldcflags" +int +main () +{ + + #if DB_VERSION_MAJOR < 4 || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 8) || \ + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && \ + DB_VERSION_PATCH < 30) + #error "Recommend version of Berkeley DB at least 4.8.30" + #endif + + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_DB_OLD=0 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + HAVE_DB_OLD=1 fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$oldcflags" +fi; -# Check whether --with-openssl was given. +# Check whether --with-openssl or --without-openssl was given. if test "${with_openssl+set}" = set; then - withval=$with_openssl; + withval="$with_openssl" + opensslpath=${withval} if test "x${withval}" != "xno"; then - { echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for openssl library" >&5 +echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 if test "x${opensslpath}" != "x"; then CFLAGS="${CFLAGS} -I${opensslpath}/include" @@ -6105,33 +5821,37 @@ echo $ECHO_N "checking for openssl library... $ECHO_C" >&6; } #include "openssl/bio.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 - { { echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 +{ { echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6149,35 +5869,38 @@ BIO * b; } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: could not find openssl libs" >&5 +{ { echo "$as_me:$LINENO: error: could not find openssl libs" >&5 echo "$as_me: error: could not find openssl libs" >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -6190,19 +5913,18 @@ _ACEOF for ac_header in openssl/evp.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -6213,37 +5935,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -6252,22 +5978,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -6275,10 +6003,9 @@ 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; } +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 @@ -6302,19 +6029,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -6330,19 +6063,18 @@ done for ac_header in openssl/crypto.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -6353,37 +6085,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -6392,22 +6128,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -6415,10 +6153,9 @@ 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; } +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 @@ -6442,19 +6179,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -6466,118 +6209,22 @@ fi done - fi - -else - - { echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6; } - TMPLIBS=${LIBS} - LIBS="$LIBS -lcrypto -lssl" - - cat >conftest.$ac_ext <<_ACEOF -#include "openssl/bio.h" -_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 - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} -fi - -rm -f core 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. */ -#include "openssl/bio.h" -int -main () -{ -BIO * b; - ; - 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 - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -cat >>confdefs.h <<\_ACEOF -#define WITH_OPENSSL 1 -_ACEOF - - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} - LIBS=${TMPLIBS} - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -for ac_header in openssl/evp.h +for ac_header in openssl/sha.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -6588,37 +6235,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -6627,22 +6278,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -6650,10 +6303,9 @@ 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; } +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 @@ -6677,19 +6329,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -6701,88 +6359,195 @@ fi done + fi -for ac_header in openssl/crypto.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> + + echo "$as_me:$LINENO: checking for openssl library" >&5 +echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 + TMPLIBS=${LIBS} + LIBS="$LIBS -lcrypto -lssl" + + cat >conftest.$ac_ext <<_ACEOF +#include "openssl/bio.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + (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 - ac_header_compiler=no +{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +echo "$as_me: WARNING: No openssl headers found." >&2;} fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -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 + 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 +#include "openssl/bio.h" +int +main () +{ +BIO * b; + ; + 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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define WITH_OPENSSL 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +echo "$as_me: WARNING: No openssl headers found." >&2;} + LIBS=${TMPLIBS} + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +for ac_header in openssl/evp.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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -6790,10 +6555,9 @@ 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; } +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 @@ -6817,19 +6581,175 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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_header in openssl/crypto.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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -6842,20 +6762,170 @@ fi done +for ac_header in openssl/sha.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 + + +fi; -# Check whether --with-libaio was given. + +# Check whether --with-libaio or --without-libaio was given. if test "${with_libaio+set}" = set; then - withval=$with_libaio; + withval="$with_libaio" + libaiopath=${withval} if test "x${withval}" != "xno"; then - { echo "$as_me:$LINENO: checking for libaio library" >&5 -echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for libaio library" >&5 +echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 if test "x${libaiopath}" != "x"; then CFLAGS="${CFLAGS} -I${libaiopath}/include" @@ -6868,33 +6938,37 @@ echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; } #include "libaio.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 - { { echo "$as_me:$LINENO: error: Invalid libaio path specified. No libaio.h found." >&5 +{ { echo "$as_me:$LINENO: error: Invalid libaio path specified. No libaio.h found." >&5 echo "$as_me: error: Invalid libaio path specified. No libaio.h found." >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6912,35 +6986,38 @@ io_context_t * b; } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: could not find libaio libs" >&5 +{ { echo "$as_me:$LINENO: error: could not find libaio libs" >&5 echo "$as_me: error: could not find libaio libs" >&2;} { (exit 1); exit 1; }; } fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -6953,19 +7030,18 @@ _ACEOF for ac_header in libaio.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -6976,37 +7052,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -7015,22 +7095,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -7038,10 +7120,9 @@ 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; } +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 @@ -7065,19 +7146,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -7093,8 +7180,8 @@ done else - { echo "$as_me:$LINENO: checking for libaio library" >&5 -echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; } + echo "$as_me:$LINENO: checking for libaio library" >&5 +echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 TMPLIBS=${LIBS} LIBS="$LIBS -laio" @@ -7102,32 +7189,36 @@ echo $ECHO_N "checking for libaio library... $ECHO_C" >&6; } #include "libaio.h" _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 - { echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 +{ echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 echo "$as_me: WARNING: No libaio headers found." >&2;} fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7145,25 +7236,29 @@ io_context_t * b; } _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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + (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 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define WITH_AIO 1 @@ -7180,27 +7275,25 @@ echo "$as_me: WARNING: No libaio headers found." >&2;} LIBS=${TMPLIBS} fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext for ac_header in libaio.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 +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 -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +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; } +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 @@ -7211,37 +7304,41 @@ $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 +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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (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 +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; } +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; } +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 @@ -7250,22 +7347,24 @@ 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 +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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (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 @@ -7273,10 +7372,9 @@ 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; } +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 @@ -7300,19 +7398,25 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ 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 { 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 eval "test \"\${$as_ac_Header+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; } +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 @@ -7326,15 +7430,13 @@ done -fi - +fi; for d in common io client correctness/pts kernel ; do install -d $d; done -ac_config_files="$ac_config_files Makefile io/trove/module.mk io/buffer/module.mk common/quicklist/module.mk common/id-generator/module.mk common/gossip/module.mk common/gen-locks/module.mk common/misc/module.mk io/bmi/module.mk io/description/module.mk io/flow/module.mk io/job/module.mk io/dev/module.mk client/sysint/module.mk client/mpi-io/module.mk client/vfs/module.mk proto/module.mk server/module.mk server/request-scheduler/module.mk correctness/pts/module.mk correctness/module.mk common/pav/configfile.sample kernel/linux-2.6/module.mk maint/mpi-depend.sh shared/module.mk perfbase/benchmarks/module.mk posix/module.mk" - + ac_config_files="$ac_config_files Makefile io/trove/module.mk io/buffer/module.mk common/quicklist/module.mk common/id-generator/module.mk common/gossip/module.mk common/gen-locks/module.mk common/misc/module.mk io/bmi/module.mk io/description/module.mk io/flow/module.mk io/job/module.mk io/dev/module.mk client/sysint/module.mk client/mpi-io/module.mk client/vfs/module.mk proto/module.mk server/module.mk server/request-scheduler/module.mk correctness/pts/module.mk correctness/module.mk common/pav/configfile.sample kernel/linux-2.6/module.mk maint/mpi-depend.sh shared/module.mk perfbase/benchmarks/module.mk posix/module.mk" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -7353,58 +7455,39 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - +{ (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( + ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; - esac | - sort -) | + esac; +} | sed ' - /^ac_cv_env_/b end t clear - :clear + : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + echo "not updating unwritable cache $cache_file" fi fi rm -f confcache @@ -7413,18 +7496,32 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -7455,91 +7552,28 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + as_unset=false fi + # Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -7553,19 +7587,18 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -7573,120 +7606,159 @@ fi # Name of the executable. -as_me=`$as_basename -- "$0" || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -# CDPATH. -$as_unset CDPATH + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop - s/-\n.*// + s,-$,, + s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno # Exit status is that of the last command. exit } -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -7695,28 +7767,7 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -7725,14 +7776,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + exec 6>&1 -# Save the log message, to keep $[0] and so on meaningful, and to +# Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7740,19 +7808,30 @@ generated by GNU Autoconf 2.61. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi -_ACEOF +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi cat >>$CONFIG_STATUS <<\_ACEOF + ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -7760,7 +7839,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -7776,21 +7855,19 @@ Configuration headers: $config_headers Report bugs to ." - _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' +srcdir=$srcdir +INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -7801,24 +7878,39 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; - *) + -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; esac case $ac_option in # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -7828,24 +7920,18 @@ do $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; + *) ac_config_targets="$ac_config_targets $1" ;; esac shift @@ -7861,69 +7947,55 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# Handling of arguments. + + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do - case $ac_config_target in - "pvfs2-test-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-test-config.h" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES io/trove/module.mk" ;; - "io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES io/buffer/module.mk" ;; - "common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES common/quicklist/module.mk" ;; - "common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES common/id-generator/module.mk" ;; - "common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES common/gossip/module.mk" ;; - "common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES common/gen-locks/module.mk" ;; - "common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES common/misc/module.mk" ;; - "io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES io/bmi/module.mk" ;; - "io/description/module.mk") CONFIG_FILES="$CONFIG_FILES io/description/module.mk" ;; - "io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES io/flow/module.mk" ;; - "io/job/module.mk") CONFIG_FILES="$CONFIG_FILES io/job/module.mk" ;; - "io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES io/dev/module.mk" ;; - "client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES client/sysint/module.mk" ;; - "client/mpi-io/module.mk") CONFIG_FILES="$CONFIG_FILES client/mpi-io/module.mk" ;; - "client/vfs/module.mk") CONFIG_FILES="$CONFIG_FILES client/vfs/module.mk" ;; - "proto/module.mk") CONFIG_FILES="$CONFIG_FILES proto/module.mk" ;; - "server/module.mk") CONFIG_FILES="$CONFIG_FILES server/module.mk" ;; - "server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES server/request-scheduler/module.mk" ;; - "correctness/pts/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/pts/module.mk" ;; - "correctness/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/module.mk" ;; - "common/pav/configfile.sample") CONFIG_FILES="$CONFIG_FILES common/pav/configfile.sample" ;; - "kernel/linux-2.6/module.mk") CONFIG_FILES="$CONFIG_FILES kernel/linux-2.6/module.mk" ;; - "maint/mpi-depend.sh") CONFIG_FILES="$CONFIG_FILES maint/mpi-depend.sh" ;; - "shared/module.mk") CONFIG_FILES="$CONFIG_FILES shared/module.mk" ;; - "perfbase/benchmarks/module.mk") CONFIG_FILES="$CONFIG_FILES perfbase/benchmarks/module.mk" ;; - "posix/module.mk") CONFIG_FILES="$CONFIG_FILES posix/module.mk" ;; - + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/trove/module.mk" ;; + "io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/buffer/module.mk" ;; + "common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/quicklist/module.mk" ;; + "common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/id-generator/module.mk" ;; + "common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/gossip/module.mk" ;; + "common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/gen-locks/module.mk" ;; + "common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/misc/module.mk" ;; + "io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/bmi/module.mk" ;; + "io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/description/module.mk" ;; + "io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/flow/module.mk" ;; + "io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/job/module.mk" ;; + "io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/dev/module.mk" ;; + "client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/sysint/module.mk" ;; + "client/mpi-io/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/mpi-io/module.mk" ;; + "client/vfs/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/vfs/module.mk" ;; + "proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES proto/module.mk" ;; + "server/module.mk" ) CONFIG_FILES="$CONFIG_FILES server/module.mk" ;; + "server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES server/request-scheduler/module.mk" ;; + "correctness/pts/module.mk" ) CONFIG_FILES="$CONFIG_FILES correctness/pts/module.mk" ;; + "correctness/module.mk" ) CONFIG_FILES="$CONFIG_FILES correctness/module.mk" ;; + "common/pav/configfile.sample" ) CONFIG_FILES="$CONFIG_FILES common/pav/configfile.sample" ;; + "kernel/linux-2.6/module.mk" ) CONFIG_FILES="$CONFIG_FILES kernel/linux-2.6/module.mk" ;; + "maint/mpi-depend.sh" ) CONFIG_FILES="$CONFIG_FILES maint/mpi-depend.sh" ;; + "shared/module.mk" ) CONFIG_FILES="$CONFIG_FILES shared/module.mk" ;; + "perfbase/benchmarks/module.mk" ) CONFIG_FILES="$CONFIG_FILES perfbase/benchmarks/module.mk" ;; + "posix/module.mk" ) CONFIG_FILES="$CONFIG_FILES posix/module.mk" ;; + "pvfs2-test-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-test-config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done - # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -7934,386 +8006,318 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, +# simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# Create a temporary directory, and hook for its removal unless debugging. $debug || { - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } + # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + # -# Set up the sed scripts for CONFIG_FILES section. +# CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -BUILD_ABSOLUTE_TOP!$BUILD_ABSOLUTE_TOP$ac_delim -SRC_RELATIVE_TOP!$SRC_RELATIVE_TOP$ac_delim -SRC_ABSOLUTE_TOP!$SRC_ABSOLUTE_TOP$ac_delim -QUIET_COMPILE!$QUIET_COMPILE$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -CPP!$CPP$ac_delim -HAVE_PERL!$HAVE_PERL$ac_delim -HAVE_FIND!$HAVE_FIND$ac_delim -HAVE_BISON!$HAVE_BISON$ac_delim -HAVE_FLEX!$HAVE_FLEX$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -INTELC!$INTELC$ac_delim -GNUC!$GNUC$ac_delim -PVFS2_SRC_RELATIVE_TOP!$PVFS2_SRC_RELATIVE_TOP$ac_delim -PVFS2_BUILD_RELATIVE_TOP!$PVFS2_BUILD_RELATIVE_TOP$ac_delim -SERVERLIBS!$SERVERLIBS$ac_delim -PVFS2_TOP_PREFIX!$PVFS2_TOP_PREFIX$ac_delim -MPICC!$MPICC$ac_delim -BUILD_MPI!$BUILD_MPI$ac_delim -MPI_INTELC!$MPI_INTELC$ac_delim -MPI_GNUC!$MPI_GNUC$ac_delim -DB_CFLAGS!$DB_CFLAGS$ac_delim -DB_LIB!$DB_LIB$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@BUILD_ABSOLUTE_TOP@,$BUILD_ABSOLUTE_TOP,;t t +s,@SRC_RELATIVE_TOP@,$SRC_RELATIVE_TOP,;t t +s,@SRC_ABSOLUTE_TOP@,$SRC_ABSOLUTE_TOP,;t t +s,@QUIET_COMPILE@,$QUIET_COMPILE,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@HAVE_PERL@,$HAVE_PERL,;t t +s,@HAVE_FIND@,$HAVE_FIND,;t t +s,@HAVE_BISON@,$HAVE_BISON,;t t +s,@HAVE_FLEX@,$HAVE_FLEX,;t t +s,@EGREP@,$EGREP,;t t +s,@INTELC@,$INTELC,;t t +s,@GNUC@,$GNUC,;t t +s,@PVFS2_SRC_RELATIVE_TOP@,$PVFS2_SRC_RELATIVE_TOP,;t t +s,@PVFS2_BUILD_RELATIVE_TOP@,$PVFS2_BUILD_RELATIVE_TOP,;t t +s,@SERVERLIBS@,$SERVERLIBS,;t t +s,@PVFS2_TOP_PREFIX@,$PVFS2_TOP_PREFIX,;t t +s,@MPICC@,$MPICC,;t t +s,@BUILD_MPI@,$BUILD_MPI,;t t +s,@MPI_INTELC@,$MPI_INTELC,;t t +s,@MPI_GNUC@,$MPI_GNUC,;t t +s,@DB_CFLAGS@,$DB_CFLAGS,;t t +s,@DB_LIB@,$DB_LIB,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +fi # test -n "$CONFIG_FILES" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof _ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ac_dir=`$as_dirname -- "$ac_file" || + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } + ac_builddir=. -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) +if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi case $srcdir in - .) # We are building in place. + .) # No --srcdir option. We are building in place. ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac - case $ac_mode in - :F) - # - # CONFIG_FILE - # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } _ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -8321,137 +8325,252 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines conftest.tail +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs -echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + rm -f $ac_file - mv "$tmp/config.h" $ac_file + mv $tmp/config.h $ac_file fi else - echo "/* $configure_input */" - cat "$ac_result" + cat $tmp/config.h + rm -f $tmp/config.h fi - rm -f "$tmp/out12" - ;; - - - esac - -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF diff --git a/test/pvfs2-test-config.h.in b/test/pvfs2-test-config.h.in index 9a20645..bec252f 100644 --- a/test/pvfs2-test-config.h.in +++ b/test/pvfs2-test-config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_EVP_H +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENSSL_SHA_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H diff --git a/test/server/showconfig.c b/test/server/showconfig.c index 0ab3b87..4b2b8dc 100644 --- a/test/server/showconfig.c +++ b/test/server/showconfig.c @@ -31,7 +31,7 @@ int main(int argc, char **argv) gossip_enable_stderr(); memset(&serverconfig,0,sizeof(serverconfig)); - if (PINT_parse_config(&serverconfig, argv[1], argv[2])) + if (PINT_parse_config(&serverconfig, argv[1], argv[2], 1)) { printf("Failed to parse config files\n"); return 1;