summaryrefslogtreecommitdiff
path: root/bdb/dist/aclocal
diff options
context:
space:
mode:
authorunknown <tim@threads.polyesthetic.msg>2001-03-04 19:42:05 -0500
committerunknown <tim@threads.polyesthetic.msg>2001-03-04 19:42:05 -0500
commitec6ae091617bdfdca9e65e8d3e65b950d234f676 (patch)
tree9dd732e08dba156ee3d7635caedc0dc3107ecac6 /bdb/dist/aclocal
parent87d70fb598105b64b538ff6b81eef9da626255b1 (diff)
downloadmariadb-git-ec6ae091617bdfdca9e65e8d3e65b950d234f676.tar.gz
Import changeset
Diffstat (limited to 'bdb/dist/aclocal')
-rw-r--r--bdb/dist/aclocal/mutex.m4395
-rw-r--r--bdb/dist/aclocal/options.m4121
-rw-r--r--bdb/dist/aclocal/programs.m448
-rw-r--r--bdb/dist/aclocal/tcl.m4126
-rw-r--r--bdb/dist/aclocal/types.m4139
5 files changed, 829 insertions, 0 deletions
diff --git a/bdb/dist/aclocal/mutex.m4 b/bdb/dist/aclocal/mutex.m4
new file mode 100644
index 00000000000..5f16ee0e114
--- /dev/null
+++ b/bdb/dist/aclocal/mutex.m4
@@ -0,0 +1,395 @@
+dnl $Id: mutex.m4,v 11.20 2000/12/20 22:16:56 bostic Exp $
+
+dnl Figure out mutexes for this compiler/architecture.
+AC_DEFUN(AM_DEFINE_MUTEXES, [
+
+AC_CACHE_CHECK([for mutexes], db_cv_mutex, [dnl
+db_cv_mutex=no
+
+orig_libs=$LIBS
+
+dnl User-specified POSIX mutexes.
+dnl
+dnl Assume that -lpthread exists when the user specifies POSIX mutexes. (I
+dnl only expect this option to be used on Solaris, which has -lpthread.)
+if test "$db_cv_posixmutexes" = yes; then
+ db_cv_mutex="posix_only"
+fi
+
+dnl User-specified UI mutexes.
+dnl
+dnl Assume that -lthread exists when the user specifies UI mutexes. (I only
+dnl expect this option to be used on Solaris, which has -lthread.)
+if test "$db_cv_uimutexes" = yes; then
+ db_cv_mutex="ui_only"
+fi
+
+dnl LWP threads: _lwp_XXX
+dnl
+dnl Test for LWP threads before testing for UI/POSIX threads, we prefer them
+dnl on Solaris. There are two reasons: the Solaris C library has UI/POSIX
+dnl interface stubs, but they're broken, configuring them for inter-process
+dnl mutexes doesn't return an error, but it doesn't work either. Second,
+dnl there's a bug in SunOS 5.7 where applications get pwrite, not pwrite64,
+dnl if they load the C library before the appropriate threads library, e.g.,
+dnl tclsh using dlopen to load the DB library. Anyway, by using LWP threads
+dnl we avoid answering lots of user questions, not to mention the bugs.
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([
+#include <synch.h>
+main(){
+ static lwp_mutex_t mi = SHAREDMUTEX;
+ static lwp_cond_t ci = SHAREDCV;
+ lwp_mutex_t mutex = mi;
+ lwp_cond_t cond = ci;
+ exit (
+ _lwp_mutex_lock(&mutex) ||
+ _lwp_mutex_unlock(&mutex));
+}], [db_cv_mutex="Solaris/lwp"])
+fi
+
+dnl UI threads: thr_XXX
+dnl
+dnl Try with and without the -lthread library.
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "ui_only"; then
+LIBS="-lthread $LIBS"
+AC_TRY_RUN([
+#include <thread.h>
+#include <synch.h>
+main(){
+ mutex_t mutex;
+ cond_t cond;
+ int type = USYNC_PROCESS;
+ exit (
+ mutex_init(&mutex, type, NULL) ||
+ cond_init(&cond, type, NULL) ||
+ mutex_lock(&mutex) ||
+ mutex_unlock(&mutex));
+}], [db_cv_mutex="UI/threads/library"])
+LIBS="$orig_libs"
+fi
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "ui_only"; then
+AC_TRY_RUN([
+#include <thread.h>
+#include <synch.h>
+main(){
+ mutex_t mutex;
+ cond_t cond;
+ int type = USYNC_PROCESS;
+ exit (
+ mutex_init(&mutex, type, NULL) ||
+ cond_init(&cond, type, NULL) ||
+ mutex_lock(&mutex) ||
+ mutex_unlock(&mutex));
+}], [db_cv_mutex="UI/threads"])
+fi
+if test "$db_cv_mutex" = "ui_only"; then
+ AC_MSG_ERROR([unable to find UI mutex interfaces])
+fi
+
+
+dnl POSIX.1 pthreads: pthread_XXX
+dnl
+dnl Try with and without the -lpthread library.
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "posix_only"; then
+AC_TRY_RUN([
+#include <pthread.h>
+main(){
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+ pthread_mutexattr_t mutexattr;
+ exit (
+ pthread_condattr_init(&condattr) ||
+ pthread_condattr_setpshared(&condattr, PTHREAD_PROCESS_SHARED) ||
+ pthread_mutexattr_init(&mutexattr) ||
+ pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED) ||
+ pthread_cond_init(&cond, &condattr) ||
+ pthread_mutex_init(&mutex, &mutexattr) ||
+ pthread_mutex_lock(&mutex) ||
+ pthread_mutex_unlock(&mutex) ||
+ pthread_mutex_destroy(&mutex) ||
+ pthread_cond_destroy(&cond) ||
+ pthread_condattr_destroy(&condattr) ||
+ pthread_mutexattr_destroy(&mutexattr));
+}], [db_cv_mutex="POSIX/pthreads"])
+fi
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "posix_only"; then
+LIBS="-lpthread $LIBS"
+AC_TRY_RUN([
+#include <pthread.h>
+main(){
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+ pthread_mutexattr_t mutexattr;
+ exit (
+ pthread_condattr_init(&condattr) ||
+ pthread_condattr_setpshared(&condattr, PTHREAD_PROCESS_SHARED) ||
+ pthread_mutexattr_init(&mutexattr) ||
+ pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED) ||
+ pthread_cond_init(&cond, &condattr) ||
+ pthread_mutex_init(&mutex, &mutexattr) ||
+ pthread_mutex_lock(&mutex) ||
+ pthread_mutex_unlock(&mutex) ||
+ pthread_mutex_destroy(&mutex) ||
+ pthread_cond_destroy(&cond) ||
+ pthread_condattr_destroy(&condattr) ||
+ pthread_mutexattr_destroy(&mutexattr));
+}], [db_cv_mutex="POSIX/pthreads/library"])
+LIBS="$orig_libs"
+fi
+if test "$db_cv_mutex" = "posix_only"; then
+ AC_MSG_ERROR([unable to find POSIX mutex interfaces])
+fi
+
+dnl msemaphore: HPPA only
+dnl Try HPPA before general msem test, it needs special alignment.
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([
+#include <sys/mman.h>
+main(){
+#if defined(__hppa)
+ typedef msemaphore tsl_t;
+ msemaphore x;
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+ exit(0);
+#else
+ exit(1);
+#endif
+}], [db_cv_mutex="HP/msem_init"])
+fi
+
+dnl msemaphore: AIX, OSF/1
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/mman.h>;
+main(){
+ typedef msemaphore tsl_t;
+ msemaphore x;
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+ exit(0);
+}], [db_cv_mutex="UNIX/msem_init"])
+fi
+
+dnl ReliantUNIX
+if test "$db_cv_mutex" = no; then
+LIBS="$LIBS -lmproc"
+AC_TRY_LINK([#include <ulocks.h>],
+[typedef spinlock_t tsl_t;
+spinlock_t x; initspin(&x, 1); cspinlock(&x); spinunlock(&x);],
+[db_cv_mutex="ReliantUNIX/initspin"])
+LIBS="$orig_libs"
+fi
+
+dnl SCO: UnixWare has threads in libthread, but OpenServer doesn't.
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([
+main(){
+#if defined(__USLC__)
+ exit(0);
+#endif
+ exit(1);
+}], [db_cv_mutex="SCO/x86/cc-assembly"])
+fi
+
+dnl abilock_t: SGI
+if test "$db_cv_mutex" = no; then
+AC_TRY_LINK([#include <abi_mutex.h>],
+[typedef abilock_t tsl_t;
+abilock_t x; init_lock(&x); acquire_lock(&x); release_lock(&x);],
+[db_cv_mutex="SGI/init_lock"])
+fi
+
+dnl sema_t: Solaris
+dnl The sema_XXX calls do not work on Solaris 5.5. I see no reason to ever
+dnl turn this test on, unless we find some other platform that uses the old
+dnl POSIX.1 interfaces. (I plan to move directly to pthreads on Solaris.)
+if test "$db_cv_mutex" = DOESNT_WORK; then
+AC_TRY_LINK([#include <synch.h>],
+[typedef sema_t tsl_t;
+ sema_t x;
+ sema_init(&x, 1, USYNC_PROCESS, NULL); sema_wait(&x); sema_post(&x);],
+[db_cv_mutex="UNIX/sema_init"])
+fi
+
+dnl _lock_try/_lock_clear: Solaris
+dnl On Solaris systems without Pthread or UI mutex interfaces, DB uses the
+dnl undocumented _lock_try _lock_clear function calls instead of either the
+dnl sema_trywait(3T) or sema_wait(3T) function calls. This is because of
+dnl problems in those interfaces in some releases of the Solaris C library.
+if test "$db_cv_mutex" = no; then
+AC_TRY_LINK([#include <sys/machlock.h>],
+[typedef lock_t tsl_t;
+ lock_t x;
+ _lock_try(&x); _lock_clear(&x);],
+[db_cv_mutex="Solaris/_lock_try"])
+fi
+
+dnl _check_lock/_clear_lock: AIX
+if test "$db_cv_mutex" = no; then
+AC_TRY_LINK([#include <sys/atomic_op.h>],
+[int x; _check_lock(&x,0,1); _clear_lock(&x,0);],
+[db_cv_mutex="AIX/_check_lock"])
+fi
+
+dnl Alpha/gcc: OSF/1
+dnl The alpha/gcc code doesn't work as far as I know. There are
+dnl two versions, both have problems. See Support Request #1583.
+if test "$db_cv_mutex" = DOESNT_WORK; then
+AC_TRY_RUN([main(){
+#if defined(__alpha)
+#if defined(__GNUC__)
+exit(0);
+#endif
+#endif
+exit(1);}],
+[db_cv_mutex="ALPHA/gcc-assembly"])
+fi
+
+dnl PaRisc/gcc: HP/UX
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(__hppa)
+#if defined(__GNUC__)
+exit(0);
+#endif
+#endif
+exit(1);}],
+[db_cv_mutex="HPPA/gcc-assembly"])
+fi
+
+dnl PPC/gcc:
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(__powerpc__)
+#if defined(__GNUC__)
+exit(0);
+#endif
+#endif
+exit(1);}],
+[db_cv_mutex="PPC/gcc-assembly"])
+fi
+
+dnl Sparc/gcc: SunOS, Solaris
+dnl The sparc/gcc code doesn't always work, specifically, I've seen assembler
+dnl failures from the stbar instruction on SunOS 4.1.4/sun4c and gcc 2.7.2.2.
+if test "$db_cv_mutex" = DOESNT_WORK; then
+AC_TRY_RUN([main(){
+#if defined(__sparc__)
+#if defined(__GNUC__)
+ exit(0);
+#endif
+#endif
+ exit(1);
+}], [db_cv_mutex="Sparc/gcc-assembly"])
+fi
+
+dnl 68K/gcc: SunOS
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if (defined(mc68020) || defined(sun3))
+#if defined(__GNUC__)
+ exit(0);
+#endif
+#endif
+ exit(1);
+}], [db_cv_mutex="68K/gcc-assembly"])
+fi
+
+dnl x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(i386) || defined(__i386__)
+#if defined(__GNUC__)
+ exit(0);
+#endif
+#endif
+ exit(1);
+}], [db_cv_mutex="x86/gcc-assembly"])
+fi
+
+dnl ia86/gcc: Linux
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(__ia64)
+#if defined(__GNUC__)
+ exit(0);
+#endif
+#endif
+ exit(1);
+}], [db_cv_mutex="ia64/gcc-assembly"])
+fi
+
+dnl: uts/cc: UTS
+if test "$db_cv_mutex" = no; then
+AC_TRY_RUN([main(){
+#if defined(_UTS)
+ exit(0);
+#endif
+ exit(1);
+}], [db_cv_mutex="UTS/cc-assembly"])
+fi
+])
+
+if test "$db_cv_mutex" = no; then
+ AC_MSG_WARN(
+ [THREAD MUTEXES NOT AVAILABLE FOR THIS COMPILER/ARCHITECTURE.])
+ ADDITIONAL_OBJS="mut_fcntl${o} $ADDITIONAL_OBJS"
+else
+ AC_DEFINE(HAVE_MUTEX_THREADS)
+fi
+
+case "$db_cv_mutex" in
+68K/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_68K_GCC_ASSEMBLY);;
+AIX/_check_lock) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_AIX_CHECK_LOCK);;
+ALPHA/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_ALPHA_GCC_ASSEMBLY);;
+HP/msem_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_HPPA_MSEM_INIT);;
+HPPA/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_HPPA_GCC_ASSEMBLY);;
+ia64/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_IA64_GCC_ASSEMBLY);;
+POSIX/pthreads) ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_PTHREADS);;
+POSIX/pthreads/library) LIBS="-lpthread $LIBS"
+ ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_PTHREADS);;
+PPC/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_PPC_GCC_ASSEMBLY);;
+ReliantUNIX/initspin) LIBS="$LIBS -lmproc"
+ ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_RELIANTUNIX_INITSPIN);;
+SCO/x86/cc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SCO_X86_CC_ASSEMBLY);;
+SGI/init_lock) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SGI_INIT_LOCK);;
+Solaris/_lock_try) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SOLARIS_LOCK_TRY);;
+Solaris/lwp) ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SOLARIS_LWP);;
+Sparc/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SPARC_GCC_ASSEMBLY);;
+UI/threads) ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_UI_THREADS);;
+UI/threads/library) LIBS="-lthread $LIBS"
+ ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_UI_THREADS);;
+UNIX/msem_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_MSEM_INIT);;
+UNIX/sema_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_SEMA_INIT);;
+UTS/cc-assembly) ADDITIONAL_OBJS="$ADDITIONAL_OBJS uts4.cc${o}"
+ AC_DEFINE(HAVE_MUTEX_UTS_CC_ASSEMBLY);;
+x86/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_X86_GCC_ASSEMBLY);;
+esac
+])dnl
diff --git a/bdb/dist/aclocal/options.m4 b/bdb/dist/aclocal/options.m4
new file mode 100644
index 00000000000..c51a3952419
--- /dev/null
+++ b/bdb/dist/aclocal/options.m4
@@ -0,0 +1,121 @@
+dnl $Id: options.m4,v 11.10 2000/07/07 15:50:39 bostic Exp $
+
+dnl Process user-specified options.
+AC_DEFUN(AM_OPTIONS_SET, [
+
+AC_MSG_CHECKING(if --disable-bigfile option specified)
+AC_ARG_ENABLE(bigfile,
+ [ --disable-bigfile Disable AIX, HP/UX, Solaris big files.],
+ [db_cv_bigfile="yes"], [db_cv_bigfile="no"])
+AC_MSG_RESULT($db_cv_bigfile)
+
+AC_MSG_CHECKING(if --enable-compat185 option specified)
+AC_ARG_ENABLE(compat185,
+ [ --enable-compat185 Build DB 1.85 compatibility API.],
+ [db_cv_compat185="$enable_compat185"], [db_cv_compat185="no"])
+AC_MSG_RESULT($db_cv_compat185)
+
+AC_MSG_CHECKING(if --enable-cxx option specified)
+AC_ARG_ENABLE(cxx,
+ [ --enable-cxx Build C++ API.],
+ [db_cv_cxx="$enable_cxx"], [db_cv_cxx="no"])
+AC_MSG_RESULT($db_cv_cxx)
+
+AC_MSG_CHECKING(if --enable-debug option specified)
+AC_ARG_ENABLE(debug,
+ [ --enable-debug Build a debugging version.],
+ [db_cv_debug="$enable_debug"], [db_cv_debug="no"])
+AC_MSG_RESULT($db_cv_debug)
+
+AC_MSG_CHECKING(if --enable-debug_rop option specified)
+AC_ARG_ENABLE(debug_rop,
+ [ --enable-debug_rop Build a version that logs read operations.],
+ [db_cv_debug_rop="$enable_debug_rop"], [db_cv_debug_rop="no"])
+AC_MSG_RESULT($db_cv_debug_rop)
+
+AC_MSG_CHECKING(if --enable-debug_wop option specified)
+AC_ARG_ENABLE(debug_wop,
+ [ --enable-debug_wop Build a version that logs write operations.],
+ [db_cv_debug_wop="$enable_debug_wop"], [db_cv_debug_wop="no"])
+AC_MSG_RESULT($db_cv_debug_wop)
+
+AC_MSG_CHECKING(if --enable-diagnostic option specified)
+AC_ARG_ENABLE(diagnostic,
+ [ --enable-diagnostic Build a version with run-time diagnostics.],
+ [db_cv_diagnostic="$enable_diagnostic"], [db_cv_diagnostic="no"])
+AC_MSG_RESULT($db_cv_diagnostic)
+
+AC_MSG_CHECKING(if --enable-dump185 option specified)
+AC_ARG_ENABLE(dump185,
+ [ --enable-dump185 Build db_dump185(1) to dump 1.85 databases.],
+ [db_cv_dump185="$enable_dump185"], [db_cv_dump185="no"])
+AC_MSG_RESULT($db_cv_dump185)
+
+AC_MSG_CHECKING(if --enable-dynamic option specified)
+AC_ARG_ENABLE(dynamic,
+ [ --enable-dynamic Build with dynamic libraries.],
+ [db_cv_dynamic="$enable_dynamic"], [db_cv_dynamic="no"])
+AC_MSG_RESULT($db_cv_dynamic)
+
+AC_MSG_CHECKING(if --enable-java option specified)
+AC_ARG_ENABLE(java,
+ [ --enable-java Build Java API.],
+ [db_cv_java="$enable_java"], [db_cv_java="no"])
+AC_MSG_RESULT($db_cv_java)
+
+AC_MSG_CHECKING(if --enable-posixmutexes option specified)
+AC_ARG_ENABLE(posixmutexes,
+ [ --enable-posixmutexes Force use of POSIX standard mutexes.],
+ [db_cv_posixmutexes="$enable_posixmutexes"], [db_cv_posixmutexes="no"])
+AC_MSG_RESULT($db_cv_posixmutexes)
+
+AC_MSG_CHECKING(if --enable-rpc option specified)
+AC_ARG_ENABLE(rpc,
+ [ --enable-rpc Build RPC client/server.],
+ [db_cv_rpc="$enable_rpc"], [db_cv_rpc="no"])
+AC_MSG_RESULT($db_cv_rpc)
+
+dnl --enable-shared is an alias for --enable-dynamic. We support it for
+dnl compatibility with other applications, e.g., Tcl.
+AC_MSG_CHECKING(if --enable-shared option specified)
+AC_ARG_ENABLE(shared,
+ [ --enable-shared Build with dynamic libraries.],
+ [db_cv_shared="$enable_shared"], [db_cv_shared="no"])
+AC_MSG_RESULT($db_cv_shared)
+if test "$db_cv_shared" != "no"; then
+ db_cv_dynamic="yes"
+fi
+
+AC_MSG_CHECKING(if --enable-tcl option specified)
+AC_ARG_ENABLE(tcl,
+ [ --enable-tcl Build Tcl API.],
+ [db_cv_tcl="$enable_tcl"], [db_cv_tcl="no"])
+AC_MSG_RESULT($db_cv_tcl)
+
+AC_MSG_CHECKING(if --enable-test option specified)
+AC_ARG_ENABLE(test,
+ [ --enable-test Configure to run the test suite.],
+ [db_cv_test="$enable_test"], [db_cv_test="no"])
+AC_MSG_RESULT($db_cv_test)
+
+AC_MSG_CHECKING(if --enable-uimutexes option specified)
+AC_ARG_ENABLE(uimutexes,
+ [ --enable-uimutexes Force use of Unix International mutexes.],
+ [db_cv_uimutexes="$enable_uimutexes"], [db_cv_uimutexes="no"])
+AC_MSG_RESULT($db_cv_uimutexes)
+
+AC_MSG_CHECKING(if --enable-umrw option specified)
+AC_ARG_ENABLE(umrw,
+ [ --enable-umrw Mask harmless unitialized memory read/writes.],
+ [db_cv_umrw="$enable_umrw"], [db_cv_umrw="no"])
+AC_MSG_RESULT($db_cv_umrw)
+
+AC_MSG_CHECKING([if --with-tcl option specified])
+AC_ARG_WITH(tcl,
+ [ --with-tcl=DIR Directory location of tclConfig.sh.],
+ with_tclconfig=${withval}, with_tclconfig="no")
+AC_MSG_RESULT($with_tclconfig)
+if test "$with_tclconfig" != "no"; then
+ db_cv_tcl="yes"
+fi
+])dnl
diff --git a/bdb/dist/aclocal/programs.m4 b/bdb/dist/aclocal/programs.m4
new file mode 100644
index 00000000000..9ec04f4d8cd
--- /dev/null
+++ b/bdb/dist/aclocal/programs.m4
@@ -0,0 +1,48 @@
+dnl $Id: programs.m4,v 11.11 2000/03/30 21:20:50 bostic Exp $
+
+dnl Check for programs used in building/installation.
+AC_DEFUN(AM_PROGRAMS_SET, [
+
+AC_PATH_PROG(db_cv_path_ar, ar, missing_ar)
+if test "$db_cv_path_ar" = missing_ar; then
+ AC_MSG_ERROR([No ar utility found.])
+fi
+AC_PATH_PROG(db_cv_path_chmod, chmod, missing_chmod)
+if test "$db_cv_path_chmod" = missing_chmod; then
+ AC_MSG_ERROR([No chmod utility found.])
+fi
+AC_PATH_PROG(db_cv_path_cp, cp, missing_cp)
+if test "$db_cv_path_cp" = missing_cp; then
+ AC_MSG_ERROR([No cp utility found.])
+fi
+AC_PATH_PROG(db_cv_path_ln, ln, missing_ln)
+if test "$db_cv_path_ln" = missing_ln; then
+ AC_MSG_ERROR([No ln utility found.])
+fi
+AC_PATH_PROG(db_cv_path_mkdir, mkdir, missing_mkdir)
+if test "$db_cv_path_mkdir" = missing_mkdir; then
+ AC_MSG_ERROR([No mkdir utility found.])
+fi
+AC_PATH_PROG(db_cv_path_ranlib, ranlib, missing_ranlib)
+AC_PATH_PROG(db_cv_path_rm, rm, missing_rm)
+if test "$db_cv_path_rm" = missing_rm; then
+ AC_MSG_ERROR([No rm utility found.])
+fi
+AC_PATH_PROG(db_cv_path_sh, sh, missing_sh)
+if test "$db_cv_path_sh" = missing_sh; then
+ AC_MSG_ERROR([No sh utility found.])
+fi
+AC_PATH_PROG(db_cv_path_strip, strip, missing_strip)
+if test "$db_cv_path_strip" = missing_strip; then
+ AC_MSG_ERROR([No strip utility found.])
+fi
+
+dnl Check for programs used in testing.
+if test "$db_cv_test" = "yes"; then
+ AC_PATH_PROG(db_cv_path_kill, kill, missing_kill)
+ if test "$db_cv_path_kill" = missing_kill; then
+ AC_MSG_ERROR([No kill utility found.])
+ fi
+fi
+
+])dnl
diff --git a/bdb/dist/aclocal/tcl.m4 b/bdb/dist/aclocal/tcl.m4
new file mode 100644
index 00000000000..3d0aec2e8ff
--- /dev/null
+++ b/bdb/dist/aclocal/tcl.m4
@@ -0,0 +1,126 @@
+dnl $Id: tcl.m4,v 11.5 2000/06/27 13:21:28 bostic Exp $
+
+dnl The SC_* macros in this file are from the unix/tcl.m4 files in the Tcl
+dnl 8.3.0 distribution, with some minor changes. For this reason, license
+dnl terms for the Berkeley DB distribution dist/aclocal/tcl.m4 file are as
+dnl follows (copied from the license.terms file in the Tcl 8.3 distribution):
+dnl
+dnl This software is copyrighted by the Regents of the University of
+dnl California, Sun Microsystems, Inc., Scriptics Corporation,
+dnl and other parties. The following terms apply to all files associated
+dnl with the software unless explicitly disclaimed in individual files.
+dnl
+dnl The authors hereby grant permission to use, copy, modify, distribute,
+dnl and license this software and its documentation for any purpose, provided
+dnl that existing copyright notices are retained in all copies and that this
+dnl notice is included verbatim in any distributions. No written agreement,
+dnl license, or royalty fee is required for any of the authorized uses.
+dnl Modifications to this software may be copyrighted by their authors
+dnl and need not follow the licensing terms described here, provided that
+dnl the new terms are clearly indicated on the first page of each file where
+dnl they apply.
+dnl
+dnl IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
+dnl FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+dnl ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
+dnl DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
+dnl POSSIBILITY OF SUCH DAMAGE.
+dnl
+dnl THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
+dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
+dnl IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
+dnl NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
+dnl MODIFICATIONS.
+dnl
+dnl GOVERNMENT USE: If you are acquiring this software on behalf of the
+dnl U.S. government, the Government shall have only "Restricted Rights"
+dnl in the software and related documentation as defined in the Federal
+dnl Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
+dnl are acquiring the software on behalf of the Department of Defense, the
+dnl software shall be classified as "Commercial Computer Software" and the
+dnl Government shall have only "Restricted Rights" as defined in Clause
+dnl 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
+dnl authors grant the U.S. Government and others acting in its behalf
+dnl permission to use and distribute the software in accordance with the
+dnl terms specified in this license.
+
+AC_DEFUN(SC_PATH_TCLCONFIG, [
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ # First check to see if --with-tclconfig was specified.
+ if test "${with_tclconfig}" != no; then
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ ])
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ AC_MSG_ERROR(can't find Tcl configuration definitions)
+ else
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ fi
+])
+
+AC_DEFUN(SC_LOAD_TCLCONFIG, [
+ AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
+
+ if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . $TCL_BIN_DIR/tclConfig.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # The eval is required to do the TCL_DBGX substitution in the
+ # TCL_LIB_FILE variable
+ #
+ eval TCL_LIB_FILE="${TCL_LIB_FILE}"
+ eval TCL_LIB_FLAG="${TCL_LIB_FLAG}"
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+ AC_SUBST(TCL_LIB_FILE)
+
+ AC_SUBST(TCL_TCLSH)
+ TCL_TCLSH="${TCL_PREFIX}/bin/tclsh${TCL_VERSION}"
+])
+
+dnl Optional Tcl API.
+AC_DEFUN(AM_TCL_LOAD, [
+if test "$db_cv_tcl" != no; then
+ if test "$db_cv_dynamic" != "yes"; then
+ AC_MSG_ERROR([--with-tcl requires --enable-dynamic])
+ fi
+
+ AC_SUBST(TCFLAGS)
+
+ SC_PATH_TCLCONFIG
+ SC_LOAD_TCLCONFIG
+
+ if test x"$TCL_PREFIX" != x && test -f "$TCL_PREFIX/include/tcl.h"; then
+ TCFLAGS="-I$TCL_PREFIX/include"
+ fi
+
+ LIBS="$LIBS $TCL_LIB_SPEC $TCL_LIBS"
+
+ ADDITIONAL_LIBS="$ADDITIONAL_LIBS \$(libtso_target)"
+ DEFAULT_INSTALL="${DEFAULT_INSTALL} install_tcl"
+fi])
diff --git a/bdb/dist/aclocal/types.m4 b/bdb/dist/aclocal/types.m4
new file mode 100644
index 00000000000..a9a03ab6d87
--- /dev/null
+++ b/bdb/dist/aclocal/types.m4
@@ -0,0 +1,139 @@
+dnl $Id: types.m4,v 11.4 1999/12/04 19:18:28 bostic Exp $
+
+dnl Check for the standard shorthand types.
+AC_DEFUN(AM_SHORTHAND_TYPES, [dnl
+
+AC_SUBST(ssize_t_decl)
+AC_CACHE_CHECK([for ssize_t], db_cv_ssize_t, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], ssize_t foo;,
+ [db_cv_ssize_t=yes], [db_cv_ssize_t=no])])
+if test "$db_cv_ssize_t" = no; then
+ ssize_t_decl="typedef int ssize_t;"
+fi
+
+AC_SUBST(u_char_decl)
+AC_CACHE_CHECK([for u_char], db_cv_uchar, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_char foo;,
+ [db_cv_uchar=yes], [db_cv_uchar=no])])
+if test "$db_cv_uchar" = no; then
+ u_char_decl="typedef unsigned char u_char;"
+fi
+
+AC_SUBST(u_short_decl)
+AC_CACHE_CHECK([for u_short], db_cv_ushort, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_short foo;,
+ [db_cv_ushort=yes], [db_cv_ushort=no])])
+if test "$db_cv_ushort" = no; then
+ u_short_decl="typedef unsigned short u_short;"
+fi
+
+AC_SUBST(u_int_decl)
+AC_CACHE_CHECK([for u_int], db_cv_uint, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_int foo;,
+ [db_cv_uint=yes], [db_cv_uint=no])])
+if test "$db_cv_uint" = no; then
+ u_int_decl="typedef unsigned int u_int;"
+fi
+
+AC_SUBST(u_long_decl)
+AC_CACHE_CHECK([for u_long], db_cv_ulong, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_long foo;,
+ [db_cv_ulong=yes], [db_cv_ulong=no])])
+if test "$db_cv_ulong" = no; then
+ u_long_decl="typedef unsigned long u_long;"
+fi
+
+dnl DB/Vi use specific integer sizes.
+AC_SUBST(u_int8_decl)
+AC_CACHE_CHECK([for u_int8_t], db_cv_uint8, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_int8_t foo;,
+ [db_cv_uint8=yes],
+ AC_TRY_RUN([main(){exit(sizeof(unsigned char) != 1);}],
+ [db_cv_uint8="unsigned char"], [db_cv_uint8=no]))])
+if test "$db_cv_uint8" = no; then
+ AC_MSG_ERROR(No unsigned 8-bit integral type.)
+fi
+if test "$db_cv_uint8" != yes; then
+ u_int8_decl="typedef $db_cv_uint8 u_int8_t;"
+fi
+
+AC_SUBST(u_int16_decl)
+AC_CACHE_CHECK([for u_int16_t], db_cv_uint16, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_int16_t foo;,
+ [db_cv_uint16=yes],
+AC_TRY_RUN([main(){exit(sizeof(unsigned short) != 2);}],
+ [db_cv_uint16="unsigned short"],
+AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 2);}],
+ [db_cv_uint16="unsigned int"], [db_cv_uint16=no])))])
+if test "$db_cv_uint16" = no; then
+ AC_MSG_ERROR([No unsigned 16-bit integral type.])
+fi
+if test "$db_cv_uint16" != yes; then
+ u_int16_decl="typedef $db_cv_uint16 u_int16_t;"
+fi
+
+AC_SUBST(int16_decl)
+AC_CACHE_CHECK([for int16_t], db_cv_int16, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], int16_t foo;,
+ [db_cv_int16=yes],
+AC_TRY_RUN([main(){exit(sizeof(short) != 2);}],
+ [db_cv_int16="short"],
+AC_TRY_RUN([main(){exit(sizeof(int) != 2);}],
+ [db_cv_int16="int"], [db_cv_int16=no])))])
+if test "$db_cv_int16" = no; then
+ AC_MSG_ERROR([No signed 16-bit integral type.])
+fi
+if test "$db_cv_int16" != yes; then
+ int16_decl="typedef $db_cv_int16 int16_t;"
+fi
+
+AC_SUBST(u_int32_decl)
+AC_CACHE_CHECK([for u_int32_t], db_cv_uint32, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], u_int32_t foo;,
+ [db_cv_uint32=yes],
+AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 4);}],
+ [db_cv_uint32="unsigned int"],
+AC_TRY_RUN([main(){exit(sizeof(unsigned long) != 4);}],
+ [db_cv_uint32="unsigned long"], [db_cv_uint32=no])))])
+if test "$db_cv_uint32" = no; then
+ AC_MSG_ERROR([No unsigned 32-bit integral type.])
+fi
+if test "$db_cv_uint32" != yes; then
+ u_int32_decl="typedef $db_cv_uint32 u_int32_t;"
+fi
+
+AC_SUBST(int32_decl)
+AC_CACHE_CHECK([for int32_t], db_cv_int32, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], int32_t foo;,
+ [db_cv_int32=yes],
+AC_TRY_RUN([main(){exit(sizeof(int) != 4);}],
+ [db_cv_int32="int"],
+AC_TRY_RUN([main(){exit(sizeof(long) != 4);}],
+ [db_cv_int32="long"], [db_cv_int32=no])))])
+if test "$db_cv_int32" = no; then
+ AC_MSG_ERROR([No signed 32-bit integral type.])
+fi
+if test "$db_cv_int32" != yes; then
+ int32_decl="typedef $db_cv_int32 int32_t;"
+fi
+
+dnl Figure out largest integral type.
+AC_SUBST(db_align_t_decl)
+AC_CACHE_CHECK([for largest integral type], db_cv_align_t, [dnl
+AC_TRY_COMPILE([#include <sys/types.h>], long long foo;,
+ [db_cv_align_t="unsigned long long"], [db_cv_align_t="unsigned long"])])
+db_align_t_decl="typedef $db_cv_align_t db_align_t;"
+
+dnl Figure out integral type the same size as a pointer.
+AC_SUBST(db_alignp_t_decl)
+AC_CACHE_CHECK([for integral type equal to pointer size], db_cv_alignp_t, [dnl
+db_cv_alignp_t=$db_cv_align_t
+AC_TRY_RUN([main(){exit(sizeof(unsigned int) != sizeof(char *));}],
+ [db_cv_alignp_t="unsigned int"])
+AC_TRY_RUN([main(){exit(sizeof(unsigned long) != sizeof(char *));}],
+ [db_cv_alignp_t="unsigned long"])
+AC_TRY_RUN([main(){exit(sizeof(unsigned long long) != sizeof(char *));}],
+ [db_cv_alignp_t="unsigned long long"])])
+db_alignp_t_decl="typedef $db_cv_alignp_t db_alignp_t;"
+
+])dnl