summaryrefslogtreecommitdiff
path: root/storage/bdb/dist
diff options
context:
space:
mode:
Diffstat (limited to 'storage/bdb/dist')
-rw-r--r--storage/bdb/dist/Makefile.in951
-rw-r--r--storage/bdb/dist/RELEASE23
-rw-r--r--storage/bdb/dist/aclocal/config.ac11
-rw-r--r--storage/bdb/dist/aclocal/libtool.ac7304
-rw-r--r--storage/bdb/dist/aclocal/mutex.ac238
-rw-r--r--storage/bdb/dist/aclocal/options.ac181
-rw-r--r--storage/bdb/dist/aclocal/programs.ac19
-rw-r--r--storage/bdb/dist/aclocal/rpc.ac83
-rw-r--r--storage/bdb/dist/aclocal/sequence.ac76
-rw-r--r--storage/bdb/dist/aclocal/sosuffix.ac43
-rw-r--r--storage/bdb/dist/aclocal/tcl.ac13
-rw-r--r--storage/bdb/dist/aclocal/types.ac185
-rw-r--r--storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac14
-rw-r--r--storage/bdb/dist/aclocal_java/ac_prog_java.ac8
-rw-r--r--storage/bdb/dist/buildrel87
-rwxr-xr-xstorage/bdb/dist/config.guess367
-rw-r--r--storage/bdb/dist/config.hin458
-rwxr-xr-xstorage/bdb/dist/config.sub221
-rw-r--r--storage/bdb/dist/configure.ac538
-rw-r--r--storage/bdb/dist/gen_inc.awk14
-rw-r--r--storage/bdb/dist/gen_rec.awk947
-rw-r--r--storage/bdb/dist/gen_rpc.awk212
-rw-r--r--storage/bdb/dist/ltmain.sh3249
-rw-r--r--storage/bdb/dist/pubdef.in158
-rw-r--r--storage/bdb/dist/s_all12
-rwxr-xr-xstorage/bdb/dist/s_config34
-rw-r--r--storage/bdb/dist/s_crypto10
-rwxr-xr-xstorage/bdb/dist/s_include33
-rwxr-xr-xstorage/bdb/dist/s_java273
-rwxr-xr-xstorage/bdb/dist/s_java_const35
-rwxr-xr-xstorage/bdb/dist/s_java_stat327
-rwxr-xr-xstorage/bdb/dist/s_java_swig55
-rw-r--r--storage/bdb/dist/s_je2db88
-rwxr-xr-xstorage/bdb/dist/s_perm14
-rwxr-xr-xstorage/bdb/dist/s_readme6
-rwxr-xr-xstorage/bdb/dist/s_recover30
-rw-r--r--storage/bdb/dist/s_rpc114
-rwxr-xr-xstorage/bdb/dist/s_symlink14
-rwxr-xr-xstorage/bdb/dist/s_tags19
-rwxr-xr-xstorage/bdb/dist/s_test8
-rw-r--r--storage/bdb/dist/s_vxworks276
-rwxr-xr-xstorage/bdb/dist/s_win3277
-rw-r--r--storage/bdb/dist/s_win32_dsp89
-rw-r--r--storage/bdb/dist/s_winmsi126
-rw-r--r--storage/bdb/dist/srcfiles.in423
-rw-r--r--storage/bdb/dist/template/db_server_proc1794
-rw-r--r--storage/bdb/dist/template/gen_client_ret723
-rw-r--r--storage/bdb/dist/template/rec_btree633
-rw-r--r--storage/bdb/dist/template/rec_crdel75
-rw-r--r--storage/bdb/dist/template/rec_db757
-rw-r--r--storage/bdb/dist/template/rec_dbreg75
-rw-r--r--storage/bdb/dist/template/rec_fileops323
-rw-r--r--storage/bdb/dist/template/rec_hash571
-rw-r--r--storage/bdb/dist/template/rec_qam323
-rw-r--r--storage/bdb/dist/template/rec_rep13
-rw-r--r--storage/bdb/dist/template/rec_txn323
-rw-r--r--storage/bdb/dist/vx_2.0/BerkeleyDB.wpj14
-rw-r--r--storage/bdb/dist/vx_2.0/BerkeleyDBsmall.wpj251
-rw-r--r--storage/bdb/dist/vx_2.0/wpj.in6
-rw-r--r--storage/bdb/dist/vx_2.2/BerkeleyDB.wpj310
-rw-r--r--storage/bdb/dist/vx_2.2/BerkeleyDBsmall.wpj310
-rw-r--r--storage/bdb/dist/vx_2.2/wpj.in194
-rw-r--r--storage/bdb/dist/vx_config.in81
-rw-r--r--storage/bdb/dist/vx_setup/CONFIG.in2
-rw-r--r--storage/bdb/dist/vx_setup/LICENSE.TXT2
-rw-r--r--storage/bdb/dist/vx_setup/vx_allfile.in6
-rw-r--r--storage/bdb/dist/vx_setup/vx_demofile.in3
-rw-r--r--storage/bdb/dist/win_config.in171
-rw-r--r--storage/bdb/dist/win_db.in100
-rw-r--r--storage/bdb/dist/win_exports.in87
-rw-r--r--storage/bdb/dist/winmsi/dbcorewix.in196
-rw-r--r--storage/bdb/dist/winmsi/dbvarsbat.in25
-rw-r--r--storage/bdb/dist/winmsi/dbwix.m4833
-rw-r--r--storage/bdb/dist/winmsi/environment.in23
-rw-r--r--storage/bdb/dist/winmsi/features.in33
-rw-r--r--storage/bdb/dist/winmsi/files.in87
-rw-r--r--storage/bdb/dist/winmsi/images/caticon.ibdbin0 -> 1406 bytes
-rw-r--r--storage/bdb/dist/winmsi/images/foldernew.ibdbin0 -> 1078 bytes
-rw-r--r--storage/bdb/dist/winmsi/images/folderup.ibdbin0 -> 1078 bytes
-rw-r--r--storage/bdb/dist/winmsi/images/sleepycat.jpgbin0 -> 27896 bytes
-rw-r--r--storage/bdb/dist/winmsi/images/topstripe.ibdbin0 -> 1827 bytes
-rw-r--r--storage/bdb/dist/winmsi/images/webicon.icobin0 -> 1406 bytes
-rw-r--r--storage/bdb/dist/winmsi/links.in18
-rw-r--r--storage/bdb/dist/winmsi/s_winmsi.fcn1426
-rw-r--r--storage/bdb/dist/winmsi/winbuild.bat119
85 files changed, 21361 insertions, 6009 deletions
diff --git a/storage/bdb/dist/Makefile.in b/storage/bdb/dist/Makefile.in
index a7cc0e11f34..cf484b6bf99 100644
--- a/storage/bdb/dist/Makefile.in
+++ b/storage/bdb/dist/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 11.175 2002/08/29 14:22:20 margo Exp $
+# $Id: Makefile.in,v 11.264 2004/11/01 21:55:33 mark Exp $
srcdir= @srcdir@/..
builddir=.
@@ -30,7 +30,6 @@ ln= @db_cv_path_ln@
mkdir= @db_cv_path_mkdir@
ranlib= @db_cv_path_ranlib@
rm= @db_cv_path_rm@
-rpm= @db_cv_path_rpm@
strip= @db_cv_path_strip@
##################################################
@@ -44,28 +43,30 @@ LIBTOOL= @LIBTOOL@
POSTLINK= @POSTLINK@
SOLINK= @MAKEFILE_SOLINK@
SOFLAGS= @SOFLAGS@
-SOMAJOR= @DB_VERSION_MAJOR@
-SOVERSION= @DB_VERSION_MAJOR@.@DB_VERSION_MINOR@
+LIBMAJOR= @DB_VERSION_MAJOR@
+LIBVERSION= @DB_VERSION_MAJOR@.@DB_VERSION_MINOR@
+
+CPPFLAGS= -I$(builddir) -I$(srcdir) @CPPFLAGS@
##################################################
# C API.
##################################################
-CPPFLAGS= -I$(builddir) -I$(srcdir) -I$(srcdir)/dbinc @CPPFLAGS@
CFLAGS= -c $(CPPFLAGS) @CFLAGS@
CC= @MAKEFILE_CC@
-CCLINK= @MAKEFILE_CCLINK@
+CCLINK= @MAKEFILE_CCLINK@ @CFLAGS@
LDFLAGS= @LDFLAGS@
LIBS= @LIBS@
+TEST_LIBS= @TEST_LIBS@
LIBSO_LIBS= @LIBSO_LIBS@
-libdb= libdb.a
-libso_base= libdb
-libso= $(libso_base)-$(SOVERSION).@SOSUFFIX@
-libso_static= $(libso_base)-$(SOVERSION).a
-libso_target= $(libso_base)-$(SOVERSION).la
-libso_default= $(libso_base).@SOSUFFIX@
-libso_major= $(libso_base)-$(SOMAJOR).@SOSUFFIX@
+libdb_base= libdb
+libdb= $(libdb_base).a
+libdb_version= $(libdb_base)-$(LIBVERSION).a
+libso= $(libdb_base)-$(LIBVERSION)@SOSUFFIX@
+libso_target= $(libdb_base)-$(LIBVERSION).la
+libso_default= $(libdb_base)@SOSUFFIX@
+libso_major= $(libdb_base)-$(LIBMAJOR)@SOSUFFIX@
##################################################
# C++ API.
@@ -74,17 +75,17 @@ libso_major= $(libso_base)-$(SOMAJOR).@SOSUFFIX@
##################################################
CXXFLAGS= -c $(CPPFLAGS) @CXXFLAGS@
CXX= @MAKEFILE_CXX@
-CXXLINK= @MAKEFILE_CXXLINK@
-XSOLINK= @MAKEFILE_XSOLINK@
+CXXLINK= @MAKEFILE_CXXLINK@ @CXXFLAGS@
+XSOLINK= @MAKEFILE_XSOLINK@ @CXXFLAGS@
LIBXSO_LIBS= @LIBXSO_LIBS@
-libcxx= libdb_cxx.a
-libxso_base= libdb_cxx
-libxso= $(libxso_base)-$(SOVERSION).@SOSUFFIX@
-libxso_static= $(libxso_base)-$(SOVERSION).a
-libxso_target= $(libxso_base)-$(SOVERSION).la
-libxso_default= $(libxso_base).@SOSUFFIX@
-libxso_major= $(libxso_base)-$(SOMAJOR).@SOSUFFIX@
+libcxx_base= libdb_cxx
+libcxx= $(libcxx_base).a
+libcxx_version= $(libcxx_base)-$(LIBVERSION).a
+libxso= $(libcxx_base)-$(LIBVERSION)@SOSUFFIX@
+libxso_target= $(libcxx_base)-$(LIBVERSION).la
+libxso_default= $(libcxx_base)@SOSUFFIX@
+libxso_major= $(libcxx_base)-$(LIBMAJOR)@SOSUFFIX@
##################################################
# Java API.
@@ -98,25 +99,26 @@ JAR= @JAR@
JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
JAVACFLAGS= @JAVACFLAGS@
JAVA_CLASSTOP= ./classes
-JAVA_RPCCLASSES=./classes.rpc
-JAVA_SRCDIR= $(srcdir)/java/src
+JAVA_RPCCLASSTOP=./classes.rpc
+JAVA_EXCLASSTOP=./classes.ex
JAVA_DBREL= com/sleepycat/db
JAVA_EXREL= com/sleepycat/examples
JAVA_RPCREL= com/sleepycat/db/rpcserver
-JAVA_DBDIR= $(JAVA_SRCDIR)/$(JAVA_DBREL)
-JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+JAVA_SRCDIR= $(srcdir)/java/src
+JAVA_EXDIR= $(srcdir)/examples_java/src/com/sleepycat/examples
JAVA_RPCDIR= $(srcdir)/rpc_server/java
+JAVA_SLEEPYCAT= $(srcdir)/java/src/com/sleepycat
libj_jarfile= db.jar
libj_exjarfile= dbexamples.jar
rpc_jarfile= dbsvc.jar
libjso_base= libdb_java
-libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
-libjso_static= $(libjso_base)-$(SOVERSION).a
-libjso_target= $(libjso_base)-$(SOVERSION).la
-libjso_default= $(libjso_base).@JMODSUFFIX@
-libjso_major= $(libjso_base)-$(SOMAJOR).@JMODSUFFIX@
-libjso_g= $(libjso_base)-$(SOVERSION)_g.@JMODSUFFIX@
+libjso= $(libjso_base)-$(LIBVERSION)@JMODSUFFIX@
+libjso_static= $(libjso_base)-$(LIBVERSION).a
+libjso_target= $(libjso_base)-$(LIBVERSION).la
+libjso_default= $(libjso_base)@JMODSUFFIX@
+libjso_major= $(libjso_base)-$(LIBMAJOR)@JMODSUFFIX@
+libjso_g= $(libjso_base)-$(LIBVERSION)_g@JMODSUFFIX@
##################################################
# TCL API.
@@ -126,11 +128,11 @@ libjso_g= $(libjso_base)-$(SOVERSION)_g.@JMODSUFFIX@
TCFLAGS= @TCFLAGS@
LIBTSO_LIBS= @LIBTSO_LIBS@
libtso_base= libdb_tcl
-libtso= $(libtso_base)-$(SOVERSION).@MODSUFFIX@
-libtso_static= $(libtso_base)-$(SOVERSION).a
-libtso_target= $(libtso_base)-$(SOVERSION).la
-libtso_default= $(libtso_base).@MODSUFFIX@
-libtso_major= $(libtso_base)-$(SOMAJOR).@MODSUFFIX@
+libtso= $(libtso_base)-$(LIBVERSION)@MODSUFFIX@
+libtso_static= $(libtso_base)-$(LIBVERSION).a
+libtso_target= $(libtso_base)-$(LIBVERSION).la
+libtso_default= $(libtso_base)@MODSUFFIX@
+libtso_major= $(libtso_base)-$(LIBMAJOR)@MODSUFFIX@
##################################################
# db_dump185 UTILITY
@@ -152,90 +154,321 @@ DB185LIB=
##################################################
# Object and utility lists.
##################################################
-C_OBJS= @ADDITIONAL_OBJS@ @LTLIBOBJS@ @RPC_CLIENT_OBJS@ \
+BTREE_OBJS=\
bt_compare@o@ bt_conv@o@ bt_curadj@o@ bt_cursor@o@ bt_delete@o@ \
bt_method@o@ bt_open@o@ bt_put@o@ bt_rec@o@ bt_reclaim@o@ \
bt_recno@o@ bt_rsearch@o@ bt_search@o@ bt_split@o@ bt_stat@o@ \
- bt_upgrade@o@ bt_verify@o@ btree_auto@o@ crdel_auto@o@ \
- crdel_rec@o@ db@o@ db_am@o@ db_auto@o@ db_byteorder@o@ db_cam@o@ \
- db_conv@o@ db_dispatch@o@ db_dup@o@ db_err@o@ db_getlong@o@ \
- db_idspace@o@ db_iface@o@ db_join@o@ db_log2@o@ db_meta@o@ \
- db_method@o@ db_open@o@ db_overflow@o@ db_pr@o@ db_rec@o@ \
- db_reclaim@o@ db_rename@o@ db_remove@o@ db_ret@o@ db_salloc@o@ \
- db_shash@o@ db_truncate@o@ db_upg@o@ db_upg_opd@o@ db_vrfy@o@ \
- db_vrfyutil@o@ dbm@o@ dbreg@o@ dbreg_auto@o@ dbreg_rec@o@ \
- dbreg_util@o@ env_file@o@ env_method@o@ env_open@o@ env_recover@o@ \
- env_region@o@ fileops_auto@o@ fop_basic@o@ fop_rec@o@ \
- fop_util@o@ hash@o@ hash_auto@o@ hash_conv@o@ hash_dup@o@ \
- hash_func@o@ hash_meta@o@ hash_method@o@ hash_open@o@ \
- hash_page@o@ hash_rec@o@ hash_reclaim@o@ hash_stat@o@ \
- hash_upgrade@o@ hash_verify@o@ hmac@o@ hsearch@o@ lock@o@ \
- lock_deadlock@o@ lock_method@o@ lock_region@o@ lock_stat@o@ \
- lock_util@o@ log@o@ log_archive@o@ log_compare@o@ log_get@o@ \
- log_method@o@ log_put@o@ mp_alloc@o@ mp_bh@o@ mp_fget@o@ \
- mp_fopen@o@ mp_fput@o@ mp_fset@o@ mp_method@o@ mp_region@o@ \
- mp_register@o@ mp_stat@o@ mp_sync@o@ mp_trickle@o@ mutex@o@ \
- os_abs@o@ os_alloc@o@ os_clock@o@ os_config@o@ os_dir@o@ \
- os_errno@o@ os_fid@o@ os_fsync@o@ os_handle@o@ os_id@o@ \
- os_map@o@ os_method@o@ os_oflags@o@ os_open@o@ os_region@o@ \
- os_rename@o@ os_root@o@ os_rpath@o@ os_rw@o@ os_seek@o@ \
- os_sleep@o@ os_spin@o@ os_stat@o@ os_tmpdir@o@ os_unlink@o@ \
+ bt_upgrade@o@ btree_auto@o@
+BTREE_VRFY_OBJS=\
+ db_ovfl_vrfy@o@ db_vrfy@o@ db_vrfyutil@o@ bt_verify@o@
+HASH_OBJS=\
+ hash@o@ hash_auto@o@ hash_conv@o@ hash_dup@o@ hash_meta@o@ \
+ hash_method@o@ hash_open@o@ hash_page@o@ hash_rec@o@ \
+ hash_reclaim@o@ hash_stat@o@ hash_upgrade@o@
+HASH_VRFY_OBJS=\
+ hash_verify@o@
+QUEUE_OBJS=\
qam@o@ qam_auto@o@ qam_conv@o@ qam_files@o@ qam_method@o@ \
- qam_open@o@ qam_rec@o@ qam_stat@o@ qam_upgrade@o@ qam_verify@o@ \
- rep_method@o@ rep_record@o@ rep_region@o@ rep_util@o@ sha1@o@ \
- txn@o@ txn_auto@o@ txn_method@o@ txn_rec@o@ txn_recover@o@ \
- txn_region@o@ txn_stat@o@ txn_util@o@ xa@o@ xa_db@o@ xa_map@o@
+ qam_open@o@ qam_rec@o@ qam_stat@o@ qam_upgrade@o@
+QUEUE_VRFY_OBJS=\
+ qam_verify@o@
+REP_OBJS=\
+ rep_auto@o@ rep_backup@o@ rep_method@o@ rep_record@o@ rep_region@o@ \
+ rep_stat@o@ rep_util@o@
+PRINT_OBJS=\
+ btree_autop@o@ crdel_autop@o@ db_autop@o@ dbreg_autop@o@ \
+ fileops_autop@o@ hash_autop@o@ qam_autop@o@ rep_autop@o@ \
+ txn_autop@o@
+
+C_OBJS= @ADDITIONAL_OBJS@ @REPLACEMENT_OBJS@ @CRYPTO_OBJS@ @RPC_CLIENT_OBJS@ \
+ crdel_auto@o@ crdel_rec@o@ db@o@ db_am@o@ db_auto@o@ \
+ db_byteorder@o@ db_cam@o@ db_conv@o@ db_dispatch@o@ db_dup@o@ \
+ db_err@o@ db_getlong@o@ db_idspace@o@ db_iface@o@ db_join@o@ \
+ db_log2@o@ db_meta@o@ db_method@o@ db_open@o@ db_overflow@o@ \
+ db_pr@o@ db_rec@o@ db_reclaim@o@ db_rename@o@ db_remove@o@ \
+ db_ret@o@ db_salloc@o@ db_setid@o@ db_setlsn@o@ db_shash@o@ \
+ db_stati@o@ db_truncate@o@ db_upg@o@ db_upg_opd@o@ dbm@o@ \
+ dbreg@o@ dbreg_auto@o@ dbreg_rec@o@ dbreg_stat@o@ dbreg_util@o@ \
+ env_file@o@ env_method@o@ env_open@o@ env_recover@o@ \
+ env_region@o@ env_stat@o@ fileops_auto@o@ fop_basic@o@ \
+ fop_rec@o@ fop_util@o@ hash_func@o@ hmac@o@ hsearch@o@ lock@o@ \
+ lock_deadlock@o@ lock_id@o@ lock_list@o@ lock_method@o@ \
+ lock_region@o@ lock_stat@o@ lock_timer@o@ lock_util@o@ log@o@ \
+ log_archive@o@ log_compare@o@ log_get@o@ log_method@o@ \
+ log_put@o@ log_stat@o@ mp_alloc@o@ mp_bh@o@ mp_fget@o@ \
+ mp_fmethod@o@ mp_fopen@o@ mp_fput@o@ mp_fset@o@ mp_method@o@ \
+ mp_region@o@ mp_register@o@ mp_stat@o@ mp_sync@o@ mp_trickle@o@ \
+ mutex@o@ os_abs@o@ os_alloc@o@ os_clock@o@ os_config@o@ \
+ os_dir@o@ os_errno@o@ os_fid@o@ os_fsync@o@ os_handle@o@ \
+ os_id@o@ os_map@o@ os_method@o@ os_oflags@o@ os_open@o@ \
+ os_region@o@ os_rename@o@ os_root@o@ os_rpath@o@ os_rw@o@ \
+ os_seek@o@ os_sleep@o@ os_spin@o@ os_stat@o@ os_tmpdir@o@ \
+ os_truncate@o@ os_unlink@o@ sha1@o@ seq_stat@o@ sequence@o@ \
+ snprintf@o@ txn@o@ txn_auto@o@ txn_method@o@ txn_rec@o@ \
+ txn_recover@o@ txn_region@o@ txn_stat@o@ txn_util@o@ xa@o@ \
+ xa_db@o@ xa_map@o@
CXX_OBJS=\
- cxx_db@o@ cxx_dbc@o@ cxx_dbt@o@ cxx_env@o@ cxx_except@o@ \
- cxx_lock@o@ cxx_logc@o@ cxx_mpool@o@ cxx_txn@o@
+ cxx_db@o@ cxx_dbc@o@ cxx_dbt@o@ cxx_env@o@ cxx_except@o@ cxx_lock@o@ \
+ cxx_logc@o@ cxx_mpool@o@ cxx_multi@o@ cxx_seq@o@ cxx_txn@o@
+
+CRYPTO_OBJS=\
+ aes_method@o@ crypto@o@ mt19937db@o@ rijndael-alg-fst@o@ \
+ rijndael-api-fst@o@
JAVA_OBJS=\
- java_Db@o@ java_DbEnv@o@ java_DbLock@o@ java_DbLogc@o@ \
- java_DbLsn@o@ java_DbTxn@o@ java_DbUtil@o@ java_Dbc@o@ \
- java_Dbt@o@ \
- java_info@o@ java_locked@o@ java_util@o@ java_stat_auto@o@
+ db_java_wrap@o@
JAVA_DBSRCS=\
- $(JAVA_DBDIR)/Db.java $(JAVA_DBDIR)/DbAppendRecno.java \
- $(JAVA_DBDIR)/DbAppDispatch.java \
- $(JAVA_DBDIR)/DbBtreeCompare.java $(JAVA_DBDIR)/DbBtreePrefix.java \
- $(JAVA_DBDIR)/DbBtreeStat.java $(JAVA_DBDIR)/DbClient.java \
- $(JAVA_DBDIR)/DbConstants.java $(JAVA_DBDIR)/DbDeadlockException.java \
- $(JAVA_DBDIR)/DbDupCompare.java $(JAVA_DBDIR)/DbEnv.java \
- $(JAVA_DBDIR)/DbEnvFeedback.java $(JAVA_DBDIR)/DbErrcall.java \
- $(JAVA_DBDIR)/DbException.java $(JAVA_DBDIR)/DbFeedback.java \
- $(JAVA_DBDIR)/DbHash.java $(JAVA_DBDIR)/DbHashStat.java \
- $(JAVA_DBDIR)/DbKeyRange.java $(JAVA_DBDIR)/DbLock.java \
- $(JAVA_DBDIR)/DbLockNotGrantedException.java \
- $(JAVA_DBDIR)/DbLockRequest.java $(JAVA_DBDIR)/DbLockStat.java \
- $(JAVA_DBDIR)/DbLogc.java $(JAVA_DBDIR)/DbLogStat.java \
- $(JAVA_DBDIR)/DbLsn.java $(JAVA_DBDIR)/DbMemoryException.java \
- $(JAVA_DBDIR)/DbMpoolFStat.java $(JAVA_DBDIR)/DbMpoolStat.java \
- $(JAVA_DBDIR)/DbMultipleDataIterator.java \
- $(JAVA_DBDIR)/DbMultipleIterator.java \
- $(JAVA_DBDIR)/DbMultipleKeyDataIterator.java \
- $(JAVA_DBDIR)/DbMultipleRecnoDataIterator.java \
- $(JAVA_DBDIR)/DbOutputStreamErrcall.java \
- $(JAVA_DBDIR)/DbPreplist.java $(JAVA_DBDIR)/DbQueueStat.java \
- $(JAVA_DBDIR)/DbRepStat.java $(JAVA_DBDIR)/DbRepTransport.java \
- $(JAVA_DBDIR)/DbRunRecoveryException.java \
- $(JAVA_DBDIR)/DbSecondaryKeyCreate.java $(JAVA_DBDIR)/DbTxn.java \
- $(JAVA_DBDIR)/DbTxnStat.java \
- $(JAVA_DBDIR)/DbUtil.java $(JAVA_DBDIR)/Dbc.java $(JAVA_DBDIR)/Dbt.java
+ $(JAVA_SLEEPYCAT)/bind/ByteArrayBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/EntityBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/EntryBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/RecordNumberBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/ClassCatalog.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/SerialBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/SerialInput.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/SerialOutput.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/SerialSerialBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/SerialSerialKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/StoredClassCatalog.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/TupleSerialBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/TupleSerialKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/TupleSerialMarshalledBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/serial/TupleSerialMarshalledKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/BooleanBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/ByteBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/CharacterBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/DoubleBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/FloatBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/IntegerBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/LongBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/MarshalledTupleEntry.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/MarshalledTupleKeyEntity.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/ShortBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/StringBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleInput.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleInputBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleMarshalledBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleOutput.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleTupleBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleTupleKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleTupleMarshalledBinding.java \
+ $(JAVA_SLEEPYCAT)/bind/tuple/TupleTupleMarshalledKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/collections/CurrentTransaction.java \
+ $(JAVA_SLEEPYCAT)/collections/DataCursor.java \
+ $(JAVA_SLEEPYCAT)/collections/DataView.java \
+ $(JAVA_SLEEPYCAT)/collections/KeyRange.java \
+ $(JAVA_SLEEPYCAT)/collections/KeyRangeException.java \
+ $(JAVA_SLEEPYCAT)/collections/MapEntryParameter.java \
+ $(JAVA_SLEEPYCAT)/collections/PrimaryKeyAssigner.java \
+ $(JAVA_SLEEPYCAT)/collections/RangeCursor.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredCollection.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredCollections.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredContainer.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredEntrySet.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredIterator.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredKeySet.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredList.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredMap.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredMapEntry.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredSortedEntrySet.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredSortedKeySet.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredSortedMap.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredSortedValueSet.java \
+ $(JAVA_SLEEPYCAT)/collections/StoredValueSet.java \
+ $(JAVA_SLEEPYCAT)/collections/TransactionRunner.java \
+ $(JAVA_SLEEPYCAT)/collections/TransactionWorker.java \
+ $(JAVA_SLEEPYCAT)/collections/TupleSerialFactory.java \
+ $(JAVA_SLEEPYCAT)/compat/DbCompat.java \
+ $(JAVA_SLEEPYCAT)/db/BtreePrefixCalculator.java \
+ $(JAVA_SLEEPYCAT)/db/BtreeStats.java \
+ $(JAVA_SLEEPYCAT)/db/CacheFile.java \
+ $(JAVA_SLEEPYCAT)/db/CacheFilePriority.java \
+ $(JAVA_SLEEPYCAT)/db/CacheFileStats.java \
+ $(JAVA_SLEEPYCAT)/db/CacheStats.java \
+ $(JAVA_SLEEPYCAT)/db/CheckpointConfig.java \
+ $(JAVA_SLEEPYCAT)/db/Cursor.java \
+ $(JAVA_SLEEPYCAT)/db/CursorConfig.java \
+ $(JAVA_SLEEPYCAT)/db/Database.java \
+ $(JAVA_SLEEPYCAT)/db/DatabaseConfig.java \
+ $(JAVA_SLEEPYCAT)/db/DatabaseEntry.java \
+ $(JAVA_SLEEPYCAT)/db/DatabaseException.java \
+ $(JAVA_SLEEPYCAT)/db/DatabaseStats.java \
+ $(JAVA_SLEEPYCAT)/db/DatabaseType.java \
+ $(JAVA_SLEEPYCAT)/db/DeadlockException.java \
+ $(JAVA_SLEEPYCAT)/db/Environment.java \
+ $(JAVA_SLEEPYCAT)/db/EnvironmentConfig.java \
+ $(JAVA_SLEEPYCAT)/db/ErrorHandler.java \
+ $(JAVA_SLEEPYCAT)/db/FeedbackHandler.java \
+ $(JAVA_SLEEPYCAT)/db/HashStats.java \
+ $(JAVA_SLEEPYCAT)/db/Hasher.java \
+ $(JAVA_SLEEPYCAT)/db/JoinConfig.java \
+ $(JAVA_SLEEPYCAT)/db/JoinCursor.java \
+ $(JAVA_SLEEPYCAT)/db/KeyRange.java \
+ $(JAVA_SLEEPYCAT)/db/Lock.java \
+ $(JAVA_SLEEPYCAT)/db/LockDetectMode.java \
+ $(JAVA_SLEEPYCAT)/db/LockMode.java \
+ $(JAVA_SLEEPYCAT)/db/LockNotGrantedException.java \
+ $(JAVA_SLEEPYCAT)/db/LockOperation.java \
+ $(JAVA_SLEEPYCAT)/db/LockRequest.java \
+ $(JAVA_SLEEPYCAT)/db/LockRequestMode.java \
+ $(JAVA_SLEEPYCAT)/db/LockStats.java \
+ $(JAVA_SLEEPYCAT)/db/LogCursor.java \
+ $(JAVA_SLEEPYCAT)/db/LogRecordHandler.java \
+ $(JAVA_SLEEPYCAT)/db/LogSequenceNumber.java \
+ $(JAVA_SLEEPYCAT)/db/LogStats.java \
+ $(JAVA_SLEEPYCAT)/db/MemoryException.java \
+ $(JAVA_SLEEPYCAT)/db/MessageHandler.java \
+ $(JAVA_SLEEPYCAT)/db/MultipleDataEntry.java \
+ $(JAVA_SLEEPYCAT)/db/MultipleEntry.java \
+ $(JAVA_SLEEPYCAT)/db/MultipleKeyDataEntry.java \
+ $(JAVA_SLEEPYCAT)/db/MultipleRecnoDataEntry.java \
+ $(JAVA_SLEEPYCAT)/db/OperationStatus.java \
+ $(JAVA_SLEEPYCAT)/db/PanicHandler.java \
+ $(JAVA_SLEEPYCAT)/db/PreparedTransaction.java \
+ $(JAVA_SLEEPYCAT)/db/QueueStats.java \
+ $(JAVA_SLEEPYCAT)/db/RecordNumberAppender.java \
+ $(JAVA_SLEEPYCAT)/db/RecoveryOperation.java \
+ $(JAVA_SLEEPYCAT)/db/ReplicationHandleDeadException.java \
+ $(JAVA_SLEEPYCAT)/db/ReplicationStats.java \
+ $(JAVA_SLEEPYCAT)/db/ReplicationStatus.java \
+ $(JAVA_SLEEPYCAT)/db/ReplicationTransport.java \
+ $(JAVA_SLEEPYCAT)/db/RunRecoveryException.java \
+ $(JAVA_SLEEPYCAT)/db/SecondaryConfig.java \
+ $(JAVA_SLEEPYCAT)/db/SecondaryCursor.java \
+ $(JAVA_SLEEPYCAT)/db/SecondaryDatabase.java \
+ $(JAVA_SLEEPYCAT)/db/SecondaryKeyCreator.java \
+ $(JAVA_SLEEPYCAT)/db/Sequence.java \
+ $(JAVA_SLEEPYCAT)/db/SequenceConfig.java \
+ $(JAVA_SLEEPYCAT)/db/SequenceStats.java \
+ $(JAVA_SLEEPYCAT)/db/StatsConfig.java \
+ $(JAVA_SLEEPYCAT)/db/Transaction.java \
+ $(JAVA_SLEEPYCAT)/db/TransactionConfig.java \
+ $(JAVA_SLEEPYCAT)/db/TransactionStats.java \
+ $(JAVA_SLEEPYCAT)/db/VerifyConfig.java \
+ $(JAVA_SLEEPYCAT)/db/internal/Db.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbClient.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbConstants.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbEnv.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbLock.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbLogc.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbMpoolFile.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbSequence.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbTxn.java \
+ $(JAVA_SLEEPYCAT)/db/internal/DbUtil.java \
+ $(JAVA_SLEEPYCAT)/db/internal/Dbc.java \
+ $(JAVA_SLEEPYCAT)/db/internal/db_java.java \
+ $(JAVA_SLEEPYCAT)/db/internal/db_javaJNI.java \
+ $(JAVA_SLEEPYCAT)/util/ExceptionUnwrapper.java \
+ $(JAVA_SLEEPYCAT)/util/ExceptionWrapper.java \
+ $(JAVA_SLEEPYCAT)/util/FastInputStream.java \
+ $(JAVA_SLEEPYCAT)/util/FastOutputStream.java \
+ $(JAVA_SLEEPYCAT)/util/IOExceptionWrapper.java \
+ $(JAVA_SLEEPYCAT)/util/RuntimeExceptionWrapper.java \
+ $(JAVA_SLEEPYCAT)/util/UtfOps.java
JAVA_EXSRCS=\
- $(JAVA_EXDIR)/AccessExample.java \
- $(JAVA_EXDIR)/BtRecExample.java \
- $(JAVA_EXDIR)/BulkAccessExample.java \
- $(JAVA_EXDIR)/EnvExample.java \
- $(JAVA_EXDIR)/LockExample.java \
- $(JAVA_EXDIR)/TpcbExample.java
+ $(JAVA_EXDIR)/collections/access/AccessExample.java \
+ $(JAVA_EXDIR)/collections/hello/HelloDatabaseWorld.java \
+ $(JAVA_EXDIR)/collections/ship/basic/PartData.java \
+ $(JAVA_EXDIR)/collections/ship/basic/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/basic/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/basic/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/basic/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/basic/ShipmentData.java \
+ $(JAVA_EXDIR)/collections/ship/basic/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/basic/SupplierData.java \
+ $(JAVA_EXDIR)/collections/ship/basic/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/basic/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/entity/Part.java \
+ $(JAVA_EXDIR)/collections/ship/entity/PartData.java \
+ $(JAVA_EXDIR)/collections/ship/entity/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/entity/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/entity/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/entity/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/entity/Shipment.java \
+ $(JAVA_EXDIR)/collections/ship/entity/ShipmentData.java \
+ $(JAVA_EXDIR)/collections/ship/entity/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/entity/Supplier.java \
+ $(JAVA_EXDIR)/collections/ship/entity/SupplierData.java \
+ $(JAVA_EXDIR)/collections/ship/entity/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/entity/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/factory/Part.java \
+ $(JAVA_EXDIR)/collections/ship/factory/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/factory/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/factory/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/factory/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/factory/Shipment.java \
+ $(JAVA_EXDIR)/collections/ship/factory/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/factory/Supplier.java \
+ $(JAVA_EXDIR)/collections/ship/factory/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/factory/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/index/PartData.java \
+ $(JAVA_EXDIR)/collections/ship/index/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/index/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/index/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/index/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/index/ShipmentData.java \
+ $(JAVA_EXDIR)/collections/ship/index/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/index/SupplierData.java \
+ $(JAVA_EXDIR)/collections/ship/index/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/index/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/MarshalledEnt.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/MarshalledKey.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/Part.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/Shipment.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/Supplier.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/marshal/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/Part.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/Shipment.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/Supplier.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/sentity/Weight.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/Part.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/PartData.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/PartKey.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/Sample.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/SampleDatabase.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/SampleViews.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/Shipment.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/ShipmentData.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/ShipmentKey.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/Supplier.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/SupplierData.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/SupplierKey.java \
+ $(JAVA_EXDIR)/collections/ship/tuple/Weight.java \
+ $(JAVA_EXDIR)/db/AccessExample.java \
+ $(JAVA_EXDIR)/db/BtRecExample.java \
+ $(JAVA_EXDIR)/db/BulkAccessExample.java \
+ $(JAVA_EXDIR)/db/EnvExample.java \
+ $(JAVA_EXDIR)/db/GettingStarted/ExampleDatabaseLoad.java \
+ $(JAVA_EXDIR)/db/GettingStarted/ExampleDatabaseRead.java \
+ $(JAVA_EXDIR)/db/GettingStarted/Inventory.java \
+ $(JAVA_EXDIR)/db/GettingStarted/InventoryBinding.java \
+ $(JAVA_EXDIR)/db/GettingStarted/ItemNameKeyCreator.java \
+ $(JAVA_EXDIR)/db/GettingStarted/MyDbs.java \
+ $(JAVA_EXDIR)/db/GettingStarted/Vendor.java \
+ $(JAVA_EXDIR)/db/LockExample.java \
+ $(JAVA_EXDIR)/db/RPCExample.java \
+ $(JAVA_EXDIR)/db/SequenceExample.java \
+ $(JAVA_EXDIR)/db/TpcbExample.java
TCL_OBJS=\
tcl_compat@o@ tcl_db@o@ tcl_db_pkg@o@ tcl_dbcursor@o@ tcl_env@o@ \
tcl_internal@o@ tcl_lock@o@ tcl_log@o@ tcl_mp@o@ tcl_rep@o@ \
- tcl_txn@o@ tcl_util@o@
+ tcl_seq@o@ tcl_txn@o@ tcl_util@o@
RPC_CLIENT_OBJS=\
client@o@ db_server_clnt@o@ db_server_xdr@o@ gen_client@o@ \
@@ -250,16 +483,19 @@ RPC_CXXSRV_OBJS=\
gen_db_server@o@
RPC_JAVASRV_SRCS=\
- $(JAVA_RPCDIR)/DbDispatcher.java \
- $(JAVA_RPCDIR)/DbServer.java \
+ $(JAVA_RPCDIR)/AssociateCallbacks.java \
+ $(JAVA_RPCDIR)/Dispatcher.java \
$(JAVA_RPCDIR)/FreeList.java \
+ $(JAVA_RPCDIR)/JoinCursorAdapter.java \
$(JAVA_RPCDIR)/LocalIterator.java \
$(JAVA_RPCDIR)/RpcDb.java \
$(JAVA_RPCDIR)/RpcDbEnv.java \
$(JAVA_RPCDIR)/RpcDbTxn.java \
$(JAVA_RPCDIR)/RpcDbc.java \
+ $(JAVA_RPCDIR)/Server.java \
$(JAVA_RPCDIR)/Timer.java \
- $(JAVA_RPCDIR)/gen/DbServerStub.java \
+ $(JAVA_RPCDIR)/Util.java \
+ $(JAVA_RPCDIR)/gen/ServerStubs.java \
$(JAVA_RPCDIR)/gen/__db_associate_msg.java \
$(JAVA_RPCDIR)/gen/__db_associate_reply.java \
$(JAVA_RPCDIR)/gen/__db_bt_maxkey_msg.java \
@@ -280,7 +516,33 @@ RPC_JAVASRV_SRCS=\
$(JAVA_RPCDIR)/gen/__db_extentsize_reply.java \
$(JAVA_RPCDIR)/gen/__db_flags_msg.java \
$(JAVA_RPCDIR)/gen/__db_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_bt_minkey_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_bt_minkey_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_encrypt_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_encrypt_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_extentsize_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_extentsize_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_h_ffactor_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_h_ffactor_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_h_nelem_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_h_nelem_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_lorder_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_lorder_reply.java \
$(JAVA_RPCDIR)/gen/__db_get_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_name_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_name_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_open_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_open_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_pagesize_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_pagesize_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_delim_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_delim_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_len_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_len_reply.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_pad_msg.java \
+ $(JAVA_RPCDIR)/gen/__db_get_re_pad_reply.java \
$(JAVA_RPCDIR)/gen/__db_get_reply.java \
$(JAVA_RPCDIR)/gen/__db_h_ffactor_msg.java \
$(JAVA_RPCDIR)/gen/__db_h_ffactor_reply.java \
@@ -344,6 +606,16 @@ RPC_JAVASRV_SRCS=\
$(JAVA_RPCDIR)/gen/__env_encrypt_reply.java \
$(JAVA_RPCDIR)/gen/__env_flags_msg.java \
$(JAVA_RPCDIR)/gen/__env_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__env_get_cachesize_msg.java \
+ $(JAVA_RPCDIR)/gen/__env_get_cachesize_reply.java \
+ $(JAVA_RPCDIR)/gen/__env_get_encrypt_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__env_get_encrypt_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__env_get_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__env_get_flags_reply.java \
+ $(JAVA_RPCDIR)/gen/__env_get_home_msg.java \
+ $(JAVA_RPCDIR)/gen/__env_get_home_reply.java \
+ $(JAVA_RPCDIR)/gen/__env_get_open_flags_msg.java \
+ $(JAVA_RPCDIR)/gen/__env_get_open_flags_reply.java \
$(JAVA_RPCDIR)/gen/__env_open_msg.java \
$(JAVA_RPCDIR)/gen/__env_open_reply.java \
$(JAVA_RPCDIR)/gen/__env_remove_msg.java \
@@ -364,8 +636,8 @@ RPC_JAVASRV_SRCS=\
UTIL_PROGS=\
@ADDITIONAL_PROGS@ \
- db_archive db_checkpoint db_deadlock \
- db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify
+ db_archive db_checkpoint db_deadlock db_dump db_load db_printlog \
+ db_recover db_stat db_upgrade db_verify
##################################################
# List of files installed into the library directory.
@@ -375,13 +647,13 @@ LIB_INSTALL_FILE_LIST=\
$(libso) \
$(libso_default) \
$(libso_major) \
- $(libso_static) \
+ $(libdb_version) \
$(libso_target) \
$(libcxx) \
$(libxso) \
$(libxso_default) \
$(libxso_major) \
- $(libxso_static) \
+ $(libcxx_version) \
$(libxso_target) \
$(libtso) \
$(libtso_default) \
@@ -398,10 +670,9 @@ LIB_INSTALL_FILE_LIST=\
$(libj_jarfile)
##################################################
-# We're building a standard library or a RPM file hierarchy, potentially
-# for Embedix. Note: "all" must be the first target in the Makefile.
+# Note: "all" must be the first target in the Makefile.
##################################################
-all: @BUILD_TARGET@ libdb.a
+all: @BUILD_TARGET@
install-strip install: all @INSTALL_TARGET@
@@ -410,29 +681,49 @@ install-strip install: all @INSTALL_TARGET@
##################################################
library_build: @INSTALL_LIBS@ @ADDITIONAL_LANG@ $(UTIL_PROGS)
-$(libdb): $(C_OBJS)
+# Static C library named libdb.a.
+$(libdb): $(DEF_LIB)
+
+# Real static C library.
+$(libdb_version): $(C_OBJS)
$(ar) cr $@ $(C_OBJS)
test ! -f $(ranlib) || $(ranlib) $@
+ $(rm) -f $(libdb)
+ $(ln) -s $(libdb_version) $(libdb)
-$(libcxx): $(CXX_OBJS) $(C_OBJS)
+# Shared C library.
+$(libso_target): $(C_OBJS)
+ $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(LIBSO_LIBS)
+ $(rm) -f $(libdb)
+ $(ln) -s .libs/$(libdb_version) $(libdb)
+
+# Static C++ library named libdb_cxx.a.
+$(libcxx): $(DEF_LIB_CXX)
+
+# Real static C++ library.
+$(libcxx_version): $(CXX_OBJS) $(C_OBJS)
$(ar) cr $@ $(CXX_OBJS) $(C_OBJS)
test ! -f $(ranlib) || $(ranlib) $@
+ $(rm) -f $(libcxx)
+ $(ln) -s $(libcxx_version) $(libcxx)
-$(libso_target): $(C_OBJS)
- $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) $(LIBSO_LIBS)
+# Shared C++ library.
+$(libxso_target): $(CXX_OBJS) $(C_OBJS)
+ $(XSOLINK) $(SOFLAGS) $(LDFLAGS) \
+ -o $@ $(CXX_OBJS) $(C_OBJS) $(LIBXSO_LIBS)
+ $(rm) -f $(libcxx)
+ $(ln) -s .libs/$(libcxx_version) $(libcxx)
+# Shared Java library.
$(libjso_target): $(JAVA_OBJS) $(C_OBJS)
- $(SOLINK) -jnimodule $(SOFLAGS) $(LDFLAGS) \
+ $(SOLINK) -shrext @JMODSUFFIX@ $(SOFLAGS) $(LDFLAGS) \
-o $@ $(JAVA_OBJS) $(C_OBJS) $(LIBJSO_LIBS)
+# Shared Tcl library.
$(libtso_target): $(TCL_OBJS) $(C_OBJS)
- $(SOLINK) -module $(SOFLAGS) $(LDFLAGS) \
+ $(SOLINK) @LIBTSO_MODULE@ $(SOFLAGS) $(LDFLAGS) \
-o $@ $(TCL_OBJS) $(C_OBJS) $(LIBTSO_LIBS)
-$(libxso_target): $(CXX_OBJS) $(C_OBJS)
- $(XSOLINK) $(SOFLAGS) $(LDFLAGS) \
- -o $@ $(CXX_OBJS) $(C_OBJS) $(LIBXSO_LIBS)
-
##################################################
# Creating individual dependencies and actions for building class
# files is possible, but it is very messy and error prone.
@@ -443,22 +734,23 @@ $(libj_jarfile): $(JAVA_DBSRCS)
@test -d $(JAVA_CLASSTOP) || \
($(mkdir) -p $(JAVA_CLASSTOP) && $(chmod) $(dmode) $(JAVA_CLASSTOP))
$(JAVAC) -d $(JAVA_CLASSTOP) $(JAVACFLAGS) $(JAVA_DBSRCS)
- cd $(JAVA_CLASSTOP) && $(JAR) cf ../$(libj_jarfile) $(JAVA_DBREL)
+ cd $(JAVA_CLASSTOP) && $(JAR) cf ../$(libj_jarfile) ./com/sleepycat
$(libj_exjarfile): $(libj_jarfile) $(JAVA_EXSRCS)
- @test -d $(JAVA_CLASSTOP) || \
- ($(mkdir) -p $(JAVA_CLASSTOP) && $(chmod) $(dmode) $(JAVA_CLASSTOP))
- $(JAVAC) -d $(JAVA_CLASSTOP) $(JAVACFLAGS) $(JAVA_EXSRCS)
- cd $(JAVA_CLASSTOP) && $(JAR) cf ../$(libj_exjarfile) $(JAVA_EXREL)
+ @test -d $(JAVA_EXCLASSTOP) || \
+ ($(mkdir) -p $(JAVA_EXCLASSTOP) && \
+ $(chmod) $(dmode) $(JAVA_EXCLASSTOP))
+ $(JAVAC) -classpath $(libj_jarfile) -d $(JAVA_EXCLASSTOP) \
+ $(JAVACFLAGS) $(JAVA_EXSRCS)
+ cd $(JAVA_EXCLASSTOP) && $(JAR) cf ../$(libj_exjarfile) .
$(rpc_jarfile): $(libj_jarfile) $(RPC_JAVASRV_SRCS)
- @test -d $(JAVA_RPCCLASSES) || \
- ($(mkdir) -p $(JAVA_RPCCLASSES) && \
- $(chmod) $(dmode) $(JAVA_RPCCLASSES))
+ @test -d $(JAVA_RPCCLASSTOP) || \
+ ($(mkdir) -p $(JAVA_RPCCLASSTOP) && \
+ $(chmod) $(dmode) $(JAVA_RPCCLASSTOP))
env CLASSPATH=$(CLASSPATH):$(JAVA_RPCDIR)/oncrpc.jar \
- @JAVAC@ -d $(JAVA_RPCCLASSES) $(JAVACFLAGS) $(RPC_JAVASRV_SRCS)
- cd $(JAVA_RPCCLASSES) && $(JAR) cf ../$(rpc_jarfile) $(JAVA_RPCREL)
-
+ @JAVAC@ -d $(JAVA_RPCCLASSTOP) $(JAVACFLAGS) $(RPC_JAVASRV_SRCS)
+ cd $(JAVA_RPCCLASSTOP) && $(JAR) cf ../$(rpc_jarfile) $(JAVA_RPCREL)
##################################################
# Utilities
@@ -474,11 +766,11 @@ berkeley_db_cxxsvc: $(RPC_CXXSRV_OBJS) util_log@o@ $(DEF_LIB_CXX)
$(POSTLINK) $@
berkeley_db_javasvc: $(rpc_jarfile)
- echo > $@ "#!/bin/sh"
- echo >> $@ CLASSPATH="$(CLASSPATH):$(rpc_jarfile):$(JAVA_RPCDIR)/oncrpc.jar"
- echo >> $@ LD_LIBRARY_PATH=.libs
- echo >> $@ export CLASSPATH LD_LIBRARY_PATH
- echo >> $@ exec java com.sleepycat.db.rpcserver.DbServer \$$@
+ echo "#!/bin/sh" > $@
+ echo CLASSPATH="$(CLASSPATH):$(rpc_jarfile):$(JAVA_RPCDIR)/oncrpc.jar" >> $@
+ echo LD_LIBRARY_PATH=.libs >> $@
+ echo export CLASSPATH LD_LIBRARY_PATH >> $@
+ echo exec java com.sleepycat.db.rpcserver.Server \$$@ >> $@
chmod +x $@
db_archive: db_archive@o@ util_sig@o@ $(DEF_LIB)
@@ -497,20 +789,22 @@ db_deadlock: db_deadlock@o@ util_log@o@ util_sig@o@ $(DEF_LIB)
$(POSTLINK) $@
db_dump: db_dump@o@ util_cache@o@ util_sig@o@ $(DEF_LIB)
- $(CCLINK) -o $@ $(LDFLAGS) db_dump@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_dump@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
-db_dump185: db_dump185@o@ @LTLIBOBJS@
- $(CCLINK) -o $@ $(LDFLAGS) db_dump185@o@ @LTLIBOBJS@ $(DB185LIB)
+db_dump185: db_dump185@o@ @REPLACEMENT_OBJS@
+ $(CCLINK) -o $@ $(LDFLAGS) db_dump185@o@ @REPLACEMENT_OBJS@ $(DB185LIB)
$(POSTLINK) $@
db_load: db_load@o@ util_cache@o@ util_sig@o@ $(DEF_LIB)
- $(CCLINK) -o $@ $(LDFLAGS) db_load@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_load@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
-db_printlog: db_printlog@o@ util_sig@o@ $(DEF_LIB)
+db_printlog: db_printlog@o@ $(PRINT_OBJS) util_sig@o@ $(DEF_LIB)
$(CCLINK) -o $@ $(LDFLAGS) \
- db_printlog@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ db_printlog@o@ $(PRINT_OBJS) util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
db_recover: db_recover@o@ util_sig@o@ $(DEF_LIB)
@@ -519,7 +813,8 @@ db_recover: db_recover@o@ util_sig@o@ $(DEF_LIB)
$(POSTLINK) $@
db_stat: db_stat@o@ util_cache@o@ util_sig@o@ $(DEF_LIB)
- $(CCLINK) -o $@ $(LDFLAGS) db_stat@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_stat@o@ util_cache@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
db_upgrade: db_upgrade@o@ util_sig@o@ $(DEF_LIB)
@@ -541,129 +836,109 @@ library_install: install_include install_lib install_utilities install_docs
uninstall: uninstall_include uninstall_lib uninstall_utilities uninstall_docs
install_setup:
- @test -d $(prefix) || \
- ($(mkdir) -p $(prefix) && $(chmod) $(dmode) $(prefix))
+ @test -d $(DESTDIR)$(prefix) || \
+ ($(mkdir) -p $(DESTDIR)$(prefix) && \
+ $(chmod) $(dmode) $(DESTDIR)$(prefix))
INCDOT= db.h db_cxx.h @ADDITIONAL_INCS@
-INCINC= cxx_common.h cxx_except.h
install_include:
- @echo "Installing DB include files: $(includedir) ..."
- @test -d $(includedir) || \
- ($(mkdir) -p $(includedir) && $(chmod) $(dmode) $(includedir))
- @cd $(includedir) && $(rm) -f $(INCDOT) $(INCINC)
- @$(cp) -p $(INCDOT) $(includedir)
- @cd $(srcdir)/dbinc/ && $(cp) -p $(INCINC) $(includedir)
- @cd $(includedir) && $(chmod) $(fmode) $(INCDOT) $(INCINC)
+ @echo "Installing DB include files: $(DESTDIR)$(includedir) ..."
+ @test -d $(DESTDIR)$(includedir) || \
+ ($(mkdir) -p $(DESTDIR)$(includedir) && \
+ $(chmod) $(dmode) $(DESTDIR)$(includedir))
+ @cd $(DESTDIR)$(includedir) && $(rm) -f $(INCDOT)
+ @$(cp) -p $(INCDOT) $(DESTDIR)$(includedir)
+ @cd $(DESTDIR)$(includedir) && $(chmod) $(fmode) $(INCDOT)
uninstall_include:
- @cd $(includedir) && $(rm) -f $(INCDOT) $(INCINC)
+ @cd $(DESTDIR)$(includedir) && $(rm) -f $(INCDOT)
install_lib:
- @echo "Installing DB library: $(libdir) ..."
- @test -d $(libdir) || \
- ($(mkdir) -p $(libdir) && $(chmod) $(dmode) $(libdir))
- @cd $(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
- @$(INSTALLER) @INSTALL_LIBS@ $(libdir)
- @(cd $(libdir) && \
+ @echo "Installing DB library: $(DESTDIR)$(libdir) ..."
+ @test -d $(DESTDIR)$(libdir) || \
+ ($(mkdir) -p $(DESTDIR)$(libdir) && \
+ $(chmod) $(dmode) $(DESTDIR)$(libdir))
+ @cd $(DESTDIR)$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
+ @$(INSTALLER) @INSTALL_LIBS@ $(DESTDIR)$(libdir)
+ @(cd $(DESTDIR)$(libdir) && \
test -f $(libso) && $(ln) -s $(libso) $(libso_default); \
test -f $(libso) && $(ln) -s $(libso) $(libso_major); \
- test -f $(libso_static) && $(ln) -s $(libso_static) $(libdb); \
test -f $(libxso) && $(ln) -s $(libxso) $(libxso_default); \
test -f $(libxso) && $(ln) -s $(libxso) $(libxso_major); \
- test -f $(libxso_static) && $(ln) -s $(libxso_static) $(libcxx); \
test -f $(libtso) && $(ln) -s $(libtso) $(libtso_default); \
test -f $(libtso) && $(ln) -s $(libtso) $(libtso_major); \
test -f $(libjso) && $(ln) -s $(libjso) $(libjso_default); \
test -f $(libjso) && $(ln) -s $(libjso) $(libjso_major); \
test -f $(libjso) && $(ln) -s $(libjso) $(libjso_g)) || true
@(test -f $(libj_jarfile) && \
- $(cp) $(libj_jarfile) $(libdir) && \
- $(chmod) $(fmode) $(libdir)/$(libj_jarfile)) || true
+ $(cp) $(libj_jarfile) $(DESTDIR)$(libdir) && \
+ $(chmod) $(fmode) $(DESTDIR)$(libdir)/$(libj_jarfile)) || true
uninstall_lib:
- @cd $(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
+ @cd $(DESTDIR)$(libdir) && $(rm) -f $(LIB_INSTALL_FILE_LIST)
install_utilities:
- echo "Installing DB utilities: $(bindir) ..."
- @test -d $(bindir) || \
- ($(mkdir) -p $(bindir) && $(chmod) $(dmode) $(bindir))
+ @echo "Installing DB utilities: $(DESTDIR)$(bindir) ..."
+ @test -d $(DESTDIR)$(bindir) || \
+ ($(mkdir) -p $(DESTDIR)$(bindir) && \
+ $(chmod) $(dmode) $(DESTDIR)$(bindir))
@for i in $(UTIL_PROGS); do \
- $(rm) -f $(bindir)/$$i $(bindir)/$$i.exe; \
+ $(rm) -f $(DESTDIR)$(bindir)/$$i $(DESTDIR)$(bindir)/$$i.exe; \
test -f $$i.exe && i=$$i.exe || true; \
- $(INSTALLER) $$i $(bindir)/$$i; \
- test -f $(strip) && $(strip) $(bindir)/$$i || true; \
- $(chmod) $(emode) $(bindir)/$$i; \
+ $(INSTALLER) $$i $(DESTDIR)$(bindir)/$$i; \
+ test -f $(strip) && $(strip) $(DESTDIR)$(bindir)/$$i || true; \
+ $(chmod) $(emode) $(DESTDIR)$(bindir)/$$i; \
done
uninstall_utilities:
- @(cd $(bindir); for i in $(UTIL_PROGS); do \
+ @(cd $(DESTDIR)$(bindir); for i in $(UTIL_PROGS); do \
$(rm) -f $$i $$i.exe; \
done)
-DOCLIST=\
- api_c api_cxx api_java api_tcl images index.html ref reftoc.html \
+DOCLIST=api_c api_cxx api_tcl collections gsg images index.html java ref \
sleepycat utility
+
install_docs:
- @echo "Installing documentation: $(docdir) ..."
- @test -d $(docdir) || \
- ($(mkdir) -p $(docdir) && $(chmod) $(dmode) $(docdir))
- @cd $(docdir) && $(rm) -rf $(DOCLIST)
- @cd $(srcdir)/docs && $(cp) -pr $(DOCLIST) $(docdir)/
+ @echo "Installing documentation: $(DESTDIR)$(docdir) ..."
+ @test -d $(DESTDIR)$(docdir) || \
+ ($(mkdir) -p $(DESTDIR)$(docdir) && \
+ $(chmod) $(dmode) $(DESTDIR)$(docdir))
+ @cd $(DESTDIR)$(docdir) && $(rm) -rf $(DOCLIST)
+ @cd $(srcdir)/docs && $(cp) -pr $(DOCLIST) $(DESTDIR)$(docdir)/
uninstall_docs:
- @cd $(docdir) && $(rm) -rf $(DOCLIST)
-
-##################################################
-# RPM, Embedix build and install.
-##################################################
-RPM_ARCHIVE=db-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@.tar.gz
-rpm_build:
- @$(rm) -rf BUILD RPMS SOURCES SPECS SRPMS RPM_INSTALL
- @$(mkdir) -p BUILD && $(chmod) $(dmode) BUILD
- @$(mkdir) -p RPMS/i386 && $(chmod) $(dmode) RPMS RPMS/i386
- @$(mkdir) -p SOURCES && $(chmod) $(dmode) SOURCES
- @$(mkdir) -p SPECS && $(chmod) $(dmode) SPECS
- @$(mkdir) -p SRPMS && $(chmod) $(dmode) SRPMS
- $(cp) @db_cv_path_rpm_archive@/$(RPM_ARCHIVE) SOURCES/
- $(cp) db.spec SPECS/db.spec
- $(rpm) --rcfile @CONFIGURATION_PATH@/rpmrc -ba SPECS/db.spec
-
-rpm_install:
-
-RPM_SRPMS=db-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@-1.src.rpm
-embedix_install:
- $(cp) db.ecd @db_cv_path_embedix_install@/config-data/ecds/db.ecd
- $(chmod) $(fmode) @db_cv_path_embedix_install@/config-data/ecds/db.ecd
- $(cp) SRPMS/$(RPM_SRPMS) \
- @db_cv_path_embedix_install@/Packages/SRPMS/$(RPM_SRPMS)
- $(chmod) $(fmode) \
- @db_cv_path_embedix_install@/Packages/SRPMS/$(RPM_SRPMS)
+ @cd $(docdir) && $(rm) -rf $(DESTDIR)$(DOCLIST)
##################################################
# Remaining standard Makefile targets.
##################################################
CLEAN_LIST=\
- berkeley_db_svc berkeley_db_cxxsvc berkeley_db_javasvc \
- db_dump185 db_perf dbs bench_001 \
- ex_access ex_apprec ex_btrec ex_dbclient ex_env ex_lock ex_mpool \
- ex_repquote ex_thread ex_tpcb excxx_access excxx_btrec excxx_env \
- excxx_lock excxx_mpool excxx_tpcb rpmrc
+ bench_001 berkeley_db_cxxsvc berkeley_db_javasvc berkeley_db_svc \
+ db_dump185 db_perf dbs ex_access ex_apprec ex_btrec ex_dbclient \
+ ex_env ex_lock ex_mpool ex_repquote ex_sequence ex_thread \
+ ex_tpcb example_database_load example_database_read excxx_access \
+ excxx_btrec excxx_env excxx_example_database_load \
+ excxx_example_database_read excxx_lock excxx_mpool \
+ excxx_sequence excxx_tpcb
mostly-clean clean:
$(rm) -rf $(C_OBJS)
$(rm) -rf $(CXX_OBJS) $(JAVA_OBJS) $(TCL_OBJS)
$(rm) -rf $(RPC_CLIENT_OBJS) $(RPC_SRV_OBJS) $(RPC_CXXSRV_OBJS)
$(rm) -rf $(UTIL_PROGS) *.exe $(CLEAN_LIST)
- $(rm) -rf $(JAVA_CLASSTOP) $(JAVA_RPCCLASSES) $(rpc_jarfile)
+ $(rm) -rf $(JAVA_CLASSTOP) $(JAVA_EXCLASSTOP)
+ $(rm) -rf $(JAVA_RPCCLASSES) $(rpc_jarfile)
$(rm) -rf tags *@o@ *.o *.o.lock *.lo core *.core
- $(rm) -rf ALL.OUT.* BUILD PARALLEL_TESTDIR.* RPMS RPM_INSTALL
- $(rm) -rf RUN_LOG RUNQUEUE SOURCES SPECS SRPMS TESTDIR TESTDIR.A
- $(rm) -rf logtrack_seen.db tm .libs $(LIB_INSTALL_FILE_LIST)
+ $(rm) -rf ALL.OUT.* PARALLEL_TESTDIR.*
+ $(rm) -rf RUN_LOG RUNQUEUE TESTDIR TESTDIR.A
+ $(rm) -rf TEST.LIST logtrack_seen.db tm .libs $(LIB_INSTALL_FILE_LIST)
REALCLEAN_LIST=\
- Makefile confdefs.h config.cache config.log config.status db.h \
- db.spec db185_int.h db_185.h db_config.h db_cxx.h db_int.h \
- db_int_def.h include.tcl
+ Makefile confdefs.h config.cache config.log config.status \
+ configure.lineno db.h db185_int.h db_185.h db_config.h \
+ db_cxx.h db_int.h db_int_def.h include.tcl \
+ db_server.h db_server_clnt.c db_server_svc.c db_server_xdr.c \
+ gen_db_server.c win_db.h
distclean maintainer-clean realclean: clean
$(rm) -rf $(REALCLEAN_LIST)
@@ -672,7 +947,7 @@ distclean maintainer-clean realclean: clean
check depend dvi info obj TAGS:
@echo "$@: make target not supported" && true
-dist:
+dist rpm rpmbuild:
@echo "$@: make target not supported" && false
##################################################
@@ -706,19 +981,19 @@ DBS_OBJS=\
dbs_yield@o@
dbs: $(DBS_OBJS) $(DEF_LIB)
$(CCLINK) -o $@ \
- $(LDFLAGS) $(DBS_OBJS) $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(LDFLAGS) $(DBS_OBJS) $(DEF_LIB) $(TEST_LIBS) $(LIBS)
$(POSTLINK) $@
db_perf@o@: $(srcdir)/test_perf/db_perf.c
$(CC) $(CFLAGS) $?
-perf_cache_check@o@: $(srcdir)/test_perf/perf_cache_check.c
- $(CC) $(CFLAGS) $?
perf_checkpoint@o@: $(srcdir)/test_perf/perf_checkpoint.c
$(CC) $(CFLAGS) $?
perf_config@o@: $(srcdir)/test_perf/perf_config.c
$(CC) $(CFLAGS) $?
perf_dbs@o@: $(srcdir)/test_perf/perf_dbs.c
$(CC) $(CFLAGS) $?
+perf_dead@o@: $(srcdir)/test_perf/perf_dead.c
+ $(CC) $(CFLAGS) $?
perf_debug@o@: $(srcdir)/test_perf/perf_debug.c
$(CC) $(CFLAGS) $?
perf_file@o@: $(srcdir)/test_perf/perf_file.c
@@ -737,6 +1012,10 @@ perf_rand@o@: $(srcdir)/test_perf/perf_rand.c
$(CC) $(CFLAGS) $?
perf_spawn@o@: $(srcdir)/test_perf/perf_spawn.c
$(CC) $(CFLAGS) $?
+perf_stat@o@: $(srcdir)/test_perf/perf_stat.c
+ $(CC) $(CFLAGS) $?
+perf_sync@o@: $(srcdir)/test_perf/perf_sync.c
+ $(CC) $(CFLAGS) $?
perf_thread@o@: $(srcdir)/test_perf/perf_thread.c
$(CC) $(CFLAGS) $?
perf_trickle@o@: $(srcdir)/test_perf/perf_trickle.c
@@ -748,20 +1027,21 @@ perf_util@o@: $(srcdir)/test_perf/perf_util.c
perf_vx@o@: $(srcdir)/test_perf/perf_vx.c
$(CC) $(CFLAGS) $?
DBPERF_OBJS=\
- db_perf@o@ perf_cache_check@o@ perf_checkpoint@o@ perf_config@o@ \
- perf_dbs@o@ perf_debug@o@ perf_file@o@ perf_key@o@ perf_log@o@ \
- perf_misc@o@ perf_op@o@ perf_parse@o@ perf_rand@o@ \
- perf_spawn@o@ perf_thread@o@ perf_trickle@o@ perf_txn@o@ \
- perf_util@o@ perf_vx@o@
+ db_perf@o@ perf_checkpoint@o@ perf_config@o@ perf_dbs@o@ \
+ perf_dead@o@ perf_debug@o@ perf_file@o@ perf_key@o@ perf_log@o@ \
+ perf_misc@o@ perf_op@o@ perf_parse@o@ perf_rand@o@ perf_spawn@o@ \
+ perf_stat@o@ perf_sync@o@ perf_thread@o@ perf_trickle@o@ \
+ perf_txn@o@ perf_util@o@ perf_vx@o@
+
db_perf: $(DBPERF_OBJS) $(DEF_LIB)
$(CCLINK) -o $@ \
- $(LDFLAGS) $(DBPERF_OBJS) $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(LDFLAGS) $(DBPERF_OBJS) $(DEF_LIB) $(TEST_LIBS) $(LIBS)
$(POSTLINK) $@
tm@o@: $(srcdir)/mutex/tm.c
$(CC) $(CFLAGS) $?
tm: tm@o@ $(DEF_LIB)
- $(CCLINK) -o $@ $(LDFLAGS) tm@o@ $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(CCLINK) -o $@ $(LDFLAGS) tm@o@ $(DEF_LIB) $(TEST_LIBS) $(LIBS)
$(POSTLINK) $@
##################################################
@@ -788,7 +1068,7 @@ ex_apprec_rec@o@: $(srcdir)/examples_c/ex_apprec/ex_apprec_rec.c
EX_APPREC_OBJS=ex_apprec@o@ ex_apprec_auto@o@ ex_apprec_rec@o@
ex_apprec: $(EX_APPREC_OBJS) $(DEF_LIB)
$(CCLINK) -o $@ \
- $(LDFLAGS) $(EX_APPREC_OBJS) $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(LDFLAGS) $(EX_APPREC_OBJS) $(DEF_LIB) $(TEST_LIBS) $(LIBS)
ex_btrec@o@: $(srcdir)/examples_c/ex_btrec.c
$(CC) $(CFLAGS) $?
@@ -834,14 +1114,20 @@ EX_RQ_OBJS=\
ex_rq_client@o@ ex_rq_main@o@ ex_rq_master@o@ ex_rq_net@o@ ex_rq_util@o@
ex_repquote: $(EX_RQ_OBJS) $(DEF_LIB)
$(CCLINK) -o $@ \
- $(LDFLAGS) $(EX_RQ_OBJS) $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(LDFLAGS) $(EX_RQ_OBJS) $(DEF_LIB) $(TEST_LIBS) $(LIBS)
+ $(POSTLINK) $@
+
+ex_sequence@o@: $(srcdir)/examples_c/ex_sequence.c
+ $(CC) $(CFLAGS) $?
+ex_sequence: ex_sequence@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) ex_sequence@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
ex_thread@o@: $(srcdir)/examples_c/ex_thread.c
$(CC) $(CFLAGS) $?
ex_thread: ex_thread@o@ $(DEF_LIB)
$(CCLINK) -o $@ \
- $(LDFLAGS) ex_thread@o@ $(DEF_LIB) @LOAD_LIBS@ $(LIBS)
+ $(LDFLAGS) ex_thread@o@ $(DEF_LIB) $(TEST_LIBS) $(LIBS)
$(POSTLINK) $@
ex_tpcb@o@: $(srcdir)/examples_c/ex_tpcb.c
@@ -850,6 +1136,26 @@ ex_tpcb: ex_tpcb@o@ $(DEF_LIB)
$(CCLINK) -o $@ $(LDFLAGS) ex_tpcb@o@ $(DEF_LIB) $(LIBS)
$(POSTLINK) $@
+gettingstarted_common@o@: \
+ $(srcdir)/examples_c/getting_started/gettingstarted_common.c
+ $(CC) -I $(srcdir)/examples_c/getting_started $(CFLAGS) $?
+example_database_load@o@: \
+ $(srcdir)/examples_c/getting_started/example_database_load.c
+ $(CC) $(CFLAGS) $?
+example_database_read@o@: \
+ $(srcdir)/examples_c/getting_started/example_database_read.c
+ $(CC) $(CFLAGS) $?
+example_database_load: example_database_load@o@ gettingstarted_common@o@ \
+ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ example_database_load@o@ gettingstarted_common@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+example_database_read: example_database_read@o@ gettingstarted_common@o@ \
+ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ example_database_read@o@ gettingstarted_common@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
##################################################
# Example programs for C++.
##################################################
@@ -883,12 +1189,37 @@ excxx_mpool: MpoolExample@o@ $(DEF_LIB_CXX)
$(CXXLINK) -o $@ $(LDFLAGS) MpoolExample@o@ $(DEF_LIB_CXX) $(LIBS)
$(POSTLINK) $@
+SequenceExample@o@: $(srcdir)/examples_cxx/SequenceExample.cpp
+ $(CXX) $(CXXFLAGS) $?
+excxx_sequence: SequenceExample@o@ $(DEF_LIB_CXX)
+ $(CXXLINK) -o $@ $(LDFLAGS) SequenceExample@o@ $(DEF_LIB_CXX) $(LIBS)
+ $(POSTLINK) $@
+
TpcbExample@o@: $(srcdir)/examples_cxx/TpcbExample.cpp
$(CXX) $(CXXFLAGS) $?
excxx_tpcb: TpcbExample@o@ $(DEF_LIB_CXX)
$(CXXLINK) -o $@ $(LDFLAGS) TpcbExample@o@ $(DEF_LIB_CXX) $(LIBS)
$(POSTLINK) $@
+excxx_example_database_load@o@: \
+ $(srcdir)/examples_cxx/getting_started/excxx_example_database_load.cpp
+ $(CXX) -I$(srcdir)/examples_cxx/getting_started $(CXXFLAGS) $?
+excxx_example_database_read@o@: \
+ $(srcdir)/examples_cxx/getting_started/excxx_example_database_read.cpp
+ $(CXX) -I$(srcdir)/examples_cxx/getting_started $(CXXFLAGS) $?
+MyDb@o@: $(srcdir)/examples_cxx/getting_started/MyDb.cpp
+ $(CXX) -I$(srcdir)/examples_cxx/getting_started $(CXXFLAGS) $?
+excxx_example_database_load: \
+ excxx_example_database_load@o@ MyDb@o@ $(DEF_LIB_CXX)
+ $(CXXLINK) -o $@ $(LDFLAGS) \
+ excxx_example_database_load@o@ MyDb@o@ $(DEF_LIB_CXX) $(LIBS)
+ $(POSTLINK) $@
+excxx_example_database_read: \
+ excxx_example_database_read@o@ MyDb@o@ $(DEF_LIB_CXX)
+ $(CXXLINK) -o $@ $(LDFLAGS) \
+ excxx_example_database_read@o@ MyDb@o@ $(DEF_LIB_CXX) $(LIBS)
+ $(POSTLINK) $@
+
##################################################
# C API build rules.
##################################################
@@ -922,8 +1253,6 @@ bt_search@o@: $(srcdir)/btree/bt_search.c
$(CC) $(CFLAGS) $?
bt_split@o@: $(srcdir)/btree/bt_split.c
$(CC) $(CFLAGS) $?
-bt_stack@o@: $(srcdir)/btree/bt_stack.c
- $(CC) $(CFLAGS) $?
bt_stat@o@: $(srcdir)/btree/bt_stat.c
$(CC) $(CFLAGS) $?
bt_upgrade@o@: $(srcdir)/btree/bt_upgrade.c
@@ -932,12 +1261,18 @@ bt_verify@o@: $(srcdir)/btree/bt_verify.c
$(CC) $(CFLAGS) $?
btree_auto@o@: $(srcdir)/btree/btree_auto.c
$(CC) $(CFLAGS) $?
+btree_autop@o@: $(srcdir)/btree/btree_autop.c
+ $(CC) $(CFLAGS) $?
crdel_auto@o@: $(srcdir)/db/crdel_auto.c
$(CC) $(CFLAGS) $?
+crdel_autop@o@: $(srcdir)/db/crdel_autop.c
+ $(CC) $(CFLAGS) $?
crdel_rec@o@: $(srcdir)/db/crdel_rec.c
$(CC) $(CFLAGS) $?
crypto@o@: $(srcdir)/crypto/crypto.c
$(CC) $(CFLAGS) $?
+crypto_stub@o@: $(srcdir)/common/crypto_stub.c
+ $(CC) $(CFLAGS) $?
db185@o@: $(srcdir)/db185/db185.c
$(CC) $(CFLAGS) $?
db@o@: $(srcdir)/db/db.c
@@ -946,6 +1281,8 @@ db_am@o@: $(srcdir)/db/db_am.c
$(CC) $(CFLAGS) $?
db_auto@o@: $(srcdir)/db/db_auto.c
$(CC) $(CFLAGS) $?
+db_autop@o@: $(srcdir)/db/db_autop.c
+ $(CC) $(CFLAGS) $?
db_byteorder@o@: $(srcdir)/common/db_byteorder.c
$(CC) $(CFLAGS) $?
db_cam@o@: $(srcdir)/db/db_cam.c
@@ -976,6 +1313,8 @@ db_open@o@: $(srcdir)/db/db_open.c
$(CC) $(CFLAGS) $?
db_overflow@o@: $(srcdir)/db/db_overflow.c
$(CC) $(CFLAGS) $?
+db_ovfl_vrfy@o@: $(srcdir)/db/db_ovfl_vrfy.c
+ $(CC) $(CFLAGS) $?
db_pr@o@: $(srcdir)/db/db_pr.c
$(CC) $(CFLAGS) $?
db_rec@o@: $(srcdir)/db/db_rec.c
@@ -988,10 +1327,16 @@ db_remove@o@: $(srcdir)/db/db_remove.c
$(CC) $(CFLAGS) $?
db_ret@o@: $(srcdir)/db/db_ret.c
$(CC) $(CFLAGS) $?
+db_setid@o@: $(srcdir)/db/db_setid.c
+ $(CC) $(CFLAGS) $?
+db_setlsn@o@: $(srcdir)/db/db_setlsn.c
+ $(CC) $(CFLAGS) $?
db_salloc@o@: $(srcdir)/env/db_salloc.c
$(CC) $(CFLAGS) $?
db_shash@o@: $(srcdir)/env/db_shash.c
$(CC) $(CFLAGS) $?
+db_stati@o@: $(srcdir)/db/db_stati.c
+ $(CC) $(CFLAGS) $?
db_truncate@o@: $(srcdir)/db/db_truncate.c
$(CC) $(CFLAGS) $?
db_upg@o@: $(srcdir)/db/db_upg.c
@@ -1002,14 +1347,20 @@ db_vrfy@o@: $(srcdir)/db/db_vrfy.c
$(CC) $(CFLAGS) $?
db_vrfyutil@o@: $(srcdir)/db/db_vrfyutil.c
$(CC) $(CFLAGS) $?
+db_vrfy_stub@o@: $(srcdir)/db/db_vrfy_stub.c
+ $(CC) $(CFLAGS) $?
dbm@o@: $(srcdir)/dbm/dbm.c
$(CC) $(CFLAGS) $?
dbreg@o@: $(srcdir)/dbreg/dbreg.c
$(CC) $(CFLAGS) $?
dbreg_auto@o@: $(srcdir)/dbreg/dbreg_auto.c
$(CC) $(CFLAGS) $?
+dbreg_autop@o@: $(srcdir)/dbreg/dbreg_autop.c
+ $(CC) $(CFLAGS) $?
dbreg_rec@o@: $(srcdir)/dbreg/dbreg_rec.c
$(CC) $(CFLAGS) $?
+dbreg_stat@o@: $(srcdir)/dbreg/dbreg_stat.c
+ $(CC) $(CFLAGS) $?
dbreg_util@o@: $(srcdir)/dbreg/dbreg_util.c
$(CC) $(CFLAGS) $?
env_file@o@: $(srcdir)/env/env_file.c
@@ -1022,8 +1373,12 @@ env_recover@o@: $(srcdir)/env/env_recover.c
$(CC) $(CFLAGS) $?
env_region@o@: $(srcdir)/env/env_region.c
$(CC) $(CFLAGS) $?
+env_stat@o@: $(srcdir)/env/env_stat.c
+ $(CC) $(CFLAGS) $?
fileops_auto@o@: $(srcdir)/fileops/fileops_auto.c
$(CC) $(CFLAGS) $?
+fileops_autop@o@: $(srcdir)/fileops/fileops_autop.c
+ $(CC) $(CFLAGS) $?
fop_basic@o@: $(srcdir)/fileops/fop_basic.c
$(CC) $(CFLAGS) $?
fop_rec@o@: $(srcdir)/fileops/fop_rec.c
@@ -1034,6 +1389,8 @@ hash@o@: $(srcdir)/hash/hash.c
$(CC) $(CFLAGS) $?
hash_auto@o@: $(srcdir)/hash/hash_auto.c
$(CC) $(CFLAGS) $?
+hash_autop@o@: $(srcdir)/hash/hash_autop.c
+ $(CC) $(CFLAGS) $?
hash_conv@o@: $(srcdir)/hash/hash_conv.c
$(CC) $(CFLAGS) $?
hash_dup@o@: $(srcdir)/hash/hash_dup.c
@@ -1054,6 +1411,8 @@ hash_reclaim@o@: $(srcdir)/hash/hash_reclaim.c
$(CC) $(CFLAGS) $?
hash_stat@o@: $(srcdir)/hash/hash_stat.c
$(CC) $(CFLAGS) $?
+hash_stub@o@: $(srcdir)/hash/hash_stub.c
+ $(CC) $(CFLAGS) $?
hash_upgrade@o@: $(srcdir)/hash/hash_upgrade.c
$(CC) $(CFLAGS) $?
hash_verify@o@: $(srcdir)/hash/hash_verify.c
@@ -1066,12 +1425,18 @@ lock@o@: $(srcdir)/lock/lock.c
$(CC) $(CFLAGS) $?
lock_deadlock@o@:$(srcdir)/lock/lock_deadlock.c
$(CC) $(CFLAGS) $?
+lock_id@o@:$(srcdir)/lock/lock_id.c
+ $(CC) $(CFLAGS) $?
+lock_list@o@:$(srcdir)/lock/lock_list.c
+ $(CC) $(CFLAGS) $?
lock_method@o@:$(srcdir)/lock/lock_method.c
$(CC) $(CFLAGS) $?
lock_region@o@:$(srcdir)/lock/lock_region.c
$(CC) $(CFLAGS) $?
lock_stat@o@:$(srcdir)/lock/lock_stat.c
$(CC) $(CFLAGS) $?
+lock_timer@o@:$(srcdir)/lock/lock_timer.c
+ $(CC) $(CFLAGS) $?
lock_util@o@:$(srcdir)/lock/lock_util.c
$(CC) $(CFLAGS) $?
log@o@: $(srcdir)/log/log.c
@@ -1086,12 +1451,16 @@ log_method@o@: $(srcdir)/log/log_method.c
$(CC) $(CFLAGS) $?
log_put@o@: $(srcdir)/log/log_put.c
$(CC) $(CFLAGS) $?
+log_stat@o@: $(srcdir)/log/log_stat.c
+ $(CC) $(CFLAGS) $?
mp_alloc@o@: $(srcdir)/mp/mp_alloc.c
$(CC) $(CFLAGS) $?
mp_bh@o@: $(srcdir)/mp/mp_bh.c
$(CC) $(CFLAGS) $?
mp_fget@o@: $(srcdir)/mp/mp_fget.c
$(CC) $(CFLAGS) $?
+mp_fmethod@o@: $(srcdir)/mp/mp_fmethod.c
+ $(CC) $(CFLAGS) $?
mp_fopen@o@: $(srcdir)/mp/mp_fopen.c
$(CC) $(CFLAGS) $?
mp_fput@o@: $(srcdir)/mp/mp_fput.c
@@ -1118,62 +1487,68 @@ mut_pthread@o@: $(srcdir)/mutex/mut_pthread.c
$(CC) $(CFLAGS) $?
mut_tas@o@: $(srcdir)/mutex/mut_tas.c
$(CC) $(CFLAGS) $?
+mut_win32@o@: $(srcdir)/mutex/mut_win32.c
+ $(CC) $(CFLAGS) $?
mutex@o@: $(srcdir)/mutex/mutex.c
$(CC) $(CFLAGS) $?
-os_abs@o@: $(srcdir)/os/os_abs.c
+os_abs@o@: $(srcdir)/@OSDIR@/os_abs.c
$(CC) $(CFLAGS) $?
os_alloc@o@: $(srcdir)/os/os_alloc.c
$(CC) $(CFLAGS) $?
-os_clock@o@: $(srcdir)/os/os_clock.c
+os_clock@o@: $(srcdir)/@OSDIR@/os_clock.c
$(CC) $(CFLAGS) $?
-os_config@o@: $(srcdir)/os/os_config.c
+os_config@o@: $(srcdir)/@OSDIR@/os_config.c
$(CC) $(CFLAGS) $?
-os_dir@o@: $(srcdir)/os/os_dir.c
+os_dir@o@: $(srcdir)/@OSDIR@/os_dir.c
$(CC) $(CFLAGS) $?
-os_errno@o@: $(srcdir)/os/os_errno.c
+os_errno@o@: $(srcdir)/@OSDIR@/os_errno.c
$(CC) $(CFLAGS) $?
-os_fid@o@: $(srcdir)/os/os_fid.c
+os_fid@o@: $(srcdir)/@OSDIR@/os_fid.c
$(CC) $(CFLAGS) $?
-os_fsync@o@: $(srcdir)/os/os_fsync.c
+os_fsync@o@: $(srcdir)/@OSDIR@/os_fsync.c
$(CC) $(CFLAGS) $?
os_id@o@: $(srcdir)/os/os_id.c
$(CC) $(CFLAGS) $?
-os_handle@o@: $(srcdir)/os/os_handle.c
+os_handle@o@: $(srcdir)/@OSDIR@/os_handle.c
$(CC) $(CFLAGS) $?
-os_map@o@: $(srcdir)/os/os_map.c
+os_map@o@: $(srcdir)/@OSDIR@/os_map.c
$(CC) $(CFLAGS) $?
os_method@o@: $(srcdir)/os/os_method.c
$(CC) $(CFLAGS) $?
os_oflags@o@: $(srcdir)/os/os_oflags.c
$(CC) $(CFLAGS) $?
-os_open@o@: $(srcdir)/os/os_open.c
+os_open@o@: $(srcdir)/@OSDIR@/os_open.c
$(CC) $(CFLAGS) $?
os_region@o@: $(srcdir)/os/os_region.c
$(CC) $(CFLAGS) $?
-os_rename@o@: $(srcdir)/os/os_rename.c
+os_rename@o@: $(srcdir)/@OSDIR@/os_rename.c
$(CC) $(CFLAGS) $?
os_root@o@: $(srcdir)/os/os_root.c
$(CC) $(CFLAGS) $?
os_rpath@o@: $(srcdir)/os/os_rpath.c
$(CC) $(CFLAGS) $?
-os_rw@o@: $(srcdir)/os/os_rw.c
+os_rw@o@: $(srcdir)/@OSDIR@/os_rw.c
$(CC) $(CFLAGS) $?
-os_seek@o@: $(srcdir)/os/os_seek.c
+os_seek@o@: $(srcdir)/@OSDIR@/os_seek.c
$(CC) $(CFLAGS) $?
-os_sleep@o@: $(srcdir)/os/os_sleep.c
+os_sleep@o@: $(srcdir)/@OSDIR@/os_sleep.c
$(CC) $(CFLAGS) $?
-os_spin@o@: $(srcdir)/os/os_spin.c
+os_spin@o@: $(srcdir)/@OSDIR@/os_spin.c
$(CC) $(CFLAGS) $?
-os_stat@o@: $(srcdir)/os/os_stat.c
+os_stat@o@: $(srcdir)/@OSDIR@/os_stat.c
$(CC) $(CFLAGS) $?
os_tmpdir@o@: $(srcdir)/os/os_tmpdir.c
$(CC) $(CFLAGS) $?
+os_truncate@o@: $(srcdir)/@OSDIR@/os_truncate.c
+ $(CC) $(CFLAGS) $?
os_unlink@o@: $(srcdir)/os/os_unlink.c
$(CC) $(CFLAGS) $?
qam@o@: $(srcdir)/qam/qam.c
$(CC) $(CFLAGS) $?
qam_auto@o@: $(srcdir)/qam/qam_auto.c
$(CC) $(CFLAGS) $?
+qam_autop@o@: $(srcdir)/qam/qam_autop.c
+ $(CC) $(CFLAGS) $?
qam_conv@o@: $(srcdir)/qam/qam_conv.c
$(CC) $(CFLAGS) $?
qam_files@o@: $(srcdir)/qam/qam_files.c
@@ -1186,28 +1561,48 @@ qam_rec@o@: $(srcdir)/qam/qam_rec.c
$(CC) $(CFLAGS) $?
qam_stat@o@: $(srcdir)/qam/qam_stat.c
$(CC) $(CFLAGS) $?
+qam_stub@o@: $(srcdir)/qam/qam_stub.c
+ $(CC) $(CFLAGS) $?
qam_upgrade@o@: $(srcdir)/qam/qam_upgrade.c
$(CC) $(CFLAGS) $?
qam_verify@o@: $(srcdir)/qam/qam_verify.c
$(CC) $(CFLAGS) $?
+rep_auto@o@: $(srcdir)/rep/rep_auto.c
+ $(CC) $(CFLAGS) $?
+rep_autop@o@: $(srcdir)/rep/rep_autop.c
+ $(CC) $(CFLAGS) $?
+rep_backup@o@: $(srcdir)/rep/rep_backup.c
+ $(CC) $(CFLAGS) $?
rep_method@o@: $(srcdir)/rep/rep_method.c
$(CC) $(CFLAGS) $?
rep_record@o@: $(srcdir)/rep/rep_record.c
$(CC) $(CFLAGS) $?
rep_region@o@: $(srcdir)/rep/rep_region.c
$(CC) $(CFLAGS) $?
+rep_stub@o@: $(srcdir)/rep/rep_stub.c
+ $(CC) $(CFLAGS) $?
+rep_stat@o@: $(srcdir)/rep/rep_stat.c
+ $(CC) $(CFLAGS) $?
rep_util@o@: $(srcdir)/rep/rep_util.c
$(CC) $(CFLAGS) $?
rijndael-alg-fst@o@: $(srcdir)/crypto/rijndael/rijndael-alg-fst.c
$(CC) $(CFLAGS) $?
rijndael-api-fst@o@: $(srcdir)/crypto/rijndael/rijndael-api-fst.c
$(CC) $(CFLAGS) $?
+seq_stat@o@: $(srcdir)/sequence/seq_stat.c
+ $(CC) $(CFLAGS) $?
+sequence@o@: $(srcdir)/sequence/sequence.c
+ $(CC) $(CFLAGS) $?
sha1@o@: $(srcdir)/hmac/sha1.c
$(CC) $(CFLAGS) $?
+stat_stub@o@: $(srcdir)/common/stat_stub.c
+ $(CC) $(CFLAGS) $?
txn@o@: $(srcdir)/txn/txn.c
$(CC) $(CFLAGS) $?
txn_auto@o@: $(srcdir)/txn/txn_auto.c
$(CC) $(CFLAGS) $?
+txn_autop@o@: $(srcdir)/txn/txn_autop.c
+ $(CC) $(CFLAGS) $?
txn_method@o@: $(srcdir)/txn/txn_method.c
$(CC) $(CFLAGS) $?
txn_rec@o@: $(srcdir)/txn/txn_rec.c
@@ -1254,37 +1649,17 @@ cxx_logc@o@: $(srcdir)/cxx/cxx_logc.cpp
$(CXX) $(CXXFLAGS) $?
cxx_mpool@o@: $(srcdir)/cxx/cxx_mpool.cpp
$(CXX) $(CXXFLAGS) $?
+cxx_multi@o@: $(srcdir)/cxx/cxx_multi.cpp
+ $(CXX) $(CXXFLAGS) $?
+cxx_seq@o@: $(srcdir)/cxx/cxx_seq.cpp
+ $(CXX) $(CXXFLAGS) $?
cxx_txn@o@: $(srcdir)/cxx/cxx_txn.cpp
$(CXX) $(CXXFLAGS) $?
##################################################
# Java API build rules.
##################################################
-java_Db@o@::$(srcdir)/libdb_java/java_Db.c
- $(CC) $(CFLAGS) $?
-java_DbEnv@o@: $(srcdir)/libdb_java/java_DbEnv.c
- $(CC) $(CFLAGS) $?
-java_DbLock@o@: $(srcdir)/libdb_java/java_DbLock.c
- $(CC) $(CFLAGS) $?
-java_DbLogc@o@: $(srcdir)/libdb_java/java_DbLogc.c
- $(CC) $(CFLAGS) $?
-java_DbLsn@o@: $(srcdir)/libdb_java/java_DbLsn.c
- $(CC) $(CFLAGS) $?
-java_DbTxn@o@: $(srcdir)/libdb_java/java_DbTxn.c
- $(CC) $(CFLAGS) $?
-java_DbUtil@o@: $(srcdir)/libdb_java/java_DbUtil.c
- $(CC) $(CFLAGS) $?
-java_Dbc@o@: $(srcdir)/libdb_java/java_Dbc.c
- $(CC) $(CFLAGS) $?
-java_Dbt@o@: $(srcdir)/libdb_java/java_Dbt.c
- $(CC) $(CFLAGS) $?
-java_info@o@: $(srcdir)/libdb_java/java_info.c
- $(CC) $(CFLAGS) $?
-java_locked@o@: $(srcdir)/libdb_java/java_locked.c
- $(CC) $(CFLAGS) $?
-java_util@o@: $(srcdir)/libdb_java/java_util.c
- $(CC) $(CFLAGS) $?
-java_stat_auto@o@: $(srcdir)/libdb_java/java_stat_auto.c
+db_java_wrap@o@: $(srcdir)/libdb_java/db_java_wrap.c
$(CC) $(CFLAGS) $?
##################################################
@@ -1310,6 +1685,8 @@ tcl_mp@o@: $(srcdir)/tcl/tcl_mp.c
$(CC) $(CFLAGS) $(TCFLAGS) $?
tcl_rep@o@: $(srcdir)/tcl/tcl_rep.c
$(CC) $(CFLAGS) $(TCFLAGS) $?
+tcl_seq@o@: $(srcdir)/tcl/tcl_seq.c
+ $(CC) $(CFLAGS) $(TCFLAGS) $?
tcl_txn@o@: $(srcdir)/tcl/tcl_txn.c
$(CC) $(CFLAGS) $(TCFLAGS) $?
tcl_util@o@: $(srcdir)/tcl/tcl_util.c
@@ -1321,7 +1698,7 @@ tcl_util@o@: $(srcdir)/tcl/tcl_util.c
# RPC client files
client@o@: $(srcdir)/rpc_client/client.c
$(CC) $(CFLAGS) $?
-db_server_clnt@o@: $(srcdir)/rpc_client/db_server_clnt.c
+db_server_clnt@o@: db_server_clnt.c
$(CC) $(CFLAGS) $?
gen_client@o@: $(srcdir)/rpc_client/gen_client.c
$(CC) $(CFLAGS) $?
@@ -1331,13 +1708,13 @@ gen_client_ret@o@: $(srcdir)/rpc_client/gen_client_ret.c
# RPC server files
db_server_proc@o@: $(srcdir)/rpc_server/c/db_server_proc.c
$(CC) $(CFLAGS) $?
-db_server_svc@o@: $(srcdir)/rpc_server/c/db_server_svc.c
+db_server_svc@o@: db_server_svc.c
$(CC) $(CFLAGS) $?
db_server_util@o@: $(srcdir)/rpc_server/c/db_server_util.c
$(CC) $(CFLAGS) $?
-db_server_xdr@o@: $(srcdir)/rpc_server/c/db_server_xdr.c
+db_server_xdr@o@: db_server_xdr.c
$(CC) $(CFLAGS) $?
-gen_db_server@o@: $(srcdir)/rpc_server/c/gen_db_server.c
+gen_db_server@o@: gen_db_server.c
$(CC) $(CFLAGS) $?
db_server_cxxproc@o@: $(srcdir)/rpc_server/cxx/db_server_cxxproc.cpp
$(CXX) $(CXXFLAGS) $?
@@ -1393,5 +1770,7 @@ snprintf@o@: $(srcdir)/clib/snprintf.c
$(CC) $(CFLAGS) $?
strerror@o@: $(srcdir)/clib/strerror.c
$(CC) $(CFLAGS) $?
-vsnprintf@o@: $(srcdir)/clib/vsnprintf.c
+strtol@o@: $(srcdir)/clib/strtol.c
+ $(CC) $(CFLAGS) $?
+strtoul@o@: $(srcdir)/clib/strtoul.c
$(CC) $(CFLAGS) $?
diff --git a/storage/bdb/dist/RELEASE b/storage/bdb/dist/RELEASE
index 61151b8589c..35e16a4333b 100644
--- a/storage/bdb/dist/RELEASE
+++ b/storage/bdb/dist/RELEASE
@@ -1,28 +1,11 @@
-# $Id: RELEASE,v 11.123 2002/09/13 22:16:02 bostic Exp $
+# $Id: RELEASE,v 11.195 2004/11/09 01:30:41 bostic Exp $
DB_VERSION_MAJOR=4
-DB_VERSION_MINOR=1
-DB_VERSION_PATCH=24
+DB_VERSION_MINOR=3
+DB_VERSION_PATCH=28
DB_VERSION="$DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH"
DB_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DB_VERSION_MAJOR $DB_VERSION_MINOR`
DB_RELEASE_DATE=`date "+%B %e, %Y"`
DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION: ($DB_RELEASE_DATE)"
-
-# this file is included by all s_* scripts, so it's the way to apply
-# hacks :)
-
-# bitkeeper doesn't like somebody to mess with permissions!
-chmod()
-{
- echo "chmod $1 $2" >/dev/null
-}
-
-# useful trick to find auto-generated files
-#cmp()
-#{
-# echo "==>> CMP $1 $2" >/dev/tty
-# /usr/bin/cmp "$1" "$2"
-#}
-
diff --git a/storage/bdb/dist/aclocal/config.ac b/storage/bdb/dist/aclocal/config.ac
index cd288425946..717a0becc2f 100644
--- a/storage/bdb/dist/aclocal/config.ac
+++ b/storage/bdb/dist/aclocal/config.ac
@@ -1,5 +1,12 @@
# Features we don't test for, but want the #defines to exist for
# other ports.
+AH_TEMPLATE(DB_WIN32,
+ [We use DB_WIN32 much as one would use _WIN32 -- to specify that
+ we're using an operating system environment that supports Win32
+ calls and semantics. We don't use _WIN32 because Cygwin/GCC also
+ defines _WIN32, even though Cygwin/GCC closely emulates the Unix
+ environment.])
+
AH_TEMPLATE(HAVE_VXWORKS, [Define to 1 if building VxWorks.])
AH_TEMPLATE(HAVE_FILESYSTEM_NOTZERO,
@@ -48,4 +55,8 @@ AH_BOTTOM([/*
#endif
#ifndef HAVE_VSNPRINTF
#define vsnprintf __db_Cvsnprintf
+#endif
+
+#ifdef DB_WIN32
+#include "win_db.h"
#endif])
diff --git a/storage/bdb/dist/aclocal/libtool.ac b/storage/bdb/dist/aclocal/libtool.ac
index e99faf15e4e..71dae456a52 100644
--- a/storage/bdb/dist/aclocal/libtool.ac
+++ b/storage/bdb/dist/aclocal/libtool.ac
@@ -1,5 +1,5 @@
-# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
## Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
@@ -22,10 +22,61 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 46 AC_PROG_LIBTOOL
+# serial 47 AC_PROG_LIBTOOL
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [m4_define([AC_PROVIDE_IFELSE],
+ [m4_ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+ AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [AC_LIBTOOL_CXX],
+ [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+ ])])
+dnl And a similar setup for Fortran 77 support
+ AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [AC_LIBTOOL_F77],
+ [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [ifdef([AC_PROG_GCJ],
+ [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([A][M_PROG_GCJ],
+ [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([LT_AC_PROG_GCJ],
+ [define([LT_AC_PROG_GCJ],
+ defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
@@ -36,10 +87,13 @@ AC_SUBST(LIBTOOL)dnl
# Prevent multiple expansion
define([AC_PROG_LIBTOOL], [])
-])
+])# _AC_PROG_LIBTOOL
+
+# AC_LIBTOOL_SETUP
+# ----------------
AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
+[AC_PREREQ(2.50)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
@@ -49,340 +103,186 @@ AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
+
AC_REQUIRE([AC_PROG_LN_S])dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
fi
;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
esac
-_LT_AC_LTCONFIG_HACK
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-])
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-# AC_LIBTOOL_HEADER_ASSERT
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
-[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
- [lt_cv_func_assert_works],
- [case $host in
- *-*-solaris*)
- if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*) lt_cv_func_assert_works=no ;;
- *) lt_cv_func_assert_works=yes ;;
- esac
- fi
- ;;
- esac])
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-if test "x$lt_cv_func_assert_works" = xyes; then
- AC_CHECK_HEADERS(assert.h)
-fi
-])# AC_LIBTOOL_HEADER_ASSERT
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)
-])# _LT_AC_CHECK_DLFCN
+# Constants:
+rm="rm -f"
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-irix*)
- symcode='[[BCDEGRST]]'
- ;;
-solaris* | sysv5*)
- symcode='[[BDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ AC_PATH_MAGIC
+ fi
;;
esac
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
+AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
+AC_ARG_WITH([pic],
+ [AC_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr) 0}
-};
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest; then
- pipe_works=yes
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- global_symbol_to_cdecl=
- global_symbol_to_c_name_address=
-else
- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
- global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
-fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
-# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-# ---------------------------------
-AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
# _LT_AC_PROG_ECHO_BACKSLASH
# --------------------------
# Add some code to the start of the generated configure script which
# will find an echo command which doesn't interpret backslashes.
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
+[_LT_AC_SHELL_INIT([
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -400,7 +300,7 @@ if test "X[$]1" = X--no-reexec; then
elif test "X[$]1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
# Yippee, $echo works!
:
else
@@ -412,14 +312,14 @@ if test "X[$]1" = X--fallback-echo; then
# used as fallback echo
shift
cat <<EOF
-$*
+[$]*
EOF
exit 0
fi
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then
@@ -446,8 +346,9 @@ else
#
# So, first we look for a working echo in the user's PATH.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
@@ -456,7 +357,7 @@ else
break
fi
done
- IFS="$save_ifs"
+ IFS="$lt_save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
@@ -529,17 +430,312 @@ if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
fi
AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+ ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s conftest.err; then
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$5], , :, [$5])
+else
+ ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$4], , :, [$4])
+else
+ ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* )
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ ;;
+
+ *)
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ = "XX$teststring") >/dev/null 2>&1 &&
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
# ------------------------------------------------------------------
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[if test "$cross_compiling" = yes; then :
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
[$4]
else
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
@@ -620,10 +816,12 @@ fi
rm -fr conftest*
])# _LT_AC_TRY_DLOPEN_SELF
+
# AC_LIBTOOL_DLOPEN_SELF
# -------------------
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[if test "x$enable_dlopen" != xyes; then
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -638,24 +836,39 @@ else
lt_cv_dlopen_self=yes
;;
- cygwin* | mingw* | pw32*)
+ mingw* | pw32*)
lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
;;
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
*)
AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
+ [lt_cv_dlopen="shl_load"],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
[AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
])
@@ -673,7 +886,6 @@ else
case $lt_cv_dlopen in
dlopen)
save_CPPFLAGS="$CPPFLAGS"
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
@@ -717,422 +929,64 @@ else
fi
])# AC_LIBTOOL_DLOPEN_SELF
-AC_DEFUN([_LT_AC_LTCONFIG_HACK],
-[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([for objdir])
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-AC_MSG_RESULT($objdir)
-##
-## END FIXME
-
-
-## FIXME: this should be a separate macro
-##
-AC_ARG_WITH(pic,
-[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
-pic_mode="$withval", pic_mode=default)
-test -z "$pic_mode" && pic_mode=default
-
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-AC_CACHE_VAL(lt_cv_prog_cc_pic,
-[ lt_cv_prog_cc_pic=
- lt_cv_prog_cc_shlib=
- lt_cv_prog_cc_wl=
- lt_cv_prog_cc_static=
- lt_cv_prog_cc_no_builtin=
- lt_cv_prog_cc_can_build_shared=$can_build_shared
-
- if test "$GCC" = yes; then
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-static'
-
- case $host_os in
- aix*)
- # Below there is a dirty hack to force normal static linking with -ldl
- # The problem is because libdl dynamically linked with both libc and
- # libC (AIX C++ library), which obviously doesn't included in libraries
- # list by gcc. This cause undefined symbols with -static flags.
- # This hack allows C programs to be linked with "-static -ldl", but
- # not sure about C++ programs.
- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
- ;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_cv_prog_cc_pic='-fno-common'
- ;;
- cygwin* | mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- lt_cv_prog_cc_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for PIC flags for the system compiler.
- case $host_os in
- aix3* | aix4* | aix5*)
- lt_cv_prog_cc_wl='-Wl,'
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_cv_prog_cc_static='-Bstatic'
- else
- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- hpux9* | hpux10* | hpux11*)
- # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
- ;;
-
- irix5* | irix6*)
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- # PIC (with -KPIC) is the default.
- ;;
-
- cygwin* | mingw* | pw32* | os2*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
-
- newsos6)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- osf3* | osf4* | osf5*)
- # All OSF/1 code is PIC.
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- ;;
-
- sco3.2v5*)
- lt_cv_prog_cc_pic='-Kpic'
- lt_cv_prog_cc_static='-dn'
- lt_cv_prog_cc_shlib='-belf'
- ;;
-
- solaris*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- sunos4*)
- lt_cv_prog_cc_pic='-PIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Qoption ld '
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- if test "x$host_vendor" = xsni; then
- lt_cv_prog_cc_wl='-LD'
- else
- lt_cv_prog_cc_wl='-Wl,'
- fi
- ;;
-
- uts4*)
- lt_cv_prog_cc_pic='-pic'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_cv_prog_cc_pic='-Kconform_pic'
- lt_cv_prog_cc_static='-Bstatic'
- fi
- ;;
- *)
- lt_cv_prog_cc_can_build_shared=no
- ;;
- esac
- fi
-])
-if test -z "$lt_cv_prog_cc_pic"; then
- AC_MSG_RESULT([none])
-else
- AC_MSG_RESULT([$lt_cv_prog_cc_pic])
-
- # Check to make sure the pic_flag actually works.
- AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
- AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
- AC_TRY_COMPILE([], [], [dnl
- case $host_os in
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- lt_cv_prog_cc_pic_works=no
- else
- lt_cv_prog_cc_pic_works=yes
- fi
- ;;
- *)
- lt_cv_prog_cc_pic_works=yes
- ;;
- esac
- ], [dnl
- lt_cv_prog_cc_pic_works=no
- ])
- CFLAGS="$save_CFLAGS"
- ])
-
- if test "X$lt_cv_prog_cc_pic_works" = Xno; then
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_can_build_shared=no
- else
- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
- fi
-
- AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
-fi
-##
-## END FIXME
-
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
- AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
- lt_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
-AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
- lt_cv_prog_cc_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
- AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
- LDFLAGS="$save_LDFLAGS"
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s out/conftest.err; then
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w .
+ $rm conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+ $rm out/* && rmdir out
+ cd ..
+ rmdir conftest
+ $rm conftest*
])
+])# AC_LIBTOOL_PROG_CC_C_O
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# Check to see if options -o and -c are simultaneously supported by compiler
-AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
-AC_CACHE_VAL([lt_cv_compiler_c_o], [
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory. Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s out/conftest.err; then
- lt_cv_compiler_c_o=no
- else
- lt_cv_compiler_c_o=yes
- fi
-else
- # Append any errors to the config.log.
- cat out/conftest.err 1>&AC_FD_CC
- lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-])
-compiler_c_o=$lt_cv_compiler_c_o
-AC_MSG_RESULT([$compiler_c_o])
-
-if test x"$compiler_c_o" = x"yes"; then
- # Check to see if we can write to a .lo
- AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
- AC_CACHE_VAL([lt_cv_compiler_o_lo], [
- lt_cv_compiler_o_lo=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -c -o conftest.lo"
- save_objext="$ac_objext"
- ac_objext=lo
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- lt_cv_compiler_o_lo=no
- else
- lt_cv_compiler_o_lo=yes
- fi
- ])
- ac_objext="$save_objext"
- CFLAGS="$save_CFLAGS"
- ])
- compiler_o_lo=$lt_cv_compiler_o_lo
- AC_MSG_RESULT([$compiler_o_lo])
-else
- compiler_o_lo=no
-fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
AC_MSG_CHECKING([if we can lock with hard links])
hard_links=yes
@@ -1143,802 +997,77 @@ if test "$compiler_c_o" = no && test "$need_locks" != no; then
ln conftest.a conftest.b 2>/dev/null && hard_links=no
AC_MSG_RESULT([$hard_links])
if test "$hard_links" = no; then
- AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
need_locks=warn
fi
else
need_locks=no
fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-if test "$GCC" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
- echo "int some_variable = 0;" > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- compiler_rtti_exceptions=no
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- compiler_rtti_exceptions=no
- else
- compiler_rtti_exceptions=yes
- fi
- ])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$compiler_rtti_exceptions])
-
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
- else
- no_builtin_flag=' -fno-builtin'
- fi
-fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# See if the linker supports building shared libraries.
-AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# include_expsyms should be a list of space-separated symbols to be *always*
-# included in the symbol list
-include_expsyms=
-# exclude_expsyms can be an egrep regular expression of symbols to exclude
-# it will be wrapped by ` (' and `)$', so one must not match beginning or
-# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-# as well as any symbol that contains `d'.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-# platforms (ab)use it in PIC code, but their linkers get confused if
-# the symbol is explicitly referenced. Since portable code cannot
-# rely on this symbol name, it's probably fine to never include it in
-# preloaded symbol tables.
-extract_expsyms_cmds=
-
-case $host_os in
-cygwin* | mingw* | pw32*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
-openbsd*)
- with_gnu_ld=no
- ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
- ld_shlibs=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- ;;
-
- amigaos*)
- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- cygwin* | mingw* | pw32*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # FIXME: what about values for MSVC?
- dll_entry=__cygwin_dll_entry@12
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case $host_os in
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
- sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is.
- # If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname-def;
- else
- echo EXPORTS > $output_objdir/$soname-def;
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \[$]# in
- 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done;
- fi~
- '"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw* | pw32*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- fi
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- hardcode_direct=yes
- archive_cmds=''
- hardcode_libdir_separator=':'
-
- #### Local change for Sleepycat's Berkeley DB [#5779]:
- # Added $aix_export variable to control use of exports file.
- # For non-gcc, we don't use exports files, and rather trust
- # the binder's -qmkshrobj option to export all the mangled
- # symbols we need for C++ and java.
-
- aix_export="\${wl}$exp_sym_flag:\$export_symbols"
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- esac
-
- shared_flag='-shared'
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- shared_flag='${wl}-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
-
- # Test for -qmkshrobj and use it if it's available.
- # It's superior for determining exportable symbols,
- # especially for C++ or JNI libraries, which have
- # mangled names.
- #
- AC_LANG_CONFTEST(void f(){})
- if AC_TRY_EVAL(CC -c conftest.c) && AC_TRY_EVAL(CC -o conftest conftest.$ac_objext -qmkshrobj -lC_r); then
- lt_cv_aix_mkshrobj=yes
- else
- lt_cv_aix_mkshrobj=no
- fi
-
- if test "$lt_cv_aix_mkshrobj" = yes; then
- aix_export="-qmkshrobj"
- fi
- fi
-
- # It seems that -bexpall can do strange things, so it is better to
- # generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag $aix_export $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag $aix_export"
- else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='${wl}-berok'
- # This is a bit strange, but is similar to how AIX traditionally builds
- # it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag $aix_export"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- ;;
-
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- esac
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
-
- #### Local change for Sleepycat's Berkeley DB [#5664] [#6511]
- case "$host_os" in
- darwin[[12345]].*)
- # removed double quotes in the following line:
- archive_cmds='$nonopt $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
- ;;
- *) # Darwin6.0 on (Mac OS/X Jaguar)
- archive_cmds='$nonopt $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -dynamiclib -install_name $rpath/$soname $verstring'
- ;;
- esac
- #### End of changes for Sleepycat's Berkeley DB [#5664] [#6511]
-
- # We need to add '_' to the symbols in $export_symbols first
- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- whole_archive_flag_spec='-all_load $convenience'
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9* | hpux10* | hpux11*)
- case $host_os in
- hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
- esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- irix5* | irix6*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case "$host_os" in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
- #Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
-
- sco3.2v5*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- ;;
-
- solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*)
- cat <<EOF 1>&2
-
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries. However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
-*** upgrade to a newer version of GCC. Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
-EOF
- no_undefined_flag=
- ;;
- esac
- fi
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- if test "x$host_vendor" = xsno; then
- archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- else
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- sysv5uw7* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
fi
-AC_MSG_RESULT([$ld_shlibs])
-test "$ld_shlibs" = no && can_build_shared=no
-##
-## END FIXME
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
-## FIXME: this should be a separate macro
-##
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
# Check hardcoding attributes.
-AC_MSG_CHECKING([how to hardcode library paths into programs])
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
# We can hardcode non-existant directories.
- if test "$hardcode_direct" != no &&
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$hardcode_shlibpath_var" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
# Linking always hardcodes the temporary library directory.
- hardcode_action=relink
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
- hardcode_action=unsupported
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
fi
-AC_MSG_RESULT([$hardcode_action])
-##
-## END FIXME
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
-## FIXME: this should be a separate macro
-##
-striplib=
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
@@ -1946,21 +1075,33 @@ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
AC_MSG_RESULT([yes])
else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ AC_MSG_RESULT([yes])
+ else
AC_MSG_RESULT([no])
fi
-##
-## END FIXME
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-## FIXME: this should be a separate macro
-##
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
# PORTME Fill in your ld.so characteristics
-AC_MSG_CHECKING([dynamic linker characteristics])
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -1970,29 +1111,45 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
case $host_os in
aix3*)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
- # AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix4* | aix5*)
version_type=linux
-
- #### Local change for Sleepycat's Berkeley DB [#5779]:
- # If we don't set need_version, we'll get x.so.0.0.0,
- # even if -avoid-version is set.
+ need_lib_prefix=no
need_version=no
-
+ hardcode_into_libs=yes
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
@@ -2002,29 +1159,28 @@ aix4* | aix5*)
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
esac
- # AIX (on Power*) has no versioning support, so currently we can
- # not hardcode correct soname into executable. Probably we can
- # add versioning support to collect2, so additional links can
- # be useful in future.
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}.so$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
fi
shlibpath_var=LIBPATH
fi
@@ -2033,25 +1189,24 @@ aix4* | aix5*)
amigaos*)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
beos*)
- library_names_spec='${libname}.so'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
-bsdi4*)
+bsdi[[45]]*)
version_type=linux
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- export_dynamic_flag_spec=-rdynamic
# the default ld.so.conf also contains /usr/contrib/lib and
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
# libtool to hard-code these into programs
@@ -2059,29 +1214,55 @@ bsdi4*)
cygwin* | mingw* | pw32*)
version_type=windows
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
+
case $GCC,$host_os in
- yes,cygwin*)
+ yes,cygwin* | yes,mingw* | yes,pw32*)
library_names_spec='$libname.dll.a'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
- $install_prog .libs/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
;;
- yes,mingw*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
- ;;
- yes,pw32*)
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- ;;
+
*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -2094,33 +1275,56 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
- #### Local change for Sleepycat's Berkeley DB [#6117]:
- # added support for -jnimodule, encapsulated below in ${darwin_suffix}
- darwin_suffix='$(test .$jnimodule = .yes && echo jnilib || (test .$module = .yes && echo so || echo dylib))'
- library_names_spec='${libname}${release}${versuffix}.'"${darwin_suffix}"' ${libname}${release}${major}.'"${darwin_suffix}"' ${libname}.'"${darwin_suffix}"
- soname_spec='${libname}${release}${major}.'"${darwin_suffix}"
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
;;
freebsd1*)
dynamic_linker=no
;;
+kfreebsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -2129,7 +1333,11 @@ freebsd*)
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- *)
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ *) # from 3.2 on
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
@@ -2140,8 +1348,8 @@ gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
hardcode_into_libs=yes
;;
@@ -2149,33 +1357,75 @@ gnu*)
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
- dynamic_linker="$host_os dld.sl"
version_type=sunos
need_lib_prefix=no
need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
+ case "$host_cpu" in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
-irix5* | irix6*)
- version_type=irix
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
- irix5*)
+ irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
*) libsuff= shlibsuff= libmagic=never-match;;
esac
;;
@@ -2184,20 +1434,21 @@ irix5* | irix6*)
shlibpath_overrides_runpath=no
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
;;
# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
# This must be Linux ELF.
-linux-gnu*)
+linux*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -2206,6 +1457,12 @@ linux-gnu*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
@@ -2215,17 +1472,29 @@ linux-gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -2235,17 +1504,17 @@ netbsd*)
newsos6)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
-nto-qnx)
+nto-qnx*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -2254,36 +1523,38 @@ openbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case "$host_os" in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
shlibpath_overrides_runpath=yes
fi
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
libname_spec='$name'
+ shrext_cmds=".dll"
need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
+ library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
+ need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
@@ -2291,8 +1562,8 @@ osf3* | osf4* | osf5*)
sco3.2v5*)
version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -2300,8 +1571,8 @@ solaris*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -2311,7 +1582,7 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
@@ -2323,12 +1594,18 @@ sunos4*)
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
;;
motorola)
need_lib_prefix=no
@@ -2339,50 +1616,947 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
;;
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
sysv4*MP*)
if test -d /usr/nec ;then
version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
*)
dynamic_linker=no
;;
esac
AC_MSG_RESULT([$dynamic_linker])
test "$dynamic_linker" = no && can_build_shared=no
-##
-## END FIXME
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-## FIXME: this should be a separate macro
-##
-# Report the final consequences.
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+ [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [include additional configurations @<:@automatic@:>@])],
+ [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+ "") ;;
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ F77)
+ if test -n "$F77" && test "X$F77" != "Xno"; then
+ AC_LIBTOOL_LANG_F77_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ GCJ)
+ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ RC)
+ AC_LIBTOOL_LANG_RC_CONFIG
+ ;;
+
+ *)
+ AC_MSG_ERROR([Unsupported tag name: $tagname])
+ ;;
+ esac
+
+ # Append the new tag name to the list of available tags.
+ if test -n "$tagname" ; then
+ available_tags="$available_tags $tagname"
+ fi
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ # Now substitute the updated list of available tags.
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+ mv "${ofile}T" "$ofile"
+ chmod +x "$ofile"
+ else
+ rm -f "${ofile}T"
+ AC_MSG_ERROR([unable to update list of available tagged configurations.])
+ fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+ [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+ [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+ [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+ [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])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+ [AC_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case "$host_cpu" in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux*)
+ case $host_cpu in
+ alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+nto-qnx*)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, lt_dlinit,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLINCL=
+ fi
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+ [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+ [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+ [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+ case $host_os in
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+ ;;
+ esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+ AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+ if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+ _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+ fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
-##
-## END FIXME
-## FIXME: this should be a separate macro
-##
AC_MSG_CHECKING([whether to build shared libraries])
test "$can_build_shared" = "no" && enable_shared=no
@@ -2397,136 +2571,1365 @@ aix3*)
fi
;;
-aix4*)
+aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
- ;;
+ ;;
esac
AC_MSG_RESULT([$enable_shared])
-##
-## END FIXME
-## FIXME: this should be a separate macro
-##
AC_MSG_CHECKING([whether to build static libraries])
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
-##
-## END FIXME
-if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+ unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+ unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ AC_PROG_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+ grep 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
fi
-AC_LIBTOOL_DLOPEN_SELF
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
-## FIXME: this should be a separate macro
-##
-if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
- [$rm conftest*
- echo 'static int dummy;' > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile); then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- lt_cv_archive_cmds_need_lc=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
else
- lt_cv_archive_cmds_need_lc=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
fi
- allow_undefined_flag=$save_allow_undefined_flag
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
else
- cat conftest.err 1>&5
- fi])
- AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes ; then
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case "$cc_basename" in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
;;
- esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-##
-## END FIXME
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ freebsd-elf*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux9*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
-## FIXME: this should be a separate macro
-##
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- :
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ ia64*|hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ fi
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc)
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ openbsd*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd='echo'
+ ;;
+ osf3*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | grep -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+ fi
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ fi
+ ;;
+ esac
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" \
+ || test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+ _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+ _LT_AC_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+ _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- test -f Makefile && make "$ltmain"
+ echo "libtool.m4: error: problem compiling $1 test program"
fi
-if test -f "$ltmain"; then
- trap "$rm \"${ofile}T\"; exit 1" 1 2 15
- $rm -f "${ofile}T"
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
- echo creating $ofile
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+aix4* | aix5*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars. Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # See if we are running on zsh, and set the options which allow our commands through
+ # without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS \
- AR AR_FLAGS CC LD LN_S NM SHELL \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- global_symbol_to_c_name_address \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+ old_postinstall_cmds old_postuninstall_cmds \
+ _LT_AC_TAGVAR(compiler, $1) \
+ _LT_AC_TAGVAR(CC, $1) \
+ _LT_AC_TAGVAR(LD, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+ _LT_AC_TAGVAR(old_archive_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+ _LT_AC_TAGVAR(predep_objects, $1) \
+ _LT_AC_TAGVAR(postdep_objects, $1) \
+ _LT_AC_TAGVAR(predeps, $1) \
+ _LT_AC_TAGVAR(postdeps, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(archive_cmds, $1) \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(postinstall_cmds, $1) \
+ _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+ _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+ _LT_AC_TAGVAR(no_undefined_flag, $1) \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+ _LT_AC_TAGVAR(hardcode_automatic, $1) \
+ _LT_AC_TAGVAR(module_cmds, $1) \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(exclude_expsyms, $1) \
+ _LT_AC_TAGVAR(include_expsyms, $1); do
case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+ _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(module_cmds, $1) | \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
@@ -2536,14 +3939,31 @@ if test -f "$ltmain"; then
esac
done
- cat <<__EOF__ > "${ofile}T"
-#! $SHELL
+ case $lt_echo in
+ *'\[$]0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+ ;;
+ esac
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+ifelse([$1], [],
+ [cfgfile="${ofile}T"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ $rm -f "$cfgfile"
+ AC_MSG_NOTICE([creating $ofile])],
+ [cfgfile="$ofile"])
+
+ cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -2565,14 +3985,21 @@ if test -f "$ltmain"; then
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+# A sed program that does not truncate output.
+SED=$lt_SED
+
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
+Xsed="$SED -e s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
-# ### BEGIN LIBTOOL CONFIG
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
@@ -2586,7 +4013,10 @@ build_libtool_libs=$enable_shared
build_old_libs=$enable_static
# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
@@ -2602,14 +4032,20 @@ echo=$lt_echo
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS
-# The default C compiler.
-CC=$lt_CC
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
# Is the compiler the GNU C compiler?
-with_gcc=$GCC
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
# The linker used to build libraries.
-LD=$lt_LD
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
# Whether we need hard or soft links.
LN_S=$lt_LN_S
@@ -2618,7 +4054,7 @@ LN_S=$lt_LN_S
NM=$lt_NM
# A symbol stripping program
-STRIP=$STRIP
+STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
@@ -2640,7 +4076,7 @@ reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# How to pass a linker flag through the compiler.
-wl=$lt_wl
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
# Object file suffix (normally "o").
objext="$ac_objext"
@@ -2648,18 +4084,21 @@ objext="$ac_objext"
# Old archive suffix (normally "a").
libext="$libext"
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
pic_mode=$pic_mode
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
# Must we lock files when doing compilation ?
need_locks=$lt_need_locks
@@ -2680,19 +4119,19 @@ dlopen_self=$enable_dlopen_self
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
# Library versioning type.
version_type=$version_type
@@ -2709,26 +4148,50 @@ soname_spec=$lt_soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -2736,10 +4199,10 @@ deplibs_check_method=$lt_deplibs_check_method
file_magic_cmd=$lt_file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
@@ -2748,13 +4211,13 @@ finish_cmds=$lt_finish_cmds
finish_eval=$lt_finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# This is the shared library runtime path variable.
runpath_var=$runpath_var
@@ -2766,36 +4229,45 @@ shlibpath_var=$shlibpath_var
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
-hardcode_direct=$hardcode_direct
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
@@ -2804,30 +4276,33 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-# ### END LIBTOOL CONFIG
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
__EOF__
+ifelse([$1],[], [
case $host_os in
aix3*)
- cat <<\EOF >> "${ofile}T"
+ cat <<\EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
@@ -2840,785 +4315,1591 @@ EOF
;;
esac
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- cat <<'EOF' >> "${ofile}T"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
- ;;
- esac
-
# We use sed instead of cat because bash on DJGPP gets confused if
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
- mv -f "${ofile}T" "$ofile" || \
- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+ mv -f "$cfgfile" "$ofile" || \
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
+])
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ fi
fi
-##
-## END FIXME
+])# AC_LIBTOOL_CONFIG
-])# _LT_AC_LTCONFIG_HACK
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
+if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
+hpux*) # Its linker distinguishes data from code symbols
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDRT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- fi ;;
- esac
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
fi
- break
+
+ # Make sure that we snagged all the symbols we need.
+ if grep ' nm_test_var$' "$nlist" >/dev/null; then
+ if grep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(ok)
fi
-])
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
else
- MAGIC_CMD=:
+ case $host_os in
+ aix4* | aix5*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68)
+ # Green Hills C++ Compiler
+ # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case "$cc_basename" in
+ xlc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # KAI C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc)
+ # Intel C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ cxx)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx)
+ # Digital/Compaq C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ sco*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc)
+ # Lucid
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ unixware*)
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
fi
-fi
-])
+],
+[
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
- test "$with_gnu_ld" != yes && break
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case "$cc_basename" in
+ xlc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
-# AC_PROG_LD_GNU -
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
+ hpux9* | hpux10* | hpux11*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+ irix5* | irix6* | nonstopux*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ newsos6)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ ccc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ esac
+ ;;
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
+ osf3* | osf4* | osf5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
-cygwin* | mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+ ;;
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
+ solaris*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
-freebsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ sunos4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
esac
- else
- lt_cv_deplibs_check_method=pass_all
fi
- ;;
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+])
-hpux10.20*|hpux11*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
-irix5* | irix6*)
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ aix4* | aix5*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
;;
+ pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
+ esac
+],[
+ runpath_var=
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+ _LT_AC_TAGVAR(module_cmds, $1)=
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_AC_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
- fi
- ;;
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<EOF 1>&2
-nto-qnx)
- lt_cv_deplibs_check_method=unknown
- ;;
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
-openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
- else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
- fi
- ;;
+EOF
+ fi
+ ;;
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
-sysv5uw[[78]]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test $supports_anon_versioning = yes; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
+ fi
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
fi
fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi[[45]]*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ if test "$GCC" = yes ; then
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case "$cc_basename" in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_AC_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
;;
esac
-])
+])# AC_LIBTOOL_PROG_LD_SHLIBS
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# # ifdef __CYGWIN32__
+# # define __CYGWIN__ __CYGWIN32__
+# # endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
# old names
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
@@ -3631,3 +5912,76 @@ AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
# This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && break
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
diff --git a/storage/bdb/dist/aclocal/mutex.ac b/storage/bdb/dist/aclocal/mutex.ac
index f3f5529c74f..959ed4ebe56 100644
--- a/storage/bdb/dist/aclocal/mutex.ac
+++ b/storage/bdb/dist/aclocal/mutex.ac
@@ -1,28 +1,6 @@
-# $Id: mutex.ac,v 11.38 2002/07/25 20:07:52 sue Exp $
+# $Id: mutex.ac,v 11.46 2004/07/09 16:23:19 bostic Exp $
# POSIX pthreads tests: inter-process safe and intra-process only.
-#
-# We need to run a test here, because the PTHREAD_PROCESS_SHARED flag compiles
-# fine on problematic systems, but won't actually work. This is a problem for
-# cross-compilation environments. I think inter-process mutexes are as likely
-# to fail in cross-compilation environments as real ones (especially since the
-# likely cross-compilation environment is Linux, where inter-process mutexes
-# don't currently work -- the latest estimate I've heard is Q1 2002, as part
-# of IBM's NGPT package). So:
-#
-# If checking for inter-process pthreads mutexes:
-# If it's local, run a test.
-# If it's a cross-compilation, fail.
-#
-# If the user specified pthreads mutexes and we're checking for intra-process
-# mutexes only:
-# If it's local, run a test.
-# If it's a cross-compilation, run a link-test.
-#
-# So, the thing you can't do here is configure for inter-process POSIX pthread
-# mutexes when cross-compiling. Since we're using the GNU/Cygnus toolchain for
-# cross-compilation, the target system is likely Linux or *BSD, so we're doing
-# the right thing.
AC_DEFUN(AM_PTHREADS_SHARED, [
AC_TRY_RUN([
#include <pthread.h>
@@ -44,7 +22,27 @@ main() {
pthread_cond_destroy(&cond) ||
pthread_condattr_destroy(&condattr) ||
pthread_mutexattr_destroy(&mutexattr));
-}], [db_cv_mutex="$1"],, [db_cv_mutex="no"])])
+}], [db_cv_mutex="$1"],,
+AC_TRY_LINK([
+#include <pthread.h>],[
+ 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="$1"]))])
AC_DEFUN(AM_PTHREADS_PRIVATE, [
AC_TRY_RUN([
#include <pthread.h>
@@ -91,7 +89,6 @@ AC_DEFUN(AM_DEFINE_MUTEXES, [
# other ports.
AH_TEMPLATE(HAVE_MUTEX_VMS, [Define to 1 to use VMS mutexes.])
AH_TEMPLATE(HAVE_MUTEX_VXWORKS, [Define to 1 to use VxWorks mutexes.])
-AH_TEMPLATE(HAVE_MUTEX_WIN32, [Define to 1 to use Windows mutexes.])
AC_CACHE_CHECK([for mutexes], db_cv_mutex, [
db_cv_mutex=no
@@ -104,37 +101,32 @@ orig_libs=$LIBS
# is already using one type of mutex and doesn't want to mix-and-match (for
# example, on Solaris, which has POSIX, UI and LWP mutexes). Second, the
# applications POSIX pthreads mutexes don't support inter-process locking,
-# but the application wants to use them anyway (for example, current Linux
-# and *BSD systems).
-#
-# If we're on Solaris, we insist that -lthread or -lpthread be used. The
-# problem is the Solaris C library has UI/POSIX interface stubs, but they're
-# broken, configuring them for inter-process mutexes doesn't return an error,
-# but it doesn't work either. Otherwise, we try first without the library
-# and then with it: there's some information that SCO/UnixWare/OpenUNIX needs
-# this. [#4950]
+# but the application wants to use them anyway (for example, some Linux and
+# *BSD systems).
#
# Test for LWP threads before testing for UI/POSIX threads, we prefer them
# on Solaris. There's a bug in SunOS 5.7 where applications get pwrite, not
# pwrite64, if they load the C library before the appropriate threads library,
# e.g., tclsh using dlopen to load the DB library. By using LWP threads we
# avoid answering lots of user questions, not to mention the bugs.
+#
+# Otherwise, test for POSIX threads before UI threads. There are Linux systems
+# that support a UI compatibility mode, and applications are more likely to be
+# written for POSIX threads than UI threads.
+#
+# Try and link with a threads library if possible. The problem is the Solaris
+# C library has UI/POSIX interface stubs, but they're broken, configuring them
+# for inter-process mutexes doesn't return an error, but it doesn't work either.
if test "$db_cv_posixmutexes" = yes; then
- case "$host_os" in
- solaris*)
- db_cv_mutex="posix_library_only";;
- *)
- db_cv_mutex="posix_only";;
- esac
+ db_cv_mutex="posix_only";
fi
-
if test "$db_cv_uimutexes" = yes; then
- case "$host_os" in
- solaris*)
- db_cv_mutex="ui_library_only";;
- *)
- db_cv_mutex="ui_only";;
- esac
+ db_cv_mutex="ui_only";
+fi
+
+# User-specified Win32 mutexes (MinGW build)
+if test "$db_cv_mingw" = "yes"; then
+ db_cv_mutex=win32/gcc
fi
# LWP threads: _lwp_XXX
@@ -151,10 +143,33 @@ AC_TRY_LINK([
], [db_cv_mutex="Solaris/lwp"])
fi
-# UI threads: thr_XXX
+# POSIX.1 pthreads: pthread_XXX
#
-# Try with and without the -lthread library.
+# If the user specified we use POSIX pthreads mutexes, and we fail to find the
+# full interface, try and configure for just intra-process support.
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "posix_only"; then
+ LIBS="$LIBS -lpthread"
+ AM_PTHREADS_SHARED("POSIX/pthreads/library")
+ LIBS="$orig_libs"
+fi
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "posix_only"; then
+ AM_PTHREADS_SHARED("POSIX/pthreads")
+fi
+if test "$db_cv_mutex" = "posix_only"; then
+ AM_PTHREADS_PRIVATE("POSIX/pthreads/private")
+fi
+if test "$db_cv_mutex" = "posix_only"; then
+ LIBS="$LIBS -lpthread"
+ AM_PTHREADS_PRIVATE("POSIX/pthreads/library/private")
+ LIBS="$orig_libs"
+fi
+if test "$db_cv_mutex" = "posix_only"; then
+ AC_MSG_ERROR([unable to find POSIX 1003.1 mutex interfaces])
+fi
+
+# UI threads: thr_XXX
if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "ui_only"; then
+LIBS="$LIBS -lthread"
AC_TRY_LINK([
#include <thread.h>
#include <synch.h>],[
@@ -166,11 +181,10 @@ AC_TRY_LINK([
cond_init(&cond, type, NULL) ||
mutex_lock(&mutex) ||
mutex_unlock(&mutex));
-], [db_cv_mutex="UI/threads"])
+], [db_cv_mutex="UI/threads/library"])
+LIBS="$orig_libs"
fi
-if test "$db_cv_mutex" = no -o \
- "$db_cv_mutex" = "ui_only" -o "$db_cv_mutex" = "ui_library_only"; then
-LIBS="$LIBS -lthread"
+if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "ui_only"; then
AC_TRY_LINK([
#include <thread.h>
#include <synch.h>],[
@@ -182,42 +196,12 @@ AC_TRY_LINK([
cond_init(&cond, type, NULL) ||
mutex_lock(&mutex) ||
mutex_unlock(&mutex));
-], [db_cv_mutex="UI/threads/library"])
-LIBS="$orig_libs"
+], [db_cv_mutex="UI/threads"])
fi
-if test "$db_cv_mutex" = "ui_only" -o "$db_cv_mutex" = "ui_library_only"; then
+if test "$db_cv_mutex" = "ui_only"; then
AC_MSG_ERROR([unable to find UI mutex interfaces])
fi
-# POSIX.1 pthreads: pthread_XXX
-#
-# Try with and without the -lpthread library. If the user specified we use
-# POSIX pthreads mutexes, and we fail to find the full interface, try and
-# configure for just intra-process support.
-if test "$db_cv_mutex" = no -o "$db_cv_mutex" = "posix_only"; then
- AM_PTHREADS_SHARED("POSIX/pthreads")
-fi
-if test "$db_cv_mutex" = no -o \
- "$db_cv_mutex" = "posix_only" -o "$db_cv_mutex" = "posix_library_only"; then
- LIBS="$LIBS -lpthread"
- AM_PTHREADS_SHARED("POSIX/pthreads/library")
- LIBS="$orig_libs"
-fi
-if test "$db_cv_mutex" = "posix_only"; then
- AM_PTHREADS_PRIVATE("POSIX/pthreads/private")
-fi
-if test "$db_cv_mutex" = "posix_only" -o \
- "$db_cv_mutex" = "posix_library_only"; then
- LIBS="$LIBS -lpthread"
- AM_PTHREADS_PRIVATE("POSIX/pthreads/library/private")
- LIBS="$orig_libs"
-fi
-
-if test "$db_cv_mutex" = "posix_only" -o \
- "$db_cv_mutex" = "posix_library_only"; then
- AC_MSG_ERROR([unable to find POSIX 1003.1 mutex interfaces])
-fi
-
# msemaphore: HPPA only
# Try HPPA before general msem test, it needs special alignment.
if test "$db_cv_mutex" = no; then
@@ -327,7 +311,27 @@ AC_TRY_LINK([
], [db_cv_mutex="AIX/_check_lock"])
fi
-# Alpha/gcc: OSF/1
+# _spin_lock_try/_spin_unlock: Apple/Darwin
+if test "$db_cv_mutex" = no; then
+AC_TRY_LINK(,[
+ int x;
+ _spin_lock_try(&x);
+ _spin_unlock(&x);
+], [db_cv_mutex="Darwin/_spin_lock_try"])
+fi
+
+# Tru64/cc
+if test "$db_cv_mutex" = no; then
+AC_TRY_COMPILE(,[
+#if defined(__alpha) && defined(__DECC)
+ exit(0);
+#else
+ FAIL TO COMPILE/LINK
+#endif
+], [db_cv_mutex="Tru64/cc-assembly"])
+fi
+
+# Alpha/gcc
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
#if defined(__alpha) && defined(__GNUC__)
@@ -361,16 +365,6 @@ AC_TRY_COMPILE(,[
fi
# PPC/gcc:
-# Test for Apple first, it requires slightly different assembly.
-if test "$db_cv_mutex" = no; then
-AC_TRY_COMPILE(,[
-#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__) && defined(__APPLE__)
- exit(0);
-#else
- FAIL TO COMPILE/LINK
-#endif
-], [db_cv_mutex="PPC_APPLE/gcc-assembly"])
-fi
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
@@ -378,7 +372,7 @@ AC_TRY_COMPILE(,[
#else
FAIL TO COMPILE/LINK
#endif
-], [db_cv_mutex="PPC_GENERIC/gcc-assembly"])
+], [db_cv_mutex="PPC/gcc-assembly"])
fi
# Sparc/gcc: SunOS, Solaris
@@ -406,7 +400,7 @@ fi
# x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
-#if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
+#if (defined(i386) || defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__)
exit(0);
#else
FAIL TO COMPILE/LINK
@@ -414,6 +408,17 @@ AC_TRY_COMPILE(,[
], [db_cv_mutex="x86/gcc-assembly"])
fi
+# S390/cc: IBM OS/390 Unix
+if test "$db_cv_mutex" = no; then
+AC_TRY_COMPILE(,[
+#if defined(__MVS__) && defined(__IBMC__)
+ exit(0);
+#else
+ FAIL TO COMPILE/LINK
+#endif
+], [db_cv_mutex="S390/cc-assembly"])
+fi
+
# S390/gcc: Linux
if test "$db_cv_mutex" = no; then
AC_TRY_COMPILE(,[
@@ -462,6 +467,10 @@ AIX/_check_lock) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_AIX_CHECK_LOCK)
AH_TEMPLATE(HAVE_MUTEX_AIX_CHECK_LOCK,
[Define to 1 to use the AIX _check_lock mutexes.]);;
+Darwin/_spin_lock_try) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY)
+ AH_TEMPLATE(HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY,
+ [Define to 1 to use the Apple/Darwin _spin_lock_try mutexes.]);;
ALPHA/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_ALPHA_GCC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_ALPHA_GCC_ASSEMBLY,
@@ -494,12 +503,16 @@ POSIX/pthreads/private) ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
AH_TEMPLATE(HAVE_MUTEX_THREAD_ONLY,
[Define to 1 to configure mutexes intra-process only.]);;
POSIX/pthreads/library) LIBS="$LIBS -lpthread"
+ LIBJSO_LIBS="$LIBJSO_LIBS -lpthread"
+ LIBTSO_LIBS="$LIBTSO_LIBS -lpthread"
ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_PTHREADS)
AH_TEMPLATE(HAVE_MUTEX_PTHREADS,
[Define to 1 to use POSIX 1003.1 pthread_XXX mutexes.]);;
POSIX/pthreads/library/private)
LIBS="$LIBS -lpthread"
+ LIBJSO_LIBS="$LIBJSO_LIBS -lpthread"
+ LIBTSO_LIBS="$LIBTSO_LIBS -lpthread"
ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_PTHREADS)
AH_TEMPLATE(HAVE_MUTEX_PTHREADS,
@@ -507,20 +520,20 @@ POSIX/pthreads/library/private)
AC_DEFINE(HAVE_MUTEX_THREAD_ONLY)
AH_TEMPLATE(HAVE_MUTEX_THREAD_ONLY,
[Define to 1 to configure mutexes intra-process only.]);;
-PPC_GENERIC/gcc-assembly)
+PPC/gcc-assembly)
ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
- AC_DEFINE(HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY)
- AH_TEMPLATE(HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY,
- [Define to 1 to use the GCC compiler and generic PowerPC assembly language.]);;
-PPC_APPLE/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
- AC_DEFINE(HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY)
- AH_TEMPLATE(HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY,
- [Define to 1 to use the GCC compiler and Apple PowerPC assembly language.]);;
+ AC_DEFINE(HAVE_MUTEX_PPC_GCC_ASSEMBLY)
+ AH_TEMPLATE(HAVE_MUTEX_PPC_GCC_ASSEMBLY,
+ [Define to 1 to use the GCC compiler and PowerPC assembly language mutexes.]);;
ReliantUNIX/initspin) LIBS="$LIBS -lmproc"
ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_RELIANTUNIX_INITSPIN)
AH_TEMPLATE(HAVE_MUTEX_RELIANTUNIX_INITSPIN,
[Define to 1 to use Reliant UNIX initspin mutexes.]);;
+S390/cc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_S390_CC_ASSEMBLY)
+ AH_TEMPLATE(HAVE_MUTEX_S390_CC_ASSEMBLY,
+ [Define to 1 to use the IBM C compiler and S/390 assembly language mutexes.]);;
S390/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_S390_GCC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_S390_GCC_ASSEMBLY,
@@ -545,6 +558,11 @@ Sparc/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_SPARC_GCC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_SPARC_GCC_ASSEMBLY,
[Define to 1 to use the GCC compiler and Sparc assembly language mutexes.]);;
+Tru64/cc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_TRU64_CC_ASSEMBLY)
+ AH_TEMPLATE(HAVE_MUTEX_TRU64_CC_ASSEMBLY,
+ [Define to 1 to use the CC compiler and Tru64 assembly language mutexes.]);;
+
UI/threads) ADDITIONAL_OBJS="mut_pthread${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_UI_THREADS)
AH_TEMPLATE(HAVE_MUTEX_UI_THREADS,
@@ -562,10 +580,16 @@ UNIX/sema_init) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_SEMA_INIT)
AH_TEMPLATE(HAVE_MUTEX_SEMA_INIT,
[Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes.]);;
-UTS/cc-assembly) ADDITIONAL_OBJS="$ADDITIONAL_OBJS uts4.cc${o}"
+UTS/cc-assembly) ADDITIONAL_OBJS="uts4.cc${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_UTS_CC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_UTS_CC_ASSEMBLY,
[Define to 1 to use the UTS compiler and assembly language mutexes.]);;
+win32) ADDITIONAL_OBJS="mut_win32${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_WIN32)
+ AH_TEMPLATE(HAVE_MUTEX_WIN32, [Define to 1 to use the MSVC compiler and Windows mutexes.]);;
+win32/gcc) ADDITIONAL_OBJS="mut_win32${o} $ADDITIONAL_OBJS"
+ AC_DEFINE(HAVE_MUTEX_WIN32_GCC)
+ AH_TEMPLATE(HAVE_MUTEX_WIN32_GCC, [Define to 1 to use the GCC compiler and Windows mutexes.]);;
x86/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
AC_DEFINE(HAVE_MUTEX_X86_GCC_ASSEMBLY)
AH_TEMPLATE(HAVE_MUTEX_X86_GCC_ASSEMBLY,
diff --git a/storage/bdb/dist/aclocal/options.ac b/storage/bdb/dist/aclocal/options.ac
index ba45c34dfe9..b770fc44478 100644
--- a/storage/bdb/dist/aclocal/options.ac
+++ b/storage/bdb/dist/aclocal/options.ac
@@ -1,4 +1,4 @@
-# $Id: options.ac,v 11.19 2002/06/25 19:31:48 bostic Exp $
+# $Id: options.ac,v 11.37 2004/06/10 16:38:18 bostic Exp $
# Process user-specified options.
AC_DEFUN(AM_OPTIONS_SET, [
@@ -11,6 +11,66 @@ AC_ARG_ENABLE(bigfile,
[AC_MSG_ERROR(
[--enable-bigfile no longer supported, use --enable-largefile])])
+AC_MSG_CHECKING(if --disable-cryptography option specified)
+AC_ARG_ENABLE(cryptography,
+ AC_HELP_STRING([--disable-cryptography],
+ [Do not build database cryptography support.]),, enableval="yes")
+db_cv_build_cryptography="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING(if --disable-hash option specified)
+AC_ARG_ENABLE(hash,
+ AC_HELP_STRING([--disable-hash],
+ [Do not build Hash access method.]),, enableval="yes")
+db_cv_build_hash="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING(if --disable-queue option specified)
+AC_ARG_ENABLE(queue,
+ AC_HELP_STRING([--disable-queue],
+ [Do not build Queue access method.]),, enableval="yes")
+db_cv_build_queue="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING(if --disable-replication option specified)
+AC_ARG_ENABLE(replication,
+ AC_HELP_STRING([--disable-replication],
+ [Do not build database replication support.]),, enableval="yes")
+db_cv_build_replication="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING(if --disable-statistics option specified)
+AC_ARG_ENABLE(statistics,
+ AC_HELP_STRING([--disable-statistics],
+ [Do not build statistics support.]),, enableval="yes")
+db_cv_build_statistics="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING(if --disable-verify option specified)
+AC_ARG_ENABLE(verify,
+ AC_HELP_STRING([--disable-verify],
+ [Do not build database verification support.]),, enableval="yes")
+db_cv_build_verify="$enableval"
+case "$enableval" in
+ no) AC_MSG_RESULT(yes);;
+yes) AC_MSG_RESULT(no);;
+esac
+
AC_MSG_CHECKING(if --enable-compat185 option specified)
AC_ARG_ENABLE(compat185,
[AC_HELP_STRING([--enable-compat185],
@@ -51,7 +111,20 @@ AC_ARG_ENABLE(diagnostic,
[AC_HELP_STRING([--enable-diagnostic],
[Build a version with run-time diagnostics.])],
[db_cv_diagnostic="$enable_diagnostic"], [db_cv_diagnostic="no"])
-AC_MSG_RESULT($db_cv_diagnostic)
+if test "$db_cv_diagnostic" = "yes"; then
+ AC_MSG_RESULT($db_cv_diagnostic)
+fi
+if test "$db_cv_diagnostic" = "no" -a "$db_cv_debug_rop" = "yes"; then
+ db_cv_diagnostic="yes"
+ AC_MSG_RESULT([by --enable-debug_rop])
+fi
+if test "$db_cv_diagnostic" = "no" -a "$db_cv_debug_wop" = "yes"; then
+ db_cv_diagnostic="yes"
+ AC_MSG_RESULT([by --enable-debug_wop])
+fi
+if test "$db_cv_diagnostic" = "no"; then
+ AC_MSG_RESULT($db_cv_diagnostic)
+fi
AC_MSG_CHECKING(if --enable-dump185 option specified)
AC_ARG_ENABLE(dump185,
@@ -67,6 +140,20 @@ AC_ARG_ENABLE(java,
[db_cv_java="$enable_java"], [db_cv_java="no"])
AC_MSG_RESULT($db_cv_java)
+AC_MSG_CHECKING(if --enable-mingw option specified)
+AC_ARG_ENABLE(mingw,
+ [AC_HELP_STRING([--enable-mingw],
+ [Build Berkeley DB for MinGW.])],
+ [db_cv_mingw="$enable_mingw"], [db_cv_mingw="no"])
+AC_MSG_RESULT($db_cv_mingw)
+
+AC_MSG_CHECKING(if --enable-o_direct option specified)
+AC_ARG_ENABLE(o_direct,
+ [AC_HELP_STRING([--enable-o_direct],
+ [Enable the O_DIRECT flag for direct I/O.])],
+ [db_cv_o_direct="$enable_o_direct"], [db_cv_o_direct="no"])
+AC_MSG_RESULT($db_cv_o_direct)
+
AC_MSG_CHECKING(if --enable-posixmutexes option specified)
AC_ARG_ENABLE(posixmutexes,
[AC_HELP_STRING([--enable-posixmutexes],
@@ -81,6 +168,21 @@ AC_ARG_ENABLE(rpc,
[db_cv_rpc="$enable_rpc"], [db_cv_rpc="no"])
AC_MSG_RESULT($db_cv_rpc)
+AC_MSG_CHECKING(if --enable-smallbuild option specified)
+AC_ARG_ENABLE(smallbuild,
+ [AC_HELP_STRING([--enable-smallbuild],
+ [Build small footprint version of the library.])],
+ [db_cv_smallbuild="$enable_smallbuild"], [db_cv_smallbuild="no"])
+if test "$db_cv_smallbuild" = "yes"; then
+ db_cv_build_cryptography="no"
+ db_cv_build_hash="no"
+ db_cv_build_queue="no"
+ db_cv_build_replication="no"
+ db_cv_build_statistics="no"
+ db_cv_build_verify="no"
+fi
+AC_MSG_RESULT($db_cv_smallbuild)
+
AC_MSG_CHECKING(if --enable-tcl option specified)
AC_ARG_ENABLE(tcl,
[AC_HELP_STRING([--enable-tcl],
@@ -105,28 +207,10 @@ AC_MSG_RESULT($db_cv_uimutexes)
AC_MSG_CHECKING(if --enable-umrw option specified)
AC_ARG_ENABLE(umrw,
[AC_HELP_STRING([--enable-umrw],
- [Mask harmless unitialized memory read/writes.])],
+ [Mask harmless uninitialized memory read/writes.])],
[db_cv_umrw="$enable_umrw"], [db_cv_umrw="no"])
AC_MSG_RESULT($db_cv_umrw)
-AC_MSG_CHECKING([if --with-embedix=DIR option specified])
-AC_ARG_WITH(embedix,
- [AC_HELP_STRING([--with-embedix=DIR],
- [Embedix install directory location.])],
- [with_embedix="$withval"], [with_embedix="no"])
-if test "$with_embedix" = "no"; then
- db_cv_embedix="no"
- AC_MSG_RESULT($with_embedix)
-else
- db_cv_embedix="yes"
- if test "$with_embedix" = "yes"; then
- db_cv_path_embedix_install="/opt/Embedix"
- else
- db_cv_path_embedix_install="$with_embedix"
- fi
- AC_MSG_RESULT($db_cv_path_embedix_install)
-fi
-
AC_MSG_CHECKING(if --with-mutex=MUTEX option specified)
AC_ARG_WITH(mutex,
[AC_HELP_STRING([--with-mutex=MUTEX],
@@ -140,21 +224,20 @@ if test "$with_mutex" != "no"; then
fi
AC_MSG_RESULT($with_mutex)
-AC_MSG_CHECKING(if --with-rpm=DIR option specified)
-AC_ARG_WITH(rpm,
- [AC_HELP_STRING([--with-rpm=DIR],
- [Directory location of RPM archive.])],
- [with_rpm="$withval"], [with_rpm="no"])
-if test "$with_rpm" = "no"; then
- db_cv_rpm="no"
-else
- if test "$with_rpm" = "yes"; then
- AC_MSG_ERROR([--with-rpm requires a directory argument])
- fi
- db_cv_rpm="yes"
- db_cv_path_rpm_archive="$with_rpm"
+AH_TEMPLATE(MUTEX_ALIGN,
+ [Define to a value if using non-standard mutex alignment.])
+AC_MSG_CHECKING(if --with-mutexalign=ALIGNMENT option specified)
+AC_ARG_WITH(mutexalign,
+ [AC_HELP_STRING([--with-mutexalign=ALIGNMENT],
+ [Selection of non-standard mutex alignment.])],
+ [with_mutexalign="$withval"], [with_mutexalign="no"])
+if test "$with_mutexalign" = "yes"; then
+ AC_MSG_ERROR([--with-mutexalign requires a mutex alignment argument])
+fi
+if test "$with_mutexalign" != "no"; then
+ AC_DEFINE_UNQUOTED(MUTEX_ALIGN, $with_mutexalign)
fi
-AC_MSG_RESULT($with_rpm)
+AC_MSG_RESULT($with_mutexalign)
AC_MSG_CHECKING([if --with-tcl=DIR option specified])
AC_ARG_WITH(tcl,
@@ -173,25 +256,37 @@ AC_ARG_WITH(uniquename,
[with_uniquename="$withval"], [with_uniquename="no"])
if test "$with_uniquename" = "no"; then
db_cv_uniquename="no"
+ DB_VERSION_UNIQUE_NAME=""
AC_MSG_RESULT($with_uniquename)
else
db_cv_uniquename="yes"
- if test "$with_uniquename" != "yes"; then
+ if test "$with_uniquename" = "yes"; then
+ DB_VERSION_UNIQUE_NAME="__EDIT_DB_VERSION_UNIQUE_NAME__"
+ else
DB_VERSION_UNIQUE_NAME="$with_uniquename"
fi
AC_MSG_RESULT($DB_VERSION_UNIQUE_NAME)
fi
-# Embedix requires RPM.
-if test "$db_cv_embedix" = "yes"; then
- if test "$db_cv_rpm" = "no"; then
- AC_MSG_ERROR([--with-embedix requires --with-rpm])
- fi
-fi
-
# Test requires Tcl
if test "$db_cv_test" = "yes"; then
if test "$db_cv_tcl" = "no"; then
AC_MSG_ERROR([--enable-test requires --enable-tcl])
fi
+fi
+
+# Uniquename excludes C++, Java, RPC.
+if test "$db_cv_uniquename" = "yes"; then
+ if test "$db_cv_rpc" = "yes"; then
+ AC_MSG_ERROR(
+ [--with-uniquename is not compatible with --enable-rpc])
+ fi
+ if test "$db_cv_cxx" = "yes"; then
+ AC_MSG_ERROR(
+ [--with-uniquename is not compatible with --enable-cxx])
+ fi
+ if test "$db_cv_java" = "yes"; then
+ AC_MSG_ERROR(
+ [--with-uniquename is not compatible with --enable-java])
+ fi
fi])
diff --git a/storage/bdb/dist/aclocal/programs.ac b/storage/bdb/dist/aclocal/programs.ac
index 7bfa1fa2646..db6b4f03e84 100644
--- a/storage/bdb/dist/aclocal/programs.ac
+++ b/storage/bdb/dist/aclocal/programs.ac
@@ -1,4 +1,4 @@
-# $Id: programs.ac,v 11.20 2001/09/24 02:09:25 bostic Exp $
+# $Id: programs.ac,v 11.22 2004/06/10 16:38:18 bostic Exp $
# Check for programs used in building/installation.
AC_DEFUN(AM_PROGRAMS_SET, [
@@ -18,15 +18,6 @@ if test "$db_cv_path_cp" = missing_cp; then
AC_MSG_ERROR([No cp utility found.])
fi
-if test "$db_cv_rpm" = "yes"; then
- AC_CHECK_TOOL(path_ldconfig, ldconfig, missing_ldconfig)
- AC_PATH_PROG(db_cv_path_ldconfig, $path_ldconfig, missing_ldconfig)
- if test "$db_cv_path_ldconfig" != missing_ldconfig; then
- RPM_POST_INSTALL="%post -p $db_cv_path_ldconfig"
- RPM_POST_UNINSTALL="%postun -p $db_cv_path_ldconfig"
- fi
-fi
-
AC_CHECK_TOOL(db_cv_path_ln, ln, missing_ln)
if test "$db_cv_path_ln" = missing_ln; then
AC_MSG_ERROR([No ln utility found.])
@@ -47,10 +38,10 @@ if test "$db_cv_path_rm" = missing_rm; then
AC_MSG_ERROR([No rm utility found.])
fi
-if test "$db_cv_rpm" = "yes"; then
- AC_CHECK_TOOL(db_cv_path_rpm, rpm, missing_rpm)
- if test "$db_cv_path_rpm" = missing_rpm; then
- AC_MSG_ERROR([No rpm utility found.])
+if test "$db_cv_rpc" = "yes"; then
+ AC_CHECK_TOOL(db_cv_path_rpcgen, rpcgen, missing_rpcgen)
+ if test "$db_cv_path_rpcgen" = missing_rpcgen; then
+ AC_MSG_ERROR([No rpcgen utility found.])
fi
fi
diff --git a/storage/bdb/dist/aclocal/rpc.ac b/storage/bdb/dist/aclocal/rpc.ac
new file mode 100644
index 00000000000..7d7f4dabe80
--- /dev/null
+++ b/storage/bdb/dist/aclocal/rpc.ac
@@ -0,0 +1,83 @@
+# $Id: rpc.ac,v 11.9 2004/09/27 21:33:48 mjc Exp $
+
+# Try and configure RPC support.
+AC_DEFUN(AM_RPC_CONFIGURE, [
+ AC_DEFINE(HAVE_RPC)
+ AH_TEMPLATE(HAVE_RPC, [Define to 1 if building RPC client/server.])
+
+ # We use the target's rpcgen utility because it may be architecture
+ # specific, for example, 32- or 64-bit specific.
+ XDR_FILE=$srcdir/../rpc_server/db_server.x
+
+ # Prefer the -C option to rpcgen which generates ANSI C-conformant
+ # code.
+ RPCGEN="rpcgen -C"
+ AC_MSG_CHECKING(["$RPCGEN" build of db_server.h])
+ $RPCGEN -h $XDR_FILE > db_server.h 2>/dev/null
+ if test $? -ne 0; then
+ AC_MSG_RESULT([no])
+
+ # Try rpcgen without the -C option.
+ RPCGEN="rpcgen"
+ AC_MSG_CHECKING(["$RPCGEN" build of db_server.h])
+ $RPCGEN -h $XDR_FILE > db_server.h 2>/dev/null
+ if test $? -ne 0; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR(
+ [Unable to build RPC support: $RPCGEN failed.])
+ fi
+ fi
+
+ # Some rpcgen programs generate a set of client stubs called something
+ # like __db_env_create_4003 and functions on the server to handle the
+ # request called something like __db_env_create_4003_svc. Others
+ # expect client and server stubs to both be called __db_env_create_4003.
+ #
+ # We have to generate code in whichever format rpcgen expects, and the
+ # only reliable way to do that is to check what is in the db_server.h
+ # file we just created.
+ if grep "env_create_[[0-9]]*_svc" db_server.h >/dev/null 2>&1 ; then
+ sed 's/__SVCSUFFIX__/_svc/' \
+ < $srcdir/../rpc_server/c/gen_db_server.c > gen_db_server.c
+ else
+ sed 's/__SVCSUFFIX__//' \
+ < $srcdir/../rpc_server/c/gen_db_server.c > gen_db_server.c
+ fi
+
+ AC_MSG_RESULT([yes])
+
+ $RPCGEN -l $XDR_FILE |
+ sed -e 's/^#include.*db_server.h.*/#include "db_server.h"/' \
+ -e '1,/^#include/s/^#include/#include "db_config.h"\
+&/' > db_server_clnt.c
+
+ $RPCGEN -s tcp $XDR_FILE |
+ sed -e 's/^#include.*db_server.h.*/#include "db_server.h"/' \
+ -e 's/^main *()/__dbsrv_main()/' \
+ -e 's/^main *(.*argc.*argv.*)/__dbsrv_main(int argc, char *argv[])/' \
+ -e '/^db_rpc_serverprog/,/^}/{' \
+ -e 's/return;//' \
+ -e 's/^}/__dbsrv_timeout(0);}/' \
+ -e '}' \
+ -e '1,/^#include/s/^#include/#include "db_config.h"\
+&/' > db_server_svc.c
+
+ $RPCGEN -c $XDR_FILE |
+ sed -e 's/^#include.*db_server.h.*/#include "db_server.h"/' \
+ -e '1,/^#include/s/^#include/#include "db_config.h"\
+&/' > db_server_xdr.c
+
+ RPC_SERVER_H=db_server.h
+ RPC_CLIENT_OBJS="\$(RPC_CLIENT_OBJS)"
+ ADDITIONAL_PROGS="berkeley_db_svc $ADDITIONAL_PROGS"
+
+ case "$host_os" in
+ hpux*)
+ AC_CHECK_FUNC(svc_run,,
+ AC_CHECK_LIB(nsl, svc_run,
+ LIBS="-lnsl $LIBS"; LIBTSO_LIBS="-lnsl $LIBTSO_LIBS";
+ LIBJSO_LIBS="-lnsl $LIBJSO_LIBS"));;
+ solaris*)
+ AC_CHECK_FUNC(svc_run,, AC_CHECK_LIB(nsl, svc_run));;
+ esac
+])
diff --git a/storage/bdb/dist/aclocal/sequence.ac b/storage/bdb/dist/aclocal/sequence.ac
new file mode 100644
index 00000000000..ca320b23205
--- /dev/null
+++ b/storage/bdb/dist/aclocal/sequence.ac
@@ -0,0 +1,76 @@
+# $Id: sequence.ac,v 1.3 2004/10/28 18:14:30 bostic Exp $
+
+# Try and configure sequence support.
+AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
+ AC_MSG_CHECKING([for 64-bit integral type support for sequences])
+ db_cv_build_sequence="yes"
+
+ # Have to have found 64-bit types to support sequences. If we don't
+ # find the native types, we try and create our own.
+ if test "$ac_cv_type_int64_t" = "no" -a -z "$int64_decl"; then
+ db_cv_build_sequence="no"
+ fi
+ if test "$ac_cv_type_uint64_t" = "no" -a -z "$u_int64_decl"; then
+ db_cv_build_sequence="no"
+ fi
+
+ # Have to be able to cast variables to the "unsigned long long" and
+ # "long long" types, that's our cast for the printf "%ll[du]" format.
+ if test "$ac_cv_type_long_long" = "no"; then
+ db_cv_build_sequence="no"
+ fi
+ if test "$ac_cv_type_unsigned_long_long" = "no"; then
+ db_cv_build_sequence="no"
+ fi
+
+ # Test to see if we can declare variables of the appropriate size
+ # and format them. If we're cross-compiling, all we get is a link
+ # test, which won't test for the appropriate printf format strings.
+ if test "$db_cv_build_sequence" = "yes"; then
+ AC_TRY_RUN([
+ main() {
+ long long l;
+ unsigned long long u;
+ char buf[100];
+
+ buf[0] = 'a';
+ l = 9223372036854775807LL;
+ (void)snprintf(buf, sizeof(buf), "%lld", l);
+ if (strcmp(buf, "9223372036854775807"))
+ return (1);
+ u = 18446744073709551615ULL;
+ (void)snprintf(buf, sizeof(buf), "%llu", u);
+ if (strcmp(buf, "18446744073709551615"))
+ return (1);
+ return (0);
+ }],, [db_cv_build_sequence="no"],
+ AC_TRY_LINK(,[
+ long long l;
+ unsigned long long u;
+ char buf[100];
+
+ buf[0] = 'a';
+ l = 9223372036854775807LL;
+ (void)snprintf(buf, sizeof(buf), "%lld", l);
+ if (strcmp(buf, "9223372036854775807"))
+ return (1);
+ u = 18446744073709551615ULL;
+ (void)snprintf(buf, sizeof(buf), "%llu", u);
+ if (strcmp(buf, "18446744073709551615"))
+ return (1);
+ return (0);
+ ],, [db_cv_build_sequence="no"]))
+ fi
+ if test "$db_cv_build_sequence" = "yes"; then
+ AC_DEFINE(HAVE_SEQUENCE)
+ AH_TEMPLATE(HAVE_SEQUENCE,
+ [Define to 1 if building sequence support.])
+
+ AC_SUBST(db_seq_decl)
+ db_seq_decl="typedef int64_t db_seq_t;";
+ else
+ # It still has to compile, but it won't run.
+ db_seq_decl="typedef int db_seq_t;";
+ fi
+ AC_MSG_RESULT($db_cv_build_sequence)
+])
diff --git a/storage/bdb/dist/aclocal/sosuffix.ac b/storage/bdb/dist/aclocal/sosuffix.ac
index 1197128293b..8864280f1ae 100644
--- a/storage/bdb/dist/aclocal/sosuffix.ac
+++ b/storage/bdb/dist/aclocal/sosuffix.ac
@@ -1,29 +1,32 @@
-# $Id: sosuffix.ac,v 1.1 2002/07/08 13:15:05 dda Exp $
+# $Id: sosuffix.ac,v 1.4 2004/08/14 20:00:45 dda Exp $
# Determine shared object suffixes.
#
# Our method is to use the libtool variable $library_names_spec,
# set by using AC_PROG_LIBTOOL. This variable is a snippet of shell
-# defined in terms of $versuffix, $release, $libname, $module and $jnimodule.
+# defined in terms of $versuffix, $release, $libname and $module
# We want to eval it and grab the suffix used for shared objects.
-# By setting $module and $jnimodule to yes/no, we obtain the suffixes
+# By setting $module to yes/no, we obtain the suffixes
# used to create dlloadable, or java loadable modules.
# On many (*nix) systems, these all evaluate to .so, but there
# are some notable exceptions.
+# Before calling this macro, $LIBTOOL_PROG must be set to
+# the correct method of invoking libtool (e.g. $SHELL ./libtool)
# This macro is used internally to discover the suffix for the current
-# settings of $module and $jnimodule. The result is stored in $_SOSUFFIX.
+# settings of $module. The result is stored in $_SOSUFFIX.
AC_DEFUN(_SOSUFFIX_INTERNAL, [
versuffix=""
release=""
libname=libfoo
- eval library_names=\"$library_names_spec\"
- _SOSUFFIX=`echo "$library_names" | sed -e 's/.*\.\([[a-zA-Z0-9_]]*\).*/\1/'`
- if test "$_SOSUFFIX" = '' ; then
- _SOSUFFIX=so
- if test "$enable_shared" = "yes" && test "$_SOSUFFIX_MESSAGE" = ""; then
- _SOSUFFIX_MESSAGE=yes
- AC_MSG_WARN([libtool may not know about this architecture.])
- AC_MSG_WARN([assuming .$_SUFFIX suffix for dynamic libraries.])
+ eval _SOSUFFIX=\"$shrext_cmds\"
+ if test "$_SOSUFFIX" = "" ; then
+ _SOSUFFIX=".so"
+ if test `$LIBTOOL_PROG --config | grep build_libtool_libs | grep no` 2>/dev/null; then
+ if test "$_SOSUFFIX_MESSAGE" = ""; then
+ _SOSUFFIX_MESSAGE=yes
+ AC_MSG_WARN([libtool may not know about this architecture.])
+ AC_MSG_WARN([assuming $_SUFFIX suffix for dynamic libraries.])
+ fi
fi
fi
])
@@ -33,7 +36,6 @@ AC_DEFUN(_SOSUFFIX_INTERNAL, [
AC_DEFUN(SOSUFFIX_CONFIG, [
AC_MSG_CHECKING([SOSUFFIX from libtool])
module=no
- jnimodule=no
_SOSUFFIX_INTERNAL
SOSUFFIX=$_SOSUFFIX
AC_MSG_RESULT($SOSUFFIX)
@@ -46,7 +48,6 @@ AC_DEFUN(SOSUFFIX_CONFIG, [
AC_DEFUN(MODSUFFIX_CONFIG, [
AC_MSG_CHECKING([MODSUFFIX from libtool])
module=yes
- jnimodule=no
_SOSUFFIX_INTERNAL
MODSUFFIX=$_SOSUFFIX
AC_MSG_RESULT($MODSUFFIX)
@@ -55,14 +56,20 @@ AC_DEFUN(MODSUFFIX_CONFIG, [
# JMODSUFFIX_CONFIG will set the variable JMODSUFFIX to be the
# shared library extension used JNI modules opened by Java.
-# To discover this, we set $jnimodule, simulating libtool's -jnimodule option.
-# -jnimodule is currently a Sleepycat local extension to libtool.
+# To discover this, we set $jnimodule, simulating libtool's -shrext option.
+##########################################################################
+# Robert Boehne: Not much point in this macro any more because apparently
+# Darwin is the only OS that wants or needs the .jnilib extension.
+##########################################################################
AC_DEFUN(JMODSUFFIX_CONFIG, [
AC_MSG_CHECKING([JMODSUFFIX from libtool])
module=yes
- jnimodule=yes
_SOSUFFIX_INTERNAL
- JMODSUFFIX=$_SOSUFFIX
+ if test `uname` = "Darwin"; then
+ JMODSUFFIX=".jnilib"
+ else
+ JMODSUFFIX=$_SOSUFFIX
+ fi
AC_MSG_RESULT($JMODSUFFIX)
AC_SUBST(JMODSUFFIX)
])
diff --git a/storage/bdb/dist/aclocal/tcl.ac b/storage/bdb/dist/aclocal/tcl.ac
index 80ed19c5a97..d28d360834c 100644
--- a/storage/bdb/dist/aclocal/tcl.ac
+++ b/storage/bdb/dist/aclocal/tcl.ac
@@ -1,4 +1,4 @@
-# $Id: tcl.ac,v 11.14 2002/09/07 17:25:58 dda Exp $
+# $Id: tcl.ac,v 11.18 2004/03/11 20:11:17 bostic Exp $
# The SC_* macros in this file are from the unix/tcl.m4 files in the Tcl
# 8.3.0 distribution, with some minor changes. For this reason, license
@@ -87,6 +87,12 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
AC_MSG_RESULT([file not found])
fi
+ # DB requires at least version 8.4.
+ if test ${TCL_MAJOR_VERSION} -lt 8 \
+ -o ${TCL_MAJOR_VERSION} -eq 8 -a ${TCL_MINOR_VERSION} -lt 4; then
+ AC_MSG_ERROR([Berkeley DB requires Tcl version 8.4 or better.])
+ fi
+
#
# The eval is required to do the TCL_DBGX substitution in the
# TCL_LIB_FILE variable
@@ -118,8 +124,7 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [
# Optional Tcl API.
AC_DEFUN(AM_TCL_LOAD, [
-if test "$db_cv_tcl" = "yes"; then
- if test "$enable_shared" = "no"; then
+ if test `$LIBTOOL_PROG --config | grep build_libtool_libs | grep no` 2>/dev/null; then
AC_MSG_ERROR([Tcl requires shared libraries])
fi
@@ -133,4 +138,4 @@ if test "$db_cv_tcl" = "yes"; then
fi
INSTALL_LIBS="${INSTALL_LIBS} \$(libtso_target)"
-fi])
+])
diff --git a/storage/bdb/dist/aclocal/types.ac b/storage/bdb/dist/aclocal/types.ac
index db8aaac6884..b5843385c1a 100644
--- a/storage/bdb/dist/aclocal/types.ac
+++ b/storage/bdb/dist/aclocal/types.ac
@@ -1,11 +1,4 @@
-# $Id: types.ac,v 11.10 2001/12/10 14:16:49 bostic Exp $
-
-# db.h includes <sys/types.h> and <stdio.h>, not the other default includes
-# autoconf usually includes. For that reason, we specify a set of includes
-# for all type checking tests. [#5060]
-AC_DEFUN(DB_INCLUDES, [[
-#include <sys/types.h>
-#include <stdio.h>]])
+# $Id: types.ac,v 11.18 2004/10/25 18:14:14 bostic Exp $
# Check the sizes we know about, and see if any of them match what's needed.
#
@@ -21,8 +14,12 @@ AC_DEFUN(AM_SEARCH_USIZES, [
$1="typedef unsigned short $2;";;
"$ac_cv_sizeof_unsigned_long")
$1="typedef unsigned long $2;";;
+ "$ac_cv_sizeof_unsigned_long_long")
+ $1="typedef unsigned long long $2;";;
*)
- AC_MSG_ERROR([No unsigned $3-byte integral type]);;
+ if test "$4" != "notfatal"; then
+ AC_MSG_ERROR([No unsigned $3-byte integral type])
+ fi;;
esac])
AC_DEFUN(AM_SEARCH_SSIZES, [
case "$3" in
@@ -34,113 +31,133 @@ AC_DEFUN(AM_SEARCH_SSIZES, [
$1="typedef short $2;";;
"$ac_cv_sizeof_long")
$1="typedef long $2;";;
+ "$ac_cv_sizeof_long_long")
+ $1="typedef long long $2;";;
*)
- AC_MSG_ERROR([No signed $3-byte integral type]);;
+ if test "$4" != "notfatal"; then
+ AC_MSG_ERROR([No signed $3-byte integral type])
+ fi;;
esac])
# Check for the standard system types.
AC_DEFUN(AM_TYPES, [
-# We need to know the sizes of various objects on this system.
-# We don't use the SIZEOF_XXX values created by autoconf.
-AC_CHECK_SIZEOF(char,, DB_INCLUDES)
-AC_CHECK_SIZEOF(unsigned char,, DB_INCLUDES)
-AC_CHECK_SIZEOF(short,, DB_INCLUDES)
-AC_CHECK_SIZEOF(unsigned short,, DB_INCLUDES)
-AC_CHECK_SIZEOF(int,, DB_INCLUDES)
-AC_CHECK_SIZEOF(unsigned int,, DB_INCLUDES)
-AC_CHECK_SIZEOF(long,, DB_INCLUDES)
-AC_CHECK_SIZEOF(unsigned long,, DB_INCLUDES)
-AC_CHECK_SIZEOF(size_t,, DB_INCLUDES)
-AC_CHECK_SIZEOF(char *,, DB_INCLUDES)
+# db.h includes <sys/types.h> and <stdio.h>, not the other default includes
+# autoconf usually includes. For that reason, we specify a set of includes
+# for all type checking tests. [#5060]
+#
+# C99 says types should be in <stdint.h>; include <stdint.h> if it exists.
+#
+# Some systems have types in <stddef.h>; include <stddef.h> if it exists.
+#
+# IBM's OS/390 and z/OS releases have types in <inttypes.h> not also found
+# in <sys/types.h>; include <inttypes.h> if it exists.
+db_includes="#include <sys/types.h>"
+AC_SUBST(inttypes_h_decl)
+AC_CHECK_HEADER(inttypes.h, [
+ db_includes="$db_includes
+#include <inttypes.h>"
+ inttypes_h_decl="#include <inttypes.h>"])
+AC_SUBST(stdint_h_decl)
+AC_CHECK_HEADER(stdint.h, [
+ db_includes="$db_includes
+#include <stdint.h>"
+ stdint_h_decl="#include <stdint.h>"])
+AC_SUBST(stddef_h_decl)
+AC_CHECK_HEADER(stddef.h, [
+ db_includes="$db_includes
+#include <stddef.h>"
+ stddef_h_decl="#include <stddef.h>"])
+db_includes="$db_includes
+#include <stdio.h>"
# We require off_t and size_t, and we don't try to substitute our own
# if we can't find them.
-AC_CHECK_TYPE(off_t,,, DB_INCLUDES)
-if test "$ac_cv_type_off_t" = no; then
- AC_MSG_ERROR([No off_t type.])
-fi
+AC_CHECK_TYPE(off_t,, AC_MSG_ERROR([No off_t type.]), $db_includes)
+AC_CHECK_TYPE(size_t,, AC_MSG_ERROR([No size_t type.]), $db_includes)
+
+# Check for long long and unsigned long long, we only support sequences
+# if those types are available.
+AC_CHECK_TYPES([long long, unsigned long long],,, $db_includes)
-AC_CHECK_TYPE(size_t,,, DB_INCLUDES)
-if test "$ac_cv_type_size_t" = no; then
- AC_MSG_ERROR([No size_t type.])
-fi
+# We need to know the sizes of various objects on this system.
+AC_CHECK_SIZEOF(char,, $db_includes)
+AC_CHECK_SIZEOF(unsigned char,, $db_includes)
+AC_CHECK_SIZEOF(short,, $db_includes)
+AC_CHECK_SIZEOF(unsigned short,, $db_includes)
+AC_CHECK_SIZEOF(int,, $db_includes)
+AC_CHECK_SIZEOF(unsigned int,, $db_includes)
+AC_CHECK_SIZEOF(long,, $db_includes)
+AC_CHECK_SIZEOF(unsigned long,, $db_includes)
+AC_CHECK_SIZEOF(long long,, $db_includes)
+AC_CHECK_SIZEOF(unsigned long long,, $db_includes)
+AC_CHECK_SIZEOF(size_t,, $db_includes)
+AC_CHECK_SIZEOF(char *,, $db_includes)
# We look for u_char, u_short, u_int, u_long -- if we can't find them,
# we create our own.
AC_SUBST(u_char_decl)
-AC_CHECK_TYPE(u_char,,, DB_INCLUDES)
-if test "$ac_cv_type_u_char" = no; then
- u_char_decl="typedef unsigned char u_char;"
-fi
+AC_CHECK_TYPE(u_char,,
+ [u_char_decl="typedef unsigned char u_char;"], $db_includes)
AC_SUBST(u_short_decl)
-AC_CHECK_TYPE(u_short,,, DB_INCLUDES)
-if test "$ac_cv_type_u_short" = no; then
- u_short_decl="typedef unsigned short u_short;"
-fi
+AC_CHECK_TYPE(u_short,,
+ [u_short_decl="typedef unsigned short u_short;"], $db_includes)
AC_SUBST(u_int_decl)
-AC_CHECK_TYPE(u_int,,, DB_INCLUDES)
-if test "$ac_cv_type_u_int" = no; then
- u_int_decl="typedef unsigned int u_int;"
-fi
+AC_CHECK_TYPE(u_int,,
+ [u_int_decl="typedef unsigned int u_int;"], $db_includes)
AC_SUBST(u_long_decl)
-AC_CHECK_TYPE(u_long,,, DB_INCLUDES)
-if test "$ac_cv_type_u_long" = no; then
- u_long_decl="typedef unsigned long u_long;"
-fi
+AC_CHECK_TYPE(u_long,,
+ [u_long_decl="typedef unsigned long u_long;"], $db_includes)
+# We look for fixed-size variants of u_char, u_short, u_int, u_long as well.
AC_SUBST(u_int8_decl)
-AC_CHECK_TYPE(u_int8_t,,, DB_INCLUDES)
-if test "$ac_cv_type_u_int8_t" = no; then
- AM_SEARCH_USIZES(u_int8_decl, u_int8_t, 1)
-fi
+AC_CHECK_TYPE(u_int8_t,,
+ [AM_SEARCH_USIZES(u_int8_decl, u_int8_t, 1)], $db_includes)
AC_SUBST(u_int16_decl)
-AC_CHECK_TYPE(u_int16_t,,, DB_INCLUDES)
-if test "$ac_cv_type_u_int16_t" = no; then
- AM_SEARCH_USIZES(u_int16_decl, u_int16_t, 2)
-fi
+AC_CHECK_TYPE(u_int16_t,,
+ [AM_SEARCH_USIZES(u_int16_decl, u_int16_t, 2)], $db_includes)
AC_SUBST(int16_decl)
-AC_CHECK_TYPE(int16_t,,, DB_INCLUDES)
-if test "$ac_cv_type_int16_t" = no; then
- AM_SEARCH_SSIZES(int16_decl, int16_t, 2)
-fi
+AC_CHECK_TYPE(int16_t,,
+ [AM_SEARCH_SSIZES(int16_decl, int16_t, 2)], $db_includes)
AC_SUBST(u_int32_decl)
-AC_CHECK_TYPE(u_int32_t,,, DB_INCLUDES)
-if test "$ac_cv_type_u_int32_t" = no; then
- AM_SEARCH_USIZES(u_int32_decl, u_int32_t, 4)
-fi
+AC_CHECK_TYPE(u_int32_t,,
+ [AM_SEARCH_USIZES(u_int32_decl, u_int32_t, 4)], $db_includes)
AC_SUBST(int32_decl)
-AC_CHECK_TYPE(int32_t,,, DB_INCLUDES)
-if test "$ac_cv_type_int32_t" = no; then
- AM_SEARCH_SSIZES(int32_decl, int32_t, 4)
-fi
+AC_CHECK_TYPE(int32_t,,
+ [AM_SEARCH_SSIZES(int32_decl, int32_t, 4)], $db_includes)
+
+AC_SUBST(u_int64_decl)
+AC_CHECK_TYPE(u_int64_t,,
+ [AM_SEARCH_USIZES(u_int64_decl, u_int64_t, 8, notfatal)], $db_includes)
+
+AC_SUBST(int64_decl)
+AC_CHECK_TYPE(int64_t,,
+ [AM_SEARCH_SSIZES(int64_decl, int64_t, 8, notfatal)], $db_includes)
# Check for ssize_t -- if none exists, find a signed integral type that's
# the same size as a size_t.
AC_SUBST(ssize_t_decl)
-AC_CHECK_TYPE(ssize_t,,, DB_INCLUDES)
-if test "$ac_cv_type_ssize_t" = no; then
- AM_SEARCH_SSIZES(ssize_t_decl, ssize_t, $ac_cv_sizeof_size_t)
-fi
-
-# Find the largest integral type.
-AC_SUBST(db_align_t_decl)
-AC_CHECK_TYPE(unsigned long long,,, DB_INCLUDES)
-if test "$ac_cv_type_unsigned_long_long" = no; then
- db_align_t_decl="typedef unsigned long db_align_t;"
-else
- db_align_t_decl="typedef unsigned long long db_align_t;"
-fi
-
-# Find an integral type which is the same size as a pointer.
-AC_SUBST(db_alignp_t_decl)
-AM_SEARCH_USIZES(db_alignp_t_decl, db_alignp_t, $ac_cv_sizeof_char_p)
-
+AC_CHECK_TYPE(ssize_t,,
+ [AM_SEARCH_SSIZES(ssize_t_decl, ssize_t, $ac_cv_sizeof_size_t)],
+ $db_includes)
+
+# Check for uintmax_t -- if none exists, first the largest unsigned integral
+# type available.
+AC_SUBST(uintmax_t_decl)
+AC_CHECK_TYPE(uintmax_t,, [AC_CHECK_TYPE(unsigned long long,
+ [uintmax_t_decl="typedef unsigned long long uintmax_t;"],
+ [uintmax_t_decl="typedef unsigned long uintmax_t;"], $db_includes)])
+
+# Check for uintptr_t -- if none exists, find an integral type which is
+# the same size as a pointer.
+AC_SUBST(uintptr_t_decl)
+AC_CHECK_TYPE(uintptr_t,,
+ [AM_SEARCH_USIZES(uintptr_t_decl, uintptr_t, $ac_cv_sizeof_char_p)])
])
diff --git a/storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac b/storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac
index 65cfbbfd13e..b70d108d6cf 100644
--- a/storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac
+++ b/storage/bdb/dist/aclocal_java/ac_jni_include_dirs.ac
@@ -28,7 +28,7 @@ dnl Note: This macro can work with the autoconf M4 macros for Java programs.
dnl This particular macro is not part of the original set of macros.
dnl
dnl @author Don Anderson <dda@sleepycat.com>
-dnl @version $Id: ac_jni_include_dirs.ac,v 1.8 2002/09/04 21:27:30 dda Exp $
+dnl @version $Id: ac_jni_include_dirs.ac,v 1.12 2003/10/05 18:10:06 dda Exp $
dnl
AC_DEFUN(AC_JNI_INCLUDE_DIR,[
@@ -54,18 +54,19 @@ esac
# If we find jni.h in /usr/include, then it's not a java-only tree, so
# don't add /usr/include or subdirectories to the list of includes.
# An extra -I/usr/include can foul things up with newer gcc's.
-if test -f "$_JINC/jni.h"; then
+#
+# If we don't find jni.h, just keep going. Hopefully javac knows where
+# to find its include files, even if we can't.
+if test -r "$_JINC/jni.h"; then
if test "$_JINC" != "/usr/include"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
fi
else
_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
- if test -f "$_JTOPDIR/include/jni.h"; then
+ if test -r "$_JTOPDIR/include/jni.h"; then
if test "$_JTOPDIR" != "/usr"; then
JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
fi
- else
- AC_MSG_ERROR([cannot find java include files])
fi
fi
@@ -74,6 +75,8 @@ if test "$_JTOPDIR" != "/usr"; then
case "$host_os" in
aix*) _JNI_INC_SUBDIRS="aix";;
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
+ freebsd*) _JNI_INC_SUBDIRS="freebsd";;
+ hp*) _JNI_INC_SUBDIRS="hp-ux";;
linux*) _JNI_INC_SUBDIRS="linux genunix";;
osf*) _JNI_INC_SUBDIRS="alpha";;
solaris*) _JNI_INC_SUBDIRS="solaris";;
@@ -109,4 +112,3 @@ while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
done
_ACJNI_FOLLOWED="$_cur"
])# _ACJNI
-
diff --git a/storage/bdb/dist/aclocal_java/ac_prog_java.ac b/storage/bdb/dist/aclocal_java/ac_prog_java.ac
index 8cb24445132..67a879ffcf6 100644
--- a/storage/bdb/dist/aclocal_java/ac_prog_java.ac
+++ b/storage/bdb/dist/aclocal_java/ac_prog_java.ac
@@ -62,14 +62,16 @@ dnl
dnl AC_OUTPUT(Makefile)
dnl
dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
-dnl @version $Id: ac_prog_java.ac,v 1.1 2001/08/23 16:58:43 dda Exp $
+dnl @version $Id: ac_prog_java.ac,v 1.2 2003/05/10 17:46:09 dda Exp $
+dnl
+dnl Note: Modified by dda@sleepycat.com to prefer java over kaffe. [#8059]
dnl
AC_DEFUN([AC_PROG_JAVA],[
AC_REQUIRE([AC_EXEEXT])dnl
if test x$JAVAPREFIX = x; then
- test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT)
+ test x$JAVA = x && AC_CHECK_PROGS(JAVA, java$EXEEXT kaffe$EXEEXT)
else
- test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX)
+ test x$JAVA = x && AC_CHECK_PROGS(JAVA, java$EXEEXT kaffe$EXEEXT, $JAVAPREFIX)
fi
test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
AC_PROG_JAVA_WORKS
diff --git a/storage/bdb/dist/buildrel b/storage/bdb/dist/buildrel
index b796169c719..2537376a87a 100644
--- a/storage/bdb/dist/buildrel
+++ b/storage/bdb/dist/buildrel
@@ -1,7 +1,6 @@
-#!/bin/sh -
-# $Id: buildrel,v 1.39 2002/09/06 14:30:31 bostic Exp $
+# $Id: buildrel,v 1.65 2004/11/09 01:26:29 bostic Exp $
#
-# Build the distribution archives.
+# Build the distribution package.
#
# A set of commands intended to be cut and pasted into a csh window.
@@ -10,67 +9,82 @@ setenv D `pwd`
# Update the release number.
cd $D/dist
+cvs -q update RELEASE
vi RELEASE
-setenv VERSION \
-`sh -c '. RELEASE; echo $DB_VERSION_MAJOR.$DB_VERSION_MINOR.$DB_VERSION_PATCH'`
+setenv VERSION `sh -c '. RELEASE; echo $DB_VERSION'`
echo "Version: $VERSION"
-# Make sure the source tree is up-to-date, generate new support files, and
-# commit anything that's changed.
+# Make sure the source tree is up-to-date
cd $D && cvs -q update
+
+# Build auto-generated files.
cd $D/dist && sh s_all
+
+# Commit all of the changes.
cd $D && cvs -q commit
# Copy a development tree into a release tree.
setenv R /var/tmp/db-$VERSION
rm -rf $R && mkdir -p $R
-cd $D && tar cf - \
-`cvs -q status | sed -n -e "/Repository/s;.*/CVSROOT/db/;;" -e "s/,v//p"` | \
-(cd $R && tar xpf -)
+cd $D && cvs -q status | \
+ grep "Repository revision" | \
+ sed -e 's;.*CVSROOT/db/;;' \
+ -e 's;.*CVSROOT/;;' \
+ -e 's;,v$;;' | pax -rw $R/
+
+# Build the documentation, copy it into place.
+cd db_docs && cvs -q update
+cd db_docs && sh build $D clean && sh build $D |& sed '/.html$/d'
+cd je/docs_src && sh build db ../../db
+rm -rf $R/docs && cp -r $D/docs $R/docs
+
+# Remove source directories we don't distribute.
+cd $R && rm -rf docs_src docs/api_java
+cd $R && rm -rf test/TODO test/upgrade test_perf test_purify
+cd $R && rm -rf test_server test_thread test_vxworks test_xa
+cd $R && rm -rf java/src/com/sleepycat/xa
# Fix symbolic links and permissions.
cd $R/dist && sh s_perm
cd $R/dist && sh s_symlink
-# Build a version.
+# Build a version and smoke test.
cd $R && rm -rf build_run && mkdir build_run
cd $R/build_run && ~bostic/bin/dbconf && make >& mklog
-
-# Smoke test.
-cd $R/build_run && ./ex_access
-
-# Build the documentation.
-cd $R/docs_src && sh build clean
-cd $R/docs_src && sh build |& sed '/.html$/d'
+cd $R/build_run && make ex_access && ./ex_access
# Check the install
cd $R/build_run && make prefix=`pwd`/BDB install
-# Clean up the tree.
-cd $R && rm -rf build_run docs_src
-cd $R && rm -rf test/TODO test/upgrade test_perf test_purify
-cd $R && rm -rf test_server test_thread test_vxworks test_xa
+# Build a small-footprint version and smoke test.
+cd $R && rm -rf build_run && mkdir build_run
+cd $R/build_run && ../dist/configure --enable-smallbuild && make >& mklog
+cd $R/build_run && make ex_access && ./ex_access
+
+# Remove the build directory
+cd $R && rm -rf build_run
# ACQUIRE ROOT PRIVILEGES
cd $R && find . -type d | xargs chmod 775
cd $R && find . -type f | xargs chmod 444
cd $R && chmod 664 build_win32/*.dsp
cd $R/dist && sh s_perm
-chown -R 100.100 $R
+chown -R 100 $R
+chgrp -R 100 $R
# DISCARD ROOT PRIVILEGES
-# Compare this release with the last one.
-set LR=3.1.X
-cd $R/.. && gzcat /a/releases/db-${LR}.tar.gz | tar xf -
-cd $R/../db-${LR} && find . | sort > /tmp/__OLD
-cd $R && find . | sort > /tmp/__NEW
-diff -c /tmp/__OLD /tmp/__NEW
+# Check for file names differing only in case.
+cd $R && find . | sort -f | uniq -ic | sed '/1 /d'
# Create the crypto tar archive release.
setenv T "$R/../db-$VERSION.tar.gz"
cd $R/.. && tar cf - db-$VERSION | gzip --best > $T
chmod 444 $T
+# Check the path length.
+gzcat $T | tar tf - |\
+awk '{ if (length() > 99) print "Path length: " length() " bytes: " $0;}'
+
# Create the non-crypto tree.
setenv RNC "$R/../db-$VERSION.NC"
rm -rf $RNC $R/../__TMP && mkdir $R/../__TMP
@@ -83,7 +97,8 @@ cd $RNC && find . -type d | xargs chmod 775
cd $RNC && find . -type f | xargs chmod 444
cd $RNC && chmod 664 build_win32/*.dsp
cd $RNC/dist && sh s_perm
-chown -R 100.100 $RNC
+chown -R 100 $RNC
+chgrp -R 100 $RNC
# DISCARD ROOT PRIVILEGES
# Create the non-crypto tar archive release.
@@ -91,11 +106,15 @@ setenv T "$R/../db-$VERSION.NC.tar.gz"
cd $RNC/.. && tar cf - db-$VERSION.NC | gzip --best > $T
chmod 444 $T
-# Remove symbolic links to tags files. They're large and we don't want
-# to store real symbolic links in the zip archive for portability reasons.
+# Check the path length.
+gzcat $T | tar tf - |\
+awk '{ if (length() > 99) print "Path length: " length() " bytes: " $0;}'
+
+# Remove tags files. They're large and we don't want to store symbolic links
+# in the zip archive for portability reasons.
# ACQUIRE ROOT PRIVILEGES
-cd $R && rm -f `find . -type l -name 'tags'`
-cd $RNC && rm -f `find . -type l -name 'tags'`
+cd $R && rm -f `find . -name 'tags'`
+cd $RNC && rm -f `find . -name 'tags'`
# DISCARD ROOT PRIVILEGES
# Create the crypto zip archive release.
diff --git a/storage/bdb/dist/config.guess b/storage/bdb/dist/config.guess
index fd30ab0314c..7d0185e019e 100755
--- a/storage/bdb/dist/config.guess
+++ b/storage/bdb/dist/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2002-07-23'
+timestamp='2004-09-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -98,30 +98,32 @@ trap 'exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-# This shell variable is my proudest work .. or something. --bje
+# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
-(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
- || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
-dummy=$tmpdir/dummy ;
-files="$dummy.c $dummy.o $dummy.rel $dummy" ;
-trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
- if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
- rm -f $files ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;
-unset files'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -178,21 +180,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# The OS release
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
+ amd64:OpenBSD:*:*)
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ cats:OpenBSD:*:*)
+ echo arm-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ luna88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -208,86 +227,76 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ echo mips64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- eval $set_cc_for_build
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- 3-1307)
- UNAME_MACHINE="alphaev7"
- ;;
- esac
- fi
- rm -f $dummy.s $dummy && rmdir $tmpdir
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -310,6 +319,9 @@ EOF
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -327,6 +339,9 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -399,6 +414,9 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -437,16 +455,18 @@ EOF
exit (-1);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy \
+ $CC_FOR_BUILD -o $dummy $dummy.c \
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS)
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -521,8 +541,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -620,11 +639,21 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
ia64:HP-UX:*:*)
@@ -658,8 +687,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
- rm -f $dummy.c $dummy && rmdir $tmpdir
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -717,21 +745,26 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3D:*:*:*)
- echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -742,19 +775,7 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -765,14 +786,17 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
- x86:Interix*:3*)
- echo i386-pc-interix3
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
- echo i386-pc-interix
+ echo i586-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
@@ -784,17 +808,34 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
+ # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit 0 ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -815,8 +856,26 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- rm -f $dummy.c && rmdir $tmpdir
- test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
@@ -852,6 +911,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -909,9 +971,11 @@ EOF
LIBC=gnuaout
#endif
#endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- rm -f $dummy.c && rmdir $tmpdir
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
@@ -929,6 +993,26 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -963,9 +1047,6 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -989,9 +1070,15 @@ EOF
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
- M68*:*:R3V[567]*:*)
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
+ M68*:*:R3V[5678]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1008,9 +1095,6 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1082,6 +1166,9 @@ EOF
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
@@ -1089,7 +1176,12 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
- echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ *86) UNAME_PROCESSOR=i686 ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1102,7 +1194,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1125,11 +1217,6 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit 0 ;;
@@ -1148,12 +1235,19 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms && exit 0 ;;
+ I*) echo ia64-dec-vms && exit 0 ;;
+ V*) echo vax-dec-vms && exit 0 ;;
+ esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1274,8 +1368,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
-rm -f $dummy.c $dummy && rmdir $tmpdir
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
diff --git a/storage/bdb/dist/config.hin b/storage/bdb/dist/config.hin
new file mode 100644
index 00000000000..28d6181027a
--- /dev/null
+++ b/storage/bdb/dist/config.hin
@@ -0,0 +1,458 @@
+/* config.hin. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you want to build a version for running the test suite. */
+#undef CONFIG_TEST
+
+/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using
+ an operating system environment that supports Win32 calls and semantics. We
+ don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though
+ Cygwin/GCC closely emulates the Unix environment. */
+#undef DB_WIN32
+
+/* Define to 1 if you want a debugging version. */
+#undef DEBUG
+
+/* Define to 1 if you want a version that logs read operations. */
+#undef DEBUG_ROP
+
+/* Define to 1 if you want a version that logs write operations. */
+#undef DEBUG_WOP
+
+/* Define to 1 if you want a version with run-time diagnostic checking. */
+#undef DIAGNOSTIC
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if Berkeley DB release includes strong cryptography. */
+#undef HAVE_CRYPTO
+
+/* Define to 1 if you have the `directio' function. */
+#undef HAVE_DIRECTIO
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */
+#undef HAVE_EXIT_SUCCESS
+
+/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */
+#undef HAVE_FCNTL_F_SETFD
+
+/* Define to 1 if you have the `fdatasync' function. */
+#undef HAVE_FDATASYNC
+
+/* Define to 1 if allocated filesystem blocks are not zeroed. */
+#undef HAVE_FILESYSTEM_NOTZERO
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getopt' function. */
+#undef HAVE_GETOPT
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
+/* Define to 1 if building Hash access method. */
+#undef HAVE_HASH
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mlock' function. */
+#undef HAVE_MLOCK
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `munlock' function. */
+#undef HAVE_MUNLOCK
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */
+#undef HAVE_MUTEX_68K_GCC_ASSEMBLY
+
+/* Define to 1 to use the AIX _check_lock mutexes. */
+#undef HAVE_MUTEX_AIX_CHECK_LOCK
+
+/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */
+#undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY
+
+/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
+#undef HAVE_MUTEX_ARM_GCC_ASSEMBLY
+
+/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
+#undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY
+
+/* Define to 1 to use the UNIX fcntl system call mutexes. */
+#undef HAVE_MUTEX_FCNTL
+
+/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes.
+ */
+#undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY
+
+/* Define to 1 to use the msem_XXX mutexes on HP-UX. */
+#undef HAVE_MUTEX_HPPA_MSEM_INIT
+
+/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */
+#undef HAVE_MUTEX_IA64_GCC_ASSEMBLY
+
+/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */
+#undef HAVE_MUTEX_MSEM_INIT
+
+/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes.
+ */
+#undef HAVE_MUTEX_PPC_GCC_ASSEMBLY
+
+/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */
+#undef HAVE_MUTEX_PTHREADS
+
+/* Define to 1 to use Reliant UNIX initspin mutexes. */
+#undef HAVE_MUTEX_RELIANTUNIX_INITSPIN
+
+/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes.
+ */
+#undef HAVE_MUTEX_S390_CC_ASSEMBLY
+
+/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */
+#undef HAVE_MUTEX_S390_GCC_ASSEMBLY
+
+/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */
+#undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY
+
+/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */
+#undef HAVE_MUTEX_SEMA_INIT
+
+/* Define to 1 to use the SGI XXX_lock mutexes. */
+#undef HAVE_MUTEX_SGI_INIT_LOCK
+
+/* Define to 1 to use the Solaris _lock_XXX mutexes. */
+#undef HAVE_MUTEX_SOLARIS_LOCK_TRY
+
+/* Define to 1 to use the Solaris lwp threads mutexes. */
+#undef HAVE_MUTEX_SOLARIS_LWP
+
+/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */
+#undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY
+
+/* Define to 1 if mutexes hold system resources. */
+#undef HAVE_MUTEX_SYSTEM_RESOURCES
+
+/* Define to 1 if fast mutexes are available. */
+#undef HAVE_MUTEX_THREADS
+
+/* Define to 1 to configure mutexes intra-process only. */
+#undef HAVE_MUTEX_THREAD_ONLY
+
+/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */
+#undef HAVE_MUTEX_TRU64_CC_ASSEMBLY
+
+/* Define to 1 to use the UNIX International mutexes. */
+#undef HAVE_MUTEX_UI_THREADS
+
+/* Define to 1 to use the UTS compiler and assembly language mutexes. */
+#undef HAVE_MUTEX_UTS_CC_ASSEMBLY
+
+/* Define to 1 to use VMS mutexes. */
+#undef HAVE_MUTEX_VMS
+
+/* Define to 1 to use VxWorks mutexes. */
+#undef HAVE_MUTEX_VXWORKS
+
+/* Define to 1 to use the MSVC compiler and Windows mutexes. */
+#undef HAVE_MUTEX_WIN32
+
+/* Define to 1 to use the GCC compiler and Windows mutexes. */
+#undef HAVE_MUTEX_WIN32_GCC
+
+/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */
+#undef HAVE_MUTEX_X86_GCC_ASSEMBLY
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the O_DIRECT flag. */
+#undef HAVE_O_DIRECT
+
+/* Define to 1 if you have the `pread' function. */
+#undef HAVE_PREAD
+
+/* Define to 1 if you have the `pstat_getdynamic' function. */
+#undef HAVE_PSTAT_GETDYNAMIC
+
+/* Define to 1 if you have the `pwrite' function. */
+#undef HAVE_PWRITE
+
+/* Define to 1 if building on QNX. */
+#undef HAVE_QNX
+
+/* Define to 1 if building Queue access method. */
+#undef HAVE_QUEUE
+
+/* Define to 1 if you have the `raise' function. */
+#undef HAVE_RAISE
+
+/* Define to 1 if you have the `rand' function. */
+#undef HAVE_RAND
+
+/* Define to 1 if building replication support. */
+#undef HAVE_REPLICATION
+
+/* Define to 1 if building RPC client/server. */
+#undef HAVE_RPC
+
+/* Define to 1 if you have the `sched_yield' function. */
+#undef HAVE_SCHED_YIELD
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if building sequence support. */
+#undef HAVE_SEQUENCE
+
+/* Define to 1 if you have the `shmget' function. */
+#undef HAVE_SHMGET
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `srand' function. */
+#undef HAVE_SRAND
+
+/* Define to 1 if building statistics support. */
+#undef HAVE_STATISTICS
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if you have the `sysconf' function. */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+#undef HAVE_SYS_FCNTL_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if unlink of file with open file descriptors will fail. */
+#undef HAVE_UNLINK_WITH_OPEN_FAILURE
+
+/* Define to 1 if the system has the type `unsigned long long'. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if building access method verification support. */
+#undef HAVE_VERIFY
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if building VxWorks. */
+#undef HAVE_VXWORKS
+
+/* Define to 1 if you have the `yield' function. */
+#undef HAVE_YIELD
+
+/* Define to 1 if you have the `_fstati64' function. */
+#undef HAVE__FSTATI64
+
+/* Define to a value if using non-standard mutex alignment. */
+#undef MUTEX_ALIGN
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of a `char *', as computed by sizeof. */
+#undef SIZEOF_CHAR_P
+
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of a `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of a `unsigned char', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_CHAR
+
+/* The size of a `unsigned int', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_INT
+
+/* The size of a `unsigned long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG
+
+/* The size of a `unsigned long long', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_LONG_LONG
+
+/* The size of a `unsigned short', as computed by sizeof. */
+#undef SIZEOF_UNSIGNED_SHORT
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 to mask harmless uninitialized memory read/writes. */
+#undef UMRW
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/*
+ * Exit success/failure macros.
+ */
+#ifndef HAVE_EXIT_SUCCESS
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+#endif
+
+/*
+ * Don't step on the namespace. Other libraries may have their own
+ * implementations of these functions, we don't want to use their
+ * implementations or force them to use ours based on the load order.
+ */
+#ifndef HAVE_GETCWD
+#define getcwd __db_Cgetcwd
+#endif
+#ifndef HAVE_MEMCMP
+#define memcmp __db_Cmemcmp
+#endif
+#ifndef HAVE_MEMCPY
+#define memcpy __db_Cmemcpy
+#endif
+#ifndef HAVE_MEMMOVE
+#define memmove __db_Cmemmove
+#endif
+#ifndef HAVE_RAISE
+#define raise __db_Craise
+#endif
+#ifndef HAVE_SNPRINTF
+#define snprintf __db_Csnprintf
+#endif
+#ifndef HAVE_STRCASECMP
+#define strcasecmp __db_Cstrcasecmp
+#define strncasecmp __db_Cstrncasecmp
+#endif
+#ifndef HAVE_STRERROR
+#define strerror __db_Cstrerror
+#endif
+#ifndef HAVE_VSNPRINTF
+#define vsnprintf __db_Cvsnprintf
+#endif
+
+#ifdef DB_WIN32
+#include "win_db.h"
+#endif
diff --git a/storage/bdb/dist/config.sub b/storage/bdb/dist/config.sub
index 9ff085efaf7..edb6b663ca2 100755
--- a/storage/bdb/dist/config.sub
+++ b/storage/bdb/dist/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2002-07-03'
+timestamp='2004-08-29'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -70,7 +70,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -118,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -144,7 +145,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
+ -apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
@@ -228,36 +229,42 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k \
- | m32r | m68000 | m68k | m88k | mcore \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
+ | mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | msp430 \
| ns16k | ns32k \
| openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
- | tahoe | thumb | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -292,40 +299,48 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c54x-* \
- | clipper-* | cydra-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
- | m32r-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipstx39 | mipstx39el \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -349,6 +364,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -363,6 +381,12 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -422,12 +446,27 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
crds | unos)
basic_machine=m68k-crds
;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -628,10 +667,6 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
monitor)
basic_machine=m68k-rom68k
os=-coff
@@ -723,6 +758,10 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -745,49 +784,55 @@ case $basic_machine in
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86 | athlon)
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
- ;;
+ ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
- ;;
+ ;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
@@ -818,6 +863,16 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
sequent)
basic_machine=i386-sequent
;;
@@ -825,6 +880,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -883,7 +941,7 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
+ sv1)
basic_machine=sv1-cray
os=-unicos
;;
@@ -891,10 +949,6 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
- t3d)
- basic_machine=alpha-cray
- os=-unicos
- ;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
@@ -907,6 +961,14 @@ case $basic_machine in
basic_machine=tic54x-unknown
os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -920,6 +982,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -941,8 +1007,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -963,11 +1029,7 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
- windows32)
- basic_machine=i386-pc
- os=-windows32-msvcrt
- ;;
- xps | xps100)
+ xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
@@ -997,6 +1059,9 @@ case $basic_machine in
romp)
basic_machine=romp-ibm
;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
rs6000)
basic_machine=rs6000-ibm
;;
@@ -1013,16 +1078,16 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -1037,10 +1102,6 @@ case $basic_machine in
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
- c4x*)
- basic_machine=c4x-none
- os=-coff
- ;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
@@ -1096,18 +1157,20 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1119,8 +1182,10 @@ case $os in
;;
esac
;;
+ -nto-qnx*)
+ ;;
-nto*)
- os=-nto-qnx
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@@ -1129,6 +1194,9 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1141,6 +1209,9 @@ case $os in
-opened*)
os=-openedition
;;
+ -os400*)
+ os=-os400
+ ;;
-wince*)
os=-wince
;;
@@ -1162,6 +1233,9 @@ case $os in
-atheos*)
os=-atheos
;;
+ -syllable*)
+ os=-syllable
+ ;;
-386bsd)
os=-bsd
;;
@@ -1172,7 +1246,7 @@ case $os in
os=-rtmk-nova
;;
-ns2 )
- os=-nextstep2
+ os=-nextstep2
;;
-nsk*)
os=-nsk
@@ -1184,6 +1258,9 @@ case $os in
-sinix*)
os=-sysv4
;;
+ -tpf*)
+ os=-tpf
+ ;;
-triton*)
os=-sysv3
;;
@@ -1211,8 +1288,14 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
;;
-none)
;;
@@ -1245,11 +1328,14 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1291,6 +1377,9 @@ case $basic_machine in
*-ibm)
os=-aix
;;
+ *-knuth)
+ os=-mmixware
+ ;;
*-wec)
os=-proelf
;;
@@ -1342,19 +1431,19 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
@@ -1423,9 +1512,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
+ -os400*)
+ vendor=ibm
+ ;;
-ptx*)
vendor=sequent
;;
+ -tpf*)
+ vendor=ibm
+ ;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
diff --git a/storage/bdb/dist/configure.ac b/storage/bdb/dist/configure.ac
index 0bf53972f54..8106d51d0ca 100644
--- a/storage/bdb/dist/configure.ac
+++ b/storage/bdb/dist/configure.ac
@@ -1,25 +1,25 @@
-# $Id: configure.ac,v 11.156 2002/09/04 13:51:17 bostic Exp $
+# $Id: configure.ac,v 11.221 2004/11/16 01:07:57 mjc Exp $
# Process this file with autoconf to produce a configure script.
PACKAGE=db
AC_INIT(Berkeley DB,
__EDIT_DB_VERSION__, support@sleepycat.com, db-__EDIT_DB_VERSION__)
AC_CONFIG_SRCDIR([../db/db.c])
-AC_CONFIG_HEADER(db_config.h:config.hin)
+AC_CONFIG_HEADERS([db_config.h:config.hin])
# Configure setup.
AC_CANONICAL_HOST()
AC_ARG_PROGRAM()
-# We cannot build in the top-level directory.
-AC_MSG_CHECKING(if building in the top-level directory)
-[ test -d db_archive ] && AC_MSG_ERROR([
-Berkeley DB cannot be built in the top-level distribution directory.])
+# Don't build in the top-level or dist directories.
+AC_MSG_CHECKING(if building in the top-level or dist directories)
+if [ test -d db_archive -o -f configure.ac ] ; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_ERROR(
+ [Berkeley DB should not be built in the top-level or dist directories.])
+fi
AC_MSG_RESULT(no)
-# Minimum autoconf version required.
-AC_PREREQ(2.53)
-
# Substitution variables.
AC_SUBST(ADDITIONAL_INCS)
AC_SUBST(ADDITIONAL_LANG)
@@ -30,13 +30,13 @@ AC_SUBST(CFLAGS)
AC_SUBST(CONFIGURATION_ARGS)
AC_SUBST(CONFIGURATION_PATH)
AC_SUBST(CPPFLAGS)
+AC_SUBST(CRYPTO_OBJS)
AC_SUBST(CXX)
AC_SUBST(CXXFLAGS)
+AC_SUBST(DB_PROTO1)
+AC_SUBST(DB_PROTO2)
AC_SUBST(DEFAULT_LIB)
AC_SUBST(DEFAULT_LIB_CXX)
-AC_SUBST(EMBEDIX_ECD_CXX)
-AC_SUBST(EMBEDIX_ECD_RPC)
-AC_SUBST(EMBEDIX_ROOT)
AC_SUBST(INSTALLER)
AC_SUBST(INSTALL_LIBS)
AC_SUBST(INSTALL_TARGET)
@@ -48,63 +48,66 @@ AC_SUBST(LIBS)
AC_SUBST(LIBSO_LIBS)
AC_SUBST(LIBTOOL)
AC_SUBST(LIBTSO_LIBS)
+AC_SUBST(LIBTSO_MODSUFFIX)
+AC_SUBST(LIBTSO_MODULE)
AC_SUBST(LIBXSO_LIBS)
-AC_SUBST(LOAD_LIBS)
AC_SUBST(MAKEFILE_CC)
AC_SUBST(MAKEFILE_CCLINK)
AC_SUBST(MAKEFILE_CXX)
AC_SUBST(MAKEFILE_CXXLINK)
AC_SUBST(MAKEFILE_SOLINK)
AC_SUBST(MAKEFILE_XSOLINK)
+AC_SUBST(OSDIR)
+AC_SUBST(PATH_SEPARATOR)
AC_SUBST(POSTLINK)
+AC_SUBST(REPLACEMENT_OBJS)
AC_SUBST(RPC_CLIENT_OBJS)
-AC_SUBST(RPM_POST_INSTALL)
-AC_SUBST(RPM_POST_UNINSTALL)
+AC_SUBST(RPC_SERVER_H)
AC_SUBST(SOFLAGS)
-AC_SUBST(db_cv_path_embedix_install)
-AC_SUBST(db_cv_path_rpm_archive)
+AC_SUBST(TEST_LIBS)
AC_SUBST(db_int_def)
AC_SUBST(o)
-# RPM needs the current absolute path.
-# RPM needs the list of original arguments, but we don't include the RPM
-# option itself.
-CONFIGURATION_PATH=${PWD-`pwd`}
-CONFIGURATION_ARGS=`echo "$*" |
- sed -e 's/--with-embedix[[^ ]]*//' -e 's/--with-rpm[[^ ]]*//'`
-
-# Set the version.
-AM_VERSION_SET
-
# Set the default installation location.
-AC_PREFIX_DEFAULT(/usr/local/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@)
+AC_PREFIX_DEFAULT(/usr/local/BerkeleyDB.__EDIT_DB_VERSION_MAJOR__.__EDIT_DB_VERSION_MINOR__)
+
+# Configure the version information.
+AC_SUBST(DB_VERSION_MAJOR)
+DB_VERSION_MAJOR="__EDIT_DB_VERSION_MAJOR__"
+AC_SUBST(DB_VERSION_MINOR)
+DB_VERSION_MINOR="__EDIT_DB_VERSION_MINOR__"
+AC_SUBST(DB_VERSION_PATCH)
+DB_VERSION_PATCH="__EDIT_DB_VERSION_PATCH__"
+AC_SUBST(DB_VERSION_STRING)
+DB_VERSION_STRING='"__EDIT_DB_VERSION_STRING__"'
+AC_SUBST(DB_VERSION_UNIQUE_NAME)
# Process all options before using them.
AM_OPTIONS_SET
# Set some #defines based on configuration options.
-if test "$db_cv_diagnostic" = yes; then
+if test "$db_cv_diagnostic" = "yes"; then
AC_DEFINE(DIAGNOSTIC)
AH_TEMPLATE(DIAGNOSTIC,
[Define to 1 if you want a version with run-time diagnostic checking.])
fi
-if test "$db_cv_debug_rop" = yes; then
+if test "$db_cv_debug_rop" = "yes"; then
AC_DEFINE(DEBUG_ROP)
AH_TEMPLATE(DEBUG_ROP,
[Define to 1 if you want a version that logs read operations.])
fi
-if test "$db_cv_debug_wop" = yes; then
+if test "$db_cv_debug_wop" = "yes"; then
AC_DEFINE(DEBUG_WOP)
AH_TEMPLATE(DEBUG_WOP,
[Define to 1 if you want a version that logs write operations.])
fi
-if test "$db_cv_umrw" = yes; then
+if test "$db_cv_umrw" = "yes"; then
AC_DEFINE(UMRW)
AH_TEMPLATE(UMRW,
- [Define to 1 to mask harmless unitialized memory read/writes.])
+ [Define to 1 to mask harmless uninitialized memory read/writes.])
fi
-if test "$db_cv_test" = yes; then
+if test "$db_cv_test" = "yes"; then
AC_DEFINE(CONFIG_TEST)
AH_TEMPLATE(CONFIG_TEST,
[Define to 1 if you want to build a version for running the test suite.])
@@ -114,27 +117,12 @@ fi
AM_PROGRAMS_SET
AC_PROG_INSTALL
-# RPM/Embedix support: change the standard make and install targets
-if test "$db_cv_rpm" = "yes"; then
- BUILD_TARGET="rpm_build"
- echo "topdir: $CONFIGURATION_PATH" > rpmrc
- if test "$db_cv_embedix" = "yes"; then
- EMBEDIX_ROOT="/usr"
- INSTALL_TARGET="embedix_install"
- else
- INSTALL_TARGET="rpm_install"
- fi
-else
- BUILD_TARGET="library_build"
- INSTALL_TARGET="library_install"
-fi
+BUILD_TARGET="library_build"
+INSTALL_TARGET="library_install"
# This is where we handle stuff that autoconf can't handle: compiler,
# preprocessor and load flags, libraries that the standard tests don't
-# look for. The default optimization is -O. We would like to set the
-# default optimization for systems using gcc to -O2, but we can't. By
-# the time we know we're using gcc, it's too late to set optimization
-# flags.
+# look for.
#
# There are additional libraries we need for some compiler/architecture
# combinations.
@@ -145,7 +133,6 @@ fi
# The makefile CC may be different than the CC used in config testing,
# because the makefile CC may be set to use $(LIBTOOL).
#
-# XXX
# Don't override anything if it's already set from the environment.
optimize_def="-O"
case "$host_os" in
@@ -154,25 +141,22 @@ aix4.3.*|aix5*)
CC=${CC-"xlc_r"}
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -Wl,-brtl";;
-bsdi3*) optimize_def="-O2"
- CC=${CC-"shlicc2"}
+bsdi3*) CC=${CC-"shlicc2"}
LIBS="$LIBS -lipc";;
-bsdi*) optimize_def="-O2";;
+cygwin*)
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
freebsd*)
- optimize_def="-O2"
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
- #LDFLAGS="$LDFLAGS -pthread"
- ;;
+ LDFLAGS="$LDFLAGS -pthread";;
+gnu*|k*bsd*-gnu|linux*)
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
hpux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT";;
irix*) optimize_def="-O2"
CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE";;
-linux*) optimize_def="-O2"
- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_REENTRANT";;
mpeix*) CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE"
LIBS="$LIBS -lsocket -lsvipc";;
-osf*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- LDFLAGS="$LDFLAGS -pthread";;
-*qnx) AC_DEFINE(HAVE_QNX)
+osf*) CPPFLAGS="$CPPFLAGS -pthread";;
+*qnx*) AC_DEFINE(HAVE_QNX)
AH_TEMPLATE(HAVE_QNX, [Define to 1 if building on QNX.]);;
solaris*)
CPPFLAGS="$CPPFLAGS -D_REENTRANT";;
@@ -189,19 +173,52 @@ CXXFLAGS=${CXXFLAGS-"$CFLAGS"}
# XXX
# Some compilers can't mix optimizing and debug flags. The only way to
# handle this is to specify CFLAGS in the environment before configuring.
-if test "$db_cv_debug" = yes; then
+if test "$db_cv_debug" = "yes"; then
AC_DEFINE(DEBUG)
AH_TEMPLATE(DEBUG, [Define to 1 if you want a debugging version.])
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CXXFLAGS -g"
+ db_cv_build_type=debug
+else
+ db_cv_build_type=release
fi
+AC_SUBST(db_cv_build_type)
# The default compiler is cc (NOT gcc), the default CFLAGS is as specified
# above, NOT what is set by AC_PROG_CC, as it won't set optimization flags
# for any compiler other than gcc.
AC_PROG_CC(cc gcc)
+# Set specific per-compiler flags.
+if test "$GCC" = "yes"; then
+ # We want -O2 if we're using gcc.
+ CFLAGS="$CFLAGS "
+ CFLAGS=`echo "$CFLAGS" | sed 's/-O /-O2 /g'`
+else
+ case "$host_os" in
+ hpux11.0*) ;;
+ hpux11*) CPPFLAGS="$CPPFLAGS -mt";;
+ esac
+fi
+
+# Checks for compiler characteristics.
+DB_PROTO1="#undef __P"
+
+# AC_PROG_CC_STDC only sets ac_cv_prog_cc_stdc if the test fails, so
+# check for "no", not "yes".
+if test "$ac_cv_prog_cc_stdc" = "no"; then
+ DB_PROTO2="#define __P(protos) ()"
+else
+ DB_PROTO2="#define __P(protos) protos"
+fi
+
+AC_C_CONST
+AC_SUBST(DB_CONST)
+if test "$ac_cv_c_const" != "yes"; then
+ DB_CONST="#define const"
+fi
+
# Because of shared library building, the ${CC} used for config tests
# may be different than the ${CC} we want to put in the Makefile.
# The latter is known as ${MAKEFILE_CC} in this script.
@@ -230,6 +247,9 @@ if test "$db_cv_cxx" = "yes"; then
esac
fi
AC_PROG_CXX
+ ###### WORKAROUND: SEE SR #7938
+ AC_PROG_CXXCPP
+ ###############################
AC_CXX_HAVE_STDHEADERS
MAKEFILE_CXX="${CXX}"
MAKEFILE_CXXLINK="${CXX}"
@@ -260,8 +280,8 @@ CCC=CXX
# Libtool configuration.
AC_PROG_LIBTOOL
-LIBTOOL="\$(SHELL) ./libtool"
SOFLAGS="-rpath \$(libdir)"
+LIBTOOL_PROG="${SHELL} ./libtool"
# Set SOSUFFIX and friends
SOSUFFIX_CONFIG
@@ -277,53 +297,70 @@ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
+LIBTOOL="\$(SHELL) ./libtool"
+
+case "$host_os" in
+cygwin* | mingw*)
+ MAKEFILE_SOLINK="$MAKEFILE_SOLINK -no-undefined"
+ MAKEFILE_XSOLINK="$MAKEFILE_XSOLINK -no-undefined";;
+esac
+
# Configure for shared libraries, static libraries, or both. If both are
# configured, build the utilities and example programs with shared versions.
#
# $o is set to ".o" or ".lo", and is the file suffix used in the Makefile
# instead of .o
+if test `$LIBTOOL_PROG --config |
+ grep build_libtool_libs | grep no` 2>/dev/null; then
+ enable_shared="no"
+else
+ enable_shared="yes"
+fi
+if test `$LIBTOOL_PROG --config |
+ grep build_old_libs | grep no` 2>/dev/null; then
+ enable_static="no"
+else
+ enable_static="yes"
+fi
+
+case "$host_os" in
+ darwin*)
+ LIBTSO_MODULE=""
+ LIBTSO_MODSUFFIX=".dylib"
+ ;;
+ *)
+ LIBTSO_MODULE="-module"
+ LIBTSO_MODSUFFIX=@MODSUFFIX@
+ ;;
+esac
+
+# C API.
if test "$enable_shared" = "no"; then
- DEFAULT_LIB="\$(libdb)"
- POSTLINK="@true"
+ DEFAULT_LIB="\$(libdb_version)"
+ POSTLINK=": "
o=".o"
-fi
-if test "$enable_shared" = "yes"; then
+else
DEFAULT_LIB="\$(libso_target)"
POSTLINK="\$(LIBTOOL) --mode=execute true"
o=".lo"
fi
INSTALL_LIBS="$DEFAULT_LIB"
+if test "$enable_static" = "yes"; then
+ INSTALL_LIBS="$INSTALL_LIBS \$(libdb)"
+fi
# Optional C++ API.
if test "$db_cv_cxx" = "yes"; then
if test "$enable_shared" = "no"; then
- DEFAULT_LIB_CXX="\$(libcxx)"
+ DEFAULT_LIB_CXX="\$(libcxx_version)"
fi
if test "$enable_shared" = "yes"; then
DEFAULT_LIB_CXX="\$(libxso_target)"
fi
INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_CXX"
-
- # Fill in C++ library for Embedix.
- EMBEDIX_ECD_CXX='<OPTION db-extra>\
- TYPE=bool\
- DEFAULT_VALUE=1\
- PROMPT=Include BerkeleyDB C++ library?\
- <KEEPLIST>\
- /usr/include/db_cxx.h\
- /usr/lib/libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\
- </KEEPLIST>\
- <PROVIDES>\
- libdb_cxx-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.so\
- </PROVIDES>\
- <REQUIRES>\
- ld-linux.so.2\
- libc.so.6\
- </REQUIRES>\
- STATIC_SIZE=0\
- STORAGE_SIZE=523612\
- STARTUP_TIME=0\
- </OPTION>'
+ if test "$enable_static" = "yes"; then
+ INSTALL_LIBS="$INSTALL_LIBS \$(libcxx)"
+ fi
fi
# Optional Java API.
@@ -333,9 +370,28 @@ if test "$db_cv_java" = "yes"; then
AC_MSG_ERROR([Java requires shared libraries])
fi
+ # A classpath that includes . is needed to check for Java
+ CLASSPATH=".:$CLASSPATH"
+ export CLASSPATH
AC_PROG_JAVAC
AC_PROG_JAR
- AC_JNI_INCLUDE_DIR
+ AC_PROG_JAVA
+ AC_JNI_INCLUDE_DIR
+
+ AC_MSG_CHECKING(java version)
+ case "$JAVA" in
+ *kaffe* )
+ JAVA_VERSION=`$JAVA -version 2>&1 |
+ sed -e '/Java Version:/!d' -e 's/.*Java Version: \([[^ ]]*\)[[ ]]*/\1/'` ;;
+ * ) JAVA_VERSION=`$JAVA -version 2>&1 |
+ sed -e '/ version /!d' -e 's/.*"\(.*\)".*/\1/'` ;;
+ esac
+ AC_MSG_RESULT($JAVA_VERSION)
+ case "$JAVA_VERSION" in
+ 1.[[3456789]]* | 1.[[1-9]][[0-9]]* | [[23456789]]* ) ;;
+ * )
+ AC_MSG_ERROR([Java version 1.3 or higher required, got $JAVA_VERSION]) ;;
+ esac
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
@@ -348,88 +404,69 @@ else
JAVAC=nojavac
fi
-# Optional RPC client/server.
-if test "$db_cv_rpc" = "yes"; then
- AC_DEFINE(HAVE_RPC)
- AH_TEMPLATE(HAVE_RPC, [Define to 1 if building RPC client/server.])
-
- RPC_CLIENT_OBJS="\$(RPC_CLIENT_OBJS)"
- ADDITIONAL_PROGS="berkeley_db_svc $ADDITIONAL_PROGS"
-
- EMBEDIX_ECD_RPC="/usr/bin/berkeley_db_svc"
-
- case "$host_os" in
- hpux*)
- AC_CHECK_FUNC(svc_run,,
- AC_CHECK_LIB(nsl, svc_run,
- LIBS="-lnsl $LIBS"; LIBTSO_LIBS="-lnsl $LIBTSO_LIBS"));;
- solaris*)
- AC_CHECK_FUNC(svc_run,, AC_CHECK_LIB(nsl, svc_run));;
- esac
-fi
-
-AM_TCL_LOAD
-
-# Optional crypto support.
-if test -d "$srcdir/../crypto"; then
- AC_DEFINE(HAVE_CRYPTO)
- AH_TEMPLATE(HAVE_CRYPTO,
- [Define to 1 if Berkeley DB release includes strong cryptography.])
- ADDITIONAL_OBJS="aes_method${o} crypto${o} mt19937db${o} rijndael-alg-fst${o} rijndael-api-fst${o} $ADDITIONAL_OBJS"
-fi
-
-# Optional DB 1.85 compatibility API.
-if test "$db_cv_compat185" = "yes"; then
- ADDITIONAL_INCS="db_185.h $ADDITIONAL_INCS"
- ADDITIONAL_OBJS="db185${o} $ADDITIONAL_OBJS"
-fi
+# MinGW support.
+if test "$db_cv_mingw" = "yes"; then
+ OSDIR=os_win32
+ PATH_SEPARATOR="\\\\/:"
-# Optional utilities.
-if test "$db_cv_dump185" = "yes"; then
- ADDITIONAL_PROGS="db_dump185 $ADDITIONAL_PROGS"
+ AC_DEFINE(DB_WIN32)
+ AC_DEFINE(STDC_HEADERS)
+else
+ OSDIR=os
+ PATH_SEPARATOR="/"
fi
-# Checks for compiler characteristics.
-AC_C_CONST
-
# Checks for include files, structures, C types.
AC_HEADER_STAT
AC_HEADER_TIME
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(sys/select.h sys/time.h)
+AC_CHECK_HEADERS(sys/select.h sys/time.h sys/fcntl.h)
AC_CHECK_MEMBERS([struct stat.st_blksize])
AM_TYPES
AC_CACHE_CHECK([for ANSI C exit success/failure values], db_cv_exit_defines, [
AC_TRY_COMPILE([#include <stdlib.h>], return (EXIT_SUCCESS);,
[db_cv_exit_defines=yes], [db_cv_exit_defines=no])])
-if test "$db_cv_exit_defines" = yes; then
+if test "$db_cv_exit_defines" = "yes"; then
AC_DEFINE(HAVE_EXIT_SUCCESS)
AH_TEMPLATE(HAVE_EXIT_SUCCESS,
[Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines.])
fi
-# Test for various functions/libraries that the test and example programs use:
-# sched_yield function
-# pthreads, socket and math libraries
-AC_CHECK_FUNC(sched_yield,,
- AC_SEARCH_LIBS(sched_yield, rt, LOAD_LIBS="$LOAD_LIBS -lrt"))
-
-# XXX
+# Test for various functions/libraries -- do tests that change library values
+# first.
+#
+# The Berkeley DB library calls fdatasync, and it's only available in -lrt on
+# Solaris. See if we can find it either without additional libraries or in
+# -lrt. If fdatasync is found in -lrt, add -lrt to the Java and Tcl shared
+# library link lines.
+AC_SEARCH_LIBS(fdatasync, rt, [dnl
+ if test "$ac_cv_search_fdatasync" != "none required" ; then
+ LIBJSO_LIBS="$LIBJSO_LIBS -lrt";
+ LIBSO_LIBS="$LIBSO_LIBS -lrt";
+ LIBTSO_LIBS="$LIBTSO_LIBS -lrt";
+ fi])
+
+# The test and example programs use the sched_yield function, taken from -lrt
+# on Solaris.
+AC_SEARCH_LIBS(sched_yield, rt)
+
+# !!!
# We can't check for pthreads in the same way we did the test for sched_yield
# because the Solaris C library includes pthread interfaces which are not
-# thread-safe. For that reason we always add -lpthread if we find a pthread
-# library. Also we can't depend on any specific call existing (pthread_create,
-# for example), as it may be #defined in an include file -- OSF/1 (Tru64) has
-# this problem.
-AC_HAVE_LIBRARY(pthread, LOAD_LIBS="$LOAD_LIBS -lpthread")
+# inter-process safe. For that reason we always add -lpthread if we find a
+# pthread library.
+#
+# We can't depend on any specific call existing (pthread_create, for example),
+# as it may be #defined in an include file -- OSF/1 (Tru64) has this problem.
+AC_HAVE_LIBRARY(pthread, TEST_LIBS="$TEST_LIBS -lpthread")
-# XXX
-# We could be more exact about whether these libraries are needed, but we don't
-# bother -- if they exist, we load them.
-AC_HAVE_LIBRARY(m, LOAD_LIBS="$LOAD_LIBS -lm")
-AC_HAVE_LIBRARY(socket, LOAD_LIBS="$LOAD_LIBS -lsocket")
-AC_HAVE_LIBRARY(nsl, LOAD_LIBS="$LOAD_LIBS -lnsl")
+# !!!
+# We could be more exact about whether these libraries are needed, but don't
+# bother -- if they exist, we load them, it's only the test programs anyway.
+AC_HAVE_LIBRARY(m, TEST_LIBS="$TEST_LIBS -lm")
+AC_HAVE_LIBRARY(socket, TEST_LIBS="$TEST_LIBS -lsocket")
+AC_HAVE_LIBRARY(nsl, TEST_LIBS="$TEST_LIBS -lnsl")
# Check for mutexes.
# We do this here because it changes $LIBS.
@@ -442,22 +479,22 @@ AM_DEFINE_MUTEXES
# buffer is non-NULL -- Solaris can't handle a NULL buffer, and they
# deleted getwd().
AC_REPLACE_FUNCS(getcwd getopt memcmp memcpy memmove raise)
-AC_REPLACE_FUNCS(snprintf strcasecmp strdup strerror vsnprintf)
+AC_REPLACE_FUNCS(strcasecmp strdup strerror strtol strtoul)
# Check for system functions we optionally use.
-AC_CHECK_FUNCS(_fstati64 clock_gettime directio gettimeofday getuid)
-AC_CHECK_FUNCS(pstat_getdynamic sched_yield select strtoul sysconf yield)
-
-# Checks for system functions for which we don't have replacements.
-# We require qsort(3).
-AC_CHECK_FUNCS(qsort, , AC_MSG_ERROR([No qsort library function.]))
+AC_CHECK_FUNCS(_fstati64 clock_gettime directio fdatasync ftruncate getrusage)
+AC_CHECK_FUNCS(gettimeofday getuid pstat_getdynamic rand sched_yield)
+AC_CHECK_FUNCS(select snprintf srand sysconf vsnprintf yield)
# Pread/pwrite.
# HP-UX has pread/pwrite, but it doesn't work with largefile support.
-case "$host_os" in
-hpux*)
- AC_MSG_WARN([pread/pwrite interfaces ignored on $host_os.]);;
-*) AC_CHECK_FUNCS(pread pwrite)
+# NCR's version of System V R 4.3 has pread/pwrite symbols, but no support.
+case "$host_os-$host_vendor" in
+hpux*|sysv4.3*-ncr)
+ AC_MSG_WARN(
+ [pread/pwrite interfaces ignored on $host_os-$host_vendor.]);;
+*)
+ AC_CHECK_FUNCS(pread pwrite);;
esac
# Check for fcntl(2) to deny child process access to file descriptors.
@@ -467,7 +504,7 @@ AC_TRY_LINK([
#include <fcntl.h>], [
fcntl(1, F_SETFD, 1);
], [db_cv_fcntl_f_setfd=yes], [db_cv_fcntl_f_setfd=no])])
-if test "$db_cv_fcntl_f_setfd" = yes; then
+if test "$db_cv_fcntl_f_setfd" = "yes"; then
AC_DEFINE(HAVE_FCNTL_F_SETFD)
AH_TEMPLATE(HAVE_FCNTL_F_SETFD,
[Define to 1 if fcntl/F_SETFD denies child access to file descriptors.])
@@ -475,28 +512,25 @@ fi
# A/UX has a broken getopt(3).
case "$host_os" in
-aux*) ADDITIONAL_OBJS="getopt${o} $ADDITIONAL_OBJS";;
+aux*) AC_LIBOBJ([getopt]);;
esac
-# Linux has the O_DIRECT flag, but you can't actually use it.
-AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
-echo "test for working open/O_DIRECT" > __o_direct_file
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <fcntl.h>
-main() {
-int c, fd = open("__o_direct_file", O_RDONLY | O_DIRECT, 0);
-exit ((fd == -1) || (read(fd, &c, 1) != 1));
-}], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no],
-AC_TRY_LINK([
-#include <sys/types.h>
-#include <fcntl.h>], [
- open("__o_direct_file", O_RDONLY | O_DIRECT, 0);
-], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no]))
-rm -f __o_direct_file])
-if test "$db_cv_open_o_direct" = yes; then
- AC_DEFINE(HAVE_O_DIRECT)
- AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
+# Linux has a broken O_DIRECT flag, but you can't detect it at configure time.
+# Linux and SGI require buffer alignment we may not match, otherwise writes
+# will fail. Default to not using the O_DIRECT flag.
+if test "$db_cv_o_direct" = "yes"; then
+ AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
+ AC_TRY_LINK([
+ #include <sys/types.h>
+ #include <fcntl.h>], [
+ open("a", O_RDONLY | O_DIRECT, 0);
+ ], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])])
+ if test \
+ "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then
+ AC_DEFINE(HAVE_O_DIRECT)
+ AH_TEMPLATE(HAVE_O_DIRECT,
+ [Define to 1 if you have the O_DIRECT flag.])
+ fi
fi
# Check for largefile support.
@@ -516,11 +550,11 @@ AC_SYS_LARGEFILE
mmap_ok=no
case "$host_os" in
bsdi3*|bsdi4.0)
- AC_MSG_WARN([mlock(2) interface ignored on BSD/OS 3.X and 4.0.])
+ AC_MSG_WARN([mlock(2) interface ignored on $host_os-$host_vendor.])
mmap_ok=yes
AC_CHECK_FUNCS(mmap munmap, , mmap_ok=no);;
ultrix*)
- AC_MSG_WARN([mmap(2) interface ignored on Ultrix.]);;
+ AC_MSG_WARN([mmap(2) interface ignored on $host_os-$host_vendor.]);;
*)
mmap_ok=yes
AC_CHECK_FUNCS(mlock munlock)
@@ -534,29 +568,125 @@ esac
shmget_ok=no
case "$host_os" in
sunos*)
- AC_MSG_WARN([shmget(2) interface ignored on SunOS.]);;
+ AC_MSG_WARN([shmget(2) interface ignored on $host_os-$host_vendor.]);;
*)
shmget_ok=yes
AC_CHECK_FUNCS(shmget, , shmget_ok=no);;
esac
# We require either mmap/munmap(2) or shmget(2).
-if test "$mmap_ok" = no -a "$shmget_ok" = no; then
+if test "$mmap_ok" = "no" -a "$shmget_ok" = "no"; then
AC_MSG_WARN([Neither mmap/munmap(2) or shmget(2) library functions.])
fi
-# If we're not doing version name substitution, DB_VERSION_UNIQUE_NAME
-# needs to be erased.
-if test "$db_cv_uniquename" = "no"; then
- DB_VERSION_UNIQUE_NAME=""
+# Optional RPC client/server.
+if test "$db_cv_rpc" = "yes"; then
+ AM_RPC_CONFIGURE
+fi
+
+# Optional Tcl support.
+if test "$db_cv_tcl" = "yes"; then
+ AM_TCL_LOAD
+fi
+
+# Optional sequence code.
+AM_SEQUENCE_CONFIGURE
+
+# Optional DB 1.85 compatibility API.
+if test "$db_cv_compat185" = "yes"; then
+ ADDITIONAL_INCS="db_185.h $ADDITIONAL_INCS"
+
+ ADDITIONAL_OBJS="db185${o} $ADDITIONAL_OBJS"
+fi
+
+# Optional utilities.
+if test "$db_cv_dump185" = "yes"; then
+ ADDITIONAL_PROGS="db_dump185 $ADDITIONAL_PROGS"
+fi
+
+# You can disable pieces of functionality to save space.
+#
+# Btree is always configured: it is the standard method, and Hash off-page
+# duplicates require it.
+ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(BTREE_OBJS)"
+
+# Hash can be disabled.
+if test "$db_cv_build_hash" = "yes"; then
+ AC_DEFINE(HAVE_HASH)
+ AH_TEMPLATE(HAVE_HASH, [Define to 1 if building Hash access method.])
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(HASH_OBJS)"
+ if test "$db_cv_build_verify" = "yes"; then
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(HASH_VRFY_OBJS)"
+ fi
+else
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS hash_stub${o}"
+fi
+
+# Queue can be disabled.
+if test "$db_cv_build_queue" = "yes"; then
+ AC_DEFINE(HAVE_QUEUE)
+ AH_TEMPLATE(HAVE_QUEUE, [Define to 1 if building Queue access method.])
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(QUEUE_OBJS)"
+ if test "$db_cv_build_verify" = "yes"; then
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(QUEUE_VRFY_OBJS)"
+ fi
+else
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS qam_stub${o}"
+fi
+
+# Replication can be disabled.
+if test "$db_cv_build_replication" = "yes"; then
+ AC_DEFINE(HAVE_REPLICATION)
+ AH_TEMPLATE(HAVE_REPLICATION,
+ [Define to 1 if building replication support.])
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(REP_OBJS)"
+else
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS rep_stub${o}"
+fi
+
+# The statistics code can be disabled.
+if test "$db_cv_build_statistics" = "yes"; then
+ AC_DEFINE(HAVE_STATISTICS)
+ AH_TEMPLATE(HAVE_STATISTICS,
+ [Define to 1 if building statistics support.])
+fi
+
+# The verification code can be disabled.
+if test "$db_cv_build_verify" = "yes"; then
+ AC_DEFINE(HAVE_VERIFY)
+ AH_TEMPLATE(HAVE_VERIFY,
+ [Define to 1 if building access method verification support.])
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS \$(BTREE_VRFY_OBJS)"
+else
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS db_vrfy_stub${o}"
+fi
+
+# The crypto code can be disabled.
+if test -d "$srcdir/../crypto" -a "$db_cv_build_cryptography" = "yes"; then
+ AC_DEFINE(HAVE_CRYPTO)
+ AH_TEMPLATE(HAVE_CRYPTO,
+ [Define to 1 if Berkeley DB release includes strong cryptography.])
+
+ CRYPTO_OBJS="\$(CRYPTO_OBJS)"
+else
+ CRYPTO_OBJS="crypto_stub${o}"
fi
+# We need to add the additional object files into the Makefile with the correct
+# suffix. We can't use $LTLIBOBJS itself, because that variable has $U encoded
+# in it for automake, and that's not what we want. See SR #7227 for additional
+# information.
+#
+# XXX: I'm not sure this is correct.
+REPLACEMENT_OBJS=`echo "$LIB@&t@OBJS" |
+ sed "s,\.[[^.]]* ,$o ,g;s,\.[[^.]]*$,$o,"`
+
# This is necessary so that .o files in LIBOBJS are also built via
# the ANSI2KNR-filtering rules.
LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
- sed "s,\.[[^.]]* ,$o ,g;s,\.[[^.]]*$,$o,"`
+ sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS)
# Initial output file list.
@@ -565,15 +695,21 @@ CREATE_LIST="Makefile
db_int.h:$srcdir/../dbinc/db_int.in
include.tcl:$srcdir/../test/include.tcl"
+# MinGW needs win_db.h.
+if test "$db_cv_mingw" = "yes"; then
+CREATE_LIST="$CREATE_LIST
+ win_db.h:$srcdir/win_db.in"
+fi
+
# Create the db.h file from a source file, a list of global function
# prototypes, and, if configured for unique names, a list of #defines
# to do DB_VERSION_UNIQUE_NAME substitution.
if test "$db_cv_uniquename" = "yes"; then
CREATE_LIST="$CREATE_LIST
- db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in"
+ db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_def.in:$srcdir/../dbinc_auto/ext_prot.in"
else
CREATE_LIST="$CREATE_LIST
- db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/rpc_defs.in:$srcdir/../dbinc_auto/ext_prot.in"
+ db.h:$srcdir/../dbinc/db.in:$srcdir/../dbinc_auto/ext_prot.in"
fi
# If configured for unique names, create the db_int_uext.h file (which
@@ -600,13 +736,5 @@ if test "$db_cv_compat185" = "yes"; then
fi
fi
-if test "$db_cv_embedix" = "yes"; then
- CREATE_LIST="$CREATE_LIST db.ecd:../dist/db.ecd.in"
-fi
-
-if test "$db_cv_rpm" = "yes"; then
- CREATE_LIST="$CREATE_LIST db.spec:../dist/db.spec.in"
-fi
-
AC_CONFIG_FILES($CREATE_LIST)
AC_OUTPUT
diff --git a/storage/bdb/dist/gen_inc.awk b/storage/bdb/dist/gen_inc.awk
index 2f5b491cda1..d48d02bb1d2 100644
--- a/storage/bdb/dist/gen_inc.awk
+++ b/storage/bdb/dist/gen_inc.awk
@@ -18,17 +18,17 @@
# i_pfile include file that contains internal (PUBLIC) prototypes
/PUBLIC:/ {
sub("^.*PUBLIC:[ ][ ]*", "")
- if ($0 ~ /^#(if|ifdef|ifndef|else|endif)/) {
+ if ($0 ~ "^#if|^#ifdef|^#ifndef|^#else|^#endif") {
print $0 >> i_pfile
print $0 >> i_dfile
next
}
pline = sprintf("%s %s", pline, $0)
- if (pline ~ /\)\);/) {
+ if (pline ~ "\\)\\);") {
sub("^[ ]*", "", pline)
print pline >> i_pfile
if (pline !~ db_version_unique_name) {
- sub("[ ][ ]*__P.*", "", pline)
+ gsub("[ ][ ]*__P.*", "", pline)
sub("^.*[ ][*]*", "", pline)
printf("#define %s %s@DB_VERSION_UNIQUE_NAME@\n",
pline, pline) >> i_dfile
@@ -53,17 +53,17 @@
# functions in libraries built with that configuration option.
/EXTERN:/ {
sub("^.*EXTERN:[ ][ ]*", "")
- if ($0 ~ /^#(if|ifdef|ifndef|else|endif)/) {
+ if ($0 ~ "^#if|^#ifdef|^#ifndef|^#else|^#endif") {
print $0 >> e_pfile
print $0 >> e_dfile
next
}
eline = sprintf("%s %s", eline, $0)
- if (eline ~ /\)\);/) {
+ if (eline ~ "\\)\\);") {
sub("^[ ]*", "", eline)
print eline >> e_pfile
- if (eline !~ db_version_unique_name && eline !~ /^int txn_/) {
- sub("[ ][ ]*__P.*", "", eline)
+ if (eline !~ db_version_unique_name && eline !~ "^int txn_") {
+ gsub("[ ][ ]*__P.*", "", eline)
sub("^.*[ ][*]*", "", eline)
printf("#define %s %s@DB_VERSION_UNIQUE_NAME@\n",
eline, eline) >> e_dfile
diff --git a/storage/bdb/dist/gen_rec.awk b/storage/bdb/dist/gen_rec.awk
index 75f2e86ca9e..001ec65f0c5 100644
--- a/storage/bdb/dist/gen_rec.awk
+++ b/storage/bdb/dist/gen_rec.awk
@@ -2,10 +2,10 @@
#
# See the file LICENSE for redistribution information.
#
-# Copyright (c) 1996-2002
+# Copyright (c) 1996-2004
# Sleepycat Software. All rights reserved.
#
-# $Id: gen_rec.awk,v 11.70 2002/08/08 15:44:47 bostic Exp $
+# $Id: gen_rec.awk,v 11.110 2004/10/20 20:40:58 bostic Exp $
#
# This awk script generates all the log, print, and read routines for the DB
@@ -34,35 +34,32 @@
# DB:
# DBPRIVATE Indicates that a file will be built as part of DB,
# rather than compiled independently, and so can use
-# DB-private interfaces (such as DB_NOCOPY).
+# DB-private interfaces (such as DB_LOG_NOCOPY).
# DB A DB handle. Logs the dbreg fileid for that handle,
# and makes the *_log interface take a DB * instead of a
# DB_ENV *.
# PGDBT Just like DBT, only we know it stores a page or page
# header, so we can byte-swap it (once we write the
# byte-swapping code, which doesn't exist yet).
-# WRLOCK
-# WRLOCKNZ An ARG that stores a db_pgno_t, which the getpgnos
-# function should acquire a lock on. WRLOCK implies
-# that we should always get the lock; WRLOCKNZ implies
-# that we should do so if and only if the pgno is non-zero
-# (unfortunately, 0 is both PGNO_INVALID and the main
-# metadata page number).
+# LOCKS Just like DBT, but uses a print function for locks.
BEGIN {
if (source_file == "" ||
header_file == "" || template_file == "") {
print "Usage: gen_rec.awk requires three variables to be set:"
- print "\tsource_file\t-- the C source file being created"
- print "\theader_file\t-- the C #include file being created"
+ print "\theader_file\t-- the recover #include file being created"
+ print "\tprint_file\t-- the print source file being created"
+ print "\tsource_file\t-- the recover source file being created"
print "\ttemplate_file\t-- the template file being created"
exit
}
FS="[\t ][\t ]*"
CFILE=source_file
HFILE=header_file
+ PFILE=print_file
TFILE=template_file
dbprivate = 0
+ buf_only = 1;
}
/^[ ]*DBPRIVATE/ {
dbprivate = 1
@@ -71,9 +68,17 @@ BEGIN {
prefix = $2
num_funcs = 0;
- # Start .c file.
- printf("/* Do not edit: automatically built by gen_rec.awk. */\n") \
+ # Start .c files.
+ printf("/* Do not edit: automatically built by gen_rec.awk. */\n\n") \
> CFILE
+ printf("#include \"db_config.h\"\n\n") >> CFILE
+ printf("/* Do not edit: automatically built by gen_rec.awk. */\n\n") \
+ > PFILE
+ printf("#include \"db_config.h\"\n\n") >> PFILE
+ if (prefix == "__ham")
+ printf("#ifdef HAVE_HASH\n") >> PFILE
+ if (prefix == "__qam")
+ printf("#ifdef HAVE_QUEUE\n") >> PFILE
# Start .h file, make the entire file conditional.
printf("/* Do not edit: automatically built by gen_rec.awk. */\n\n") \
@@ -94,12 +99,14 @@ BEGIN {
printf("#include \"dbinc/log.h\"\n\n") >> TFILE
}
/^[ ]*INCLUDE/ {
- if ($3 == "")
- printf("%s\n", $2) >> CFILE
- else
- printf("%s %s\n", $2, $3) >> CFILE
+ for (i = 2; i < NF; i++)
+ printf("%s ", $i) >> CFILE
+ printf("%s\n", $i) >> CFILE
+ for (i = 2; i < NF; i++)
+ printf("%s ", $i) >> PFILE
+ printf("%s\n", $i) >> PFILE
}
-/^[ ]*(BEGIN|IGNORED)/ {
+/^[ ]*(BEGIN|IGNORED|BEGIN_BUF)/ {
if (in_begin) {
print "Invalid format: missing END statement"
exit
@@ -108,21 +115,22 @@ BEGIN {
is_dbt = 0;
has_dbp = 0;
is_uint = 0;
- need_log_function = ($1 == "BEGIN");
+ need_log_function = ($1 == "BEGIN") || ($1 == "BEGIN_BUF");
+ not_buf = ($1 == "BEGIN") || ($1 == "IGNORED");
+ if (not_buf)
+ buf_only = 0;
nvars = 0;
- # number of locks that the getpgnos functions will return
- nlocks = 0;
-
thisfunc = $2;
funcname = sprintf("%s_%s", prefix, $2);
- rectype = $3;
+ if (not_buf)
+ rectype = $3;
funcs[num_funcs] = funcname;
++num_funcs;
}
-/^[ ]*(DB|ARG|DBT|PGDBT|POINTER|WRLOCK|WRLOCKNZ)/ {
+/^[ ]*(DB|ARG|DBT|LOCKS|PGDBT|POINTER|TIME)/ {
vars[nvars] = $2;
types[nvars] = $3;
atypes[nvars] = $1;
@@ -135,7 +143,7 @@ BEGIN {
has_dbp = 1;
}
- if ($1 == "DB" || $1 == "ARG" || $1 == "WRLOCK" || $1 == "WRLOCKNZ") {
+ if ($1 == "DB" || $1 == "ARG" || $1 == "TIME") {
sizes[nvars] = sprintf("sizeof(u_int32_t)");
is_uint = 1;
} else if ($1 == "POINTER")
@@ -148,17 +156,6 @@ BEGIN {
}
nvars++;
}
-/^[ ]*(WRLOCK|WRLOCKNZ)/ {
- nlocks++;
-
- if ($1 == "WRLOCK") {
- lock_if_zero[nlocks] = 1;
- } else {
- lock_if_zero[nlocks] = 0;
- }
-
- lock_pgnos[nlocks] = $2;
-}
/^[ ]*END/ {
if (!in_begin) {
print "Invalid format: missing BEGIN statement"
@@ -166,14 +163,18 @@ BEGIN {
}
# Declare the record type.
- printf("#define\tDB_%s\t%d\n", funcname, rectype) >> HFILE
+ if (not_buf) {
+ printf("#define\tDB_%s\t%d\n", funcname, rectype) >> HFILE
+ }
# Structure declaration.
printf("typedef struct _%s_args {\n", funcname) >> HFILE
# Here are the required fields for every structure
- printf("\tu_int32_t type;\n\tDB_TXN *txnid;\n") >> HFILE
- printf("\tDB_LSN prev_lsn;\n") >>HFILE
+ if (not_buf) {
+ printf("\tu_int32_t type;\n\tDB_TXN *txnid;\n") >> HFILE
+ printf("\tDB_LSN prev_lsn;\n") >>HFILE
+ }
# Here are the specified fields.
for (i = 0; i < nvars; i++) {
@@ -186,25 +187,22 @@ BEGIN {
}
printf("} %s_args;\n\n", funcname) >> HFILE
- # Output the log, print, read, and getpgnos functions.
+ # Output the log, print and read functions.
if (need_log_function) {
log_function();
-
- # The getpgnos function calls DB-private (__rep_*) functions,
- # so we only generate it for our own logging functions,
- # not application-specific ones.
- if (dbprivate) {
- getpgnos_function();
- }
}
- print_function();
+ if (not_buf) {
+ print_function();
+ }
read_function();
# Recovery template
- cmd = sprintf(\
+ if (not_buf) {
+ cmd = sprintf(\
"sed -e s/PREF/%s/ -e s/FUNC/%s/ < template/rec_ctemp >> %s",
- prefix, thisfunc, TFILE)
- system(cmd);
+ prefix, thisfunc, TFILE)
+ system(cmd);
+ }
# Done writing stuff, reset and continue.
in_begin = 0;
@@ -214,79 +212,63 @@ END {
# End the conditional for the HFILE
printf("#endif\n") >> HFILE;
+ if (buf_only == 1)
+ exit
+
# Print initialization routine; function prototype
p[1] = sprintf("int %s_init_print %s%s", prefix,
"__P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, ",
"db_recops, void *), size_t *));");
p[2] = "";
- proto_format(p);
+ proto_format(p, PFILE);
# Create the routine to call __db_add_recovery(print_fn, id)
printf("int\n%s_init_print(dbenv, dtabp, dtabsizep)\n", \
- prefix) >> CFILE;
- printf("\tDB_ENV *dbenv;\n") >> CFILE;;
- printf("\tint (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *,") >> CFILE;
- printf(" db_recops, void *));\n") >> CFILE;
- printf("\tsize_t *dtabsizep;\n{\n") >> CFILE;
+ prefix) >> PFILE;
+ printf("\tDB_ENV *dbenv;\n") >> PFILE;;
+ printf("\tint (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *,") >> PFILE;
+ printf(" db_recops, void *));\n") >> PFILE;
+ printf("\tsize_t *dtabsizep;\n{\n") >> PFILE;
# If application-specific, the user will need a prototype for
# __db_add_recovery, since they won't have DB's.
if (!dbprivate) {
- printf("\tint __db_add_recovery __P((DB_ENV *,\n") >> CFILE;
+ printf("\tint __db_add_recovery __P((DB_ENV *,\n") >> PFILE;
printf(\
-"\t int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *),\n") >> CFILE;
- printf("\t size_t *,\n") >> CFILE;
+"\t int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *),\n") >> PFILE;
+ printf("\t size_t *,\n") >> PFILE;
printf(\
"\t int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), u_int32_t));\n") \
- >> CFILE;
+ >> PFILE;
}
- printf("\tint ret;\n\n") >> CFILE;
+ printf("\tint ret;\n\n") >> PFILE;
for (i = 0; i < num_funcs; i++) {
- printf("\tif ((ret = __db_add_recovery(dbenv, ") >> CFILE;
- printf("dtabp, dtabsizep,\n") >> CFILE;
+ printf("\tif ((ret = __db_add_recovery(dbenv, ") >> PFILE;
+ printf("dtabp, dtabsizep,\n") >> PFILE;
printf("\t %s_print, DB_%s)) != 0)\n", \
- funcs[i], funcs[i]) >> CFILE;
- printf("\t\treturn (ret);\n") >> CFILE;
+ funcs[i], funcs[i]) >> PFILE;
+ printf("\t\treturn (ret);\n") >> PFILE;
}
- printf("\treturn (0);\n}\n\n") >> CFILE;
-
- # We only want to generate *_init_{getpgnos,recover} functions
- # if this is a DB-private, rather than application-specific,
- # set of recovery functions. Application-specific recovery functions
- # should be dispatched using the DB_ENV->set_app_dispatch callback
- # rather than a DB dispatch table ("dtab").
+ printf("\treturn (0);\n}\n") >> PFILE;
+ if (prefix == "__ham")
+ printf("#endif /* HAVE_HASH */\n") >> PFILE
+ if (prefix == "__qam")
+ printf("#endif /* HAVE_QUEUE */\n") >> PFILE
+
+ # We only want to generate *_init_recover functions if this is a
+ # DB-private, rather than application-specific, set of recovery
+ # functions. Application-specific recovery functions should be
+ # dispatched using the DB_ENV->set_app_dispatch callback rather
+ # than a DB dispatch table ("dtab").
if (!dbprivate)
exit
- # Page number initialization routine; function prototype
- p[1] = sprintf("int %s_init_getpgnos %s%s", prefix,
- "__P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, ",
- "db_recops, void *), size_t *));");
- p[2] = "";
- proto_format(p);
-
- # Create the routine to call db_add_recovery(pgno_fn, id)
- printf("int\n%s_init_getpgnos(dbenv, dtabp, dtabsizep)\n", \
- prefix) >> CFILE;
- printf("\tDB_ENV *dbenv;\n") >> CFILE;
- printf("\tint (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *,") >> CFILE;
- printf(" db_recops, void *));\n") >> CFILE;
- printf("\tsize_t *dtabsizep;\n{\n\tint ret;\n\n") >> CFILE;
- for (i = 0; i < num_funcs; i++) {
- printf("\tif ((ret = __db_add_recovery(dbenv, ") >> CFILE;
- printf("dtabp, dtabsizep,\n") >> CFILE;
- printf("\t %s_getpgnos, DB_%s)) != 0)\n", \
- funcs[i], funcs[i]) >> CFILE;
- printf("\t\treturn (ret);\n") >> CFILE;
- }
- printf("\treturn (0);\n}\n\n") >> CFILE;
-
# Recover initialization routine
p[1] = sprintf("int %s_init_recover %s%s", prefix,
"__P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, ",
"db_recops, void *), size_t *));");
p[2] = "";
- proto_format(p);
+ proto_format(p, CFILE);
# Create the routine to call db_add_recovery(func, id)
printf("int\n%s_init_recover(dbenv, dtabp, dtabsizep)\n", \
@@ -305,37 +287,48 @@ END {
printf("\treturn (0);\n}\n") >> CFILE;
}
-function log_function() {
+function log_function()
+{
# Write the log function; function prototype
pi = 1;
- p[pi++] = sprintf("int %s_log", funcname);
- p[pi++] = " ";
- if (has_dbp == 1) {
- p[pi++] = "__P((DB *, DB_TXN *, DB_LSN *, u_int32_t";
+ if (not_buf) {
+ p[pi++] = sprintf("int %s_log", funcname);
+ p[pi++] = " ";
+ if (has_dbp == 1) {
+ p[pi++] = "__P((DB *";
+ } else {
+ p[pi++] = "__P((DB_ENV *";
+ }
+ p[pi++] = ", DB_TXN *, DB_LSN *, u_int32_t";
} else {
- p[pi++] = "__P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t";
+ p[pi++] = sprintf("int %s_buf", funcname);
+ p[pi++] = " ";
+ p[pi++] = "__P((u_int8_t *, size_t, size_t *";
}
for (i = 0; i < nvars; i++) {
if (modes[i] == "DB")
continue;
p[pi++] = ", ";
p[pi++] = sprintf("%s%s%s",
- (modes[i] == "DBT" || modes[i] == "PGDBT") ? "const " : "",
- types[i],
- (modes[i] == "DBT" || modes[i] == "PGDBT") ? " *" : "");
+ (modes[i] == "DBT" || modes[i] == "LOCKS" ||
+ modes[i] == "PGDBT") ? "const " : "", types[i],
+ (modes[i] == "DBT" || modes[i] == "LOCKS" ||
+ modes[i] == "PGDBT") ? " *" : "");
}
p[pi++] = "";
p[pi++] = "));";
p[pi++] = "";
- proto_format(p);
+ proto_format(p, CFILE);
# Function declaration
- if (has_dbp == 1) {
+ if (not_buf && has_dbp == 1) {
printf("int\n%s_log(dbp, txnid, ret_lsnp, flags", \
funcname) >> CFILE;
- } else {
+ } else if (not_buf) {
printf("int\n%s_log(dbenv, txnid, ret_lsnp, flags", \
funcname) >> CFILE;
+ } else {
+ printf("int\n%s_buf(buf, max, lenp", funcname) >> CFILE;
}
for (i = 0; i < nvars; i++) {
if (modes[i] == "DB") {
@@ -353,16 +346,22 @@ function log_function() {
printf(")\n") >> CFILE;
# Now print the parameters
- if (has_dbp == 1) {
- printf("\tDB *dbp;\n") >> CFILE;
+ if (not_buf) {
+ if (has_dbp == 1) {
+ printf("\tDB *dbp;\n") >> CFILE;
+ } else {
+ printf("\tDB_ENV *dbenv;\n") >> CFILE;
+ }
+ printf("\tDB_TXN *txnid;\n\tDB_LSN *ret_lsnp;\n") >> CFILE;
+ printf("\tu_int32_t flags;\n") >> CFILE;
} else {
- printf("\tDB_ENV *dbenv;\n") >> CFILE;
+ printf("\tu_int8_t *buf;\n") >> CFILE;
+ printf("\tsize_t max, *lenp;\n") >> CFILE;
}
- printf("\tDB_TXN *txnid;\n\tDB_LSN *ret_lsnp;\n") >> CFILE;
- printf("\tu_int32_t flags;\n") >> CFILE;
for (i = 0; i < nvars; i++) {
# We just skip for modes == DB.
- if (modes[i] == "DBT" || modes[i] == "PGDBT")
+ if (modes[i] == "DBT" ||
+ modes[i] == "LOCKS" || modes[i] == "PGDBT")
printf("\tconst %s *%s;\n", types[i], vars[i]) >> CFILE;
else if (modes[i] != "DB")
printf("\t%s %s;\n", types[i], vars[i]) >> CFILE;
@@ -370,110 +369,213 @@ function log_function() {
# Function body and local decls
printf("{\n") >> CFILE;
- printf("\tDBT logrec;\n") >> CFILE;
- if (has_dbp == 1)
- printf("\tDB_ENV *dbenv;\n") >> CFILE;
- printf("\tDB_LSN *lsnp, null_lsn;\n") >> CFILE;
- if (is_dbt == 1)
- printf("\tu_int32_t zero;\n") >> CFILE;
- if (is_uint == 1)
- printf("\tu_int32_t uinttmp;\n") >> CFILE;
- printf("\tu_int32_t npad, rectype, txn_num;\n") >> CFILE;
- printf("\tint ret;\n") >> CFILE;
- printf("\tu_int8_t *bp;\n\n") >> CFILE;
+ if (not_buf) {
+ printf("\tDBT logrec;\n") >> CFILE;
+ if (has_dbp == 1)
+ printf("\tDB_ENV *dbenv;\n") >> CFILE;
+ if (dbprivate)
+ printf("\tDB_TXNLOGREC *lr;\n") >> CFILE;
+ printf("\tDB_LSN *lsnp, null_lsn, *rlsnp;\n") >> CFILE;
+ printf("\tu_int32_t ") >> CFILE;
+ if (is_dbt == 1)
+ printf("zero, ") >> CFILE;
+ if (is_uint == 1)
+ printf("uinttmp, ") >> CFILE;
+ printf("rectype, txn_num;\n") >> CFILE;
+ printf("\tu_int npad;\n") >> CFILE;
+ } else {
+ if (is_dbt == 1)
+ printf("\tu_int32_t zero;\n") >> CFILE;
+ if (is_uint == 1)
+ printf("\tu_int32_t uinttmp;\n") >> CFILE;
+ printf("\tu_int8_t *endbuf;\n") >> CFILE;
+ }
+ printf("\tu_int8_t *bp;\n") >> CFILE;
+ printf("\tint ") >> CFILE;
+ if (dbprivate && not_buf) {
+ printf("is_durable, ") >> CFILE;
+ }
+ printf("ret;\n\n") >> CFILE;
# Initialization
- if (has_dbp == 1)
- printf("\tdbenv = dbp->dbenv;\n") >> CFILE;
- printf("\trectype = DB_%s;\n", funcname) >> CFILE;
- printf("\tnpad = 0;\n\n") >> CFILE;
-
- printf("\tif (txnid == NULL) {\n") >> CFILE;
- printf("\t\ttxn_num = 0;\n") >> CFILE;
- printf("\t\tnull_lsn.file = 0;\n") >> CFILE;
- printf("\t\tnull_lsn.offset = 0;\n") >> CFILE;
- printf("\t\tlsnp = &null_lsn;\n") >> CFILE;
- printf("\t} else {\n") >> CFILE;
- if (funcname != "__db_debug" && dbprivate) {
- printf(\
- "\t\tif (TAILQ_FIRST(&txnid->kids) != NULL &&\n") >> CFILE;
- printf("\t\t (ret = __txn_activekids(") >> CFILE;
- printf("dbenv, rectype, txnid)) != 0)\n") >> CFILE;
- printf("\t\t\treturn (ret);\n") >> CFILE;
- }
- printf("\t\ttxn_num = txnid->txnid;\n") >> CFILE;
- printf("\t\tlsnp = &txnid->last_lsn;\n") >> CFILE;
- printf("\t}\n\n") >> CFILE;
-
- # Malloc
- printf("\tlogrec.size = sizeof(rectype) + ") >> CFILE;
- printf("sizeof(txn_num) + sizeof(DB_LSN)") >> CFILE;
- for (i = 0; i < nvars; i++)
- printf("\n\t + %s", sizes[i]) >> CFILE;
- printf(";\n") >> CFILE
- if (dbprivate) {
- printf("\tif (CRYPTO_ON(dbenv)) {\n") >> CFILE;
- printf("\t\tnpad =\n") >> CFILE
- printf(\
-"\t\t ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size);\n")\
+ if (not_buf) {
+ if (has_dbp == 1)
+ printf("\tdbenv = dbp->dbenv;\n") >> CFILE;
+ if (dbprivate)
+ printf("\tCOMPQUIET(lr, NULL);\n\n") >> CFILE;
+ printf("\trectype = DB_%s;\n", funcname) >> CFILE;
+ printf("\tnpad = 0;\n") >> CFILE;
+ printf("\trlsnp = ret_lsnp;\n\n") >> CFILE;
+ }
+ printf("\tret = 0;\n\n") >> CFILE;
+
+ if (not_buf) {
+ if (dbprivate) {
+ printf("\tif (LF_ISSET(DB_LOG_NOT_DURABLE)") \
+ >> CFILE;
+ if (has_dbp == 1) {
+ printf(" ||\n\t ") >> CFILE;
+ printf("F_ISSET(dbp, DB_AM_NOT_DURABLE)) {\n") \
+ >> CFILE;
+ } else {
+ printf(") {\n") >> CFILE;
+ printf("\t\tif (txnid == NULL)\n") >> CFILE;
+ printf("\t\t\treturn (0);\n") >> CFILE;
+ }
+ printf("\t\tis_durable = 0;\n") >> CFILE;
+ printf("\t} else\n") >> CFILE;
+ printf("\t\tis_durable = 1;\n\n") >> CFILE;
+ }
+ printf("\tif (txnid == NULL) {\n") >> CFILE;
+ printf("\t\ttxn_num = 0;\n") >> CFILE;
+ printf("\t\tlsnp = &null_lsn;\n") >> CFILE;
+ printf("\t\tnull_lsn.file = null_lsn.offset = 0;\n") >> CFILE;
+ printf("\t} else {\n") >> CFILE;
+ if (dbprivate && funcname != "__db_debug") {
+ printf(\
+ "\t\tif (TAILQ_FIRST(&txnid->kids) != NULL &&\n") >> CFILE;
+ printf("\t\t (ret = __txn_activekids(") >> CFILE;
+ printf("dbenv, rectype, txnid)) != 0)\n") >> CFILE;
+ printf("\t\t\treturn (ret);\n") >> CFILE;
+ }
+ printf("\t\t/*\n\t\t * We need to assign begin_lsn while ") \
>> CFILE;
- printf("\t\tlogrec.size += npad;\n\t}\n\n") >> CFILE
- }
- write_malloc("logrec.data", "logrec.size", CFILE)
- printf("\tif (npad > 0)\n") >> CFILE;
- printf("\t\tmemset((u_int8_t *)logrec.data + logrec.size ") >> CFILE;
- printf("- npad, 0, npad);\n\n") >> CFILE;
-
- # Copy args into buffer
- printf("\tbp = logrec.data;\n\n") >> CFILE;
- printf("\tmemcpy(bp, &rectype, sizeof(rectype));\n") >> CFILE;
- printf("\tbp += sizeof(rectype);\n\n") >> CFILE;
- printf("\tmemcpy(bp, &txn_num, sizeof(txn_num));\n") >> CFILE;
- printf("\tbp += sizeof(txn_num);\n\n") >> CFILE;
- printf("\tmemcpy(bp, lsnp, sizeof(DB_LSN));\n") >> CFILE;
- printf("\tbp += sizeof(DB_LSN);\n\n") >> CFILE;
+ printf("holding region mutex.\n") >> CFILE;
+ printf("\t\t * That assignment is done inside the ") >> CFILE;
+ printf("DbEnv->log_put call,\n\t\t * ") >> CFILE;
+ printf("so pass in the appropriate memory location to be ") \
+ >> CFILE;
+ printf("filled\n\t\t * in by the log_put code.\n\t\t*/\n") \
+ >> CFILE;
+ printf("\t\tDB_SET_BEGIN_LSNP(txnid, &rlsnp);\n") >> CFILE;
+ printf("\t\ttxn_num = txnid->txnid;\n") >> CFILE;
+ printf("\t\tlsnp = &txnid->last_lsn;\n") >> CFILE;
+ printf("\t}\n\n") >> CFILE;
+
+ # If we're logging a DB handle, make sure we have a log
+ # file ID for it.
+ db_handle_id_function(modes, nvars);
+
+ # Malloc
+ printf("\tlogrec.size = ") >> CFILE;
+ printf("sizeof(rectype) + ") >> CFILE;
+ printf("sizeof(txn_num) + sizeof(DB_LSN)") >> CFILE;
+ for (i = 0; i < nvars; i++)
+ printf("\n\t + %s", sizes[i]) >> CFILE;
+ printf(";\n") >> CFILE
+ if (dbprivate) {
+ printf("\tif (CRYPTO_ON(dbenv)) {\n") >> CFILE;
+ printf("\t\tnpad =\n") >> CFILE;
+ printf("\t\t ((DB_CIPHER *)dbenv->crypto_handle)") \
+ >> CFILE;
+ printf("->adj_size(logrec.size);\n") >> CFILE;
+ printf("\t\tlogrec.size += npad;\n\t}\n\n") >> CFILE
- for (i = 0; i < nvars; i ++) {
- if (modes[i] == "ARG" || modes[i] == "WRLOCK" || \
- modes[i] == "WRLOCKNZ") {
+ printf("\tif (is_durable || txnid == NULL) {\n") \
+ >> CFILE;
+ printf("\t\tif ((ret =\n\t\t __os_malloc(dbenv, ") \
+ >> CFILE;
+ printf("logrec.size, &logrec.data)) != 0)\n") >> CFILE;
+ printf("\t\t\treturn (ret);\n") >> CFILE;
+ printf("\t} else {\n") >> CFILE;
+ write_malloc("\t\t",
+ "lr", "logrec.size + sizeof(DB_TXNLOGREC)", CFILE)
+ printf("#ifdef DIAGNOSTIC\n") >> CFILE;
+ printf("\t\tif ((ret =\n\t\t __os_malloc(dbenv, ") \
+ >> CFILE;
+ printf("logrec.size, &logrec.data)) != 0) {\n") \
+ >> CFILE;
+ printf("\t\t\t__os_free(dbenv, lr);\n") >> CFILE;
+ printf("\t\t\treturn (ret);\n") >> CFILE;
+ printf("\t\t}\n") >> CFILE;
+ printf("#else\n") >> CFILE;
+ printf("\t\tlogrec.data = lr->data;\n") >> CFILE;
+ printf("#endif\n") >> CFILE;
+ printf("\t}\n") >> CFILE;
+ } else {
+ write_malloc("\t", "logrec.data", "logrec.size", CFILE)
+ printf("\tbp = logrec.data;\n\n") >> CFILE;
+ }
+ printf("\tif (npad > 0)\n") >> CFILE;
+ printf("\t\tmemset((u_int8_t *)logrec.data + logrec.size ") \
+ >> CFILE;
+ printf("- npad, 0, npad);\n\n") >> CFILE;
+ printf("\tbp = logrec.data;\n\n") >> CFILE;
+
+ # Copy args into buffer
+ printf("\tmemcpy(bp, &rectype, sizeof(rectype));\n") >> CFILE;
+ printf("\tbp += sizeof(rectype);\n\n") >> CFILE;
+ printf("\tmemcpy(bp, &txn_num, sizeof(txn_num));\n") >> CFILE;
+ printf("\tbp += sizeof(txn_num);\n\n") >> CFILE;
+ printf("\tmemcpy(bp, lsnp, sizeof(DB_LSN));\n") >> CFILE;
+ printf("\tbp += sizeof(DB_LSN);\n\n") >> CFILE;
+ } else {
+ # If we're logging a DB handle, make sure we have a log
+ # file ID for it.
+ db_handle_id_function(modes, nvars);
+
+ printf("\tbp = buf;\n") >> CFILE;
+ printf("\tendbuf = bp + max;\n\n") >> CFILE
+ }
+
+ for (i = 0; i < nvars; i++) {
+ if (modes[i] == "ARG" || modes[i] == "TIME") {
printf("\tuinttmp = (u_int32_t)%s;\n", \
vars[i]) >> CFILE;
+ if (!not_buf) {
+ printf(\
+ "\tif (bp + sizeof(uinttmp) > endbuf)\n") \
+ >> CFILE;
+ printf("\t\treturn (ENOMEM);\n") >> CFILE;
+ }
printf("\tmemcpy(bp, &uinttmp, sizeof(uinttmp));\n") \
>> CFILE;
printf("\tbp += sizeof(uinttmp);\n\n") >> CFILE;
- } else if (modes[i] == "DBT" || modes[i] == "PGDBT") {
+ } else if (modes[i] == "DBT" || \
+ modes[i] == "LOCKS" || modes[i] == "PGDBT") {
printf("\tif (%s == NULL) {\n", vars[i]) >> CFILE;
printf("\t\tzero = 0;\n") >> CFILE;
+ if (!not_buf) {
+ printf(\
+ "\t\tif (bp + sizeof(u_int32_t) > endbuf)\n") \
+ >> CFILE;
+ printf("\t\t\treturn (ENOMEM);\n") >> CFILE;
+ }
printf("\t\tmemcpy(bp, &zero, sizeof(u_int32_t));\n") \
>> CFILE;
printf("\t\tbp += sizeof(u_int32_t);\n") >> CFILE;
printf("\t} else {\n") >> CFILE;
+ if (!not_buf) {
+ printf(\
+ "\t\tif (bp + sizeof(%s->size) > endbuf)\n", \
+ vars[i]) >> CFILE;
+ printf("\t\t\treturn (ENOMEM);\n") >> CFILE;
+ }
printf("\t\tmemcpy(bp, &%s->size, ", vars[i]) >> CFILE;
printf("sizeof(%s->size));\n", vars[i]) >> CFILE;
printf("\t\tbp += sizeof(%s->size);\n", vars[i]) \
>> CFILE;
+ if (!not_buf) {
+ printf("\t\tif (bp + %s->size > endbuf)\n", \
+ vars[i]) >> CFILE;
+ printf("\t\t\treturn (ENOMEM);\n") >> CFILE;
+ }
printf("\t\tmemcpy(bp, %s->data, %s->size);\n", \
vars[i], vars[i]) >> CFILE;
printf("\t\tbp += %s->size;\n\t}\n\n", \
vars[i]) >> CFILE;
} else if (modes[i] == "DB") {
- # We need to log a DB handle. To do this, we
- # actually just log its fileid; from that, we'll
- # be able to acquire an open handle at recovery time.
- printf("\tDB_ASSERT(dbp->log_filename != NULL);\n") \
- >> CFILE;
- printf("\tif (dbp->log_filename->id == ") >> CFILE;
- printf("DB_LOGFILEID_INVALID &&\n\t ") >> CFILE
- printf("(ret = __dbreg_lazy_id(dbp)) != 0)\n") \
- >> CFILE;
- printf("\t\treturn (ret);\n\n") >> CFILE;
-
printf("\tuinttmp = ") >> CFILE;
printf("(u_int32_t)dbp->log_filename->id;\n") >> CFILE;
printf("\tmemcpy(bp, &uinttmp, sizeof(uinttmp));\n") \
>> CFILE;
printf("\tbp += sizeof(uinttmp);\n\n") >> CFILE;
} else { # POINTER
+ if (!not_buf) {
+ printf("\tif (bp + %s > endbuf)\n", \
+ sizes[i]) >> CFILE;
+ printf("\t\treturn (ENOMEM);\n") >> CFILE;
+ }
printf("\tif (%s != NULL)\n", vars[i]) >> CFILE;
printf("\t\tmemcpy(bp, %s, %s);\n", vars[i], \
sizes[i]) >> CFILE;
@@ -486,140 +588,267 @@ function log_function() {
# Error checking. User code won't have DB_ASSERT available, but
# this is a pretty unlikely assertion anyway, so we just leave it out
# rather than requiring assert.h.
- if (dbprivate) {
- printf("\tDB_ASSERT((u_int32_t)") >> CFILE;
- printf("(bp - (u_int8_t *)logrec.data) <= logrec.size);\n") \
- >> CFILE;
- }
+ if (not_buf) {
+ if (dbprivate) {
+ printf("\tDB_ASSERT((u_int32_t)") >> CFILE;
+ printf("(bp - (u_int8_t *)logrec.data) ") >> CFILE;
+ printf("<= logrec.size);\n\n") >> CFILE;
+ # Save the log record off in the txn's linked list,
+ # or do log call.
+ # We didn't call the crypto alignment function when
+ # we created this log record (because we don't have
+ # the right header files to find the function), so
+ # we have to copy the log record to make sure the
+ # alignment is correct.
+ printf("\tif (is_durable || txnid == NULL) {\n") \
+ >> CFILE;
+ # Output the log record and update the return LSN.
+ printf("\t\tif ((ret = __log_put(dbenv, rlsnp,") \
+ >> CFILE;
+ printf("(DBT *)&logrec,\n") >> CFILE;
+ printf("\t\t flags | DB_LOG_NOCOPY)) == 0") >> CFILE;
+ printf(" && txnid != NULL) {\n") >> CFILE;
+ printf("\t\t\ttxnid->last_lsn = *rlsnp;\n") >> CFILE;
+
+ printf("\t\t\tif (rlsnp != ret_lsnp)\n") >> CFILE;
+ printf("\t\t\t\t *ret_lsnp = *rlsnp;\n") >> CFILE;
+ printf("\t\t}\n\t} else {\n") >> CFILE;
+ printf("#ifdef DIAGNOSTIC\n") >> CFILE;
+
+ # Add the debug bit if we are logging a ND record.
+ printf("\t\t/*\n") >> CFILE;
+ printf("\t\t * Set the debug bit if we are") >> CFILE;
+ printf(" going to log non-durable\n") >> CFILE;
+ printf("\t\t * transactions so they will be ignored") \
+ >> CFILE;
+ printf(" by recovery.\n") >> CFILE;
+ printf("\t\t */\n") >> CFILE;
+ printf("\t\tmemcpy(lr->data, logrec.data, ") >> CFILE
+ printf("logrec.size);\n") >> CFILE;
+ printf("\t\trectype |= DB_debug_FLAG;\n") >> CFILE;
+ printf("\t\tmemcpy(") >> CFILE
+ printf("logrec.data, &rectype, sizeof(rectype));\n\n") \
+ >> CFILE;
+ # Output the log record.
+ printf("\t\tret = __log_put(dbenv,\n") >> CFILE;
+ printf("\t\t rlsnp, (DBT *)&logrec, ") >> CFILE;
+ printf("flags | DB_LOG_NOCOPY);\n") >> CFILE;
+ printf("#else\n") >> CFILE;
+ printf("\t\tret = 0;\n") >> CFILE;
+ printf("#endif\n") >> CFILE;
+ # Add a ND record to the txn list.
+ printf("\t\tSTAILQ_INSERT_HEAD(&txnid") >> CFILE;
+ printf("->logs, lr, links);\n") >> CFILE;
+ # Update the return LSN.
+ printf("\t\tLSN_NOT_LOGGED(*ret_lsnp);\n") >> CFILE;
+ printf("\t}\n\n") >> CFILE;
+ } else {
+ printf("\tif ((ret = dbenv->log_put(dbenv, rlsnp,") >> CFILE;
+ printf(" (DBT *)&logrec,\n") >> CFILE;
+ printf("\t flags | DB_LOG_NOCOPY)) == 0") >> CFILE;
+ printf(" && txnid != NULL) {\n") >> CFILE;
+
+ # Update the transactions last_lsn.
+ printf("\t\ttxnid->last_lsn = *rlsnp;\n") >> CFILE;
+ printf("\t\tif (rlsnp != ret_lsnp)\n") >> CFILE;
+ printf("\t\t\t *ret_lsnp = *rlsnp;\n") >> CFILE;
+ printf("\t}\n") >> CFILE;
- # Issue log call
- # We didn't call the crypto alignment function when we created this
- # log record (because we don't have the right header files to find
- # the function), so we have to copy the log record to make sure the
- # alignment is correct.
- printf(\
- "\tret = dbenv->log_put(dbenv,\n\t ret_lsnp, (DBT *)&logrec, ") \
- >> CFILE;
- if (dbprivate) {
- printf("flags | DB_NOCOPY);\n") >> CFILE;
+ }
+ # If out of disk space log writes may fail. If we are debugging
+ # that print out which records did not make it to disk.
+ printf("#ifdef LOG_DIAGNOSTIC\n") >> CFILE
+ printf("\tif (ret != 0)\n") >> CFILE;
+ printf("\t\t(void)%s_print(dbenv,\n", funcname) >> CFILE;
+ printf("\t\t (DBT *)&logrec, ret_lsnp, NULL, NULL);\n") \
+ >> CFILE
+ printf("#endif\n\n") >> CFILE
+ # Free and return
+ if (dbprivate) {
+ printf("#ifdef DIAGNOSTIC\n") >> CFILE
+ write_free("\t", "logrec.data", CFILE)
+ printf("#else\n") >> CFILE
+ printf("\tif (is_durable || txnid == NULL)\n") >> CFILE;
+ write_free("\t\t", "logrec.data", CFILE)
+ printf("#endif\n") >> CFILE
+ } else {
+ write_free("\t", "logrec.data", CFILE)
+ }
} else {
- printf("flags);\n") >> CFILE;
+ printf("\t*lenp = (u_int32_t)(bp - buf);\n\n") >> CFILE
}
- # Update the transactions last_lsn
- printf("\tif (txnid != NULL && ret == 0)\n") >> CFILE;
- printf("\t\ttxnid->last_lsn = *ret_lsnp;\n") >> CFILE;
-
- # If out of disk space log writes may fail. If we are debugging
- # that print out which records did not make it to disk.
- printf("#ifdef LOG_DIAGNOSTIC\n") >> CFILE
- printf("\tif (ret != 0)\n") >> CFILE;
- printf("\t\t(void)%s_print(dbenv,\n", funcname) >> CFILE;
- printf("\t\t (DBT *)&logrec, ret_lsnp, NULL, NULL);\n") >> CFILE
- printf("#endif\n") >> CFILE
-
- # Free and return
- write_free("logrec.data", CFILE)
printf("\treturn (ret);\n}\n\n") >> CFILE;
}
-function print_function() {
+# If we're logging a DB handle, make sure we have a log
+# file ID for it.
+function db_handle_id_function(modes, n)
+{
+ for (i = 0; i < n; i++)
+ if (modes[i] == "DB") {
+ # We actually log the DB handle's fileid; from
+ # that ID we're able to acquire an open handle
+ # at recovery time.
+ printf(\
+ "\tDB_ASSERT(dbp->log_filename != NULL);\n") \
+ >> CFILE;
+ printf("\tif (dbp->log_filename->id == ") \
+ >> CFILE;
+ printf("DB_LOGFILEID_INVALID &&\n\t ") \
+ >> CFILE
+ printf("(ret = __dbreg_lazy_id(dbp)) != 0)\n") \
+ >> CFILE
+ printf("\t\treturn (ret);\n\n") >> CFILE;
+ break;
+ }
+}
+
+function print_function()
+{
# Write the print function; function prototype
p[1] = sprintf("int %s_print", funcname);
p[2] = " ";
p[3] = "__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));";
p[4] = "";
- proto_format(p);
+ proto_format(p, PFILE);
# Function declaration
- printf("int\n%s_print(dbenv, ", funcname) >> CFILE;
- printf("dbtp, lsnp, notused2, notused3)\n") >> CFILE;
- printf("\tDB_ENV *dbenv;\n") >> CFILE;
- printf("\tDBT *dbtp;\n") >> CFILE;
- printf("\tDB_LSN *lsnp;\n") >> CFILE;
- printf("\tdb_recops notused2;\n\tvoid *notused3;\n{\n") >> CFILE;
+ printf("int\n%s_print(dbenv, ", funcname) >> PFILE;
+ printf("dbtp, lsnp, notused2, notused3)\n") >> PFILE;
+ printf("\tDB_ENV *dbenv;\n") >> PFILE;
+ printf("\tDBT *dbtp;\n") >> PFILE;
+ printf("\tDB_LSN *lsnp;\n") >> PFILE;
+ printf("\tdb_recops notused2;\n\tvoid *notused3;\n{\n") >> PFILE;
# Locals
- printf("\t%s_args *argp;\n", funcname) >> CFILE;
+ printf("\t%s_args *argp;\n", funcname) >> PFILE;
+ for (i = 0; i < nvars; i ++)
+ if (modes[i] == "TIME") {
+ printf("\tstruct tm *lt;\n") >> PFILE
+ printf("\ttime_t timeval;\n") >> PFILE
+ break;
+ }
for (i = 0; i < nvars; i ++)
if (modes[i] == "DBT" || modes[i] == "PGDBT") {
- printf("\tu_int32_t i;\n") >> CFILE
- printf("\tint ch;\n") >> CFILE
+ printf("\tu_int32_t i;\n") >> PFILE
+ printf("\tint ch;\n") >> PFILE
break;
}
-
- printf("\tint ret;\n\n") >> CFILE;
+ printf("\tint ret;\n\n") >> PFILE;
# Get rid of complaints about unused parameters.
- printf("\tnotused2 = DB_TXN_ABORT;\n\tnotused3 = NULL;\n\n") >> CFILE;
+ printf("\tnotused2 = DB_TXN_ABORT;\n\tnotused3 = NULL;\n\n") >> PFILE;
# Call read routine to initialize structure
printf("\tif ((ret = %s_read(dbenv, dbtp->data, &argp)) != 0)\n", \
- funcname) >> CFILE;
- printf("\t\treturn (ret);\n") >> CFILE;
+ funcname) >> PFILE;
+ printf("\t\treturn (ret);\n") >> PFILE;
# Print values in every record
- printf("\t(void)printf(\n\t \"[%%lu][%%lu]%s: ", funcname) >> CFILE;
- printf("rec: %%lu txnid %%lx ") >> CFILE;
- printf("prevlsn [%%lu][%%lu]\\n\",\n") >> CFILE;
- printf("\t (u_long)lsnp->file,\n") >> CFILE;
- printf("\t (u_long)lsnp->offset,\n") >> CFILE;
- printf("\t (u_long)argp->type,\n") >> CFILE;
- printf("\t (u_long)argp->txnid->txnid,\n") >> CFILE;
- printf("\t (u_long)argp->prev_lsn.file,\n") >> CFILE;
- printf("\t (u_long)argp->prev_lsn.offset);\n") >> CFILE;
+ printf("\t(void)printf(\n\t \"[%%lu][%%lu]%s%%s: ",\
+ funcname) >> PFILE;
+ printf("rec: %%lu txnid %%lx ") >> PFILE;
+ printf("prevlsn [%%lu][%%lu]\\n\",\n") >> PFILE;
+ printf("\t (u_long)lsnp->file,\n") >> PFILE;
+ printf("\t (u_long)lsnp->offset,\n") >> PFILE;
+ printf("\t (argp->type & DB_debug_FLAG) ? \"_debug\" : \"\",\n") \
+ >> PFILE;
+ printf("\t (u_long)argp->type,\n") >> PFILE;
+ printf("\t (u_long)argp->txnid->txnid,\n") >> PFILE;
+ printf("\t (u_long)argp->prev_lsn.file,\n") >> PFILE;
+ printf("\t (u_long)argp->prev_lsn.offset);\n") >> PFILE;
# Now print fields of argp
for (i = 0; i < nvars; i ++) {
- printf("\t(void)printf(\"\\t%s: ", vars[i]) >> CFILE;
+ if (modes[i] == "TIME") {
+ printf("\ttimeval = (time_t)argp->%s;\n",
+ vars[i]) >> PFILE;
+ printf("\tlt = localtime(&timeval);\n") >> PFILE;
+ printf("\t(void)printf(\n\t \"\\t%s: ",
+ vars[i]) >> PFILE;
+ } else
+ printf("\t(void)printf(\"\\t%s: ", vars[i]) >> PFILE;
if (modes[i] == "DBT" || modes[i] == "PGDBT") {
- printf("\");\n") >> CFILE;
- printf("\tfor (i = 0; i < ") >> CFILE;
- printf("argp->%s.size; i++) {\n", vars[i]) >> CFILE;
+ printf("\");\n") >> PFILE;
+ printf("\tfor (i = 0; i < ") >> PFILE;
+ printf("argp->%s.size; i++) {\n", vars[i]) >> PFILE;
printf("\t\tch = ((u_int8_t *)argp->%s.data)[i];\n", \
- vars[i]) >> CFILE;
- printf("\t\tprintf(isprint(ch) || ch == 0x0a") >> CFILE;
- printf(" ? \"%%c\" : \"%%#x \", ch);\n") >> CFILE;
- printf("\t}\n\t(void)printf(\"\\n\");\n") >> CFILE;
+ vars[i]) >> PFILE;
+ printf("\t\tprintf(isprint(ch) || ch == 0x0a") >> PFILE;
+ printf(" ? \"%%c\" : \"%%#x \", ch);\n") >> PFILE;
+ printf("\t}\n\t(void)printf(\"\\n\");\n") >> PFILE;
} else if (types[i] == "DB_LSN *") {
printf("[%%%s][%%%s]\\n\",\n", \
- formats[i], formats[i]) >> CFILE;
+ formats[i], formats[i]) >> PFILE;
printf("\t (u_long)argp->%s.file,", \
- vars[i]) >> CFILE;
+ vars[i]) >> PFILE;
printf(" (u_long)argp->%s.offset);\n", \
- vars[i]) >> CFILE;
+ vars[i]) >> PFILE;
+ } else if (modes[i] == "TIME") {
+ # Time values are displayed in two ways: the standard
+ # string returned by ctime, and in the input format
+ # expected by db_recover -t.
+ printf(\
+ "%%%s (%%.24s, 20%%02lu%%02lu%%02lu%%02lu%%02lu.%%02lu)\\n\",\n", \
+ formats[i]) >> PFILE;
+ printf("\t (long)argp->%s, ", vars[i]) >> PFILE;
+ printf("ctime(&timeval),", vars[i]) >> PFILE;
+ printf("\n\t (u_long)lt->tm_year - 100, ") >> PFILE;
+ printf("(u_long)lt->tm_mon+1,") >> PFILE;
+ printf("\n\t (u_long)lt->tm_mday, ") >> PFILE;
+ printf("(u_long)lt->tm_hour,") >> PFILE;
+ printf("\n\t (u_long)lt->tm_min, ") >> PFILE;
+ printf("(u_long)lt->tm_sec);\n") >> PFILE;
+ } else if (modes[i] == "LOCKS") {
+ printf("\\n\");\n") >> PFILE;
+ printf("\t__lock_list_print(dbenv, &argp->locks);\n") \
+ >> PFILE;
} else {
if (formats[i] == "lx")
- printf("0x") >> CFILE;
- printf("%%%s\\n\", ", formats[i]) >> CFILE;
+ printf("0x") >> PFILE;
+ printf("%%%s\\n\", ", formats[i]) >> PFILE;
if (formats[i] == "lx" || formats[i] == "lu")
- printf("(u_long)") >> CFILE;
+ printf("(u_long)") >> PFILE;
if (formats[i] == "ld")
- printf("(long)") >> CFILE;
- printf("argp->%s);\n", vars[i]) >> CFILE;
+ printf("(long)") >> PFILE;
+ printf("argp->%s);\n", vars[i]) >> PFILE;
}
}
- printf("\t(void)printf(\"\\n\");\n") >> CFILE;
- write_free("argp", CFILE);
- printf("\treturn (0);\n") >> CFILE;
- printf("}\n\n") >> CFILE;
+ printf("\t(void)printf(\"\\n\");\n") >> PFILE;
+ write_free("\t", "argp", PFILE);
+ printf("\treturn (0);\n") >> PFILE;
+ printf("}\n\n") >> PFILE;
}
-function read_function() {
+function read_function()
+{
# Write the read function; function prototype
- p[1] = sprintf("int %s_read __P((DB_ENV *, void *,", funcname);
+ if (not_buf)
+ p[1] = sprintf("int %s_read __P((DB_ENV *, void *,", funcname);
+ else
+ p[1] = sprintf("int %s_read __P((DB_ENV *, void *, void **,", \
+ funcname);
p[2] = " ";
p[3] = sprintf("%s_args **));", funcname);
p[4] = "";
- proto_format(p);
+ proto_format(p, CFILE);
# Function declaration
- printf("int\n%s_read(dbenv, recbuf, argpp)\n", funcname) >> CFILE;
+ if (not_buf)
+ printf("int\n%s_read(dbenv, recbuf, argpp)\n", funcname) \
+ >> CFILE;
+ else
+ printf(\
+ "int\n%s_read(dbenv, recbuf, nextp, argpp)\n", funcname) \
+ >> CFILE;
# Now print the parameters
printf("\tDB_ENV *dbenv;\n") >> CFILE;
printf("\tvoid *recbuf;\n") >> CFILE;
+ if (!not_buf)
+ printf("\tvoid **nextp;\n") >> CFILE;
printf("\t%s_args **argpp;\n", funcname) >> CFILE;
# Function body and local decls
@@ -637,26 +866,37 @@ function read_function() {
printf("\n\tdbenv = NULL;\n") >> CFILE;
}
- malloc_size = sprintf("sizeof(%s_args) + sizeof(DB_TXN)", funcname)
- write_malloc("argp", malloc_size, CFILE)
+ if (not_buf) {
+ malloc_size = sprintf("sizeof(%s_args) + sizeof(DB_TXN)", \
+ funcname)
+ } else {
+ malloc_size = sprintf("sizeof(%s_args)", funcname)
+ }
+ write_malloc("\t", "argp", malloc_size, CFILE)
# Set up the pointers to the txnid.
- printf("\targp->txnid = (DB_TXN *)&argp[1];\n\n") >> CFILE;
+ printf("\tbp = recbuf;\n") >> CFILE;
- # First get the record type, prev_lsn, and txnid fields.
+ if (not_buf) {
+ printf("\targp->txnid = (DB_TXN *)&argp[1];\n\n") >> CFILE;
- printf("\tbp = recbuf;\n") >> CFILE;
- printf("\tmemcpy(&argp->type, bp, sizeof(argp->type));\n") >> CFILE;
- printf("\tbp += sizeof(argp->type);\n\n") >> CFILE;
- printf("\tmemcpy(&argp->txnid->txnid, bp, ") >> CFILE;
- printf("sizeof(argp->txnid->txnid));\n") >> CFILE;
- printf("\tbp += sizeof(argp->txnid->txnid);\n\n") >> CFILE;
- printf("\tmemcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));\n") >> CFILE;
- printf("\tbp += sizeof(DB_LSN);\n\n") >> CFILE;
+ # First get the record type, prev_lsn, and txnid fields.
+
+ printf("\tmemcpy(&argp->type, bp, sizeof(argp->type));\n") \
+ >> CFILE;
+ printf("\tbp += sizeof(argp->type);\n\n") >> CFILE;
+ printf("\tmemcpy(&argp->txnid->txnid, bp, ") >> CFILE;
+ printf("sizeof(argp->txnid->txnid));\n") >> CFILE;
+ printf("\tbp += sizeof(argp->txnid->txnid);\n\n") >> CFILE;
+ printf("\tmemcpy(&argp->prev_lsn, bp, sizeof(DB_LSN));\n") \
+ >> CFILE;
+ printf("\tbp += sizeof(DB_LSN);\n\n") >> CFILE;
+ }
# Now get rest of data.
for (i = 0; i < nvars; i ++) {
- if (modes[i] == "DBT" || modes[i] == "PGDBT") {
+ if (modes[i] == "DBT" || \
+ modes[i] == "LOCKS" || modes[i] == "PGDBT") {
printf("\tmemset(&argp->%s, 0, sizeof(argp->%s));\n", \
vars[i], vars[i]) >> CFILE;
printf("\tmemcpy(&argp->%s.size, ", vars[i]) >> CFILE;
@@ -664,8 +904,8 @@ function read_function() {
printf("\tbp += sizeof(u_int32_t);\n") >> CFILE;
printf("\targp->%s.data = bp;\n", vars[i]) >> CFILE;
printf("\tbp += argp->%s.size;\n", vars[i]) >> CFILE;
- } else if (modes[i] == "ARG" || modes[i] == "WRLOCK" || \
- modes[i] == "WRLOCKNZ" || modes[i] == "DB") {
+ } else if (modes[i] == "ARG" || modes[i] == "TIME" ||
+ modes[i] == "DB") {
printf("\tmemcpy(&uinttmp, bp, sizeof(uinttmp));\n") \
>> CFILE;
printf("\targp->%s = (%s)uinttmp;\n", vars[i], \
@@ -680,118 +920,17 @@ function read_function() {
}
# Free and return
+ if (!not_buf)
+ printf("\t*nextp = bp;\n") >> CFILE;
printf("\t*argpp = argp;\n") >> CFILE;
printf("\treturn (0);\n}\n\n") >> CFILE;
}
-function getpgnos_function() {
- # Write the getpgnos function; function prototype
- p[1] = sprintf("int %s_getpgnos", funcname);
- p[2] = " ";
- p[3] = "__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));";
- p[4] = "";
- proto_format(p);
-
- # Function declaration
- printf("int\n%s_getpgnos(dbenv, ", funcname) >> CFILE;
- printf("rec, lsnp, notused1, summary)\n") >> CFILE;
- printf("\tDB_ENV *dbenv;\n") >> CFILE;
- printf("\tDBT *rec;\n") >> CFILE;
- printf("\tDB_LSN *lsnp;\n") >> CFILE;
- printf("\tdb_recops notused1;\n") >> CFILE;
- printf("\tvoid *summary;\n{\n") >> CFILE;
-
- # If there are no locks, return this fact.
- if (nlocks == 0) {
- printf("\tTXN_RECS *t;\n") >> CFILE;
- printf("\tint ret;\n") >> CFILE;
- printf("\tCOMPQUIET(rec, NULL);\n") >> CFILE;
- printf("\tCOMPQUIET(notused1, DB_TXN_ABORT);\n") >> CFILE;
-
- printf("\n\tt = (TXN_RECS *)summary;\n") >> CFILE;
- printf("\n\tif ((ret = __rep_check_alloc(dbenv, ") >> CFILE;
- printf("t, 1)) != 0)\n") >> CFILE;
- printf("\t\treturn (ret);\n") >> CFILE;
-
- printf("\n\tt->array[t->npages].flags = LSN_PAGE_NOLOCK;\n") \
- >> CFILE;
- printf("\tt->array[t->npages].lsn = *lsnp;\n") >> CFILE;
- printf("\tt->array[t->npages].fid = DB_LOGFILEID_INVALID;\n") \
- >> CFILE;
- printf("\tmemset(&t->array[t->npages].pgdesc, 0,\n") >> CFILE;
- printf("\t sizeof(t->array[t->npages].pgdesc));\n") >> CFILE;
- printf("\n\tt->npages++;\n") >> CFILE;
-
- printf("\n") >> CFILE;
- printf("\treturn (0);\n") >> CFILE;
- printf("}\n\n") >> CFILE;
- return;
- }
-
- # Locals
- printf("\tDB *dbp;\n") >> CFILE;
- printf("\tTXN_RECS *t;\n") >> CFILE;
- printf("\t%s_args *argp;\n", funcname) >> CFILE;
- printf("\tu_int32_t ret;\n\n") >> CFILE;
-
- # Shut up compiler.
- printf("\tCOMPQUIET(notused1, DB_TXN_ABORT);\n\n") >> CFILE;
-
- printf("\targp = NULL;\n") >> CFILE;
- printf("\tt = (TXN_RECS *)summary;\n\n") >> CFILE;
-
- printf("\tif ((ret = %s_read(dbenv, rec->data, &argp)) != 0)\n", \
- funcname) >> CFILE;
- printf("\t\treturn (ret);\n") >> CFILE;
-
- # Get file ID.
- printf("\n\tif ((ret = __dbreg_id_to_db(dbenv,\n\t ") >> CFILE;
- printf("argp->txnid, &dbp, argp->fileid, 0)) != 0)\n") >> CFILE;
- printf("\t\tgoto err;\n") >> CFILE;
-
- printf("\n\tif ((ret = __rep_check_alloc(dbenv, t, %d)) != 0)\n", \
- nlocks) >> CFILE;
- printf("\t\tgoto err;\n\n") >> CFILE;
-
- for (i = 1; i <= nlocks; i++) {
- if (lock_if_zero[i]) {
- indent = "\t";
- } else {
- indent = "\t\t";
- printf("\tif (argp->%s != PGNO_INVALID) {\n", \
- lock_pgnos[i]) >> CFILE;
- }
- printf("%st->array[t->npages].flags = 0;\n", indent) >> CFILE;
- printf("%st->array[t->npages].fid = argp->fileid;\n", indent) \
- >> CFILE;
- printf("%st->array[t->npages].lsn = *lsnp;\n", indent) >> CFILE;
- printf("%st->array[t->npages].pgdesc.pgno = argp->%s;\n", \
- indent, lock_pgnos[i]) >> CFILE;
- printf("%st->array[t->npages].pgdesc.type = DB_PAGE_LOCK;\n", \
- indent) >> CFILE;
- printf("%smemcpy(t->array[t->npages].pgdesc.fileid, ", indent) \
- >> CFILE;
- printf("dbp->fileid,\n%s DB_FILE_ID_LEN);\n", \
- indent, indent) >> CFILE;
- printf("%st->npages++;\n", indent) >> CFILE;
- if (!lock_if_zero[i]) {
- printf("\t}\n") >> CFILE;
- }
- }
-
- printf("\nerr:\tif (argp != NULL)\n") >> CFILE;
- write_free("argp", CFILE);
-
- printf("\treturn (ret);\n") >> CFILE;
-
- printf("}\n\n") >> CFILE;
-}
-
# proto_format --
# Pretty-print a function prototype.
-function proto_format(p)
+function proto_format(p, fp)
{
- printf("/*\n") >> CFILE;
+ printf("/*\n") >> fp;
s = "";
for (i = 1; i in p; ++i)
@@ -799,46 +938,44 @@ function proto_format(p)
t = " * PUBLIC: "
if (length(s) + length(t) < 80)
- printf("%s%s", t, s) >> CFILE;
+ printf("%s%s", t, s) >> fp;
else {
split(s, p, "__P");
len = length(t) + length(p[1]);
- printf("%s%s", t, p[1]) >> CFILE
+ printf("%s%s", t, p[1]) >> fp
n = split(p[2], comma, ",");
comma[1] = "__P" comma[1];
for (i = 1; i <= n; i++) {
if (len + length(comma[i]) > 70) {
- printf("\n * PUBLIC: ") >> CFILE;
+ printf("\n * PUBLIC: ") >> fp;
len = 0;
}
- printf("%s%s", comma[i], i == n ? "" : ",") >> CFILE;
+ printf("%s%s", comma[i], i == n ? "" : ",") >> fp;
len += length(comma[i]) + 2;
}
}
- printf("\n */\n") >> CFILE;
+ printf("\n */\n") >> fp;
delete p;
}
-function write_malloc(ptr, size, file)
+function write_malloc(tab, ptr, size, file)
{
if (dbprivate) {
- printf("\tif ((ret = ") >> file;
- printf(\
- "__os_malloc(dbenv,\n\t " size ", &" ptr ")) != 0)\n") \
- >> file
- printf("\t\treturn (ret);\n\n") >> file;
+ print(tab "if ((ret = __os_malloc(dbenv,") >> file
+ print(tab " " size ", &" ptr ")) != 0)") >> file
+ print(tab "\treturn (ret);") >> file;
} else {
- printf("\tif ((" ptr " = malloc(" size ")) == NULL)\n") >> file
- printf("\t\treturn (ENOMEM);\n\n") >> file
+ print(tab "if ((" ptr " = malloc(" size ")) == NULL)") >> file
+ print(tab "\treturn (ENOMEM);") >> file
}
}
-function write_free(ptr, file)
+function write_free(tab, ptr, file)
{
if (dbprivate) {
- printf("\t__os_free(dbenv, " ptr ");\n") >> file
+ print(tab "__os_free(dbenv, " ptr ");") >> file
} else {
- printf("\tfree(" ptr ");\n") >> file
+ print(tab "free(" ptr ");") >> file
}
}
diff --git a/storage/bdb/dist/gen_rpc.awk b/storage/bdb/dist/gen_rpc.awk
index 03975d7321b..7eee77b3df2 100644
--- a/storage/bdb/dist/gen_rpc.awk
+++ b/storage/bdb/dist/gen_rpc.awk
@@ -1,5 +1,5 @@
#
-# $Id: gen_rpc.awk,v 11.50 2002/07/02 19:26:57 sue Exp $
+# $Id: gen_rpc.awk,v 11.58 2004/08/19 20:28:37 mjc Exp $
# Awk script for generating client/server RPC code.
#
# This awk script generates most of the RPC routines for DB client/server
@@ -14,7 +14,6 @@
# xidsize -- size of GIDs
# client_file -- the C source file being created for client code
# ctmpl_file -- the C template file being created for client code
-# sed_file -- the sed file created to alter server proc code
# server_file -- the C source file being created for server code
# stmpl_file -- the C template file being created for server code
# xdr_file -- the XDR message file created
@@ -23,15 +22,13 @@
BEGIN {
if (major == "" || minor == "" || xidsize == "" ||
client_file == "" || ctmpl_file == "" ||
- sed_file == "" || server_file == "" ||
- stmpl_file == "" || xdr_file == "") {
+ server_file == "" || stmpl_file == "" || xdr_file == "") {
print "Usage: gen_rpc.awk requires these variables be set:"
print "\tmajor\t-- Major version number"
print "\tminor\t-- Minor version number"
print "\txidsize\t-- GID size"
print "\tclient_file\t-- the client C source file being created"
print "\tctmpl_file\t-- the client template file being created"
- print "\tsed_file\t-- the sed command file being created"
print "\tserver_file\t-- the server C source file being created"
print "\tstmpl_file\t-- the server template file being created"
print "\txdr_file\t-- the XDR message file being created"
@@ -51,32 +48,24 @@ BEGIN {
printf("/* Do not edit: automatically built by gen_rpc.awk. */\n") \
> SFILE
- # Server procedure template and a sed file to massage an existing
- # template source file to change args.
- # SEDFILE should be same name as PFILE but .c
- #
+ # Server procedure template.
PFILE = stmpl_file
- SEDFILE = sed_file
- printf("") > SEDFILE
- printf("/* Do not edit: automatically built by gen_rpc.awk. */\n") \
- > PFILE
-
XFILE = xdr_file
printf("/* Do not edit: automatically built by gen_rpc.awk. */\n") \
> XFILE
nendlist = 1;
}
END {
- printf("#endif /* HAVE_RPC */\n") >> CFILE
- printf("#endif /* HAVE_RPC */\n") >> TFILE
- printf("program DB_RPC_SERVERPROG {\n") >> XFILE
- printf("\tversion DB_RPC_SERVERVERS {\n") >> XFILE
+ if (error == 0) {
+ printf("program DB_RPC_SERVERPROG {\n") >> XFILE
+ printf("\tversion DB_RPC_SERVERVERS {\n") >> XFILE
- for (i = 1; i < nendlist; ++i)
- printf("\t\t%s;\n", endlist[i]) >> XFILE
+ for (i = 1; i < nendlist; ++i)
+ printf("\t\t%s;\n", endlist[i]) >> XFILE
- printf("\t} = %d%03d;\n", major, minor) >> XFILE
- printf("} = 351457;\n") >> XFILE
+ printf("\t} = %d%03d;\n", major, minor) >> XFILE
+ printf("} = 351457;\n") >> XFILE
+ }
}
/^[ ]*BEGIN/ {
@@ -169,9 +158,34 @@ END {
retlist_type[rvars] = $5;
} else
retlist_type[rvars] = 0;
+ ret_isarg[rvars] = 0;
++rvars;
}
+/^[ ]*ARET/ {
+ ret_type[rvars] = $2;
+ rpc_type[nvars] = "IGNORE";
+ retc_type[rvars] = $3;
+ c_type[nvars] = sprintf("%s *", $3);
+ pr_type[nvars] = c_type[nvars];
+ retargs[rvars] = $4;
+ args[nvars] = sprintf("%sp", $4);
+ if (ret_type[rvars] == "LIST" || ret_type[rvars] == "DBT") {
+ xdr_free = 1;
+ }
+ func_arg[nvars] = 0;
+ if (ret_type[nvars] == "LIST") {
+ retlist_type[rvars] = $5;
+ list_type[nvars] = $5;
+ } else {
+ retlist_type[rvars] = 0;
+ list_type[nvars] = 0;
+ }
+ ret_isarg[rvars] = 1;
+
+ ++nvars;
+ ++rvars;
+}
/^[ ]*END/ {
#
# =====================================================
@@ -180,33 +194,29 @@ END {
if (first == 0) {
printf("#include \"db_config.h\"\n") >> CFILE
printf("\n") >> CFILE
- printf("#ifdef HAVE_RPC\n") >> CFILE
printf("#ifndef NO_SYSTEM_INCLUDES\n") >> CFILE
- printf("#include <sys/types.h>\n\n") >> CFILE
+ printf("#include <sys/types.h>\n") >> CFILE
+ printf("\n") >> CFILE
printf("#include <rpc/rpc.h>\n") >> CFILE
- printf("#include <rpc/xdr.h>\n") >> CFILE
printf("\n") >> CFILE
printf("#include <string.h>\n") >> CFILE
printf("#endif\n") >> CFILE
printf("\n") >> CFILE
+ printf("#include \"db_server.h\"\n") >> CFILE
+ printf("\n") >> CFILE
printf("#include \"db_int.h\"\n") >> CFILE
printf("#include \"dbinc/txn.h\"\n") >> CFILE
- printf("\n") >> CFILE
- printf("#include \"dbinc_auto/db_server.h\"\n") >> CFILE
printf("#include \"dbinc_auto/rpc_client_ext.h\"\n") >> CFILE
printf("\n") >> CFILE
printf("#include \"db_config.h\"\n") >> TFILE
printf("\n") >> TFILE
- printf("#ifdef HAVE_RPC\n") >> TFILE
printf("#ifndef NO_SYSTEM_INCLUDES\n") >> TFILE
printf("#include <sys/types.h>\n") >> TFILE
- printf("#include <rpc/rpc.h>\n") >> TFILE
printf("\n") >> TFILE
printf("#include <string.h>\n") >> TFILE
printf("#endif\n") >> TFILE
printf("#include \"db_int.h\"\n") >> TFILE
- printf("#include \"dbinc_auto/db_server.h\"\n") >> TFILE
printf("#include \"dbinc/txn.h\"\n") >> TFILE
printf("\n") >> TFILE
@@ -216,13 +226,13 @@ END {
printf("#include <sys/types.h>\n") >> SFILE
printf("\n") >> SFILE
printf("#include <rpc/rpc.h>\n") >> SFILE
- printf("#include <rpc/xdr.h>\n") >> SFILE
printf("\n") >> SFILE
printf("#include <string.h>\n") >> SFILE
printf("#endif\n") >> SFILE
printf("\n") >> SFILE
+ printf("#include \"db_server.h\"\n") >> SFILE
+ printf("\n") >> SFILE
printf("#include \"db_int.h\"\n") >> SFILE
- printf("#include \"dbinc_auto/db_server.h\"\n") >> SFILE
printf("#include \"dbinc/db_server_int.h\"\n") >> SFILE
printf("#include \"dbinc_auto/rpc_server_ext.h\"\n") >> SFILE
printf("\n") >> SFILE
@@ -237,10 +247,10 @@ END {
printf("#include <string.h>\n") >> PFILE
printf("#endif\n") >> PFILE
printf("\n") >> PFILE
+ printf("#include \"db_server.h\"\n") >> PFILE
+ printf("\n") >> PFILE
printf("#include \"db_int.h\"\n") >> PFILE
- printf("#include \"dbinc_auto/db_server.h\"\n") >> PFILE
printf("#include \"dbinc/db_server_int.h\"\n") >> PFILE
- printf("#include \"dbinc_auto/rpc_server_ext.h\"\n") >> PFILE
printf("\n") >> PFILE
first = 1;
@@ -275,9 +285,9 @@ END {
printf("__dbcl_rpc_illegal(dbenv, name)\n") >> CFILE
printf("\tDB_ENV *dbenv;\n\tchar *name;\n") >> CFILE
printf("{\n\t__db_err(dbenv,") >> CFILE
- printf(" \"%%s method meaningless in an RPC") >> CFILE
- printf(" environment\", name);\n") >> CFILE
- printf("\treturn (__db_eopnotsup(dbenv));\n") >> CFILE
+ printf(" \"%%s method unsupported in RPC") >> CFILE
+ printf(" environments\", name);\n") >> CFILE
+ printf("\treturn (DB_OPNOTSUP);\n") >> CFILE
printf("}\n\n") >> CFILE
first_nofunc = 1
@@ -285,6 +295,7 @@ END {
#
# Spit out PUBLIC prototypes.
#
+ delete p;
pi = 1;
p[pi++] = sprintf("int __dbcl_%s __P((", name);
p[pi++] = "";
@@ -293,9 +304,8 @@ END {
p[pi++] = ", ";
}
p[pi - 1] = "";
- p[pi++] = "));";
- p[pi] = "";
- proto_format(p, 0, CFILE);
+ p[pi] = "));";
+ proto_format(p, CFILE);
#
# Spit out function name/args.
@@ -336,7 +346,7 @@ END {
printf("\tdbenv = %s->mgrp->dbenv;\n", \
args[txn_idx]) >> CFILE
else if (mp_handle)
- printf("\tdbenv = %s->dbmp->dbenv;\n", \
+ printf("\tdbenv = %s->dbenv;\n", \
args[mp_idx]) >> CFILE
else
printf("\tdbenv = NULL;\n") >> CFILE
@@ -413,6 +423,7 @@ END {
# Generate the reply message
#
printf("struct __%s_reply {\n", name) >> XFILE
+ printf("\t/* num return vars: %d */\n", rvars) >> XFILE
printf("\tint status;\n") >> XFILE
for (i = 0; i < rvars; ++i) {
if (ret_type[i] == "ID") {
@@ -450,13 +461,9 @@ END {
#
# First spit out PUBLIC prototypes for server functions.
#
- p[1] = sprintf("__%s_reply *__db_%s_%d%03d __P((__%s_msg *, struct svc_req *));",
- name, name, major, minor, name);
- p[2] = "";
- proto_format(p, 0, SFILE);
-
printf("__%s_reply *\n", name) >> SFILE
- printf("__db_%s_%d%03d(msg, req)\n", name, major, minor) >> SFILE
+ printf("__db_%s_%d%03d__SVCSUFFIX__(msg, req)\n", \
+ name, major, minor) >> SFILE
printf("\t__%s_msg *msg;\n", name) >> SFILE;
printf("\tstruct svc_req *req;\n", name) >> SFILE;
printf("{\n") >> SFILE
@@ -503,7 +510,7 @@ END {
sep, args[i], args[i]) >> SFILE
}
if (rpc_type[i] == "GID") {
- printf("%smsg->%s", sep, args[i]) >> SFILE
+ printf("%s(u_int8_t *)msg->%s", sep, args[i]) >> SFILE
}
if (rpc_type[i] == "INT") {
printf("%smsg->%s", sep, args[i]) >> SFILE
@@ -542,16 +549,9 @@ END {
# =====================================================
# Generate Procedure Template Server code
#
- # Produce SED file commands if needed at the same time
- #
# Spit out comment, prototype, function name and arg list.
- #
- printf("/^\\/\\* BEGIN __%s_proc/,/^\\/\\* END __%s_proc/c\\\n", \
- name, name) >> SEDFILE
-
printf("/* BEGIN __%s_proc */\n", name) >> PFILE
- printf("/* BEGIN __%s_proc */\\\n", name) >> SEDFILE
-
+ delete p;
pi = 1;
p[pi++] = sprintf("void __%s_proc __P((", name);
p[pi++] = "";
@@ -574,6 +574,10 @@ END {
p[pi++] = "u_int32_t";
p[pi++] = ", ";
}
+ if (rpc_type[i] == "INTRET") {
+ p[pi++] = "u_int32_t *";
+ p[pi++] = ", ";
+ }
if (rpc_type[i] == "LIST" && list_type[i] == "GID") {
p[pi++] = "u_int8_t *";
p[pi++] = ", ";
@@ -616,12 +620,9 @@ END {
p[pi++] = "));";
}
p[pi++] = "";
- proto_format(p, 1, SEDFILE);
printf("void\n") >> PFILE
- printf("void\\\n") >> SEDFILE
printf("__%s_proc(", name) >> PFILE
- printf("__%s_proc(", name) >> SEDFILE
sep = "";
argcount = 0;
for (i = 0; i < nvars; ++i) {
@@ -634,23 +635,21 @@ END {
continue;
if (rpc_type[i] == "ID") {
printf("%s%scl_id", sep, args[i]) >> PFILE
- printf("%s%scl_id", sep, args[i]) >> SEDFILE
}
if (rpc_type[i] == "STRING") {
printf("%s%s", sep, args[i]) >> PFILE
- printf("%s%s", sep, args[i]) >> SEDFILE
}
if (rpc_type[i] == "GID") {
printf("%s%s", sep, args[i]) >> PFILE
- printf("%s%s", sep, args[i]) >> SEDFILE
}
if (rpc_type[i] == "INT") {
printf("%s%s", sep, args[i]) >> PFILE
- printf("%s%s", sep, args[i]) >> SEDFILE
+ }
+ if (rpc_type[i] == "INTRET") {
+ printf("%s%s", sep, args[i]) >> PFILE
}
if (rpc_type[i] == "LIST") {
printf("%s%s", sep, args[i]) >> PFILE
- printf("%s%s", sep, args[i]) >> SEDFILE
argcount++;
split_lines();
if (argcount == 0) {
@@ -659,11 +658,9 @@ END {
sep = ", ";
}
printf("%s%slen", sep, args[i]) >> PFILE
- printf("%s%slen", sep, args[i]) >> SEDFILE
}
if (rpc_type[i] == "DBT") {
printf("%s%sdlen", sep, args[i]) >> PFILE
- printf("%s%sdlen", sep, args[i]) >> SEDFILE
sep = ", ";
argcount++;
split_lines();
@@ -673,7 +670,6 @@ END {
sep = ", ";
}
printf("%s%sdoff", sep, args[i]) >> PFILE
- printf("%s%sdoff", sep, args[i]) >> SEDFILE
argcount++;
split_lines();
if (argcount == 0) {
@@ -682,7 +678,6 @@ END {
sep = ", ";
}
printf("%s%sulen", sep, args[i]) >> PFILE
- printf("%s%sulen", sep, args[i]) >> SEDFILE
argcount++;
split_lines();
if (argcount == 0) {
@@ -691,7 +686,6 @@ END {
sep = ", ";
}
printf("%s%sflags", sep, args[i]) >> PFILE
- printf("%s%sflags", sep, args[i]) >> SEDFILE
argcount++;
split_lines();
if (argcount == 0) {
@@ -700,7 +694,6 @@ END {
sep = ", ";
}
printf("%s%sdata", sep, args[i]) >> PFILE
- printf("%s%sdata", sep, args[i]) >> SEDFILE
argcount++;
split_lines();
if (argcount == 0) {
@@ -709,18 +702,14 @@ END {
sep = ", ";
}
printf("%s%ssize", sep, args[i]) >> PFILE
- printf("%s%ssize", sep, args[i]) >> SEDFILE
}
sep = ", ";
}
printf("%sreplyp",sep) >> PFILE
- printf("%sreplyp",sep) >> SEDFILE
if (xdr_free) {
printf("%sfreep)\n",sep) >> PFILE
- printf("%sfreep)\\\n",sep) >> SEDFILE
} else {
printf(")\n") >> PFILE
- printf(")\\\n") >> SEDFILE
}
#
# Spit out arg types/names;
@@ -728,65 +717,44 @@ END {
for (i = 0; i < nvars; ++i) {
if (rpc_type[i] == "ID") {
printf("\tlong %scl_id;\n", args[i]) >> PFILE
- printf("\\\tlong %scl_id;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "STRING") {
printf("\tchar *%s;\n", args[i]) >> PFILE
- printf("\\\tchar *%s;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "GID") {
printf("\tu_int8_t *%s;\n", args[i]) >> PFILE
- printf("\\\tu_int8_t *%s;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "INT") {
printf("\tu_int32_t %s;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %s;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "LIST" && list_type[i] == "GID") {
printf("\tu_int8_t * %s;\n", args[i]) >> PFILE
- printf("\\\tu_int8_t * %s;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "LIST" && list_type[i] == "INT") {
printf("\tu_int32_t * %s;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t * %s;\\\n", \
- args[i]) >> SEDFILE
printf("\tu_int32_t %ssize;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %ssize;\\\n", args[i]) >> SEDFILE
}
if (rpc_type[i] == "LIST" && list_type[i] == "ID") {
printf("\tu_int32_t * %s;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t * %s;\\\n", args[i]) \
- >> SEDFILE
}
if (rpc_type[i] == "LIST") {
printf("\tu_int32_t %slen;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %slen;\\\n", args[i]) \
- >> SEDFILE
}
if (rpc_type[i] == "DBT") {
printf("\tu_int32_t %sdlen;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %sdlen;\\\n", args[i]) >> SEDFILE
printf("\tu_int32_t %sdoff;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %sdoff;\\\n", args[i]) >> SEDFILE
printf("\tu_int32_t %sulen;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %sulen;\\\n", args[i]) >> SEDFILE
printf("\tu_int32_t %sflags;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %sflags;\\\n", args[i]) >> SEDFILE
printf("\tvoid *%sdata;\n", args[i]) >> PFILE
- printf("\\\tvoid *%sdata;\\\n", args[i]) >> SEDFILE
printf("\tu_int32_t %ssize;\n", args[i]) >> PFILE
- printf("\\\tu_int32_t %ssize;\\\n", args[i]) >> SEDFILE
}
}
printf("\t__%s_reply *replyp;\n",name) >> PFILE
- printf("\\\t__%s_reply *replyp;\\\n",name) >> SEDFILE
if (xdr_free) {
printf("\tint * freep;\n") >> PFILE
- printf("\\\tint * freep;\\\n") >> SEDFILE
}
printf("/* END __%s_proc */\n", name) >> PFILE
- printf("/* END __%s_proc */\n", name) >> SEDFILE
#
# Function body
@@ -819,6 +787,7 @@ END {
#
# Spit out PUBLIC prototypes.
#
+ delete p;
pi = 1;
p[pi++] = sprintf("int __dbcl_%s __P((", name);
p[pi++] = "";
@@ -827,9 +796,8 @@ END {
p[pi++] = ", ";
}
p[pi - 1] = "";
- p[pi++] = "));";
- p[pi] = "";
- proto_format(p, 0, CFILE);
+ p[pi] = "));";
+ proto_format(p, CFILE);
#
# Spit out function name/args.
@@ -1034,6 +1002,18 @@ END {
if (ret_code == 0) {
printf("\tret = replyp->status;\n") >> CFILE
+
+ #
+ # Set any arguments that are returned
+ #
+ for (i = 0; i < rvars; ++i) {
+ if (ret_isarg[i]) {
+ printf("\tif (%sp != NULL)\n", \
+ retargs[i]) >> CFILE;
+ printf("\t\t*%sp = replyp->%s;\n", \
+ retargs[i], retargs[i]) >> CFILE;
+ }
+ }
} else {
printf("\tret = __dbcl_%s_ret(", name) >> CFILE
sep = "";
@@ -1060,6 +1040,7 @@ END {
#
# If we are doing a list, write prototypes
#
+ delete p;
pi = 1;
p[pi++] = sprintf("int __dbcl_%s_ret __P((", name);
p[pi++] = "";
@@ -1067,9 +1048,8 @@ END {
p[pi++] = pr_type[i];
p[pi++] = ", ";
}
- p[pi++] = sprintf("__%s_reply *));", name);
- p[pi++] = "";
- proto_format(p, 0, TFILE);
+ p[pi] = sprintf("__%s_reply *));", name);
+ proto_format(p, TFILE);
printf("int\n") >> TFILE
printf("__dbcl_%s_ret(", name) >> TFILE
@@ -1160,32 +1140,22 @@ function split_lines() {
sub("[ ]$", "", sep)
printf("%s\n\t\t", sep) >> PFILE
- printf("%s\\\n\\\t\\\t", sep) >> SEDFILE
}
}
# proto_format --
# Pretty-print a function prototype.
-function proto_format(p, sedfile, OUTPUT)
+function proto_format(p, OUTPUT)
{
- if (sedfile)
- printf("/*\\\n") >> OUTPUT;
- else
- printf("/*\n") >> OUTPUT;
+ printf("/*\n") >> OUTPUT;
s = "";
for (i = 1; i in p; ++i)
s = s p[i];
- if (sedfile)
- t = "\\ * PUBLIC: "
- else
- t = " * PUBLIC: "
+ t = " * PUBLIC: "
if (length(s) + length(t) < 80)
- if (sedfile)
- printf("%s%s", t, s) >> OUTPUT;
- else
- printf("%s%s", t, s) >> OUTPUT;
+ printf("%s%s", t, s) >> OUTPUT;
else {
split(s, p, "__P");
len = length(t) + length(p[1]);
@@ -1195,20 +1165,12 @@ function proto_format(p, sedfile, OUTPUT)
comma[1] = "__P" comma[1];
for (i = 1; i <= n; i++) {
if (len + length(comma[i]) > 75) {
- if (sedfile)
- printf(\
- "\\\n\\ * PUBLIC: ") >> OUTPUT;
- else
- printf("\n * PUBLIC: ") >> OUTPUT;
+ printf("\n * PUBLIC: ") >> OUTPUT;
len = 0;
}
printf("%s%s", comma[i], i == n ? "" : ",") >> OUTPUT;
len += length(comma[i]);
}
}
- if (sedfile)
- printf("\\\n\\ */\\\n") >> OUTPUT;
- else
- printf("\n */\n") >> OUTPUT;
- delete p;
+ printf("\n */\n") >> OUTPUT;
}
diff --git a/storage/bdb/dist/ltmain.sh b/storage/bdb/dist/ltmain.sh
index f07d424527d..c96a96ddd38 100644
--- a/storage/bdb/dist/ltmain.sh
+++ b/storage/bdb/dist/ltmain.sh
@@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -24,6 +24,34 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.8
+TIMESTAMP=" (1.1220.2.117 2004/08/04 14:12:05)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
@@ -36,7 +64,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
:
else
# Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
@@ -45,19 +73,9 @@ if test "X$1" = X--fallback-echo; then
cat <<EOF
$*
EOF
- exit 0
+ exit $EXIT_SUCCESS
fi
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.4.2
-TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
-
default_mode=
help="Try \`$progname --help' for more information."
magic="%%%MAGIC variable%%%"
@@ -67,10 +85,19 @@ rm="rm -f"
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
+Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+ SP2NL="tr '\100' '\n'"
+ NL2SP="tr '\r\n' '\100\100'"
+ ;;
+ *) # Assume ASCII based system
+ SP2NL="tr '\040' '\012'"
+ NL2SP="tr '\015\012' '\040\040'"
+ ;;
+esac
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
@@ -85,12 +112,13 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
-: ${IFS=" "}
+: ${IFS="
+"}
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- echo "$modename: not configured to build any kind of library" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
+ $echo "$modename: not configured to build any kind of library" 1>&2
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
fi
# Global variables.
@@ -105,8 +133,237 @@ execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid () {
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 | \
+ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+ if test "X$win32_nmres" = "Ximport" ; then
+ win32_libid_type="x86 archive import"
+ else
+ win32_libid_type="x86 archive static"
+ fi
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag () {
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit $EXIT_FAILURE
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives () {
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+ my_status=""
+
+ $show "${rm}r $my_gentop"
+ $run ${rm}r "$my_gentop"
+ $show "$mkdir $my_gentop"
+ $run $mkdir "$my_gentop"
+ my_status=$?
+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+ exit $my_status
+ fi
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+ my_xdir="$my_gentop/$my_xlib"
+
+ $show "${rm}r $my_xdir"
+ $run ${rm}r "$my_xdir"
+ $show "$mkdir $my_xdir"
+ $run $mkdir "$my_xdir"
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $status
+ fi
+ case $host in
+ *-darwin*)
+ $show "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ if test -z "$run"; then
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename $darwin_archive`
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ $show "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ # Remove the table of contents from the thin files.
+ $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
+ $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $AR -xo "${darwin_base_archive}"
+ rm "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ done # $darwin_arches
+ ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ lipo -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ rm -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ (cd $my_xdir && $AR x $my_xabs) || exit $?
+ fi # $darwin_arches
+ fi # $run
+ ;;
+ *)
+ # We will extract separately just the conflicting names and we will
+ # no longer touch any unique names. It is faster to leave these
+ # extract automatically by $AR in one run.
+ $show "(cd $my_xdir && $AR x $my_xabs)"
+ $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
+ if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
# Parse our command line options once, thoroughly.
-while test $# -gt 0
+while test "$#" -gt 0
do
arg="$1"
shift
@@ -122,6 +379,34 @@ do
execute_dlfiles)
execute_dlfiles="$execute_dlfiles $arg"
;;
+ tag)
+ tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
+
+ # Check whether tagname contains only valid characters
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ $echo "$progname: invalid tag name: $tagname" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ case $tagname in
+ CC)
+ # Don't test for the "default" C tag, as we know, it's there, but
+ # not specially marked.
+ ;;
+ *)
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+ taglist="$taglist $tagname"
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+ else
+ $echo "$progname: ignoring unknown tag $tagname" 1>&2
+ fi
+ ;;
+ esac
+ ;;
*)
eval "$prev=\$arg"
;;
@@ -139,18 +424,27 @@ do
;;
--version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- exit 0
+ $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ $echo
+ $echo "Copyright (C) 2003 Free Software Foundation, Inc."
+ $echo "This is free software; see the source for copying conditions. There is NO"
+ $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ exit $EXIT_SUCCESS
;;
--config)
- sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
- exit 0
+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+ done
+ exit $EXIT_SUCCESS
;;
--debug)
- echo "$progname: enabling shell trace mode"
+ $echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -158,18 +452,18 @@ do
;;
--features)
- echo "host: $host"
+ $echo "host: $host"
if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
+ $echo "enable shared libraries"
else
- echo "disable shared libraries"
+ $echo "disable shared libraries"
fi
if test "$build_old_libs" = yes; then
- echo "enable static libraries"
+ $echo "enable static libraries"
else
- echo "disable static libraries"
+ $echo "disable static libraries"
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
--finish) mode="finish" ;;
@@ -177,8 +471,19 @@ do
--mode) prevopt="--mode" prev=mode ;;
--mode=*) mode="$optarg" ;;
+ --preserve-dup-deps) duplicate_deps="yes" ;;
+
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
+ ;;
+
+ --tag) prevopt="--tag" prev=tag ;;
+ --tag=*)
+ set tag "$optarg" ${1+"$@"}
+ shift
+ prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -189,7 +494,7 @@ do
-*)
$echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
*)
@@ -202,7 +507,7 @@ done
if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# If this variable is set in any of the actions, the command in it
@@ -214,8 +519,10 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
+ $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+ $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
case $nonopt in
- *cc | *++ | gcc* | *-gcc*)
+ *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
for arg
do
@@ -256,7 +563,7 @@ if test -z "$show_help"; then
if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
@@ -270,158 +577,124 @@ if test -z "$show_help"; then
modename="$modename: compile"
# Get the compilation command and the source file.
base_compile=
- prev=
- lastarg=
- srcfile="$nonopt"
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
- user_target=no
for arg
do
- case $prev in
- "") ;;
- xcompiler)
- # Aesthetically quote the previous argument.
- prev=
- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
- case $arg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ case "$arg_mode" in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
+ target )
+ libobj="$arg"
+ arg_mode=normal
continue
;;
- esac
- # Accept any command-line options.
- case $arg in
- -o)
- if test "$user_target" != "no"; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit 1
- fi
- user_target=next
- ;;
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test -n "$libobj" ; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ arg_mode=target
+ continue
+ ;;
- -static)
- build_old_libs=yes
- continue
- ;;
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ lastarg="$lastarg $arg"
+ done
IFS="$save_ifs"
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
- done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
- # Add the arguments to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
+ # Add the arguments to base_compile.
base_compile="$base_compile $lastarg"
- fi
- continue
- ;;
- esac
+ continue
+ ;;
- case $user_target in
- next)
- # The next one is the -o target name
- user_target=yes
- continue
- ;;
- yes)
- # We got the output file
- user_target=set
- libobj="$arg"
- continue
+ * )
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
;;
- esac
-
- # Accept the current argument as the source file.
- lastarg="$srcfile"
- srcfile="$arg"
+ esac # case $arg_mode
# Aesthetically quote the previous argument.
-
- # Backslashify any backslashes, double quotes, and dollar signs.
- # These are the only characters that are still specially
- # interpreted inside of double-quoted scrings.
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+ case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
- case $lastarg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- done
+ base_compile="$base_compile $lastarg"
+ done # for arg
- case $user_target in
- set)
+ case $arg_mode in
+ arg)
+ $echo "$modename: you must specify an argument for -Xcompile"
+ exit $EXIT_FAILURE
;;
- no)
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ target)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit $EXIT_FAILURE
;;
*)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit 1
+ # Get the name of the library object.
+ [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSfmso]'
+ xform='[cCFSifmso]'
case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
@@ -429,10 +702,13 @@ if test -z "$show_help"; then
*.asm) xform=asm ;;
*.c++) xform=c++ ;;
*.cc) xform=cc ;;
+ *.ii) xform=ii ;;
+ *.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
*.f90) xform=f90 ;;
*.for) xform=for ;;
+ *.java) xform=java ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -441,25 +717,55 @@ if test -z "$show_help"; then
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir=
+ else
+ xdir=$xdir/
+ fi
+ lobj=${xdir}$objdir/$objname
+
if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
- removelist="$obj $libobj"
+ removelist="$obj $lobj $libobj ${libobj}T"
else
- removelist="$libobj"
+ removelist="$lobj $libobj ${libobj}T"
fi
$run $rm $removelist
- trap "$run $rm $removelist; exit 1" 1 2 15
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
@@ -467,7 +773,7 @@ if test -z "$show_help"; then
pic_mode=default
;;
esac
- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
@@ -478,8 +784,9 @@ if test -z "$show_help"; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit 1" 1 2 15
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else
+ output_obj=
need_locks=no
lockfile=
fi
@@ -487,13 +794,13 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$0" "$lockfile" 2>/dev/null; do
+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
- echo "\
+ $echo "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
@@ -505,68 +812,67 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
- echo $srcfile > "$lockfile"
+ $echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
+ $run $rm "$libobj" "${libobj}T"
+
+ # Create a libtool object file (analogous to a ".la" file),
+ # but don't create it if we're doing a dry run.
+ test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
# Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
# Without this assignment, base_compile gets emptied.
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
+ command="$base_compile $srcfile $pic_flag"
else
# Don't build PIC code
command="$base_compile $srcfile"
fi
- if test "$build_old_libs" = yes; then
- lo_libobj="$libobj"
- dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$libobj"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
- libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
- if test -d "$dir"; then
- $show "$rm $libobj"
- $run $rm $libobj
- else
- $show "$mkdir $dir"
- $run $mkdir $dir
- status=$?
- if test $status -ne 0 && test ! -d $dir; then
- exit $status
- fi
+ if test ! -d "${xdir}$objdir"; then
+ $show "$mkdir ${xdir}$objdir"
+ $run $mkdir ${xdir}$objdir
+ status=$?
+ if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $status
fi
fi
- if test "$compiler_o_lo" = yes; then
- output_obj="$libobj"
- command="$command -o $output_obj"
- elif test "$compiler_c_o" = yes; then
- output_obj="$obj"
- command="$command -o $output_obj"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
fi
- $run $rm "$output_obj"
+ $run $rm "$lobj" "$output_obj"
+
$show "$command"
if $run eval "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -581,13 +887,13 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
- if test x"$output_obj" != x"$libobj"; then
- $show "$mv $output_obj $libobj"
- if $run $mv $output_obj $libobj; then :
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ $show "$mv $output_obj $lobj"
+ if $run $mv $output_obj $lobj; then :
else
error=$?
$run $rm $removelist
@@ -595,48 +901,23 @@ compiler."
fi
fi
- # If we have no pic_flag, then copy the object into place and finish.
- if (test -z "$pic_flag" || test "$pic_mode" != default) &&
- test "$build_old_libs" = yes; then
- # Rename the .lo from within objdir to obj
- if test -f $obj; then
- $show $rm $obj
- $run $rm $obj
- fi
+ # Append the name of the PIC object to the libtool object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
- $show "$mv $libobj $obj"
- if $run $mv $libobj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+EOF
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
- libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- # Now arrange that obj and lo_libobj become the same file
- $show "(cd $xdir && $LN_S $baseobj $libobj)"
- if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
- exit 0
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
fi
+ else
+ # No PIC object so indicate it doesn't exist in the libtool
+ # object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
- # Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+EOF
fi
# Only build a position-dependent object if we build old libraries.
@@ -645,27 +926,25 @@ compiler."
# Don't build PIC code
command="$base_compile $srcfile"
else
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
+ command="$base_compile $srcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
- output_obj="$obj"
fi
# Suppress compiler output if we already did a PIC compilation.
command="$command$suppress_output"
- $run $rm "$output_obj"
+ $run $rm "$obj" "$output_obj"
$show "$command"
if $run eval "$command"; then :
else
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -680,11 +959,11 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
# Just move the object if needed
- if test x"$output_obj" != x"$obj"; then
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
$show "$mv $output_obj $obj"
if $run $mv $output_obj $obj; then :
else
@@ -694,29 +973,31 @@ compiler."
fi
fi
- # Create an invalid libtool object if no PIC, so that we do not
- # accidentally link it into a program.
- if test "$build_libtool_libs" != yes; then
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > \$libobj" || exit $?
- else
- # Move the .lo from within objdir
- $show "$mv $libobj $lo_libobj"
- if $run $mv $libobj $lo_libobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+ else
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
fi
+ $run $mv "${libobj}T" "${libobj}"
+
# Unlock the critical section if it was locked
if test "$need_locks" != no; then
$run $rm "$lockfile"
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
# libtool link mode
@@ -727,7 +1008,7 @@ compiler."
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
- # flag for every libtool invokation.
+ # flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
@@ -742,6 +1023,7 @@ compiler."
;;
esac
libtool_args="$nonopt"
+ base_compile="$nonopt $@"
compile_command="$nonopt"
finalize_command="$nonopt"
@@ -757,6 +1039,7 @@ compiler."
linker_flags=
dllsearchpath=
lib_search_path=`pwd`
+ inst_prefix_dir=
avoid_version=no
dlfiles=
@@ -771,6 +1054,8 @@ compiler."
module=no
no_install=no
objs=
+ non_pic_objects=
+ precious_files_regex=
prefer_static_libs=no
preload=no
prev=
@@ -782,6 +1067,9 @@ compiler."
temp_rpath=
thread_safe=no
vinfo=
+ vinfo_number=no
+
+ func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
for arg
@@ -812,7 +1100,7 @@ compiler."
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
- while test $# -gt 0; do
+ while test "$#" -gt 0; do
arg="$1"
shift
case $arg in
@@ -877,7 +1165,7 @@ compiler."
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
- exit 1
+ exit $EXIT_FAILURE
fi
prev=
continue
@@ -887,18 +1175,135 @@ compiler."
prev=
continue
;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
release)
release="-$arg"
prev=
continue
;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat $save_arg`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
+ case $arg in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
+ fi
+ done
+ else
+ $echo "$modename: link input file \`$save_arg' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
rpath | xrpath)
# We need an absolute path.
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
if test "$prev" = rpath; then
@@ -930,13 +1335,26 @@ compiler."
finalize_command="$finalize_command $wl$qarg"
continue
;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
*)
eval "$prev=\"\$arg\""
prev=
continue
;;
esac
- fi # test -n $prev
+ fi # test -n "$prev"
prevarg="$arg"
@@ -978,7 +1396,7 @@ compiler."
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: more than one -exported-symbols argument is not allowed"
- exit 1
+ exit $EXIT_FAILURE
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
@@ -988,11 +1406,16 @@ compiler."
continue
;;
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
- no/*-*-irix*)
+ no/*-*-irix* | /*-*-irix*)
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
;;
@@ -1009,7 +1432,7 @@ compiler."
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
dir="$absdir"
;;
@@ -1043,32 +1466,84 @@ compiler."
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
- *-*-openbsd*)
+ *-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd*)
- # Do not include libc_r directly, use -pthread flag.
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs -framework System"
continue
- ;;
esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
fi
deplibs="$deplibs $arg"
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
;;
- #### Local change for Sleepycat's Berkeley DB [#6117]:
- -jnimodule)
- module=yes
- jnimodule=yes
+ # gcc -m* arguments should be passed to the linker via $compiler_flags
+ # in order to pass architecture information to the linker
+ # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
+ # but this is not reliable with gcc because gcc may use -mfoo to
+ # select a different linker, different libraries, etc, while
+ # -Wl,-mfoo simply passes -mfoo to the linker.
+ -m*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ if test "$with_gcc" = "yes" ; then
+ compiler_flags="$compiler_flags $arg"
+ fi
+ continue
+ ;;
+
+ ################################################################
+ #### Local edit for Sleepycat SR #8705
+ #### This case was given to us by Albert Chin, and we expect
+ #### this to be included in future versions of libtool,
+ #### though we must verify that before upgrading.
+ ################################################################
+ # Flags for IRIX and Solaris compiler
+ -64|-mips[0-9]|-xarch=*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
continue
;;
@@ -1096,8 +1571,18 @@ compiler."
continue
;;
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
-o) prev=output ;;
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
-release)
prev=release
continue
@@ -1120,7 +1605,7 @@ compiler."
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
case "$xrpath " in
@@ -1148,6 +1633,11 @@ compiler."
prev=vinfo
continue
;;
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
@@ -1196,6 +1686,11 @@ compiler."
continue
;;
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
# Some other compiler flag.
-* | +*)
# Unknown arguments in both finalize_command and compile_command need
@@ -1208,29 +1703,101 @@ compiler."
esac
;;
- *.lo | *.$objext)
- # A library or standard object.
- if test "$prev" = dlfiles; then
- # This file was specified with -dlopen.
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $arg"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
- prev=
- else
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
case $arg in
- *.lo) libobjs="$libobjs $arg" ;;
- *) objs="$objs $arg" ;;
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
fi
;;
@@ -1281,7 +1848,7 @@ compiler."
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@@ -1290,6 +1857,7 @@ compiler."
finalize_command="$finalize_command $arg"
fi
+ oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
@@ -1310,11 +1878,11 @@ compiler."
output_objdir="$output_objdir/$objdir"
fi
# Create the object directory.
- if test ! -d $output_objdir; then
+ if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
+ if test "$status" -ne 0 && test ! -d "$output_objdir"; then
exit $status
fi
fi
@@ -1324,7 +1892,7 @@ compiler."
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
@@ -1332,16 +1900,47 @@ compiler."
*) linkmode=prog ;; # Anything else should be a program.
esac
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ duplicate_compiler_generated_deps=yes
+ ;;
+ *)
+ duplicate_compiler_generated_deps=$duplicate_deps
+ ;;
+ esac
specialdeplibs=
+
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
libs="$libs $deplib"
done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
deplibs=
newdependency_libs=
newlib_search_path=
@@ -1356,7 +1955,7 @@ compiler."
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
done
@@ -1373,39 +1972,59 @@ compiler."
;;
esac
for pass in $passes; do
- if test $linkmode = prog; then
- # Determine which files to process
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
case $pass in
- dlopen)
- libs="$dlfiles"
- save_deplibs="$deplibs" # Collect dlpreopened libraries
- deplibs=
- ;;
+ dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
for deplib in $libs; do
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
- if test $linkmode = oldlib && test $linkmode = obj; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- # Search the libtool library
- lib="$searchdir/lib${name}.la"
- if test -f "$lib"; then
- found=yes
- break
- fi
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
done
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
@@ -1414,40 +2033,76 @@ compiler."
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if (${SED} -e '2q' $lib |
+ grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ library_names=
+ old_library=
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
fi
;; # -l
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
- test $pass = conv && continue
+ test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
prog)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
- if test $pass = scan; then
+ if test "$pass" = scan; then
deplibs="$deplib $deplibs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
*)
- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+ $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
;;
esac # linkmode
continue
;; # -L
-R*)
- if test $pass = link; then
+ if test "$pass" = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
@@ -1460,28 +2115,45 @@ compiler."
;;
*.la) lib="$deplib" ;;
*.$libext)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
case $linkmode in
lib)
- if test "$deplibs_check_method" != pass_all; then
- echo
- echo "*** Warning: This library needs some functionality provided by $deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ if eval $echo \"$deplib\" 2>/dev/null \
+ | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $echo
+ $echo "*** Warning: Trying to link with static lib archive $deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because the file extensions .$libext of this argument makes me believe"
+ $echo "*** that it is just a static archive that I should not used here."
else
- echo
- echo "*** Warning: Linking the shared library $output against the"
- echo "*** static library $deplib is not portable!"
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the"
+ $echo "*** static library $deplib is not portable!"
deplibs="$deplib $deplibs"
fi
continue
;;
prog)
- if test $pass != link; then
+ if test "$pass" != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -1492,14 +2164,18 @@ compiler."
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
fi
continue
;;
@@ -1508,17 +2184,17 @@ compiler."
continue
;;
esac # case $deplib
- if test $found = yes || test -f "$lib"; then :
+ if test "$found" = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Check to see that this really is a libtool archive.
- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
@@ -1531,8 +2207,9 @@ compiler."
library_names=
old_library=
# If the library was installed with an old release of libtool,
- # it will not redefine variable installed.
+ # it will not redefine variables installed, or shouldnotlink
installed=yes
+ shouldnotlink=no
# Read the .la file
case $lib in
@@ -1542,19 +2219,18 @@ compiler."
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
- { test $linkmode = oldlib && test $linkmode = obj; }; then
- # Add dl[pre]opened files of deplib
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
- if test $pass = conv; then
+ if test "$pass" = conv; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
@@ -1562,18 +2238,21 @@ compiler."
tmp_libs=
for deplib in $dependency_libs; do
deplibs="$deplib $deplibs"
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
tmp_libs="$tmp_libs $deplib"
done
- elif test $linkmode != prog && test $linkmode != lib; then
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
continue
fi # $pass = conv
+
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
@@ -1581,19 +2260,23 @@ compiler."
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# This library was specified with -dlopen.
- if test $pass = dlopen; then
+ if test "$pass" = dlopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload.
- dlprefiles="$dlprefiles $lib"
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
else
newdlfiles="$newdlfiles $lib"
fi
@@ -1626,18 +2309,25 @@ compiler."
absdir="$libdir"
fi
else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
- if test $pass = dlpreopen; then
+ if test "$pass" = dlpreopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
@@ -1653,18 +2343,19 @@ compiler."
if test -z "$libdir"; then
# Link the convenience library
- if test $linkmode = lib; then
+ if test "$linkmode" = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
- deplibs="$lib $deplibs"
+ deplibs="$lib $deplibs" # used for prog,scan pass
fi
continue
fi
- if test $linkmode = prog && test $pass != link; then
+
+ if test "$linkmode" = prog && test "$pass" != link; then
newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs"
@@ -1680,28 +2371,36 @@ compiler."
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
# Need to link against all dependency_libs?
- if test $linkalldeplibs = yes; then
+ if test "$linkalldeplibs" = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
tmp_libs="$tmp_libs $deplib"
done # for deplib
continue
fi # $linkmode = prog...
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # Link against this shared library
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
- if test "$linkmode,$pass" = "prog,link" ||
- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -1723,17 +2422,6 @@ compiler."
esac
;;
esac
- if test $linkmode = prog; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
- fi
fi # $linkmode,$pass = prog,link...
if test "$alldeplibs" = yes &&
@@ -1743,11 +2431,52 @@ compiler."
# We only need to search for static libraries
continue
fi
+ fi
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
fi
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on
+ # some systems (darwin)
+ if test "$shouldnotlink" = yes && test "$pass" = link ; then
+ $echo
+ if test "$linkmode" = prog; then
+ $echo "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $echo "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $echo "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
@@ -1761,7 +2490,7 @@ compiler."
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin*)
+ *cygwin* | mingw*)
major=`expr $current - $age`
versuffix="-$major"
;;
@@ -1773,17 +2502,18 @@ compiler."
# Make a new name for the extract_expsyms_cmds to use
soroot="$soname"
- soname=`echo $soroot | sed -e 's/^.*\///'`
- newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+ soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+ newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
$show "extracting exported symbol list from \`$soname'"
save_ifs="$IFS"; IFS='~'
- eval cmds=\"$extract_expsyms_cmds\"
+ cmds=$extract_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -1794,9 +2524,10 @@ compiler."
if test -f "$output_objdir/$newlib"; then :; else
$show "generating import library for \`$soname'"
save_ifs="$IFS"; IFS='~'
- eval cmds=\"$old_archive_from_expsyms_cmds\"
+ cmds=$old_archive_from_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -1805,9 +2536,9 @@ compiler."
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
- fi # test -n $old_archive_from_expsyms_cmds
+ fi # test -n "$old_archive_from_expsyms_cmds"
- if test $linkmode = prog || test "$mode" != relink; then
+ if test "$linkmode" = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
@@ -1816,6 +2547,22 @@ compiler."
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a module then we can not link against
+ # it, someone is ignoring the new warnings I added
+ if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ $echo "** Warning, lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $echo
+ $echo "** And there doesn't seem to be a static archive available"
+ $echo "** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
elif test "$hardcode_minus_L" = no; then
case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
@@ -1834,6 +2581,14 @@ compiler."
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
@@ -1847,7 +2602,7 @@ compiler."
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
+ exit $EXIT_FAILURE
fi
if test -n "$add_shlibpath"; then
@@ -1856,7 +2611,7 @@ compiler."
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
@@ -1873,7 +2628,7 @@ compiler."
fi
fi
- if test $linkmode = prog || test "$mode" = relink; then
+ if test "$linkmode" = prog || test "$mode" = relink; then
add_shlibpath=
add_dir=
add=
@@ -1889,13 +2644,28 @@ compiler."
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
else
# We cannot seem to hardcode it, guess we'll fake it.
add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
@@ -1903,16 +2673,7 @@ compiler."
test -n "$add" && deplibs="$add $deplibs"
fi
fi
- elif test $linkmode = prog; then
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
-
- # Try to link the static library
+ elif test "$linkmode" = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
@@ -1932,20 +2693,21 @@ compiler."
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- echo
- echo "*** Warning: This library needs some functionality provided by $lib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ $echo
+ $echo "*** Warning: This system can not link to static lib archive $lib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then
- echo "*** Therefore, libtool will create a static module, that should work "
- echo "*** as long as the dlopening application is linked with the -dlopen flag."
+ $echo "*** But as you try to build a module library, libtool will still create "
+ $echo "*** a static module, that should work as long as the dlopening application"
+ $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
build_libtool_libs=module
@@ -1962,10 +2724,11 @@ compiler."
fi
fi # link shared/static library?
- if test $linkmode = lib; then
+ if test "$linkmode" = lib; then
if test -n "$dependency_libs" &&
- { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
- test $link_static = yes; }; then
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
@@ -1988,13 +2751,15 @@ compiler."
tmp_libs=
for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs"
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if test "X$duplicate_deps" = "Xyes" ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
tmp_libs="$tmp_libs $deplib"
done
- if test $link_all_deplibs != no; then
+ if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
case $deplib in
@@ -2014,22 +2779,67 @@ compiler."
;;
esac
if grep "^installed=no" $deplib > /dev/null; then
- path="-L$absdir/$objdir"
+ path="$absdir/$objdir"
else
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
fi
- path="-L$absdir"
+ path="$absdir"
fi
+ depdepl=
+ case $host in
+ *-*-darwin*)
+ # we do not want to link against static libs,
+ # but need to link against shared
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$path/$depdepl" ; then
+ depdepl="$path/$depdepl"
+ fi
+ # do not add paths which are already there
+ case " $newlib_search_path " in
+ *" $path "*) ;;
+ *) newlib_search_path="$newlib_search_path $path";;
+ esac
+ fi
+ path=""
+ ;;
+ *)
+ path="-L$path"
+ ;;
+ esac
+ ;;
+ -l*)
+ case $host in
+ *-*-darwin*)
+ # Again, we only want to link against shared libraries
+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+ for tmp in $newlib_search_path ; do
+ if test -f "$tmp/lib$tmp_libs.dylib" ; then
+ eval depdepl="$tmp/lib$tmp_libs.dylib"
+ break
+ fi
+ done
+ path=""
+ ;;
+ *) continue ;;
+ esac
;;
*) continue ;;
esac
case " $deplibs " in
+ *" $depdepl "*) ;;
+ *) deplibs="$depdepl $deplibs" ;;
+ esac
+ case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
esac
@@ -2037,15 +2847,15 @@ compiler."
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
- if test $pass = dlpreopen; then
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
- if test $pass != dlopen; then
- test $pass != scan && dependency_libs="$newdependency_libs"
- if test $pass != conv; then
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
@@ -2067,9 +2877,30 @@ compiler."
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
*)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
@@ -2097,19 +2928,32 @@ compiler."
eval $var=\"$tmp_libs\"
done # for var
fi
- if test "$pass" = "conv" &&
- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
- libs="$deplibs" # reset libs
- deplibs=
- fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
done # for pass
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
@@ -2123,7 +2967,7 @@ compiler."
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
fi
if test -n "$release"; then
@@ -2145,17 +2989,19 @@ compiler."
case $outputname in
lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
;;
*)
if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
else
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -2166,11 +3012,11 @@ compiler."
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit 1
+ exit $EXIT_FAILURE
else
- echo
- echo "*** Warning: Linking the shared library $output against the non-libtool"
- echo "*** objects $objs is not portable!"
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the non-libtool"
+ $echo "*** objects $objs is not portable!"
libobjs="$libobjs $objs"
fi
fi
@@ -2180,7 +3026,7 @@ compiler."
fi
set dummy $rpath
- if test $# -gt 2; then
+ if test "$#" -gt 2; then
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
fi
install_libdir="$2"
@@ -2189,14 +3035,16 @@ compiler."
if test -z "$rpath"; then
if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
- libext=al
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
fi
if test -n "$release"; then
@@ -2212,12 +3060,49 @@ compiler."
if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
- current="$2"
- revision="$3"
- age="$4"
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$2"
+ number_minor="$3"
+ number_revision="$4"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ esac
+ ;;
+ no)
+ current="$2"
+ revision="$3"
+ age="$4"
+ ;;
+ esac
# Check that each of the things are valid numbers.
case $current in
@@ -2225,7 +3110,7 @@ compiler."
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -2234,7 +3119,7 @@ compiler."
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -2243,14 +3128,14 @@ compiler."
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
- if test $age -gt $current; then
+ if test "$age" -gt "$current"; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Calculate the version variables.
@@ -2267,7 +3152,7 @@ compiler."
versuffix="$major.$age.$revision"
# Darwin ld doesn't like 0 for these options...
minor_current=`expr $current + 1`
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
;;
freebsd-aout)
@@ -2280,16 +3165,21 @@ compiler."
versuffix=".$current";
;;
- irix)
+ irix | nonstopux)
major=`expr $current - $age + 1`
- verstring="sgi$major.$revision"
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
# Add in all the interfaces that we are compatible with.
loop=$revision
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $revision - $loop`
loop=`expr $loop - 1`
- verstring="sgi$major.$iface:$verstring"
+ verstring="$verstring_prefix$major.$iface:$verstring"
done
# Before this point, $major must not contain `.'.
@@ -2303,13 +3193,13 @@ compiler."
;;
osf)
- major=`expr $current - $age`
+ major=.`expr $current - $age`
versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $current - $loop`
loop=`expr $loop - 1`
verstring="$verstring:${iface}.0"
@@ -2333,20 +3223,19 @@ compiler."
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
;;
esac
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
- verstring="0.0"
case $version_type in
darwin)
# we can't check for "0.0" in archive_cmds due to quoting
# problems, so we reset it completely
- verstring=""
+ verstring=
;;
*)
verstring="0.0"
@@ -2380,9 +3269,30 @@ compiler."
fi
if test "$mode" != relink; then
- # Remove our outputs.
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$echo "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ if test -n "$removelist"; then
+ $show "${rm}r $removelist"
+ $run ${rm}r $removelist
+ fi
fi
# Now set the variables for building old libraries.
@@ -2395,9 +3305,9 @@ compiler."
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
- deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
- dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+ deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
done
if test -n "$xrpath"; then
@@ -2410,7 +3320,7 @@ compiler."
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
@@ -2448,19 +3358,13 @@ compiler."
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *-*-openbsd*)
+ *-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
;;
- #### Local change for Sleepycat's Berkeley DB [#2380]:
- # FreeBSD, like OpenBSD, uses libc/libc_r and should not
- # link against libc/c_r explicitly; the -pthread linker flag
- # implicitly controls use of -lc and -lc_r.
- *-*-freebsd*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *)
+ *)
# Add libc to deplibs on all other systems if necessary.
- if test $build_libtool_need_lc = "yes"; then
+ if test "$build_libtool_need_lc" = "yes"; then
deplibs="$deplibs -lc"
fi
;;
@@ -2487,7 +3391,7 @@ compiler."
# This might be a little naive. We might want to check
# whether the library exists or not. But this is on
# osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behaviour.
+ # implementing what was already the behavior.
newdeplibs=$deplibs
;;
test_compile)
@@ -2500,64 +3404,88 @@ compiler."
int main() { return 0; }
EOF
$rm conftest
- $CC -o conftest conftest.c $deplibs
- if test $? -eq 0 ; then
+ $LTCC -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ if test "$name" != "" && test "$name" -ne "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which I believe you do not have"
+ $echo "*** because a test_compile did reveal that the linker did not use it for"
+ $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
fi
else
newdeplibs="$newdeplibs $i"
fi
done
else
- # Error occured in the first compile. Let's try to salvage the situation:
- # Compile a seperate program for each library.
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $CC -o conftest conftest.c $i
+ $LTCC -o conftest conftest.c $i
# Did it work?
- if test $? -eq 0 ; then
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because a test_compile did reveal that the linker did not use this one"
+ $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
fi
else
droppeddeps=yes
- echo
- echo "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
+ $echo
+ $echo "*** Warning! Library $i is needed by this library but I was not able to"
+ $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** library that it depends on before this library will be fully"
+ $echo "*** functional. Installing it before continuing would be even better."
fi
else
newdeplibs="$newdeplibs $i"
@@ -2571,11 +3499,20 @@ EOF
for a_deplib in $deplibs; do
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
+ if test "$name" != "" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
# Follow soft links.
if ls -lLd "$potent_lib" 2>/dev/null \
| grep " -> " >/dev/null; then
@@ -2588,28 +3525,36 @@ EOF
# but so what?
potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
- | sed 10q \
- | egrep "$file_magic_regex" > /dev/null; then
+ | ${SED} 10q \
+ | $EGREP "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
- done
- done
+ done
+ done
+ fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $echo "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a file magic. Last file checked: $potlib"
+ fi
fi
else
# Add a -L argument.
@@ -2624,26 +3569,44 @@ EOF
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- if eval echo \"$potent_lib\" 2>/dev/null \
- | sed 10q \
- | egrep "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval $echo \"$potent_lib\" 2>/dev/null \
+ | ${SED} 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
done
- done
+ fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a regex pattern. Last file checked: $potlib"
+ fi
fi
else
# Add a -L argument.
@@ -2653,16 +3616,23 @@ EOF
;;
none | unknown | *)
newdeplibs=""
- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
- grep . >/dev/null; then
- echo
+ tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+ done
+ fi
+ if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
+ | grep . >/dev/null; then
+ $echo
if test "X$deplibs_check_method" = "Xnone"; then
- echo "*** Warning: inter-library dependencies are not supported in this platform."
+ $echo "*** Warning: inter-library dependencies are not supported in this platform."
else
- echo "*** Warning: inter-library dependencies are not known to be supported."
+ $echo "*** Warning: inter-library dependencies are not known to be supported."
fi
- echo "*** All declared inter-library dependencies are being dropped."
+ $echo "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
fi
;;
@@ -2682,17 +3652,17 @@ EOF
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
- echo
- echo "*** Warning: libtool could not satisfy all declared inter-library"
- echo "*** dependencies of module $libname. Therefore, libtool will create"
- echo "*** a static module, that should work as long as the dlopening"
- echo "*** application is linked with the -dlopen flag."
+ $echo
+ $echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $echo "*** dependencies of module $libname. Therefore, libtool will create"
+ $echo "*** a static module, that should work as long as the dlopening"
+ $echo "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
@@ -2702,16 +3672,16 @@ EOF
build_libtool_libs=no
fi
else
- echo "*** The inter-library dependencies that have been dropped here will be"
- echo "*** automatically added whenever a program is linked with this library"
- echo "*** or is declared to -dlopen it."
-
- if test $allow_undefined = no; then
- echo
- echo "*** Since this library must not contain undefined symbols,"
- echo "*** because either the platform does not support them or"
- echo "*** it was explicitly requested with -no-undefined,"
- echo "*** libtool will only create a static version of it."
+ $echo "*** The inter-library dependencies that have been dropped here will be"
+ $echo "*** automatically added whenever a program is linked with this library"
+ $echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $echo
+ $echo "*** Since this library must not contain undefined symbols,"
+ $echo "*** because either the platform does not support them or"
+ $echo "*** it was explicitly requested with -no-undefined,"
+ $echo "*** libtool will only create a static version of it."
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
@@ -2733,7 +3703,7 @@ EOF
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
- if test $hardcode_into_libs = yes; then
+ if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
@@ -2769,7 +3739,11 @@ EOF
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
@@ -2789,6 +3763,7 @@ EOF
fi
# Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
@@ -2799,7 +3774,9 @@ EOF
else
soname="$realname"
fi
- test -z "$dlname" && dlname=$soname
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
lib="$output_objdir/$realname"
for link
@@ -2807,23 +3784,6 @@ EOF
linknames="$linknames $link"
done
- # Ensure that we have .o objects for linkers which dislike .lo
- # (e.g. aix) in case we are running --disable-static
- for obj in $libobjs; do
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- if test ! -f $xdir/$oldobj; then
- $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
- $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
- fi
- done
-
# Use standard objects if they are pic
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
@@ -2833,17 +3793,26 @@ EOF
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
- eval cmds=\"$export_symbols_cmds\"
+ cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ eval cmd=\"$cmd\"
+ if len=`expr "X$cmd" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ $show "using reloadable object file for export list..."
+ skipped_export=:
+ fi
done
IFS="$save_ifs"
if test -n "$export_symbols_regex"; then
- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
$run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
@@ -2854,46 +3823,30 @@ EOF
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
fi
fi
-
+
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
linker_flags="$linker_flags $flag"
@@ -2905,14 +3858,147 @@ EOF
fi
# Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval cmds=\"$archive_expsym_cmds\"
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
else
- eval cmds=\"$archive_cmds\"
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise.
+ $echo "creating reloadable object files..."
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ delfiles=
+ last_robj=
+ k=1
+ output=$output_objdir/$save_output-${k}.$objext
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+ if test "X$objlist" = X ||
+ { len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; }; then
+ objlist="$objlist $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+ fi
+ last_robj=$output_objdir/$save_output-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$save_output-${k}.$objext
+ objlist=$obj
+ len=1
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+ if ${skipped_export-false}; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+ fi
+
+ # Set up a command to remove the reloadale object files
+ # after they are used.
+ i=0
+ while test "$i" -lt "$k"
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ done
+
+ $echo "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+
+ # Append the command to remove the reloadable object files
+ # to the just-reset $cmds.
+ eval cmds=\"\$cmds~\$rm $delfiles\"
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -2921,7 +4007,7 @@ EOF
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
- exit 0
+ exit $EXIT_SUCCESS
fi
# Create links to the real library.
@@ -2969,7 +4055,7 @@ EOF
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
@@ -2998,38 +4084,10 @@ EOF
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${obj}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
@@ -3037,10 +4095,11 @@ EOF
reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
- eval cmds=\"$reload_cmds\"
+ cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -3053,7 +4112,7 @@ EOF
$run ${rm}r $gentop
fi
- exit 0
+ exit $EXIT_SUCCESS
fi
if test "$build_libtool_libs" != yes; then
@@ -3064,37 +4123,24 @@ EOF
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ # $show "echo timestamp > $libobj"
+ # $run eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
- eval cmds=\"$reload_cmds\"
+ cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
- else
- # Just create a symlink.
- $show $rm $libobj
- $run $rm $libobj
- xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$libobj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- $show "(cd $xdir && $LN_S $oldobj $baseobj)"
- $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
fi
if test -n "$gentop"; then
@@ -3102,12 +4148,12 @@ EOF
$run ${rm}r $gentop
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
prog)
case $host in
- *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+ *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@@ -3132,6 +4178,16 @@ EOF
;;
esac
+ case $host in
+ *darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ if test "$tagname" = CXX ; then
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ fi
+ ;;
+ esac
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -3282,12 +4338,12 @@ extern \"C\" {
done
if test -n "$exclude_expsyms"; then
- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
if test -n "$export_symbols_regex"; then
- $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
@@ -3295,9 +4351,9 @@ extern \"C\" {
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$output.exp"
$run $rm $export_symbols
- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else
- $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
fi
@@ -3305,8 +4361,8 @@ extern \"C\" {
for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'"
- name=`echo "$arg" | sed -e 's%^.*/%%'`
- $run eval 'echo ": $name " >> "$nlist"'
+ name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+ $run eval '$echo ": $name " >> "$nlist"'
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
@@ -3315,12 +4371,18 @@ extern \"C\" {
test -f "$nlist" || : > "$nlist"
if test -n "$exclude_expsyms"; then
- egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
$mv "$nlist"T "$nlist"
fi
# Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ if grep -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
:
else
grep -v "^: " < "$nlist" > "$nlist"S
@@ -3329,7 +4391,7 @@ extern \"C\" {
if test -f "$nlist"S; then
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
else
- echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ $echo '/* NONE */' >> "$output_objdir/$dlsyms"
fi
$echo >> "$output_objdir/$dlsyms" "\
@@ -3381,18 +4443,18 @@ static const void *lt_preloaded_setup() {
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in
*" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
esac;;
*-*-hpux*)
case "$compile_command " in
*" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ *) pic_flag_for_symtable=" $pic_flag";;
esac
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
@@ -3404,7 +4466,7 @@ static const void *lt_preloaded_setup() {
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
else
@@ -3417,7 +4479,7 @@ static const void *lt_preloaded_setup() {
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
- if test $need_relink = no || test "$build_libtool_libs" != yes; then
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
@@ -3492,7 +4554,7 @@ static const void *lt_preloaded_setup() {
# Link the executable and exit
$show "$link_command"
$run eval "$link_command" || exit $?
- exit 0
+ exit $EXIT_SUCCESS
fi
if test "$hardcode_action" = relink; then
@@ -3542,15 +4604,15 @@ static const void *lt_preloaded_setup() {
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done
- relink_command="cd `pwd`; $relink_command"
+ relink_command="(cd `pwd`; $relink_command)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
# Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
- case $0 in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
- *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
@@ -3562,15 +4624,230 @@ static const void *lt_preloaded_setup() {
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
- *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*) exeext=.exe ;;
+ *cygwin*)
+ exeext=.exe
+ outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
*) exeext= ;;
esac
+ case $host in
+ *cygwin* | *mingw* )
+ cwrappersource=`$echo ${objdir}/lt-${output}.c`
+ cwrapper=`$echo ${output}.exe`
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "/bin/sh $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int i;
+
+ program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ newargz = XMALLOC(char *, argc+2);
+EOF
+
+ cat >> $cwrappersource <<EOF
+ newargz[0] = "$SHELL";
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = fnqualify(argv[0]);
+ /* we know the script has the same name, without the .exe */
+ /* so make sure newargz[1] doesn't end in .exe */
+ strendzap(newargz[1],".exe");
+ for (i = 1; i < argc; i++)
+ newargz[i+1] = xstrdup(argv[i]);
+ newargz[argc+1] = NULL;
+EOF
+
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",newargz);
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void * p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha (name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+ size_t size;
+ char *p;
+ char tmp[LT_PATHMAX + 1];
+
+ assert(path != NULL);
+
+ /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha (path[0]) && path[1] == ':')
+ return xstrdup (path);
+#endif
+ if (IS_DIR_SEPARATOR (path[0]))
+ return xstrdup (path);
+
+ /* prepend the current directory */
+ /* doesn't handle '~' */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+ p = XMALLOC(char, size);
+ sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+ return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert(str != NULL);
+ assert(pat != NULL);
+
+ len = strlen(str);
+ patlen = strlen(pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp(str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+ const char * message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC -s -o $cwrapper $cwrappersource
+ ;;
+ esac
$rm $output
- trap "$rm $output; exit 1" 1 2 15
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -3586,12 +4863,12 @@ static const void *lt_preloaded_setup() {
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
+Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
@@ -3624,7 +4901,7 @@ else
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
while test -n \"\$file\"; do
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
@@ -3637,7 +4914,7 @@ else
fi
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
done
# Try to get the absolute directory name.
@@ -3646,12 +4923,12 @@ else
"
if test "$fast_install" = yes; then
- echo >> $output "\
+ $echo >> $output "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
@@ -3662,7 +4939,7 @@ else
$rm \"\$progdir/\$file\"
fi"
- echo >> $output "\
+ $echo >> $output "\
# relink executable if necessary
if test -n \"\$relink_command\"; then
@@ -3670,7 +4947,7 @@ else
else
$echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\"
- exit 1
+ exit $EXIT_FAILURE
fi
fi
@@ -3680,13 +4957,13 @@ else
$rm \"\$progdir/\$file\"
fi"
else
- echo >> $output "\
+ $echo >> $output "\
program='$outputname'
progdir=\"\$thisdir/$objdir\"
"
fi
- echo >> $output "\
+ $echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
@@ -3717,14 +4994,6 @@ else
# Run the actual program with our arguments.
"
case $host in
- # win32 systems need to use the prog path for dll
- # lookup to work
- *-*-cygwin* | *-*-pw32*)
- $echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
-"
- ;;
-
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
@@ -3734,30 +5003,26 @@ else
*)
$echo >> $output "\
- # Export the path to the program.
- PATH=\"\$progdir:\$PATH\"
- export PATH
-
- exec \$program \${1+\"\$@\"}
+ exec \$progdir/\$program \${1+\"\$@\"}
"
;;
esac
$echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- exit 1
+ exit $EXIT_FAILURE
fi
else
# The program doesn't exist.
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
- echo \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit $EXIT_FAILURE
fi
fi\
"
chmod +x $output
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
esac
@@ -3773,74 +5038,86 @@ fi\
oldobjs="$libobjs_save"
build_libtool_libs=no
else
- oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ oldobjs="$old_deplibs $non_pic_objects"
fi
addlibs="$old_convenience"
fi
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- # Add in members from convenience archives.
- for xlib in $addlibs; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- eval cmds=\"$old_archive_from_new_cmds\"
+ cmds=$old_archive_from_new_cmds
else
- # Ensure that we have .o objects in place in case we decided
- # not to build a shared library, and have fallen back to building
- # static libs even though --disable-static was passed!
- for oldobj in $oldobjs; do
- if test ! -f $oldobj; then
- xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$oldobj"; then
- xdir="."
+ eval cmds=\"$old_archive_cmds\"
+
+ if len=`expr "X$cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ $echo "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+ # encoded into archives. This makes 'ar r' malfunction in
+ # this piecewise linking case whenever conflicting object
+ # names appear in distinct ar calls; check, warn and compensate.
+ if (for obj in $save_oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+ $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+ AR_FLAGS=cq
+ fi
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ for obj in $save_oldobjs
+ do
+ oldobjs="$objlist $obj"
+ objlist="$objlist $obj"
+ eval test_cmds=\"$old_archive_cmds\"
+ if len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; then
+ :
else
- xdir="$xdir"
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
fi
- baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
- obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- $show "(cd $xdir && ${LN_S} $obj $baseobj)"
- $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
fi
- done
-
- eval cmds=\"$old_archive_cmds\"
+ fi
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
+ eval cmd=\"$cmd\"
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
@@ -3872,8 +5149,12 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
# Only create the output if not a dry run.
if test -z "$run"; then
@@ -3889,10 +5170,10 @@ fi\
case $deplib in
*.la)
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdependency_libs="$newdependency_libs $libdir/$name"
;;
@@ -3903,10 +5184,10 @@ fi\
newdlfiles=
for lib in $dlfiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdlfiles="$newdlfiles $libdir/$name"
done
@@ -3914,20 +5195,39 @@ fi\
newdlprefiles=
for lib in $dlprefiles; do
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdlprefiles="$newdlprefiles $libdir/$name"
done
dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
fi
$rm $output
# place dlname in correct position for cygwin
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
$echo > $output "\
# $outputname - a libtool library file
@@ -3956,13 +5256,16 @@ revision=$revision
# Is this an already installed library?
installed=$installed
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test $need_relink = yes; then
+ if test "$installed" = no && test "$need_relink" = yes; then
$echo >> $output "\
relink_command=\"$relink_command\""
fi
@@ -3975,7 +5278,7 @@ relink_command=\"$relink_command\""
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
- exit 0
+ exit $EXIT_SUCCESS
;;
# libtool install mode
@@ -4064,13 +5367,13 @@ relink_command=\"$relink_command\""
if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test -z "$files"; then
@@ -4080,7 +5383,7 @@ relink_command=\"$relink_command\""
$echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Strip any trailing slash from the destination.
@@ -4098,10 +5401,10 @@ relink_command=\"$relink_command\""
# Not a directory, so check to see that there is only one file specified.
set dummy $files
- if test $# -gt 2; then
+ if test "$#" -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
fi
case $destdir in
@@ -4113,7 +5416,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
done
@@ -4138,11 +5441,11 @@ relink_command=\"$relink_command\""
*.la)
# Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
library_names=
@@ -4173,12 +5476,33 @@ relink_command=\"$relink_command\""
dir="$dir$objdir"
if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ if test "$inst_prefix_dir" = "$destdir"; then
+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
$echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
+ exit $EXIT_FAILURE
fi
fi
@@ -4200,7 +5524,7 @@ relink_command=\"$relink_command\""
$run eval "$striplib $destdir/$realname" || exit $?
fi
- if test $# -gt 0; then
+ if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
for linkname
do
@@ -4213,10 +5537,11 @@ relink_command=\"$relink_command\""
# Do each command in the postinstall commands.
lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
+ cmds=$postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -4256,7 +5581,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -4274,7 +5599,7 @@ relink_command=\"$relink_command\""
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
*)
@@ -4286,21 +5611,49 @@ relink_command=\"$relink_command\""
destfile="$destdir/$destfile"
fi
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
# Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ case $host in
+ *cygwin*|*mingw*)
+ wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
notinst_deplibs=
relink_command=
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
# If there is no directory component, then add one.
case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
esac
# Check the variables that should have been set.
if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
- exit 1
+ $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+ exit $EXIT_FAILURE
fi
finalize=yes
@@ -4322,10 +5675,17 @@ relink_command=\"$relink_command\""
done
relink_command=
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
# If there is no directory component, then add one.
case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
esac
outputname=
@@ -4334,12 +5694,16 @@ relink_command=\"$relink_command\""
tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$"
- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ save_umask=`umask`
+ umask 0077
+ if $mkdir "$tmpdir"; then
+ umask $save_umask
else
+ umask $save_umask
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
continue
fi
- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
@@ -4357,14 +5721,14 @@ relink_command=\"$relink_command\""
fi
else
# Install the binary that we compiled earlier.
- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
fi
fi
# remove .exe since cygwin /usr/bin/install will append another
# one anyways
case $install_prog,$host in
- /usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -4373,7 +5737,7 @@ relink_command=\"$relink_command\""
destfile=$destfile.exe
;;
*:*.exe)
- destfile=`echo $destfile | sed -e 's,.exe$,,'`
+ destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
;;
esac
;;
@@ -4394,16 +5758,17 @@ relink_command=\"$relink_command\""
$show "$install_prog $file $oldlib"
$run eval "$install_prog \$file \$oldlib" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
+ if test -n "$stripme" && test -n "$old_striplib"; then
$show "$old_striplib $oldlib"
$run eval "$old_striplib $oldlib" || exit $?
fi
# Do each command in the postinstall commands.
- eval cmds=\"$old_postinstall_cmds\"
+ cmds=$old_postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -4417,9 +5782,9 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else
- exit 0
+ exit $EXIT_SUCCESS
fi
;;
@@ -4438,10 +5803,11 @@ relink_command=\"$relink_command\""
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
- eval cmds=\"$finish_cmds\"
+ cmds=$finish_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || admincmds="$admincmds
$cmd"
@@ -4458,43 +5824,43 @@ relink_command=\"$relink_command\""
fi
# Exit here if they wanted silent mode.
- test "$show" = ":" && exit 0
+ test "$show" = : && exit $EXIT_SUCCESS
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
+ $echo "----------------------------------------------------------------------"
+ $echo "Libraries have been installed in:"
for libdir in $libdirs; do
- echo " $libdir"
+ $echo " $libdir"
done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
+ $echo
+ $echo "If you ever happen to want to link against installed libraries"
+ $echo "in a given directory, LIBDIR, you must either use libtool, and"
+ $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
+ $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $echo " during execution"
fi
if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
+ $echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ $echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
- echo " - use the \`$flag' linker flag"
+ $echo " - use the \`$flag' linker flag"
fi
if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
+ $echo " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
- exit 0
+ $echo
+ $echo "See any operating system documentation about shared libraries for"
+ $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ $echo "----------------------------------------------------------------------"
+ exit $EXIT_SUCCESS
;;
# libtool execute mode
@@ -4506,7 +5872,7 @@ relink_command=\"$relink_command\""
if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help"
- exit 1
+ exit $EXIT_FAILURE
fi
# Handle -dlopen flags immediately.
@@ -4514,18 +5880,18 @@ relink_command=\"$relink_command\""
if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
dir=
case $file in
*.la)
# Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Read the libtool library.
@@ -4552,7 +5918,7 @@ relink_command=\"$relink_command\""
dir="$dir/$objdir"
else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
;;
@@ -4592,7 +5958,7 @@ relink_command=\"$relink_command\""
-*) ;;
*)
# Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
@@ -4615,7 +5981,7 @@ relink_command=\"$relink_command\""
eval "export $shlibpath_var"
fi
- # Restore saved enviroment variables
+ # Restore saved environment variables
if test "${save_LC_ALL+set}" = set; then
LC_ALL="$save_LC_ALL"; export LC_ALL
fi
@@ -4624,7 +5990,7 @@ relink_command=\"$relink_command\""
fi
# Now prepare to actually exec the command.
- exec_cmd='"$cmd"$args'
+ exec_cmd="\$cmd$args"
else
# Display what would be done.
if test -n "$shlibpath_var"; then
@@ -4632,7 +5998,7 @@ relink_command=\"$relink_command\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
- exit 0
+ exit $EXIT_SUCCESS
fi
;;
@@ -4660,24 +6026,25 @@ relink_command=\"$relink_command\""
if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
rmdirs=
+ origobjdir="$objdir"
for file in $files; do
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
if test "X$dir" = "X$file"; then
dir=.
- objdir="$objdir"
+ objdir="$origobjdir"
else
- objdir="$dir/$objdir"
+ objdir="$dir/$origobjdir"
fi
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test $mode = uninstall && objdir="$dir"
+ test "$mode" = uninstall && objdir="$dir"
# Remember objdir for removal later, being careful to avoid duplicates
- if test $mode = clean; then
+ if test "$mode" = clean; then
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
@@ -4701,7 +6068,7 @@ relink_command=\"$relink_command\""
case $name in
*.la)
# Possibly a libtool archive, so verify it.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
. $dir/$name
# Delete the libtool libraries and symlinks.
@@ -4709,18 +6076,19 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test $mode = uninstall; then
+ if test "$mode" = uninstall; then
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- eval cmds=\"$postuninstall_cmds\"
+ cmds=$postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
@@ -4729,13 +6097,14 @@ relink_command=\"$relink_command\""
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- eval cmds=\"$old_postuninstall_cmds\"
+ cmds=$old_postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
@@ -4747,22 +6116,52 @@ relink_command=\"$relink_command\""
;;
*.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
- rmfiles="$rmfiles $dir/$oldobj"
+ # Possibly a libtool object, so verify it.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+ # Read the .lo file
+ . $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" \
+ && test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" \
+ && test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
fi
;;
*)
- # Do a test to see if this is a libtool program.
- if test $mode = clean &&
- (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$file
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ noexename=`$echo $name|${SED} 's,.exe$,,'`
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$noexename
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
fi
fi
;;
@@ -4770,6 +6169,7 @@ relink_command=\"$relink_command\""
$show "$rm $rmfiles"
$run $rm $rmfiles || exit_status=1
done
+ objdir="$origobjdir"
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
@@ -4785,20 +6185,20 @@ relink_command=\"$relink_command\""
"")
$echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
if test -z "$exec_cmd"; then
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
fi # test -z "$show_help"
if test -n "$exec_cmd"; then
eval exec $exec_cmd
- exit 1
+ exit $EXIT_FAILURE
fi
# We need to display help for each of the modes.
@@ -4817,6 +6217,7 @@ Provide generalized library-building support services.
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
--quiet same as \`--silent'
--silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
--version print version information
MODE must be one of the following:
@@ -4830,8 +6231,10 @@ MODE must be one of the following:
uninstall remove libraries from an installed directory
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
- exit 0
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+ exit $EXIT_SUCCESS
;;
clean)
@@ -4937,12 +6340,14 @@ The following components of LINK-COMMAND are treated specially:
try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
- -jnimodule build a library that can dlopened via Java JNI
-module build a library that can dlopened
-no-fast-install disable the fast-install mode
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
@@ -4984,14 +6389,34 @@ Otherwise, only FILE itself is deleted using RM."
*)
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
-echo
+$echo
$echo "Try \`$modename --help' for more information about other modes."
-exit 0
+exit $EXIT_SUCCESS
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
diff --git a/storage/bdb/dist/pubdef.in b/storage/bdb/dist/pubdef.in
index f42363022cd..7f6ad2ebd69 100644
--- a/storage/bdb/dist/pubdef.in
+++ b/storage/bdb/dist/pubdef.in
@@ -1,8 +1,8 @@
# Name
# D == documentation
# I == include file
-# C == Java case value (declared and initialized)
-# J == Java constant (declared only)
+# J == Java constant
+# N == wrapped by the Java native layer
DB_AFTER D I J
DB_AGGRESSIVE D I J
DB_ALREADY_ABORTED * I *
@@ -20,7 +20,9 @@ DB_AM_DUPSORT * I *
DB_AM_ENCRYPT * I *
DB_AM_FIXEDLEN * I *
DB_AM_INMEM * I *
+DB_AM_INORDER * I *
DB_AM_IN_RENAME * I *
+DB_AM_NOT_DURABLE * I *
DB_AM_OPEN_CALLED * I *
DB_AM_PAD * I *
DB_AM_PGDEF * I *
@@ -28,6 +30,7 @@ DB_AM_RDONLY * I *
DB_AM_RECNUM * I *
DB_AM_RECOVER * I *
DB_AM_RENUMBER * I *
+DB_AM_REPLICATION * I *
DB_AM_REVSPLITOFF * I *
DB_AM_SECONDARY * I *
DB_AM_SNAPSHOT * I *
@@ -39,39 +42,42 @@ DB_APPEND D I J
DB_ARCH_ABS D I J
DB_ARCH_DATA D I J
DB_ARCH_LOG D I J
+DB_ARCH_REMOVE D I J
DB_AUTO_COMMIT D I J
DB_BEFORE D I J
-DB_BTREE D I C
+DB_BTREE D I J
DB_BTREEMAGIC * I *
DB_BTREEOLDVER * I *
DB_BTREEVERSION * I *
-DB_CACHED_COUNTS * I J
+DB_BUFFER_SMALL D I N
+DB_CACHED_COUNTS * I *
DB_CDB_ALLDB D I J
-DB_CHKSUM_SHA1 D I J
-DB_CLIENT D I J
-DB_COMMIT * I *
+DB_CHKSUM D I J
DB_CONFIG D * *
DB_CONSUME D I J
DB_CONSUME_WAIT D I J
DB_CREATE D I J
DB_CURRENT D I J
-DB_CXX_NO_EXCEPTIONS D I J
+DB_CXX_NO_EXCEPTIONS D I *
DB_DBM_HSEARCH * I *
-DB_DBT_APPMALLOC D I *
+DB_DBT_APPMALLOC D I N
DB_DBT_DUPOK * I *
DB_DBT_ISSET * I *
DB_DBT_MALLOC D I J
DB_DBT_PARTIAL D I J
-DB_DBT_REALLOC D I J
+DB_DBT_REALLOC D I N
DB_DBT_USERMEM D I J
+DB_DEGREE_2 D I J
DB_DELETED * I *
-DB_DIRECT D I J
+DB_DIRECT D I *
DB_DIRECT_DB D I J
DB_DIRECT_LOG D I J
DB_DIRTY_READ D I J
-DB_DONOTINDEX D I C
+DB_DONOTINDEX D I J
+DB_DSYNC_LOG D I J
DB_DUP D I J
DB_DUPSORT D I J
+DB_DURABLE_UNKNOWN * I *
DB_EID_BROADCAST D I J
DB_EID_INVALID D I J
DB_ENCRYPT D I J
@@ -83,8 +89,11 @@ DB_ENV_CREATE * I *
DB_ENV_DBLOCAL * I *
DB_ENV_DIRECT_DB * I *
DB_ENV_DIRECT_LOG * I *
+DB_ENV_DSYNC_LOG * I *
DB_ENV_FATAL * I *
DB_ENV_LOCKDOWN * I *
+DB_ENV_LOG_AUTOREMOVE * I *
+DB_ENV_LOG_INMEMORY * I *
DB_ENV_NOLOCKING * I *
DB_ENV_NOMMAP * I *
DB_ENV_NOPANIC * I *
@@ -92,13 +101,11 @@ DB_ENV_OPEN_CALLED * I *
DB_ENV_OVERWRITE * I *
DB_ENV_PRIVATE * I *
DB_ENV_REGION_INIT * I *
-DB_ENV_REP_CLIENT * I *
-DB_ENV_REP_LOGSONLY * I *
-DB_ENV_REP_MASTER * I *
DB_ENV_RPCCLIENT * I *
DB_ENV_RPCCLIENT_GIVEN * I *
DB_ENV_SYSTEM_MEM * I *
DB_ENV_THREAD * I *
+DB_ENV_TIME_NOTGRANTED * I *
DB_ENV_TXN_NOSYNC * I *
DB_ENV_TXN_WRITE_NOSYNC * I *
DB_ENV_YIELDCPU * I *
@@ -115,7 +122,7 @@ DB_GET_BOTHC * I *
DB_GET_BOTH_RANGE D I J
DB_GET_RECNO D I J
DB_HANDLE_LOCK * I *
-DB_HASH D I C
+DB_HASH D I J
DB_HASHMAGIC * I *
DB_HASHOLDVER * I *
DB_HASHVERSION * I *
@@ -124,24 +131,25 @@ DB_INIT_CDB D I J
DB_INIT_LOCK D I J
DB_INIT_LOG D I J
DB_INIT_MPOOL D I J
+DB_INIT_REP D I J
DB_INIT_TXN D I J
-DB_JAVA_CALLBACK * I *
+DB_INORDER D I J
DB_JOINENV D I J
DB_JOIN_ITEM D I J
DB_JOIN_NOSORT D I J
-DB_KEYEMPTY D I C
-DB_KEYEXIST D I C
+DB_KEYEMPTY D I J
+DB_KEYEXIST D I J
DB_KEYFIRST D I J
DB_KEYLAST D I J
DB_LAST D I J
DB_LOCKDOWN D I J
DB_LOCKVERSION * I *
-DB_LOCK_DEADLOCK D I C
+DB_LOCK_ABORT * I *
+DB_LOCK_DEADLOCK D I J
DB_LOCK_DEFAULT D I J
DB_LOCK_DIRTY * I *
DB_LOCK_DUMP * I *
DB_LOCK_EXPIRE D I J
-DB_LOCK_FREE_LOCKER * I *
DB_LOCK_GET D I J
DB_LOCK_GET_TIMEOUT D I J
DB_LOCK_INHERIT * I *
@@ -149,12 +157,13 @@ DB_LOCK_IREAD D I J
DB_LOCK_IWR D I J
DB_LOCK_IWRITE D I J
DB_LOCK_MAXLOCKS D I J
+DB_LOCK_MAXWRITE D I J
DB_LOCK_MINLOCKS D I J
DB_LOCK_MINWRITE D I J
DB_LOCK_NG * I *
DB_LOCK_NORUN * I *
DB_LOCK_NOTEXIST * I *
-DB_LOCK_NOTGRANTED D I C
+DB_LOCK_NOTGRANTED D I J
DB_LOCK_NOWAIT D I J
DB_LOCK_OLDEST D I J
DB_LOCK_PUT D I J
@@ -180,11 +189,20 @@ DB_LOGFILEID_INVALID * I *
DB_LOGMAGIC * I *
DB_LOGOLDVER * I *
DB_LOGVERSION * I *
+DB_LOG_AUTOREMOVE D I J
+DB_LOG_BUFFER_FULL D I *
+DB_LOG_CHKPNT * I *
+DB_LOG_COMMIT * I *
DB_LOG_DISK * I *
+DB_LOG_INMEMORY D I J
DB_LOG_LOCKED * I *
+DB_LOG_NOCOPY * I *
+DB_LOG_NOT_DURABLE * I *
+DB_LOG_PERM * I *
+DB_LOG_RESEND * I *
DB_LOG_SILENT_ERR * I *
+DB_LOG_WRNOSYNC * I *
DB_LSTAT_ABORTED * I *
-DB_LSTAT_ERR * I *
DB_LSTAT_EXPIRED * I *
DB_LSTAT_FREE * I *
DB_LSTAT_HELD * I *
@@ -197,8 +215,11 @@ DB_MPOOL_CLEAN D I *
DB_MPOOL_CREATE D I *
DB_MPOOL_DIRTY D I *
DB_MPOOL_DISCARD D I *
+DB_MPOOL_FREE * I *
DB_MPOOL_LAST D I *
DB_MPOOL_NEW D I *
+DB_MPOOL_NOFILE D I J
+DB_MPOOL_UNLINK D I J
DB_MULTIPLE D I J
DB_MULTIPLE_INIT D I *
DB_MULTIPLE_KEY D I J
@@ -209,33 +230,31 @@ DB_NEEDSPLIT * I *
DB_NEXT D I J
DB_NEXT_DUP D I J
DB_NEXT_NODUP D I J
-DB_NOCOPY * I *
DB_NODUPDATA D I J
DB_NOLOCKING D I J
DB_NOMMAP D I J
DB_NOORDERCHK D I J
DB_NOOVERWRITE D I J
DB_NOPANIC D I J
-DB_NOSERVER D I C
-DB_NOSERVER_HOME D I C
-DB_NOSERVER_ID D I C
+DB_NOSERVER D I *
+DB_NOSERVER_HOME D I J
+DB_NOSERVER_ID D I J
DB_NOSYNC D I J
-DB_NOTFOUND D I C
-DB_ODDFILESIZE D I J
+DB_NOTFOUND D I J
+DB_NO_AUTO_COMMIT * I *
+DB_ODDFILESIZE D I *
DB_OK_BTREE * I *
DB_OK_HASH * I *
DB_OK_QUEUE * I *
DB_OK_RECNO * I *
-DB_OLD_VERSION D I C
+DB_OLD_VERSION D I *
DB_OPFLAGS_MASK * I *
DB_ORDERCHKONLY D I J
DB_OVERWRITE D I J
DB_PAGE_LOCK * I *
-DB_PAGE_NOTFOUND D I C
+DB_PAGE_NOTFOUND D I *
DB_PANIC_ENVIRONMENT D I J
-DB_PERMANENT * I *
DB_POSITION D I J
-DB_POSITIONI * I *
DB_PREV D I J
DB_PREV_NODUP D I J
DB_PRINTABLE D I J
@@ -250,12 +269,12 @@ DB_PR_RECOVERYTEST * I *
DB_QAMMAGIC * I *
DB_QAMOLDVER * I *
DB_QAMVERSION * I *
-DB_QUEUE D I C
+DB_QUEUE D I J
DB_RDONLY D I J
DB_RDWRMASTER * I *
-DB_RECNO D I C
+DB_RECNO D I J
DB_RECNUM D I J
-DB_RECORDCOUNT * I J
+DB_RECORDCOUNT * I *
DB_RECORD_LOCK * I *
DB_RECOVER D I J
DB_RECOVER_FATAL D I J
@@ -265,37 +284,54 @@ DB_REGION_MAGIC * I *
DB_RENAMEMAGIC * I *
DB_RENUMBER D I J
DB_REP_CLIENT D I J
-DB_REP_DUPMASTER D I C
-DB_REP_HOLDELECTION D I C
-DB_REP_LOGSONLY D I J
+DB_REP_CREATE * I *
+DB_REP_DUPMASTER D I J
+DB_REP_EGENCHG * I *
+DB_REP_HANDLE_DEAD D I N
+DB_REP_HOLDELECTION D I J
+DB_REP_ISPERM D I J
+DB_REP_LOGREADY * I *
DB_REP_MASTER D I J
-DB_REP_NEWMASTER D I C
-DB_REP_NEWSITE D I C
-DB_REP_OUTDATED D I C
+DB_REP_NEWMASTER D I J
+DB_REP_NEWSITE D I J
+DB_REP_NOBUFFER D I J
+DB_REP_NOTPERM D I J
+DB_REP_PAGEDONE * I *
DB_REP_PERMANENT D I J
-DB_REP_UNAVAIL D I J
+DB_REP_STARTUPDONE D I J
+DB_REP_UNAVAIL D I *
DB_REVSPLITOFF D I J
DB_RMW D I J
-DB_RUNRECOVERY D I C
+DB_RPCCLIENT D I J
+DB_RUNRECOVERY D I N
DB_SALVAGE D I J
-DB_SECONDARY_BAD D I C
+DB_SECONDARY_BAD D I *
+DB_SEQUENCE_VERSION * I *
+DB_SEQ_DEC D I J
+DB_SEQ_INC D I J
+DB_SEQ_RANGE_SET * I *
+DB_SEQ_WRAP D I J
DB_SET D I J
+DB_SET_BEGIN_LSNP * I *
DB_SET_LOCK_TIMEOUT D I J
DB_SET_RANGE D I J
DB_SET_RECNO D I J
DB_SET_TXN_NOW * I *
DB_SET_TXN_TIMEOUT D I J
DB_SNAPSHOT D I J
+DB_STAT_ALL D I *
DB_STAT_CLEAR D I J
+DB_STAT_LOCK_CONF D I *
+DB_STAT_LOCK_LOCKERS D I *
+DB_STAT_LOCK_OBJECTS D I *
+DB_STAT_LOCK_PARAMS D I *
+DB_STAT_MEMP_HASH D I *
+DB_STAT_SUBSYSTEM D I *
DB_SURPRISE_KID * I *
DB_SWAPBYTES * I *
DB_SYSTEM_MEM D I J
DB_TEST_ELECTINIT * I *
-DB_TEST_ELECTSEND * I *
DB_TEST_ELECTVOTE1 * I *
-DB_TEST_ELECTVOTE2 * I *
-DB_TEST_ELECTWAIT1 * I *
-DB_TEST_ELECTWAIT2 * I *
DB_TEST_POSTDESTROY * I *
DB_TEST_POSTLOG * I *
DB_TEST_POSTLOGMETA * I *
@@ -306,45 +342,45 @@ DB_TEST_PREOPEN * I *
DB_TEST_SUBDB_LOCKS * I *
DB_THREAD D I J
DB_TIMEOUT * I *
+DB_TIME_NOTGRANTED D I J
DB_TRUNCATE D I J
DB_TXNVERSION * I *
-DB_TXN_ABORT D I C
-DB_TXN_APPLY D I C
+DB_TXN_ABORT D I J
+DB_TXN_APPLY D I J
DB_TXN_BACKWARD_ALLOC * I *
-DB_TXN_BACKWARD_ROLL D I C
+DB_TXN_BACKWARD_ROLL D I J
DB_TXN_CKP * I *
-DB_TXN_FORWARD_ROLL D I C
-DB_TXN_GETPGNOS * I *
-DB_TXN_LOCK * I *
+DB_TXN_FORWARD_ROLL D I J
DB_TXN_NOSYNC D I J
+DB_TXN_NOT_DURABLE D I J
DB_TXN_NOWAIT D I J
DB_TXN_OPENFILES * I *
DB_TXN_POPENFILES * I *
-DB_TXN_PRINT D I C
+DB_TXN_PRINT D I J
DB_TXN_SYNC D I J
DB_TXN_WRITE_NOSYNC D I J
DB_UNDO * I *
-DB_UNKNOWN D I C
+DB_UNKNOWN D I J
+DB_UNREF * I *
DB_UPDATE_SECONDARY * I *
DB_UPGRADE D I J
DB_USE_ENVIRON D I J
DB_USE_ENVIRON_ROOT D I J
-DB_VERB_CHKPOINT D I J
DB_VERB_DEADLOCK D I J
DB_VERB_RECOVERY D I J
DB_VERB_REPLICATION D I J
DB_VERB_WAITSFOR D I J
DB_VERIFY D I J
-DB_VERIFY_BAD D I C
+DB_VERIFY_BAD D I N
DB_VERIFY_FATAL * I *
DB_VERSION_MAJOR * I J
DB_VERSION_MINOR * I J
+DB_VERSION_MISMATCH D I *
DB_VERSION_PATCH * I J
-DB_VERSION_STRING * I *
+DB_VERSION_STRING * I N
DB_WRITECURSOR D I J
DB_WRITELOCK * I *
DB_WRITEOPEN * I *
-DB_WRNOSYNC * I *
DB_XA_CREATE D I J
DB_XIDDATASIZE D I J
DB_YIELDCPU D I J
diff --git a/storage/bdb/dist/s_all b/storage/bdb/dist/s_all
index 132017def3c..02686b742bf 100644
--- a/storage/bdb/dist/s_all
+++ b/storage/bdb/dist/s_all
@@ -1,11 +1,9 @@
#!/bin/sh -
-# $Id: s_all,v 1.10 2001/08/04 14:01:44 bostic Exp $
+# $Id: s_all,v 1.11 2002/10/30 15:26:36 bostic Exp $
-sh s_dir
-
-#sh s_perm # permissions.
+sh s_perm # permissions.
sh s_symlink # symbolic links.
-sh s_readme # db/README file.
+sh s_readme # distribution README file.
#
# The following order is important, s_include must run last.
@@ -17,7 +15,7 @@ sh s_include # standard include files.
sh s_win32 # Win32 include files.
sh s_win32_dsp # Win32 build environment.
-#sh s_vxworks # VxWorks include files.
-#sh s_java # Java support.
+sh s_vxworks # VxWorks include files.
+sh s_java # Java support.
sh s_test # Test suite support.
sh s_tags # Tags files.
diff --git a/storage/bdb/dist/s_config b/storage/bdb/dist/s_config
index 3e033da81ab..604a1d08916 100755
--- a/storage/bdb/dist/s_config
+++ b/storage/bdb/dist/s_config
@@ -1,41 +1,31 @@
#!/bin/sh -
-# $Id: s_config,v 1.9 2002/05/20 19:18:13 bostic Exp $
+# $Id: s_config,v 1.13 2003/07/02 15:27:44 bostic Exp $
#
# Build the autoconfiguration files.
trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3 13 15
-msgac="# DO NOT EDIT: automatically built by dist/s_config."
-
. ./RELEASE
-echo "Building aclocal.m4"
-(echo "$msgac" &&
- echo "AC_DEFUN(AM_VERSION_SET, [" &&
- echo "AC_SUBST(DB_VERSION_MAJOR)" &&
- echo "DB_VERSION_MAJOR=$DB_VERSION_MAJOR" &&
- echo "AC_SUBST(DB_VERSION_MINOR)" &&
- echo "DB_VERSION_MINOR=$DB_VERSION_MINOR" &&
- echo "AC_SUBST(DB_VERSION_PATCH)" &&
- echo "DB_VERSION_PATCH=$DB_VERSION_PATCH" &&
- echo "AC_SUBST(DB_VERSION_UNIQUE_NAME)" &&
- echo "DB_VERSION_UNIQUE_NAME=$DB_VERSION_UNIQUE_NAME" &&
- echo "AC_SUBST(DB_VERSION_STRING)" &&
- echo "DB_VERSION_STRING=\"\\\"$DB_VERSION_STRING\\\"\"" &&
- echo "])" &&
- cat aclocal/*.ac aclocal_java/*.ac) > aclocal.m4
-
-echo "Running autoheader to build config.hin"
+echo "autoconf: building aclocal.m4..."
+cat aclocal/*.ac aclocal_java/*.ac > aclocal.m4
+
+echo "autoconf: running autoheader to build config.hin..."
rm -f config.hin
autoheader
chmod 444 config.hin
-echo "Running autoconf to build configure"
+echo "autoconf: running autoconf to build configure"
rm -f configure
autoconf
# Edit version information we couldn't pre-compute.
-(echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" &&
+(echo "1,\$s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" &&
+ echo "1,\$s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" &&
+ echo "1,\$s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" &&
+ echo "1,\$s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" &&
+ echo "1,\$s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" &&
+ echo "1,\$s/__EDIT_DB_VERSION__/$DB_VERSION/g" &&
echo "w" &&
echo "q") | ed configure
diff --git a/storage/bdb/dist/s_crypto b/storage/bdb/dist/s_crypto
index f7947cb3e10..05a93043a8b 100644
--- a/storage/bdb/dist/s_crypto
+++ b/storage/bdb/dist/s_crypto
@@ -1,10 +1,8 @@
#!/bin/sh -
-# $Id: s_crypto,v 11.5 2002/09/13 13:14:14 bostic Exp $
+# $Id: s_crypto,v 11.8 2003/11/24 22:41:26 bostic Exp $
# Remove crypto from the DB source tree.
-. ./RELEASE
-
d=..
t=/tmp/__db_a
@@ -19,8 +17,8 @@ fi
# Remove the crypto.
rm -rf $d/crypto
-# Update the docs.
-f=$d/docs/ref/env/encrypt.html
+# Update the release splash page.
+f=$d/docs/index.html
chmod 664 $f
(echo '/DOES/' &&
echo 's/DOES/DOES NOT/' &&
@@ -40,6 +38,8 @@ chmod 664 $f
f=srcfiles.in
chmod 664 $f
(echo 'g/^crypto\//d' &&
+ echo '/crypto_stub\.c/' &&
+ echo 's/small/dynamic small static vx/' &&
echo 'w' &&
echo 'q') | ed $f
diff --git a/storage/bdb/dist/s_include b/storage/bdb/dist/s_include
index 878b4a38af1..ab058d86dba 100755
--- a/storage/bdb/dist/s_include
+++ b/storage/bdb/dist/s_include
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $Id: s_include,v 1.19 2002/03/27 04:31:50 bostic Exp $
+# $Id: s_include,v 1.22 2004/04/19 18:27:17 mjc Exp $
#
# Build the automatically generated function prototype files.
@@ -71,14 +71,19 @@ head defonly _DB_INT_DEF_IN_ > $i_dfile
# Process the standard directories, creating per-directory prototype
# files and adding to the external prototype and #define files.
-for i in db btree clib common dbreg env fileops hash hmac \
- lock log mp mutex os qam rep rpc_client rpc_server tcl txn xa; do
+for i in db btree clib common crypto dbreg env fileops hash hmac \
+ lock log mp mutex os qam rep rpc_client rpc_server sequence tcl txn xa; do
head "_${i}_ext_h_" > $i_pfile
- f="../$i/*.c"
- [ $i = os ] && f="$f ../os_win32/*.c"
- [ $i = rpc_server ] && f="../$i/c/*.c"
- [ $i = crypto ] && f="../$i/*.c ../$i/*/*.c"
+ if [ $i = os ] ; then
+ f=`ls ../$i/*.c ../os_win32/*.c`
+ elif [ $i = rpc_server ] ; then
+ f=`ls ../$i/c/*.c`
+ elif [ $i = crypto ] ; then
+ f=`ls ../$i/*.c ../$i/*/*.c`
+ else
+ f=`ls ../$i/*.c`
+ fi
awk -f gen_inc.awk \
-v db_version_unique_name=$DB_VERSION_UNIQUE_NAME \
-v e_dfile=$e_dfile \
@@ -96,7 +101,7 @@ done
# Process directories which only add to the external prototype and #define
# files.
for i in dbm hsearch; do
- f="../$i/*.c"
+ f=`ls ../$i/*.c`
awk -f gen_inc.awk \
-v db_version_unique_name=$DB_VERSION_UNIQUE_NAME \
-v e_dfile=$e_dfile \
@@ -105,16 +110,6 @@ for i in dbm hsearch; do
-v i_pfile="" $f
done
-# RPC uses rpcgen to generate a header file; post-process it to add more
-# interfaces to the internal #define file.
-sed -e '/extern bool_t xdr___/{' \
- -e 's/.* //' \
- -e 's/();//' \
- -e 's/.*/#define & &@DB_VERSION_UNIQUE_NAME@/' \
- -e 'p' \
- -e '}' \
- -e d < ../dbinc_auto/db_server.h >> $i_dfile
-
# There are a few globals in DB -- add them to the external/internal
# #define files.
(echo "#define __db_global_values __db_global_values@DB_VERSION_UNIQUE_NAME@";
@@ -141,7 +136,7 @@ cmp $i_dfile $f > /dev/null 2>&1 ||
head space defonly _DB_EXT_185_DEF_IN_ > $e_dfile
head space _DB_EXT_185_PROT_IN_ > $e_pfile
-f="../db185/*.c"
+f=`ls ../db185/*.c`
awk -f gen_inc.awk \
-v db_version_unique_name=$DB_VERSION_UNIQUE_NAME \
-v e_dfile=$e_dfile \
diff --git a/storage/bdb/dist/s_java b/storage/bdb/dist/s_java
index f7c96e823a1..ae715ccd687 100755
--- a/storage/bdb/dist/s_java
+++ b/storage/bdb/dist/s_java
@@ -1,273 +1,8 @@
#!/bin/sh -
-# $Id: s_java,v 1.13 2002/09/09 20:47:30 bostic Exp $
+# $Id: s_java,v 11.8 2004/04/06 20:43:35 mjc Exp $
#
# Build the Java files.
-msgjava="/* DO NOT EDIT: automatically built by dist/s_java. */"
-
-. ./RELEASE
-
-t=/tmp/__java
-c=/tmp/__javajnic
-h=/tmp/__javajnih
-trap 'rm -f $t $c $h; exit 0' 0 1 2 3 13 15
-
-# Build DbConstants.java.
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo 'class DbConstants' &&
- echo '{' &&
- for i in `egrep '^DB_.*J$' pubdef.in | awk '{print $1}'`; do \
- egrep -w "^#define[ ]$i|^[ ][ ]*$i" ../dbinc/db.in; \
- done |
- sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/" \
- -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/" \
- -e "s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/" \
- -e 's/^#define[ ][ ]*//' \
- -e 's/[()=,]/ /g' \
- -e 's/\/\*/ /' | \
- awk '{ print " static final int " $1 " = " $2 ";" }' &&
- echo '}' &&
- echo &&
- echo '// end of DbConstants.java') > $t
-
-f=../java/src/com/sleepycat/db/DbConstants.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build Db.java.
-f=../java/src/com/sleepycat/db/Db.java.in
-sed '/BEGIN-JAVA-SPECIAL-CONSTANTS/q' < $f > $t
-(echo " $msgjava" &&
- for i in `egrep '^DB_.*C$' pubdef.in | awk '{print $1}'`; do \
- egrep -w "^#define[ ]$i|^[ ][ ]*$i" ../dbinc/db.in; \
- done |
- sed -e 's/^#define[ ][ ]*//' \
- -e 's/[()=,]/ /g' |
- awk '{ print " public static final int " $1 " = " $2 ";" }') >> $t
-(for i in `egrep '^DB_.*J$' pubdef.in | awk '{print $1}'`; do \
- egrep -w "^#define[ ]$i|^[ ][ ]*$i" ../dbinc/db.in; \
- done |
- sed -e 's/^#define[ ][ ]*//' \
- -e 's/[()=,]/ /g' |
- awk '{ print " public static final int " $1 ";" }') >> $t
-sed -n \
- '/END-JAVA-SPECIAL-CONSTANTS/,/BEGIN-JAVA-CONSTANT-INITIALIZATION/p' \
- < $f >> $t
-(echo " $msgjava" &&
- for i in `egrep '^DB_.*J$' pubdef.in | awk '{print $1}'`; do \
- egrep -w "^#define[ ]$i|^[ ][ ]*$i" ../dbinc/db.in; \
- done |
- sed -e 's/^#define[ ][ ]*//' \
- -e 's/[()=,]/ /g' \
- -e 's/\/\*/ /' | \
- awk '{ print " " $1 " = DbConstants." $1 ";" }') >> $t
-sed -n '/END-JAVA-CONSTANT-INITIALIZATION/,$p' < $f >> $t
-
-f=../java/src/com/sleepycat/db/Db.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Script to convert DB C structure declarations into Java declarations.
-jclass()
-{
- cat ../dbinc/db.in |
- sed -n \
- -e "/struct $1 {/,/^}/{" \
- -e "/$1/d" \
- -e '/;/!d' \
- -e '/^}/d' \
- -e '/char[ ]*\*/{' \
- -e "s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/$2 public String \1;/p"\
- -e 'd' \
- -e '}' \
- -e '/time_t/{' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/$2 public long \1;/p" \
- -e 'd' \
- -e '}' \
- -e '/DB_LSN[ ]*/{' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/$2 public DbLsn \1;/p"\
- -e 'd' \
- -e '}' \
- -e '/DB_TXN_ACTIVE[ ]*\*/{' \
- -e "s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/$2 public Active \1[];/p"\
- -e 'd' \
- -e '}' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/$2 public int \1;/p" \
- -e '}'
-}
-
-# Script to convert DB C structure declarations into Java declarations.
-jclass_jni()
-{
- c=$3
- h=$4
- echo "extern int $2(JNIEnv *jnienv, jclass cl, jobject jobj, struct $1 *statp);" >> $h
- echo "int $2(JNIEnv *jnienv, jclass cl," >> $c
- echo " jobject jobj, struct $1 *statp) {" >> $c
- cat ../dbinc/db.in |
- sed -n \
- -e "/struct $1 {/,/^}/{" \
- -e "/$1/d" \
- -e '/;/!d' \
- -e '/^}/d' \
- -e '/char[ ]*\*/{' \
- -e "s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ JAVADB_STAT_STRING(jnienv, cl, jobj, statp, \1);/p"\
- -e 'd' \
- -e '}' \
- -e '/time_t/{' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_LONG(jnienv, cl, jobj, statp, \1);/p" \
- -e 'd' \
- -e '}' \
- -e '/DB_LSN[ ]*/{' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_LSN(jnienv, cl, jobj, statp, \1);/p"\
- -e 'd' \
- -e '}' \
- -e '/DB_TXN_ACTIVE[ ]*\*/{' \
- -e "s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ JAVADB_STAT_ACTIVE(jnienv, cl, jobj, statp, \1);/p"\
- -e 'd' \
- -e '}' \
- -e "s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_INT(jnienv, cl, jobj, statp, \1);/p" \
- -e '}' >> $c
- echo ' return (0);' >> $c
- echo '}' >> $c
-}
-
-echo "$msgjava" >> $c
-echo "$msgjava" >> $h
-echo '#include "java_util.h"' >> $c
-
-# Build DbBtreeStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbBtreeStat"
- echo '{'
- jclass __db_bt_stat &&
- echo '}' &&
- echo '// end of DbBtreeStat.java') > $t
-jclass_jni __db_bt_stat __jv_fill_bt_stat $c $h
-f=../java/src/com/sleepycat/db/DbBtreeStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbHashStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbHashStat"
- echo '{'
- jclass __db_h_stat &&
- echo '}' &&
- echo '// end of DbHashStat.java') > $t
-jclass_jni __db_h_stat __jv_fill_h_stat $c $h
-f=../java/src/com/sleepycat/db/DbHashStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbLockStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbLockStat"
- echo '{'
- jclass __db_lock_stat &&
- echo '}' &&
- echo '// end of DbLockStat.java') > $t
-jclass_jni __db_lock_stat __jv_fill_lock_stat $c $h
-f=../java/src/com/sleepycat/db/DbLockStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbLogStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbLogStat"
- echo '{'
- jclass __db_log_stat &&
- echo '}' &&
- echo '// end of DbLogStat.java') > $t
-jclass_jni __db_log_stat __jv_fill_log_stat $c $h
-f=../java/src/com/sleepycat/db/DbLogStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbMpoolFStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbMpoolFStat"
- echo '{'
- jclass __db_mpool_fstat &&
- echo '}' &&
- echo '// end of DbMpoolFStat.java') > $t
-jclass_jni __db_mpool_stat __jv_fill_mpool_stat $c $h
-f=../java/src/com/sleepycat/db/DbMpoolFStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbQueueStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbQueueStat"
- echo '{'
- jclass __db_qam_stat &&
- echo '}' &&
- echo '// end of DbQueueStat.java') > $t
-jclass_jni __db_qam_stat __jv_fill_qam_stat $c $h
-f=../java/src/com/sleepycat/db/DbQueueStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbRepStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbRepStat"
- echo '{'
- jclass __db_rep_stat &&
- echo '}' &&
- echo '// end of DbRepStat.java') > $t
-jclass_jni __db_rep_stat __jv_fill_rep_stat $c $h
-f=../java/src/com/sleepycat/db/DbRepStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build DbTxnStat.java
-(echo "$msgjava" &&
- echo &&
- echo 'package com.sleepycat.db;' &&
- echo &&
- echo "public class DbTxnStat"
- echo '{'
- echo " public static class Active {"
- jclass __db_txn_active " " &&
- echo ' };' &&
- jclass __db_txn_stat &&
- echo '}' &&
- echo '// end of DbTxnStat.java') > $t
-jclass_jni __db_txn_stat __jv_fill_txn_stat $c $h
-f=../java/src/com/sleepycat/db/DbTxnStat.java
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-mv $c $t
-f=../libdb_java/java_stat_auto.c
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-mv $h $t
-f=../libdb_java/java_stat_auto.h
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+sh s_java_stat # Create Java stat methods
+sh s_java_swig # Create core Java API with SWIG
+sh s_java_const # Create Java constants
diff --git a/storage/bdb/dist/s_java_const b/storage/bdb/dist/s_java_const
new file mode 100755
index 00000000000..644b32324d6
--- /dev/null
+++ b/storage/bdb/dist/s_java_const
@@ -0,0 +1,35 @@
+#!/bin/sh -
+# $Id: s_java_const,v 1.27 2004/07/30 14:51:37 mjc Exp $
+#
+# Build the Java files.
+
+msgjava="/* DO NOT EDIT: automatically built by dist/s_java_const. */"
+
+. RELEASE
+
+t=/tmp/__java
+trap 'rm -f $t; exit 0' 0 1 2 3 13 15
+
+(echo "$msgjava" &&
+ echo &&
+ echo 'package com.sleepycat.db.internal;' &&
+ echo &&
+ echo 'public interface DbConstants' &&
+ echo '{' &&
+ for i in `egrep '^DB_.*J$' pubdef.in | awk '{print $1}'`; do \
+ egrep -w "^#define[ ]$i|^[ ][ ]*$i" ../dbinc/db.in; \
+ done |
+ sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/" \
+ -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/" \
+ -e "s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/" \
+ -e 's/^#define[ ][ ]*//' \
+ -e 's/[()=,]/ /g' \
+ -e 's/\/\*/ /' | \
+ awk '{ print " int " $1 " = " $2 ";" }' &&
+ echo '}' &&
+ echo &&
+ echo '// end of DbConstants.java') > $t
+
+f=../java/src/com/sleepycat/db/internal/DbConstants.java
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
diff --git a/storage/bdb/dist/s_java_stat b/storage/bdb/dist/s_java_stat
new file mode 100755
index 00000000000..4eb2ab1470a
--- /dev/null
+++ b/storage/bdb/dist/s_java_stat
@@ -0,0 +1,327 @@
+#!/bin/sh -
+# $Id: s_java_stat,v 1.33 2004/09/28 19:30:36 mjc Exp $
+#
+# Build the Java files.
+
+msgjava="/*-
+ * DO NOT EDIT: automatically built by dist/s_java_stat.
+ *
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2002-2004
+ * Sleepycat Software. All rights reserved.
+ */"
+
+
+s=/tmp/__java.sed
+t=/tmp/__java
+c=/tmp/__javajnic
+u1=/tmp/__javautil1
+u2=/tmp/__javautil2
+trap 'rm -f $t $c $u1 $u2; exit 0' 0 1 2 3 13 15
+
+# Script to convert DB C structure declarations into Java declarations.
+jclass()
+{
+ cat > $s <<EOF
+/struct __db_$1 {/,/^}/{
+ /__db_$1/d
+ /;/!d
+ /^}/d
+ /char[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/\\
+$2 private String \1;\\
+$2 public String get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ /time_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/\\
+$2 private long \1;\\
+$2 public long get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ /db_seq_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/\\
+$2 private long \1;\\
+$2 public long get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ /DB_LSN[ ]*/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/\\
+$2 private LogSequenceNumber \1;\\
+$2 public LogSequenceNumber get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ /DB_TXN_ACTIVE[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/\\
+$2 private Active[] \1;\\
+$2 public Active[] get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ /u_int8_t[ ]*xid\[/{
+ s/^[ ]*[^ ]*[ ]*\([^[;]*\).*/\\
+$2 private byte[] \1;\\
+$2 public byte[] get_\1() {\\
+$2 return \1;\\
+$2 }/p
+ d
+ }
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/\\
+$2 private int \1;\\
+$2 public int get_\1() {\\
+$2 return \1;\\
+$2 }/p
+}
+EOF
+ sed -n -f $s < ../dbinc/db.in |
+ perl -w -p -e 's/get_(st|bt|hash|qs)_/get_/;' \
+ -e 'if (m/get.*\(/) {' \
+ -e 's/_n([b-df-hj-np-tv-z])/_num_$1/;' \
+ -e 's/_(min|max)([a-z])/_$1_$2/;' \
+ -e 's/pg(.)/_pages_$1/;' \
+ -e 's/(count|flag|free|id\(|page|size|timeout)/_$1/g;' \
+ -e 's/__*/_/g;' \
+ -e 's/_(.)/\U$1/g' \
+ -e '};' \
+ -e '1'
+}
+
+# Script to convert DB C structure declarations into a JNI method to fill the
+# corresponding Java class
+jclass_jni()
+{
+ fill=__dbj_fill_$1
+ j_class=$2
+ jni_fieldid_decls $1 $2
+ jni_fieldids $1 $2
+ cat > $s <<EOF
+/struct __db_$1 {/,/^}/{
+ /__db_$1/d
+ /;/!d
+ /^}/d
+ /char[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ JAVADB_STAT_STRING(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ /time_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_LONG(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ /db_seq_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_LONG(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ /DB_LSN[ ]*/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_LSN(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ /DB_TXN_ACTIVE[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ JAVADB_STAT_ACTIVE(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ /u_int8_t[ ]*xid\[/{
+ s/^[ ]*[^ ]*[ ]*\([^[;]*\).*/ JAVADB_STAT_XID(jnienv, jobj, $1_\1_fid, statp, \1);/p
+ d
+ }
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ JAVADB_STAT_INT(jnienv, jobj, $1_\1_fid, statp, \1);/p
+}
+EOF
+ echo "static int $fill(JNIEnv *jnienv, " >> $c
+ echo " jobject jobj, struct __db_$1 *statp) {" >> $c
+ sed -n -f $s < ../dbinc/db.in >> $c
+ echo ' return (0);' >> $c
+ echo '}' >> $c
+}
+
+jni_fieldid_decls()
+{
+ cat > $s <<EOF
+/struct __db_$1 {/,/^}/{
+ /__db_$1/d
+ /;/!d
+ /^}/d
+ /char[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ /time_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ /db_seq_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ /DB_LSN[ ]*/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ /DB_TXN_ACTIVE[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ /u_int8_t[ ]*xid\[/{
+ s/^[ ]*[^ ]*[ ]*\([^[;]*\).*/static jfieldID $1_\1_fid;/p
+ d
+ }
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/static jfieldID $1_\1_fid;/p
+}
+EOF
+ sed -n -f $s < ../dbinc/db.in >> $u1
+}
+
+jni_fieldids()
+{
+ cat > $s <<EOF
+/struct __db_$1 {/,/^}/{
+ /__db_$1/d
+ /;/!d
+ /^}/d
+ /char[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"Ljava\/lang\/String;\" },/p
+ d
+ }
+ /time_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"J\" },/p
+ d
+ }
+ /db_seq_t/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"J\" },/p
+ d
+ }
+ /DB_LSN[ ]*/{
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"L\" DB_PKG \"LogSequenceNumber;\" },/p
+ d
+ }
+ /DB_TXN_ACTIVE[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"[L\" DB_PKG \"TransactionStats\$Active;\" },/p
+ d
+ }
+ /u_int8_t[ ]*xid\[/{
+ s/^[ ]*[^ ]*[ ]*\([^[;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"[B\" },/p
+ d
+ }
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/ { \&$1_\1_fid, \&$1_class, \"\1\", \"I\" },/p
+}
+EOF
+ sed -n -f $s < ../dbinc/db.in >> $u2
+}
+
+# Script to convert DB C structure declarations into a toString method body
+jclass_toString()
+{
+ cat > $s <<EOF
+/struct __db_$1 {/,/^}/{
+ /__db_$1/d
+ /;/!d
+ /^}/d
+ /char[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/$3 + "\\\\n$3 \1=" + \1/p
+ d
+ }
+ /DB_TXN_ACTIVE[ ]*\*/{
+ s/^[ ]*[^\*]*\*[ ]*\([^;]*\).*/$3 + \"\\\\n$3 \1=\" + DbUtil.objectArrayToString(\1, \"\1\")/p
+ d
+ }
+ /u_int8_t[ ]*xid\[/{
+ s/^[ ]*[^ ]*[ ]*\([^[;]*\).*/$3 + \"\\\\n$3 \1=\" + DbUtil.byteArrayToString(\1)/p
+ d
+ }
+ s/^[ ]*[^ ]*[ ]*\([^;]*\).*/$3 + \"\\\\n$3 \1=\" + \1/p
+}
+EOF
+ echo
+ echo "$3 public String toString() {"
+ echo "$3 return \"$2:\""
+ sed -n -f $s < ../dbinc/db.in
+ echo "$3 ;"
+ echo "$3 }"
+}
+
+stat_class()
+{
+ c_struct=__db_$1
+ j_class=$2
+ extends=$3
+
+ (echo "$msgjava"
+ echo
+ echo 'package com.sleepycat.db;'
+ echo
+ echo "public class $j_class$extends {"
+ echo " // no public constructor"
+ echo " protected $j_class() {}"
+ jclass $1
+ jclass_toString $1 $2
+ echo '}') > $t
+ jclass_jni $1 $2
+ f=../java/src/com/sleepycat/db/$j_class.java
+ cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+}
+
+echo "$msgjava" > $c
+> $u1
+> $u2
+
+stat_class bt_stat BtreeStats " extends DatabaseStats"
+stat_class h_stat HashStats " extends DatabaseStats"
+stat_class lock_stat LockStats
+stat_class log_stat LogStats
+stat_class mpool_fstat CacheFileStats
+stat_class mpool_stat CacheStats
+stat_class qam_stat QueueStats " extends DatabaseStats"
+stat_class rep_stat ReplicationStats
+stat_class seq_stat SequenceStats
+
+# Build TransactionStats.java - special because of embedded Active class
+(echo "$msgjava"
+ echo
+ echo 'package com.sleepycat.db;'
+ echo
+ echo 'import com.sleepycat.db.internal.DbUtil;'
+ echo
+ echo "public class TransactionStats"
+ echo '{'
+ echo " // no public constructor"
+ echo " protected TransactionStats() {}"
+ echo
+ echo -n " public static class Active {"
+ echo " // no public constructor"
+ echo " protected Active() {}"
+ jclass txn_active " "
+ jclass_toString txn_active Active " "
+ echo ' };'
+ jclass txn_stat
+ jclass_toString txn_stat TransactionStats
+ echo '}'
+ echo '// end of TransactionStats.java') > $t
+jclass_jni txn_stat __dbj_fill_txn_stat
+jclass_jni txn_active __dbj_fill_txn_active
+f=../java/src/com/sleepycat/db/TransactionStats.java
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+
+mv $c $t
+f=../libdb_java/java_stat_auto.c
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+
+f=../libdb_java/java_util.i
+sed '/BEGIN-STAT-FIELD-DECLS/q' < $f > $t
+cat $u1 >> $t
+sed -n '/END-STAT-FIELD-DECLS/,/BEGIN-STAT-FIELDS/p' < $f >> $t
+cat $u2 >> $t
+sed -n '/END-STAT-FIELDS/,$p' < $f >> $t
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 644 $f)
diff --git a/storage/bdb/dist/s_java_swig b/storage/bdb/dist/s_java_swig
new file mode 100755
index 00000000000..c1e67e31608
--- /dev/null
+++ b/storage/bdb/dist/s_java_swig
@@ -0,0 +1,55 @@
+#!/bin/sh -
+# $Id: s_java_swig,v 11.11 2004/09/23 17:31:53 mjc Exp $
+#
+# Run SWIG to generate the Java APIs
+
+SWIG=swig
+SWIG_DIR=../libdb_java
+SWIG_FILE=$SWIG_DIR/db.i
+PACKAGE="com.sleepycat.db.internal"
+
+die() {
+ echo "$@" >&2
+ exit 1
+}
+
+[ -f $SWIG_FILE ] || die "Must be run from the dist directory"
+
+for api in java ; do
+ echo "Building $api API"
+
+ swig_args=""
+ case $api in
+ java)
+ swig_args="-nodefault -package $PACKAGE $args"
+ ;;
+ esac
+
+ $SWIG -Wall -$api $swig_args -I$SWIG_DIR \
+ -o ../libdb_$api/db_${api}_wrap.c $SWIG_FILE || exit $?
+done
+
+# Skip Java sources if run with "-n"
+if [ "x$1" = "x-n" ] ; then
+ rm -f $SWIG_DIR/*.java
+ exit 0
+fi
+
+# Fixups for Java
+JAVA_SRCTOP=../java/src
+JAVA_PKGDIR=com/sleepycat/db/internal
+JAVA_SRCDIR=$JAVA_SRCTOP/$JAVA_PKGDIR
+
+# SWIG 1.3.18 puts the Java files in the same directory as the native code.
+cd $SWIG_DIR
+[ -f Db.java ] || exit 1
+
+for f in *.java ; do
+ case $f in
+ SWIGTYPE*)
+ die "Interface contains unresolved types: $f"
+ esac
+ rm -f $JAVA_SRCDIR/$f
+ perl -p $SWIG_DIR/java-post.pl < $f > $JAVA_SRCDIR/$f || exit $?
+ rm -f $f
+done
diff --git a/storage/bdb/dist/s_je2db b/storage/bdb/dist/s_je2db
new file mode 100644
index 00000000000..aaaa42cf12d
--- /dev/null
+++ b/storage/bdb/dist/s_je2db
@@ -0,0 +1,88 @@
+#!/bin/sh -
+
+# The examples must be hand-edited after they are copied:
+# - add setInitializeCache(true), setInitializeLocking(true), setType(BTREE)
+# - add null databaseName param to openDatabase() and openSecondaryDatabase()
+# - remove foreign key configuration and imports
+
+COPY_EXAMPLES=0
+
+JEDIR=$1
+if [ $# -eq 1 ] ; then
+ DBDIR=..
+else
+ DBDIR=$2
+fi
+
+if [ ! -d "$DBDIR/dbinc" -o ! -f "$JEDIR/build.xml" ] ; then
+ echo >&2 "Usage $0 /path/to/je [ /path/to/db ]"
+ exit 1
+fi
+
+JEDIR=$(cd "$JEDIR" ; /bin/pwd)
+DBDIR=$(cd "$DBDIR" ; /bin/pwd)
+
+JESRC="$JEDIR/src"
+JETEST="$JEDIR/test"
+JEEXAMPLES="$JEDIR/examples"
+DBSRC="$DBDIR/java/src"
+DBTEST="$DBDIR/test/scr024/src"
+DBEXAMPLES="$DBDIR/examples_java/src"
+DIRMATCH="com/sleepycat\(/examples\)*/\(\(bind\)\|\(collections\)\|\(util\)\)"
+
+cd "$JESRC"
+for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
+ #echo "$DBSRC/$d"
+ mkdir -p "$DBSRC/$d"
+done
+cd "$JETEST"
+for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
+ #echo "$DBTEST/$d"
+ mkdir -p "$DBTEST/$d"
+done
+if [ $COPY_EXAMPLES -eq 1 ] ; then
+ cd "$JEEXAMPLES"
+ for d in `find . -type d | grep -v CVS | grep $DIRMATCH` ; do
+ #echo "$DBEXAMPLES/$d"
+ mkdir -p "$DBEXAMPLES/$d"
+ done
+fi
+
+E1='s/com\.sleepycat\.je/com.sleepycat.db/g'
+E2='/import com\.sleepycat\.db\.ForeignKeyNullifier/d'
+E3='/implements/s/, ForeignKeyNullifier//'
+E4='/<!-- begin JE only -->/,/<!-- end JE only -->/d'
+EXCLUDETESTS="\(\(ForeignKeyTest\)\|\(TupleSerialFactoryTest\)\)"
+
+cd "$JESRC"
+for f in `find . -name '*.java' | grep $DIRMATCH` ; do
+ #echo $DBSRC/$f
+ sed -e "$E1" -e "$E2" -e "$E3" -e "$E4" < $f > $DBSRC/$f.sed.out
+ diff -q -I "\$\Id:" $DBSRC/$f $DBSRC/$f.sed.out || \
+ mv -f $DBSRC/$f.sed.out $DBSRC/$f
+ rm -f $DBSRC/$f.sed.out
+done
+
+cd "$JETEST"
+for f in `find . -name '*.java' | grep $DIRMATCH | grep -v $EXCLUDETESTS` ; do
+ #echo $DBTEST/$f
+ sed -e "$E1" < $f > $DBTEST/$f.sed.out
+ diff -q -I "\$\Id:" $DBTEST/$f $DBTEST/$f.sed.out || \
+ mv -f $DBTEST/$f.sed.out $DBTEST/$f
+ rm -f $DBTEST/$f.sed.out
+done
+cp -f "com/sleepycat/collections/test/serial/TestSerial.java.original" \
+ "$DBTEST/com/sleepycat/collections/test/serial"
+
+if [ $COPY_EXAMPLES -eq 1 ] ; then
+ cd "$JEEXAMPLES"
+ for f in `find . -name '*.java' | grep $DIRMATCH` ; do
+ #echo $DBEXAMPLES/$f
+ sed -e "$E1" < $f > $DBEXAMPLES/$f.sed.out
+ diff -q -I "\$\Id:" $DBEXAMPLES/$f $DBEXAMPLES/$f.sed.out || \
+ mv -f $DBEXAMPLES/$f.sed.out $DBEXAMPLES/$f
+ rm -f $DBEXAMPLES/$f.sed.out
+ done
+fi
+
+exit 0
diff --git a/storage/bdb/dist/s_perm b/storage/bdb/dist/s_perm
index c35278b8c83..8c3a0f74645 100755
--- a/storage/bdb/dist/s_perm
+++ b/storage/bdb/dist/s_perm
@@ -1,14 +1,12 @@
#!/bin/sh -
-# $Id: s_perm,v 1.23 2002/09/09 15:03:06 bostic Exp $
+# $Id: s_perm,v 1.31 2004/10/05 18:56:58 bostic Exp $
d=..
echo 'Updating Berkeley DB source tree permissions...'
-. ./RELEASE
-
run()
{
- echo " $1 ($2)"
+ #echo " $1 ($2)"
if [ -f "$d/$1" ]; then
chmod "$2" "$d/$1"
else
@@ -24,9 +22,12 @@ run dist/configure 555
run dist/install-sh 555
run dist/s_all 555
run dist/s_config 555
+run dist/s_crypto 555
run dist/s_include 555
run dist/s_java 555
-run dist/s_javah 555
+run dist/s_java_const 555
+run dist/s_java_stat 555
+run dist/s_java_swig 555
run dist/s_perm 555
run dist/s_readme 555
run dist/s_recover 555
@@ -38,12 +39,13 @@ run dist/s_vxworks 555
run dist/s_win32 555
run dist/s_win32_dsp 555
run dist/vx_buildcd 555
+run mod_db4/configure 555
run perl/BerkeleyDB/dbinfo 555
run perl/BerkeleyDB/mkpod 555
for i in `cd $d && find build_vxworks \
-name '*.wsp' -o -name '*.cdf' -o -name '*.wpj'`; do
- echo " $i (775)"
+ #echo " $i (775)"
chmod 775 $d/$i
done
diff --git a/storage/bdb/dist/s_readme b/storage/bdb/dist/s_readme
index 1da9f9681c0..f2ed0704451 100755
--- a/storage/bdb/dist/s_readme
+++ b/storage/bdb/dist/s_readme
@@ -1,14 +1,16 @@
#!/bin/sh -
-# $Id: s_readme,v 1.6 2002/02/14 02:50:26 bostic Exp $
+# $Id: s_readme,v 1.7 2003/07/02 15:27:44 bostic Exp $
#
# Build the README.
+echo 'Updating Berkeley DB README file...'
+
d=..
t=/tmp/__t
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
-. ./RELEASE
+. RELEASE
cat << END_OF_README>$t
$DB_VERSION_STRING
diff --git a/storage/bdb/dist/s_recover b/storage/bdb/dist/s_recover
index fc2e160c083..b30a085545d 100755
--- a/storage/bdb/dist/s_recover
+++ b/storage/bdb/dist/s_recover
@@ -1,32 +1,29 @@
#!/bin/sh -
-# $Id: s_recover,v 1.14 2002/03/27 04:31:51 bostic Exp $
+# $Id: s_recover,v 1.17 2004/06/17 17:35:19 bostic Exp $
#
# Build the automatically generated logging/recovery files.
-. ./RELEASE
-
-tmp=/tmp/__db_a
+header=/tmp/__db_a
loglist=/tmp/__db_b
-source=/tmp/__db_c
-header=/tmp/__db_d
+print=/tmp/__db_c
+source=/tmp/__db_d
template=/tmp/__db_e
+tmp=/tmp/__db_f
-trap 'rm -f $tmp $loglist $source $header $template; exit 1' 1 2 3 13 15
-trap 'rm -f $tmp $loglist $source $header $template; exit 0' 0
+trap 'rm -f /tmp/__db_[abcdef]; exit 1' 1 2 3 13 15
+trap 'rm -f /tmp/__db_[abcdef]; exit 0' 0
-DIR="db dbreg btree hash qam txn"
+DIR="db dbreg btree fileops hash qam rep txn"
# Check to make sure we haven't duplicated a log record entry, and build
# the list of log record types that the test suite uses.
for i in $DIR; do
- p=none
for f in ../$i/*.src; do
# Grab the PREFIX; there should only be one per file, and
# so it's okay to just take the first.
grep '^PREFIX' $f | sed q
egrep '^BEGIN[ ]|^IGNORED[ ]|^DEPRECATED[ ]' $f |
awk '{print $1 "\t" $2 "\t" $3}'
-
done
done > $loglist
grep -v '^PREFIX' $loglist |
@@ -42,12 +39,13 @@ cmp $loglist $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $loglist $f && chmod 444 $f)
# Build DB's recovery routines.
-for i in db dbreg btree fileops hash qam txn; do
+for i in $DIR; do
for f in ../$i/*.src; do
subsystem=`basename $f .src`
awk -f gen_rec.awk \
- -v source_file=$source \
-v header_file=$header \
+ -v print_file=$print\
+ -v source_file=$source \
-v template_file=$template < $f
f=../dbinc_auto/${subsystem}_auto.h
@@ -58,6 +56,10 @@ for i in db dbreg btree fileops hash qam txn; do
cmp $source $f > /dev/null 2>&1 ||
(echo "Building $f" &&
rm -f $f && cp $source $f && chmod 444 $f)
+ f=../$i/${subsystem}_autop.c
+ cmp $print $f > /dev/null 2>&1 ||
+ (echo "Building $f" &&
+ rm -f $f && cp $print $f && chmod 444 $f)
f=template/rec_${subsystem}
cmp $template $f > /dev/null 2>&1 ||
(echo "Building $f" &&
@@ -66,4 +68,4 @@ for i in db dbreg btree fileops hash qam txn; do
done
# Build the example application's recovery routines.
-#(cd ../examples_c/ex_apprec && sh auto_rebuild)
+(cd ../examples_c/ex_apprec && sh auto_rebuild)
diff --git a/storage/bdb/dist/s_rpc b/storage/bdb/dist/s_rpc
index cdafa669d85..8dada0e3baf 100644
--- a/storage/bdb/dist/s_rpc
+++ b/storage/bdb/dist/s_rpc
@@ -1,9 +1,9 @@
#!/bin/sh -
-# $Id: s_rpc,v 11.18 2002/08/15 15:22:09 bostic Exp $
+# $Id: s_rpc,v 11.20 2004/03/11 20:11:17 bostic Exp $
#
# Build the automatically generated RPC files
-echo "Building RPC client/server files"
+echo "Building RPC client/server files..."
. ./RELEASE
@@ -13,122 +13,26 @@ trap 'rm -f $t ; exit 1' 1 2 3 13 15
client_file=../rpc_client/gen_client.c
ctmpl_file=./template/gen_client_ret
-dbinc_file=../dbinc/db.in
-defs_file=../dbinc_auto/rpc_defs.in
-header_file=../dbinc_auto/db_server.h
-proc_file=../rpc_server/c/db_server_proc.c
-rpcclnt_file=../rpc_client/db_server_clnt.c
-rpcsvc_file=../rpc_server/c/db_server_svc.c
-rpcxdr_file=../rpc_server/c/db_server_xdr.c
-sed_file=../rpc_server/c/db_server_proc.sed
server_file=../rpc_server/c/gen_db_server.c
stmpl_file=./template/db_server_proc
xdr_file=../rpc_server/db_server.x
-rm -f $client_file \
- $ctmpl_file \
- $header_file \
- $rpcclnt_file \
- $rpcsvc_file \
- $proc_file \
- $rpcxdr_file \
- $sed_file \
- $server_file \
- $stmpl_file \
- $xdr_file
+rm -f $client_file $ctmpl_file $server_file $stmpl_file $xdr_file
#
# Generate client/server/XDR code
#
xidsize=\
-`awk '/^#define/ { if ($2 == "DB_XIDDATASIZE") { print $3 }}' $dbinc_file`
+`awk '/^#define/ { if ($2 == "DB_XIDDATASIZE") { print $3 }}' ../dbinc/db.in`
awk -f gen_rpc.awk \
- -v major=$DB_VERSION_MAJOR \
- -v minor=$DB_VERSION_MINOR \
- -v xidsize=$xidsize \
-v client_file=$client_file \
-v ctmpl_file=$ctmpl_file \
- -v sed_file=$sed_file \
+ -v major=$DB_VERSION_MAJOR \
+ -v minor=$DB_VERSION_MINOR \
-v server_file=$server_file \
-v stmpl_file=$stmpl_file \
- -v xdr_file=$xdr_file < ../rpc_server/rpc.src
-chmod 444 $client_file $server_file
+ -v xdr_file=$xdr_file \
+ -v xidsize=$xidsize < ../rpc_server/rpc.src
-#
-# Now run rpcgen to generate all our sources from the XDR file
-#
-rpcgen -h $xdr_file > $header_file
-rpcgen -l $xdr_file > $rpcclnt_file
-rpcgen -s tcp $xdr_file > $rpcsvc_file
-rpcgen -c $xdr_file > $rpcxdr_file
-
-#
-# Run various server files through sed.
-#
-cat <<ENDOFSEDTEXT>$t
-s/^#include[ ]"db_server.h"/#include "db_config.h"\\
-\\
-\\#ifndef NO_SYSTEM_INCLUDES\\
-\\#include <rpc\\/rpc.h>\\
-\\#include <rpc\\/pmap_clnt.h>/
-/^#include <netinet.in.h>/a\\
-\\#endif\\
-\\
-\\#include "db_int.h"\\
-\\#include "dbinc_auto/db_server.h"\\
-\\#include "dbinc/db_server_int.h"\\
-\\#include "dbinc_auto/rpc_server_ext.h"
-/^ return;/i\\
-\\ __dbsrv_timeout(0);
-s/svc_sendreply(transp, xdr_void,/svc_sendreply(transp, (xdrproc_t)xdr_void,/
-s/svc_getargs(transp, xdr_argument, &argument)/svc_getargs(transp, (xdrproc_t)xdr_argument, (char *)\&argument)/
-s/svc_sendreply(transp, xdr_result, result)/svc_sendreply(transp, (xdrproc_t)xdr_result, result)/
-s/svc_freeargs(transp, xdr_argument, &argument)/svc_freeargs(transp, (xdrproc_t)xdr_argument, (char *)\&argument)/
-s/^main/void __dbsrv_main/
-ENDOFSEDTEXT
-sed -f $t $rpcsvc_file > ${rpcsvc_file}.new
-mv ${rpcsvc_file}.new $rpcsvc_file
-
-sed -f $sed_file ${proc_file}.in > ${proc_file}
-
-# Run rpcgen files through sed to add HAVE_RPC ifdef and appropriate
-# includes.
-cat <<ENDOFSEDTEXT>$t
-1i\\
-\\#include "db_config.h"\\
-\\
-\\#ifdef HAVE_RPC
-/^#include "db_server.h"/c\\
-\\#ifndef NO_SYSTEM_INCLUDES\\
-\\#include <rpc/rpc.h>\\
-\\
-\\#include <strings.h>\\
-\\#endif\\
-\\
-\\#include "db_int.h"\\
-\\#include "dbinc_auto/db_server.h"
-\$a\\
-\\#endif /* HAVE_RPC */
-ENDOFSEDTEXT
-
-sed -f $t $rpcxdr_file > ${rpcxdr_file}.new
-mv ${rpcxdr_file}.new $rpcxdr_file
-sed -f $t $rpcclnt_file > ${rpcclnt_file}.new
-mv ${rpcclnt_file}.new $rpcclnt_file
-
-# Copy the DB_RPC SERVER #defines into a separate file so
-# they can be part of db.h.
-msgc="/* DO NOT EDIT: automatically built by dist/s_rpc. */"
-(echo "" && echo "$msgc" &&
- sed -n -e "/DB_RPC_SERVER/p" $header_file) > $defs_file
-
-# Fix up the header file:
-# Remove the DB_RPC_SERVER #defines.
-# Remove the <rpc/rpc.h> include, it needs to be included earlier
-# than that.
-sed -e "/DB_RPC_SERVER/d"\
- -e "/^#include.*<rpc\/rpc.h>/d" $header_file > ${header_file}.new
-mv ${header_file}.new $header_file
-
-chmod 444 $header_file $rpcclnt_file $rpcsvc_file $rpcxdr_file
+chmod 444 $client_file $server_file
diff --git a/storage/bdb/dist/s_symlink b/storage/bdb/dist/s_symlink
index 8da49ca0c75..533eb6b4435 100755
--- a/storage/bdb/dist/s_symlink
+++ b/storage/bdb/dist/s_symlink
@@ -1,12 +1,11 @@
#!/bin/sh -
-# $Id: s_symlink,v 1.28 2002/08/18 21:15:45 bostic Exp $
+# $Id: s_symlink,v 1.32 2004/04/01 15:10:53 bostic Exp $
echo 'Creating Berkeley DB source tree symbolic links...'
-. ./RELEASE
build()
{
- echo " $1 -> $2"
+ #echo " $1 -> $2"
(cd ../`dirname $1` && rm -f `basename $1` && ln -s $2 `basename $1`)
}
@@ -14,7 +13,7 @@ build btree/tags ../dist/tags
build build_unix/tags ../dist/tags
build clib/tags ../dist/tags
build common/tags ../dist/tags
-#build crypto/tags ../dist/tags
+build crypto/tags ../dist/tags
build cxx/tags ../dist/tags
build db/tags ../dist/tags
build db185/tags ../dist/tags
@@ -34,9 +33,8 @@ build dbinc_auto/tags ../dist/tags
build dbm/tags ../dist/tags
build dbreg/tags ../dist/tags
build env/tags ../dist/tags
-#build examples_c/tags ../dist/tags
-#build examples_cxx/tags ../dist/tags
-#build examples_java java/src/com/sleepycat/examples
+build examples_c/tags ../dist/tags
+build examples_cxx/tags ../dist/tags
build fileops/tags ../dist/tags
build hash/tags ../dist/tags
build hmac/tags ../dist/tags
@@ -53,7 +51,7 @@ build qam/tags ../dist/tags
build rep/tags ../dist/tags
build rpc_client/tags ../dist/tags
build rpc_server/tags ../dist/tags
+build sequence/tags ../dist/tags
build tcl/tags ../dist/tags
-build test_server/tags ../dist/tags
build txn/tags ../dist/tags
build xa/tags ../dist/tags
diff --git a/storage/bdb/dist/s_tags b/storage/bdb/dist/s_tags
index 18b6025aa86..d1c21e5b232 100755
--- a/storage/bdb/dist/s_tags
+++ b/storage/bdb/dist/s_tags
@@ -1,16 +1,14 @@
#!/bin/sh -
-# $Id: s_tags,v 1.16 2002/03/28 20:13:07 krinsky Exp $
+# $Id: s_tags,v 1.18 2004/04/01 15:11:14 bostic Exp $
#
# Build tags files.
-. ./RELEASE
-
-files="../dbinc/*.h \
+files=`echo ../dbinc/*.h \
../dbinc/*.in \
../btree/*.[ch] \
../clib/*.[ch] \
../common/*.[ch] \
-# ../crypto/*.[ch] \
+ ../crypto/*.[ch] \
../crypto/mersenne/*.[ch] \
../crypto/rijndael/*.[ch] \
../db/*.[ch] \
@@ -31,11 +29,12 @@ files="../dbinc/*.h \
../rep/*.[ch] \
../rpc_client/*.[ch] \
../rpc_server/c/*.[ch] \
+ ../sequence/*.[ch] \
../tcl/*.[ch] \
../txn/*.[ch] \
../xa/*.[ch] \
../cxx/*.cpp \
- ../libdb_java/*.[ch]"
+ ../libdb_java/*.[ch] | sed 's/[^ ]*stub.c//g'`
f=tags
echo "Building $f"
@@ -56,7 +55,7 @@ fi
ctags $flags $files 2>/dev/null
chmod 444 $f
-#f=../test_perf/tags
-#echo "Building $f"
-#(cd ../test_perf && ctags $flags *.[ch] 2>/dev/null)
-#chmod 444 $f
+f=../test_perf/tags
+echo "Building $f"
+(cd ../test_perf && ctags $flags *.[ch] 2>/dev/null)
+chmod 444 $f
diff --git a/storage/bdb/dist/s_test b/storage/bdb/dist/s_test
index 16f3b9712d0..df0648d56ba 100755
--- a/storage/bdb/dist/s_test
+++ b/storage/bdb/dist/s_test
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $Id: s_test,v 1.24 2002/08/09 02:24:58 bostic Exp $
+# $Id: s_test,v 1.29 2004/05/13 18:51:43 mjc Exp $
#
# Build the Tcl test files.
@@ -9,12 +9,12 @@ msg2="# Automatically built by dist/s_test; may require local editing."
t=/tmp/__t
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
-. ./RELEASE
+. RELEASE
(echo "$msg1" && \
echo "" && \
echo "set tclsh_path @TCL_TCLSH@" && \
- echo "set tcllib .libs/libdb_tcl-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@MODSUFFIX@" && \
+ echo "set tcllib .libs/libdb_tcl-@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@@LIBTSO_MODSUFFIX@" && \
echo "" && \
echo "set rpc_server localhost" && \
echo "set rpc_path ." && \
@@ -22,6 +22,7 @@ trap 'rm -f $t; exit 0' 0 1 2 3 13 15
echo "" && \
echo "set src_root @srcdir@/.." && \
echo "set test_path @srcdir@/../test" && \
+ echo "set je_root @srcdir@/../../je" && \
echo "" && \
echo "global testdir" && \
echo "set testdir ./TESTDIR" && \
@@ -46,6 +47,7 @@ cmp $t $f > /dev/null 2>&1 ||
echo "" && \
echo "set src_root .." && \
echo "set test_path ../test" && \
+ echo "set je_root ../../je" && \
echo "" && \
echo "global testdir" && \
echo "set testdir ./TESTDIR" && \
diff --git a/storage/bdb/dist/s_vxworks b/storage/bdb/dist/s_vxworks
index 05c2599d02c..fbff44ab019 100644
--- a/storage/bdb/dist/s_vxworks
+++ b/storage/bdb/dist/s_vxworks
@@ -1,21 +1,22 @@
#!/bin/sh -
-# $Id: s_vxworks,v 1.37 2002/08/19 21:27:06 bostic Exp $
+# $Id: s_vxworks,v 1.52 2004/10/15 18:28:21 bostic Exp $
#
# Build the VxWorks files.
msgc="/* DO NOT EDIT: automatically built by dist/s_vxworks. */"
-. ./RELEASE
+. RELEASE
s=/tmp/__db_a
t=/tmp/__db_b
-vxfilelist=/tmp/__db_c
+u=/tmp/__db_c
+vxfilelist=/tmp/__db_d
+vxsmallfiles=/tmp/__db_e
-trap 'rm -f $s $t $vxfilelist ; exit 0' 0
-trap 'rm -f $s $t $vxfilelist ; exit 1' 1 2 3 13 15
+trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 0' 0
+trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 1' 1 2 3 13 15
# Build the VxWorks automatically generated files.
-f=../build_vxworks/db.h
cat <<ENDOFSEDTEXT > $s
/extern "C" {/{
n
@@ -27,37 +28,54 @@ i\\
#define __vxworks\\
#endif
}
+/@inttypes_h_decl@/d
+/@stdint_h_decl@/d
+/@stddef_h_decl@/d
s/@u_int8_decl@/typedef unsigned char u_int8_t;/
-s/@u_int16_decl@/typedef unsigned short u_int16_t;/
-s/@u_int32_decl@/typedef unsigned int u_int32_t;/
/@int16_decl@/d
+s/@u_int16_decl@/typedef unsigned short u_int16_t;/
/@int32_decl@/d
+s/@u_int32_decl@/typedef unsigned int u_int32_t;/
+s/@int64_decl@//
+s/@u_int64_decl@//
/@u_char_decl@/d
/@u_short_decl@/d
/@u_int_decl@/d
/@u_long_decl@/d
/@ssize_t_decl@/d
+s/@uintmax_t_decl@/typedef unsigned long uintmax_t;/
+s/@uintptr_t_decl@/typedef unsigned long uintptr_t;/
+s/@db_seq_decl@/typedef int db_seq_t;/
s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/
s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
s/@DB_VERSION_UNIQUE_NAME@//
+s/@DB_CONST@//
+s/@DB_PROTO1@/#undef __P/
+s/@DB_PROTO2@/#define __P(protos) protos/
ENDOFSEDTEXT
(echo "$msgc" &&
sed -f $s ../dbinc/db.in &&
- cat ../dbinc_auto/rpc_defs.in &&
cat ../dbinc_auto/ext_prot.in) > $t
+`egrep '@.*@' $t` && {
+ echo 'Unexpanded autoconf variables found in VxWorks db.h.'
+ exit 1
+}
+f=../build_vxworks/db.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-f=../build_vxworks/db_int.h
cat <<ENDOFSEDTEXT > $s
-s/\(PATH_SEPARATOR[^"]*"\)\/"/\1\/\\\\\\\\\\"/
-s/@db_align_t_decl@/typedef unsigned long db_align_t;/
-s/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/
+s/@PATH_SEPARATOR@/\/\\\\\\\\/
s/@db_int_def@//
ENDOFSEDTEXT
(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
+`egrep '@.*@' $t` && {
+ echo 'Unexpanded autoconf variables found in VxWorks db_int.h.'
+ exit 1
+}
+f=../build_vxworks/db_int.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
@@ -66,6 +84,19 @@ f=../build_vxworks/db_config.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_vxworks/db_config_small.h
+(echo "$msgc" &&
+ sed -e "s/__EDIT_DB_VERSION__/$DB_VERSION/" \
+ -e "s;^#define.*HAVE_CRYPTO.*1;/* #undef HAVE_CRYPTO */;" \
+ -e "s;^#define.*HAVE_HASH.*1;/* #undef HAVE_HASH */;" \
+ -e "s;^#define.*HAVE_QUEUE.*1;/* #undef HAVE_QUEUE */;" \
+ -e "s;^#define.*HAVE_REPLICATION.*1;/* #undef HAVE_REPLICATION */;" \
+ -e "s;^#define.*HAVE_STATISTICS.*1;/* #undef HAVE_STATISTICS */;" \
+ -e "s;^#define.*HAVE_VERIFY.*1;/* #undef HAVE_VERIFY */;" \
+ vx_config.in) > $t
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+
# Build a sed script that will change a "standard" DB utility into
# VxWorks-compatible code.
transform()
@@ -164,7 +195,11 @@ for i in $PROGRAM_LIST; do
fi
sed "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in > $t
- f=../build_vxworks/$target/$target.wpj
+ f=../build_vxworks/$target/${target}20.wpj
+ cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+ sed "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.2/wpj.in > $t
+ f=../build_vxworks/$target/${target}22.wpj
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
done
@@ -174,151 +209,86 @@ sed -e '/^$/d' -e '/^[ #]/d' srcfiles.in |
egrep -w vx |
sed 's/[ ].*//' > $vxfilelist
+# Build the list of files VxWorks knows about.
+sed -e '/^$/d' -e '/^[ #]/d' srcfiles.in |
+ egrep -w vxsmall |
+ sed 's/[ ].*//' > $vxsmallfiles
+
# Build VxWorks Tornado 2.0 project files for the library itself.
-(cat vx_2.0/BerkeleyDB.wpj
-for i in `cat $vxfilelist`; do
- o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
- echo "${o}_dependDone"
- echo "TRUE"
- echo "<END>"
- echo
- echo "${o}_dependencies"
- echo "\$(PRJ_DIR)/db_config.h \\"
- echo " \$(PRJ_DIR)/db_int.h \\"
- echo " \$(PRJ_DIR)/db.h"
- echo "<END>"
- echo
- echo "${o}_objects"
- echo "`basename $i .c`.o"
+for v in 0 2 ; do
+ #
+ # Build regular project files
+ #
+ (cat vx_2.${v}/BerkeleyDB.wpj
+ for i in `cat $vxfilelist`; do
+ o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
+ echo "${o}_dependDone"
+ echo "TRUE"
+ echo "<END>"
+ echo
+ echo "${o}_dependencies"
+ echo "\$(PRJ_DIR)/db_config.h \\"
+ echo " \$(PRJ_DIR)/db_int.h \\"
+ echo " \$(PRJ_DIR)/db.h"
+ echo "<END>"
+ echo
+ echo "${o}_objects"
+ echo "`basename $i .c`.o"
+ echo "<END>"
+ echo
+ echo "${o}_tool"
+ echo "C/C++ compiler"
+ echo "<END>"
+ echo
+ done
+ echo "<BEGIN> PROJECT_FILES"
+ sed -e '$!s/$/ \\/' \
+ -e 's/^/$(PRJ_DIR)\/..\//' \
+ -e '1!s/^/ /' < $vxfilelist
echo "<END>"
echo
- echo "${o}_tool"
- echo "C/C++ compiler"
+ echo "<BEGIN> userComments"
+ echo "BerkeleyDB"
+ echo "<END>") > $t
+ #
+ # Build small lib project files
+ #
+ (cat vx_2.${v}/BerkeleyDBsmall.wpj
+ for i in `cat $vxsmallfiles`; do
+ o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
+ echo "${o}_dependDone"
+ echo "TRUE"
+ echo "<END>"
+ echo
+ echo "${o}_dependencies"
+ echo "\$(PRJ_DIR)/db_config.h \\"
+ echo " \$(PRJ_DIR)/db_int.h \\"
+ echo " \$(PRJ_DIR)/db.h"
+ echo "<END>"
+ echo
+ echo "${o}_objects"
+ echo "`basename $i .c`.o"
+ echo "<END>"
+ echo
+ echo "${o}_tool"
+ echo "C/C++ compiler"
+ echo "<END>"
+ echo
+ done
+ echo "<BEGIN> PROJECT_FILES"
+ sed -e '$!s/$/ \\/' \
+ -e 's/^/$(PRJ_DIR)\/..\//' \
+ -e '1!s/^/ /' < $vxsmallfiles
echo "<END>"
echo
-done
-echo "<BEGIN> PROJECT_FILES"
-sed -e '$!s/$/ \\/' \
- -e 's/^/$(PRJ_DIR)\/..\//' \
- -e '1!s/^/ /' < $vxfilelist
-echo "<END>"
-echo
-echo "<BEGIN> userComments"
-echo "BerkeleyDB"
-echo "<END>") > $t
-f=../build_vxworks/BerkeleyDB.wpj
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-# Build VxWorks Tornado 3.1 project files for the utilities.
-for i in $PROGRAM_LIST; do
- if [ $i = "ex_access" ]; then
- target=dbdemo
- dir=../examples_c
- else
- target=$i
- dir=../$i
- fi
-
- cp vx_3.1/Makefile.custom $t
- f=../build_vxworks/$target/$target/Makefile.custom
+ echo "<BEGIN> userComments"
+ echo "BerkeleyDB"
+ echo "<END>") > $u
+ f=../build_vxworks/BerkeleyDB2${v}.wpj
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
- for j in component.cdf component.wpj; do
- #
- # Some parts of the component files needs to have the
- # name in all capitals. Sigh.
- #
- z=`echo $target | tr "a-z" "A-Z"`
- sed -e "s/__DB_APPLICATION_NAME__/$target/g" \
- -e "s/__DB_CAPAPPL_NAME__/$z/g" < vx_3.1/$j > $t
- f=../build_vxworks/$target/$target/$j
- cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
- done
-done
-
-# Build VxWorks Tornado 3.1 project files for the library itself.
-cp vx_3.1/Makefile.custom $t
-f=../build_vxworks/BerkeleyDB/Makefile.custom
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-
-(cat vx_3.1/cdf.1
-echo -n " MODULES"
-for i in `cat $vxfilelist`; do
- echo " `basename $i .c`.o"
-done | sort | sed -e '$!s/$/ \\/'
-cat vx_3.1/cdf.2
-for i in `cat $vxfilelist`; do
- b="`basename $i .c`.o"
- echo "Module $b {"
- echo
- echo " NAME $b"
- echo " SRC_PATH_NAME \$(PRJ_DIR)/../../$i"
- echo "}"
- echo
+ f=../build_vxworks/BerkeleyDB2${v}small.wpj
+ cmp $u $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $u $f && chmod 444 $f)
done
-cat vx_3.1/cdf.3)> $t
-f=../build_vxworks/BerkeleyDB/component.cdf
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-(cat vx_3.1/wpj.1
-for i in `cat $vxfilelist`; do
- o="<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_\$(PRJ_DIR)/../../$i"
- echo "${o}_infoTags"
- echo "toolMacro objects"
- echo "<END>"
- echo
- echo "${o}_objects"
- echo "`basename $i .c`.o"
- echo "<END>"
- echo
- echo "${o}_toolMacro"
- echo "CC"
- echo "<END>"
- echo
-done
-cat vx_3.1/wpj.2
-for i in `cat $vxfilelist`; do
- o="<BEGIN> BUILD_PENTIUM2gnu.release_FILE_\$(PRJ_DIR)/../../$i"
- echo "${o}_infoTags"
- echo "toolMacro objects"
- echo "<END>"
- echo
- echo "${o}_objects"
- echo "`basename $i .c`.o"
- echo "<END>"
- echo
- echo "${o}_toolMacro"
- echo "CC"
- echo "<END>"
- echo
-done
-cat vx_3.1/wpj.3
-for i in `cat $vxfilelist`; do
- o="<BEGIN> BUILD_PENTIUMgnu.debug_FILE_\$(PRJ_DIR)/../../$i"
- echo "${o}_infoTags"
- echo "toolMacro objects"
- echo "<END>"
- echo
- echo "${o}_objects"
- echo "`basename $i .c`.o"
- echo "<END>"
- echo
- echo "${o}_toolMacro"
- echo "CC"
- echo "<END>"
- echo
-done
-cat vx_3.1/wpj.4
-sort $vxfilelist |
-sed -e 's/^/$(PRJ_DIR)\/..\/..\//' \
- -e '1!s/^/ /' \
- -e '$!s/$/ \\/'
-cat vx_3.1/wpj.5) > $t
-f=../build_vxworks/BerkeleyDB/component.wpj
-cmp $t $f > /dev/null 2>&1 ||
- (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
diff --git a/storage/bdb/dist/s_win32 b/storage/bdb/dist/s_win32
index 207978b82bb..acdb9224918 100755
--- a/storage/bdb/dist/s_win32
+++ b/storage/bdb/dist/s_win32
@@ -1,12 +1,12 @@
#!/bin/sh -
-# $Id: s_win32,v 1.25 2002/05/20 19:18:14 bostic Exp $
+# $Id: s_win32,v 1.37 2004/10/15 18:28:21 bostic Exp $
#
# Build Windows/32 include files.
msgc="/* DO NOT EDIT: automatically built by dist/s_win32. */"
msgw="; DO NOT EDIT: automatically built by dist/s_win32."
-. ./RELEASE
+. RELEASE
s=/tmp/__db_a$$
t=/tmp/__db_b$$
@@ -15,16 +15,21 @@ rm -f $s $t
trap 'rm -f $s $t ; exit 1' 1 2 3 13 15
# Build the Win32 automatically generated files.
-f=../build_win32/db.h
cat <<ENDOFSEDTEXT > $s
+/@inttypes_h_decl@/d
+/@stdint_h_decl@/d
+s/@stddef_h_decl@/#include <stddef.h>/
s/@u_int8_decl@/typedef unsigned char u_int8_t;/
s/@int16_decl@/typedef short int16_t;/
s/@u_int16_decl@/typedef unsigned short u_int16_t;/
s/@int32_decl@/typedef int int32_t;/
s/@u_int32_decl@/typedef unsigned int u_int32_t;/
+s/@int64_decl@/typedef __int64 int64_t;/
+s/@u_int64_decl@/typedef unsigned __int64 u_int64_t;/
+s/@db_seq_decl@/typedef int64_t db_seq_t;/
/@u_char_decl@/{
i\\
-#if !defined(_WINSOCKAPI_)
+#ifndef _WINSOCKAPI_
s/@u_char_decl@/typedef unsigned char u_char;/
}
s/@u_short_decl@/typedef unsigned short u_short;/
@@ -36,10 +41,20 @@ s/@u_int_decl@/typedef unsigned int u_int;/
}
/@ssize_t_decl@/{
i\\
-#if defined(_WIN64)\\
-typedef __int64 ssize_t;\\
+#ifdef _WIN64\\
+typedef int64_t ssize_t;\\
+#else\\
+typedef int32_t ssize_t;\\
+#endif
+ d
+}
+s/@uintmax_t_decl@/typedef u_int64_t uintmax_t;/
+/@uintptr_t_decl@/{
+ i\\
+#ifdef _WIN64\\
+typedef u_int64_t uintptr_t;\\
#else\\
-typedef int ssize_t;\\
+typedef u_int32_t uintptr_t;\\
#endif
d
}
@@ -48,30 +63,52 @@ s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/
s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/
s/@DB_VERSION_STRING@/"$DB_VERSION_STRING"/
s/@DB_VERSION_UNIQUE_NAME@//
+s/@DB_CONST@//
+s/@DB_PROTO1@/#undef __P/
+s/@DB_PROTO2@/#define __P(protos) protos/
ENDOFSEDTEXT
(echo "$msgc" &&
sed -f $s ../dbinc/db.in &&
- cat ../dbinc_auto/rpc_defs.in &&
cat ../dbinc_auto/ext_prot.in) > $t
+`egrep '@.*@' $t` && {
+ echo 'Unexpanded autoconf variables found in Windows db.h.'
+ exit 1
+}
+f=../build_win32/db.h
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_win64/db.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-f=../build_win32/db_cxx.h
cat <<ENDOFSEDTEXT > $s
s/@cxx_have_stdheaders@/#define HAVE_CXX_STDHEADERS 1/
ENDOFSEDTEXT
(echo "$msgc" && sed -f $s ../dbinc/db_cxx.in) > $t
+`egrep '@.*@' $t` && {
+ echo 'Unexpanded autoconf variables found in Windows db_cxx.h.'
+ exit 1
+}
+f=../build_win32/db_cxx.h
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_win64/db_cxx.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
-f=../build_win32/db_int.h
cat <<ENDOFSEDTEXT > $s
-s/\(PATH_SEPARATOR[^"]*"\)\/"/\1\\\\\\\\\\/:\"/
-s/@db_align_t_decl@/typedef unsigned long db_align_t;/
-s/@db_alignp_t_decl@/typedef unsigned long db_alignp_t;/
+s/@PATH_SEPARATOR@/\\\\\\\\\/:/
s/@db_int_def@//
ENDOFSEDTEXT
(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
+`egrep '@.*@' $t` && {
+ echo 'Unexpanded autoconf variables found in Windows db_int.h.'
+ exit 1
+}
+f=../build_win32/db_int.h
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_win64/db_int.h
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
@@ -79,6 +116,9 @@ f=../build_win32/db_config.h
(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" win_config.in) > $t
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_win64/db_config.h
+cmp $t $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
f=../build_win32/libdb.rc
cat <<ENDOFSEDTEXT > $s
@@ -93,9 +133,6 @@ cmp $t $f > /dev/null 2>&1 ||
f=../build_win32/libdb.def
(echo $msgw &&
echo &&
- echo \
- "DESCRIPTION 'Berkeley DB $DB_VERSION_MAJOR.$DB_VERSION_MINOR Library'" &&
- echo &&
echo EXPORTS;
a=1
for i in `sed -e '/^$/d' -e '/^#/d' win_exports.in`; do
@@ -105,4 +142,12 @@ done) > $t
cmp $t $f > /dev/null 2>&1 ||
(echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
+f=../build_win32/win_db.h
+i=win_db.in
+cmp $i $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $i $f && chmod 444 $f)
+f=../build_win64/win_db.h
+cmp $i $f > /dev/null 2>&1 ||
+ (echo "Building $f" && rm -f $f && cp $i $f && chmod 444 $f)
+
rm -f $s $t
diff --git a/storage/bdb/dist/s_win32_dsp b/storage/bdb/dist/s_win32_dsp
index af5551ec248..10e0ccc4b05 100644
--- a/storage/bdb/dist/s_win32_dsp
+++ b/storage/bdb/dist/s_win32_dsp
@@ -1,11 +1,10 @@
#!/bin/sh -
-# $Id: s_win32_dsp,v 1.8 2002/03/26 23:37:55 bostic Exp $
+# $Id: s_win32_dsp,v 1.12 2004/08/20 15:01:06 mjc Exp $
#
# Build Windows/32 .dsp files.
-. ./RELEASE
+. RELEASE
-BUILDDIR=../build_win32
SRCFILES=srcfiles.in
create_dsp()
@@ -27,7 +26,7 @@ create_dsp()
# forward slash, but we need that when feeding that to the
# later sed command.
set - `echo $srcpath | sed -e 's;\(.*\)/;../\\1 ;' \
- -e 's;../build_win32;.;' \
+ -e "s;$BUILDDIR;.;" \
-e 's;/;\\\\\\\\;g'`
srcdir="$1"
srcfile="$2"
@@ -35,9 +34,7 @@ create_dsp()
-e "s/@srcfile@/$srcfile/g" \
< $srctemplate >> $dspoutput.insert
done
- # We need exactly one space after the 'r' modifier
- # See 5.9 in http://www.student.northpark.edu/pemente/sed/sedfaq.txt
- sed -e "/@SOURCE_FILES@/r $dspoutput.insert" \
+ sed -e "/@SOURCE_FILES@/r$dspoutput.insert" \
-e "/@SOURCE_FILES@/d" \
-e "s/@project_name@/$projname/g" \
-e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/g" \
@@ -70,40 +67,52 @@ sed -e "s/#.*$//" \
MODULES="`sed -e 's/^[^ ]* //' < $TMPA \
| tr ' ' '\012' | sort | uniq`"
-for module in $MODULES
+for BUILDDIR in ../build_win32 ../build_win64
do
- case "$module" in
- dynamic )
- create_dsp db_dll " $module " $TMPA \
- $BUILDDIR/dynamic_dsp.src $BUILDDIR/srcfile_dsp.src
- ;;
- java )
- create_dsp db_java " $module " $TMPA \
- $BUILDDIR/java_dsp.src $BUILDDIR/srcfile_dsp.src
- ;;
- tcl )
- create_dsp db_tcl " $module " $TMPA \
- $BUILDDIR/tcl_dsp.src $BUILDDIR/srcfile_dsp.src
- ;;
- testutil )
- create_dsp db_test " $module " $TMPA \
- $BUILDDIR/db_test.src $BUILDDIR/srcfile_dsp.src
- ;;
- static )
- create_dsp db_static " $module " $TMPA \
- $BUILDDIR/static_dsp.src $BUILDDIR/srcfile_dsp.src
- ;;
- app=* )
- appname=`echo $module | sed -e 's/^app=//'`
- create_dsp $appname " $module " $TMPA \
- $BUILDDIR/app_dsp.src $BUILDDIR/srcfile_dsp.src
- ;;
- vx )
- ;;
- * )
- echo "s_win32_dsp: module name $module in $SRCFILES is unknown type"
- ;;
- esac
+ for module in $MODULES
+ do
+ case "$module" in
+ dynamic )
+ create_dsp db_dll " $module " $TMPA \
+ $BUILDDIR/dynamic_dsp.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ small )
+ create_dsp db_small " $module " $TMPA \
+ $BUILDDIR/small_dsp.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ static )
+ create_dsp db_static " $module " $TMPA \
+ $BUILDDIR/static_dsp.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ java )
+ create_dsp db_java " $module " $TMPA \
+ $BUILDDIR/java_dsp.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ tcl )
+ create_dsp db_tcl " $module " $TMPA \
+ $BUILDDIR/tcl_dsp.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ testutil )
+ create_dsp db_test " $module " $TMPA \
+ $BUILDDIR/db_test.src $BUILDDIR/srcfile_dsp.src
+ ;;
+ app=* )
+ appname=`echo $module | sed -e 's/^app=//'`
+ if [ -f $BUILDDIR/$appname.src ] ; then
+ srcname=$BUILDDIR/$appname.src
+ else
+ srcname=$BUILDDIR/app_dsp.src
+ fi
+ create_dsp $appname " $module " $TMPA \
+ $srcname $BUILDDIR/srcfile_dsp.src
+ ;;
+ vx|vxsmall )
+ ;;
+ * )
+ echo "s_win32_dsp: module name $module in $SRCFILES is unknown type"
+ ;;
+ esac
+ done
done
rm -f $TMPA
diff --git a/storage/bdb/dist/s_winmsi b/storage/bdb/dist/s_winmsi
new file mode 100644
index 00000000000..d7dc42770cf
--- /dev/null
+++ b/storage/bdb/dist/s_winmsi
@@ -0,0 +1,126 @@
+#!/bin/bash -
+# $Id: s_winmsi,v 1.6 2005/04/15 18:48:57 philipr Exp $
+#
+# Note: The s_winmsi script in Berkeley DB core closely parallels the
+# s_winmsi script in Berkeley DB/XML. If you change one,
+# consider whether your changes apply to the other.
+# As of this writing, the two s_winmsi scripts 'diff' very closely, and
+# identical portions have been factored into functions in s_winmsi.fcn.
+#
+# Usage: s_winmsi [ options ]
+#
+# See the Usage() function in s_winmsi.fcn for a full list of options.
+# By default, this script expects a db-X.Y.Z.NC.zip file
+# to be in this directory, and uses it to build all binaries
+# needed for an Windows install, and finally builds the an
+# output db-X.Y.Z.NC.msi file that can be installed on
+# Windows XP and 2000.
+#
+# The major other inputs to this script are these files:
+#
+# features.in list of choosable features (like Java,PHP,...)
+# files.in what files are in each feature and where they belong
+# links.in a list of URLs that end up as part of the Start Menu
+# environment.in a list of environment vars that must be set
+#
+# This script does a number of operations, using the directory
+# './winmsi/stage' as a staging area:
+#
+# extracts the contents of the input ZIP file and uses those
+# files (minus docs/...) to build a Sources directory for
+# the Sources features.
+#
+# builds Berkeley DB using Visual Studio tools using a .BAT
+# script derived from winbuild.in .
+#
+# builds Perl and other APIs .
+#
+# uses {features,files,links,environment}.in to build some include
+# files in WiX XML format. These files are named
+# *.wixinc (e.g. directory.wixinc)
+#
+# run m4 on dbcorewix.in to create dbcore.wxs . dbcorewix.in
+# uses m4 macros to allow reasonable refactoring of repeated
+# UI code. Also, m4 is used to include the files created in
+# the previous step.
+#
+# Use the WiX compiler/linker on the .wxs files to create the .msi file.
+#
+################################################################
+
+# Define all needed shell functions
+. ./winmsi/s_winmsi.fcn
+
+ERRORLOG="$0".log
+SetupErrorLog
+
+# Do this before parsing options, we need the version number
+. ./RELEASE
+dbver=db-$DB_VERSION.NC
+
+# Set variables used by functions to customize this installer
+PRODUCT_NAME="Berkeley DB"
+PRODUCT_VERSION="$DB_VERSION"
+PRODUCT_STAGE=`pwd`/winmsi/stage
+PRODUCT_LICENSEDIR="${PRODUCT_STAGE}/$dbver"
+PRODUCT_SUB_BLDDIR="${PRODUCT_STAGE}/$dbver"
+PRODUCT_BLDDIR="${PRODUCT_STAGE}/$dbver"
+PRODUCT_SRCDIR="${PRODUCT_STAGE}/$dbver"
+PRODUCT_DBBUILDDIR="${PRODUCT_STAGE}/$dbver/build_unix"
+PRODUCT_SHARED_WINMSIDIR=`pwd`/winmsi
+PRODUCT_IMAGEDIR=$PRODUCT_SHARED_WINMSIDIR/images
+PRODUCT_ZIP_FILEFMT="db-X.Y.Z.NC.zip"
+PRODUCT_MSI_FILEFMT="db-X.Y.Z.NC.msi"
+
+# Gather command line options, and use reasonable defaults
+SetupOptions \
+ -input "$dbver.zip" \
+ -output "$dbver.msi" \
+ "$@"
+
+if [ "$OPT_USEBUILD" != '' ]; then
+ PRODUCT_BLDDIR="${OPT_USEBUILD}"
+ PRODUCT_SUB_BLDDIR="${OPT_USEBUILD}"
+fi
+
+Progress "s_winmsi starting, errors to $ERRORLOG"
+
+# Fail fast for certain missing files
+
+RequireCygwin
+RequireJava
+RequireTcl
+RequireWix
+RequirePerl
+
+CreateStage
+cd ${PRODUCT_STAGE}
+
+
+CreateSources ${PRODUCT_STAGE}/Sources
+
+# The docs are put into a separate feature set
+mv ${PRODUCT_STAGE}/Sources/docs ${PRODUCT_STAGE}/
+
+# Build everything unless we were told to use a preexisting build
+if [ "$OPT_USEBUILD" = '' ]; then
+ CreateWindowsBuild
+ CreateWindowsSystem
+ CreateInclude \
+ ${PRODUCT_SUB_BLDDIR}/installed_include \
+ ${PRODUCT_SUB_BLDDIR}/dbinc/* \
+ ${PRODUCT_SUB_BLDDIR}/dbinc_auto/* \
+ ${PRODUCT_SUB_BLDDIR}/build_win32/*.h
+ CreateDbPerl
+fi
+
+if ! "$OPT_SKIPGEN" ; then
+ CreateLicenseRtf ../../../LICENSE license.rtf
+ CreateWixIncludeFiles
+fi
+
+CreateMsi ../dbcorewix.in dbcore.wxs "$OPT_OUTFILE"
+
+Progress "s_winmsi finished, $OPT_OUTFILE created."
+exit 0
+
diff --git a/storage/bdb/dist/srcfiles.in b/storage/bdb/dist/srcfiles.in
index 54aeea0c1bc..b00be5a10f0 100644
--- a/storage/bdb/dist/srcfiles.in
+++ b/storage/bdb/dist/srcfiles.in
@@ -1,4 +1,4 @@
-# $Id: srcfiles.in,v 1.59 2002/08/29 14:22:21 margo Exp $
+# $Id: srcfiles.in,v 1.87 2004/10/30 21:07:01 bostic Exp $
#
# This is an input file for the s_win32_dsp and s_vxworks scripts. It lists
# the source files in the Berkeley DB tree and notes which are used to build
@@ -13,30 +13,33 @@
#
# app=NAME Linked into application NAME.exe (db_NAME.dsp)
# dynamic File is in the Windows DLL (db_dll.dsp)
-# java File is in the Windows Java DLL (db_java.dsp)
+# small File is in the small Windows library (db_small.dsp)
# static File is in the Windows static library (db_static.dsp)
+# java File is in the Windows Java DLL (db_java.dsp)
# tcl File is in the Windows tcl DLL (db_tcl.dsp)
# testutil File is used for Windows testing (db_test.dsp)
# vx File is in the VxWorks library.
+# vxsmall File is in the small VxWorks library.
-btree/bt_compare.c dynamic static vx
-btree/bt_conv.c dynamic static vx
-btree/bt_curadj.c dynamic static vx
-btree/bt_cursor.c dynamic static vx
-btree/bt_delete.c dynamic static vx
-btree/bt_method.c dynamic static vx
-btree/bt_open.c dynamic static vx
-btree/bt_put.c dynamic static vx
-btree/bt_rec.c dynamic static vx
-btree/bt_reclaim.c dynamic static vx
-btree/bt_recno.c dynamic static vx
-btree/bt_rsearch.c dynamic static vx
-btree/bt_search.c dynamic static vx
-btree/bt_split.c dynamic static vx
-btree/bt_stat.c dynamic static vx
-btree/bt_upgrade.c dynamic static vx
+btree/bt_compare.c dynamic small static vx vxsmall
+btree/bt_conv.c dynamic small static vx vxsmall
+btree/bt_curadj.c dynamic small static vx vxsmall
+btree/bt_cursor.c dynamic small static vx vxsmall
+btree/bt_delete.c dynamic small static vx vxsmall
+btree/bt_method.c dynamic small static vx vxsmall
+btree/bt_open.c dynamic small static vx vxsmall
+btree/bt_put.c dynamic small static vx vxsmall
+btree/bt_rec.c dynamic small static vx vxsmall
+btree/bt_reclaim.c dynamic small static vx vxsmall
+btree/bt_recno.c dynamic small static vx vxsmall
+btree/bt_rsearch.c dynamic small static vx vxsmall
+btree/bt_search.c dynamic small static vx vxsmall
+btree/bt_split.c dynamic small static vx vxsmall
+btree/bt_stat.c dynamic small static vx vxsmall
+btree/bt_upgrade.c dynamic small static vx vxsmall
btree/bt_verify.c dynamic static vx
-btree/btree_auto.c dynamic static vx
+btree/btree_auto.c dynamic small static vx vxsmall
+btree/btree_autop.c app=db_printlog
build_vxworks/db_archive/db_archive.c
build_vxworks/db_checkpoint/db_checkpoint.c
build_vxworks/db_deadlock/db_deadlock.c
@@ -49,63 +52,78 @@ build_vxworks/db_upgrade/db_upgrade.c
build_vxworks/db_verify/db_verify.c
build_vxworks/dbdemo/dbdemo.c
build_win32/dbkill.cpp testutil
-build_win32/dllmain.c dynamic
build_win32/libdb.def dynamic
build_win32/libdb.rc dynamic
build_win32/libdb_tcl.def tcl
clib/getcwd.c
-clib/getopt.c vx
+clib/getopt.c vx vxsmall
clib/memcmp.c
clib/memmove.c
clib/raise.c
-clib/snprintf.c vx
-clib/strcasecmp.c dynamic static vx
-clib/strdup.c vx
+clib/snprintf.c vx vxsmall
+clib/strcasecmp.c dynamic small static vx vxsmall
+clib/strdup.c vx vxsmall
clib/strerror.c
-clib/vsnprintf.c vx
-common/db_byteorder.c dynamic static vx
-common/db_err.c dynamic static vx
-common/db_getlong.c dynamic static vx
-common/db_idspace.c dynamic static vx
-common/db_log2.c dynamic static vx
-common/util_arg.c vx
-common/util_cache.c dynamic static vx
-common/util_log.c dynamic static vx
-common/util_sig.c dynamic static vx
-cxx/cxx_db.cpp dynamic static
-cxx/cxx_dbc.cpp dynamic static
-cxx/cxx_dbt.cpp dynamic static
-cxx/cxx_env.cpp dynamic static
-cxx/cxx_except.cpp dynamic static
-cxx/cxx_lock.cpp dynamic static
-cxx/cxx_logc.cpp dynamic static
-cxx/cxx_mpool.cpp dynamic static
-cxx/cxx_txn.cpp dynamic static
-db/crdel_auto.c dynamic static vx
-db/crdel_rec.c dynamic static vx
-db/db.c dynamic static vx
-db/db_am.c dynamic static vx
-db/db_auto.c dynamic static vx
-db/db_cam.c dynamic static vx
-db/db_conv.c dynamic static vx
-db/db_dispatch.c dynamic static vx
-db/db_dup.c dynamic static vx
-db/db_iface.c dynamic static vx
-db/db_join.c dynamic static vx
-db/db_meta.c dynamic static vx
-db/db_method.c dynamic static vx
-db/db_open.c dynamic static vx
-db/db_overflow.c dynamic static vx
-db/db_pr.c dynamic static vx
-db/db_rec.c dynamic static vx
-db/db_reclaim.c dynamic static vx
-db/db_remove.c dynamic static vx
-db/db_rename.c dynamic static vx
-db/db_ret.c dynamic static vx
-db/db_truncate.c dynamic static vx
-db/db_upg.c dynamic static vx
-db/db_upg_opd.c dynamic static vx
+clib/strtol.c
+clib/strtoul.c
+common/crypto_stub.c small vxsmall
+common/db_byteorder.c dynamic small static vx vxsmall
+common/db_err.c dynamic small static vx vxsmall
+common/db_getlong.c dynamic small static vx vxsmall
+common/db_idspace.c dynamic small static vx vxsmall
+common/db_log2.c dynamic small static vx vxsmall
+common/util_arg.c vx vxsmall
+common/util_cache.c dynamic small static vx vxsmall
+common/util_log.c dynamic small static vx vxsmall
+common/util_sig.c dynamic small static vx vxsmall
+crypto/aes_method.c dynamic static vx
+crypto/crypto.c dynamic static vx
+crypto/mersenne/mt19937db.c dynamic static vx
+crypto/rijndael/rijndael-alg-fst.c dynamic static vx
+crypto/rijndael/rijndael-api-fst.c dynamic static vx
+cxx/cxx_db.cpp dynamic small static
+cxx/cxx_dbc.cpp dynamic small static
+cxx/cxx_dbt.cpp dynamic small static
+cxx/cxx_env.cpp dynamic small static
+cxx/cxx_except.cpp dynamic small static
+cxx/cxx_lock.cpp dynamic small static
+cxx/cxx_logc.cpp dynamic small static
+cxx/cxx_mpool.cpp dynamic small static
+cxx/cxx_multi.cpp dynamic small static
+cxx/cxx_seq.cpp dynamic small static
+cxx/cxx_txn.cpp dynamic small static
+db/crdel_auto.c dynamic small static vx vxsmall
+db/crdel_autop.c app=db_printlog
+db/crdel_rec.c dynamic small static vx vxsmall
+db/db.c dynamic small static vx vxsmall
+db/db_am.c dynamic small static vx vxsmall
+db/db_auto.c dynamic small static vx vxsmall
+db/db_autop.c app=db_printlog
+db/db_cam.c dynamic small static vx vxsmall
+db/db_conv.c dynamic small static vx vxsmall
+db/db_dispatch.c dynamic small static vx vxsmall
+db/db_dup.c dynamic small static vx vxsmall
+db/db_iface.c dynamic small static vx vxsmall
+db/db_join.c dynamic small static vx vxsmall
+db/db_meta.c dynamic small static vx vxsmall
+db/db_method.c dynamic small static vx vxsmall
+db/db_open.c dynamic small static vx vxsmall
+db/db_overflow.c dynamic small static vx vxsmall
+db/db_ovfl_vrfy.c dynamic static vx
+db/db_pr.c dynamic small static vx vxsmall
+db/db_rec.c dynamic small static vx vxsmall
+db/db_reclaim.c dynamic small static vx vxsmall
+db/db_remove.c dynamic small static vx vxsmall
+db/db_rename.c dynamic small static vx vxsmall
+db/db_ret.c dynamic small static vx vxsmall
+db/db_setid.c dynamic small static vx vxsmall
+db/db_setlsn.c dynamic small static vx vxsmall
+db/db_stati.c dynamic small static vx vxsmall
+db/db_truncate.c dynamic small static vx vxsmall
+db/db_upg.c dynamic small static vx vxsmall
+db/db_upg_opd.c dynamic small static vx vxsmall
db/db_vrfy.c dynamic static vx
+db/db_vrfy_stub.c small vxsmall
db/db_vrfyutil.c dynamic static vx
db185/db185.c
db_archive/db_archive.c app=db_archive
@@ -116,53 +134,71 @@ db_dump185/db_dump185.c
db_load/db_load.c app=db_load
db_printlog/db_printlog.c app=db_printlog
db_recover/db_recover.c app=db_recover
+db_server_clnt.c
+db_server_svc.c
+db_server_xdr.c
db_stat/db_stat.c app=db_stat
db_upgrade/db_upgrade.c app=db_upgrade
db_verify/db_verify.c app=db_verify
dbm/dbm.c dynamic static
-dbreg/dbreg.c dynamic static vx
-dbreg/dbreg_auto.c dynamic static vx
-dbreg/dbreg_rec.c dynamic static vx
-dbreg/dbreg_util.c dynamic static vx
-env/db_salloc.c dynamic static vx
-env/db_shash.c dynamic static vx
-env/env_file.c dynamic static vx
-env/env_method.c dynamic static vx
-env/env_open.c dynamic static vx
-env/env_recover.c dynamic static vx
-env/env_region.c dynamic static vx
+dbreg/dbreg.c dynamic small static vx vxsmall
+dbreg/dbreg_auto.c dynamic small static vx vxsmall
+dbreg/dbreg_autop.c app=db_printlog
+dbreg/dbreg_rec.c dynamic small static vx vxsmall
+dbreg/dbreg_stat.c dynamic small static vx vxsmall
+dbreg/dbreg_util.c dynamic small static vx vxsmall
+env/db_salloc.c dynamic small static vx vxsmall
+env/db_shash.c dynamic small static vx vxsmall
+env/env_file.c dynamic small static vx vxsmall
+env/env_method.c dynamic small static vx vxsmall
+env/env_open.c dynamic small static vx vxsmall
+env/env_recover.c dynamic small static vx vxsmall
+env/env_region.c dynamic small static vx vxsmall
+env/env_stat.c dynamic small static vx vxsmall
examples_c/bench_001.c
examples_c/ex_access.c app=ex_access
examples_c/ex_apprec/ex_apprec.c
examples_c/ex_apprec/ex_apprec_auto.c
+examples_c/ex_apprec/ex_apprec_autop.c
examples_c/ex_apprec/ex_apprec_rec.c
examples_c/ex_btrec.c app=ex_btrec
examples_c/ex_dbclient.c
examples_c/ex_env.c app=ex_env
examples_c/ex_lock.c app=ex_lock
examples_c/ex_mpool.c app=ex_mpool
-examples_c/ex_repquote/ex_rq_client.c
-examples_c/ex_repquote/ex_rq_main.c
-examples_c/ex_repquote/ex_rq_master.c
-examples_c/ex_repquote/ex_rq_net.c
-examples_c/ex_repquote/ex_rq_util.c
+examples_c/ex_repquote/ex_rq_client.c app=ex_repquote
+examples_c/ex_repquote/ex_rq_main.c app=ex_repquote
+examples_c/ex_repquote/ex_rq_master.c app=ex_repquote
+examples_c/ex_repquote/ex_rq_net.c app=ex_repquote
+examples_c/ex_repquote/ex_rq_util.c app=ex_repquote
+examples_c/ex_sequence.c
examples_c/ex_thread.c
examples_c/ex_tpcb.c app=ex_tpcb
+examples_c/getting_started/example_database_load.c
+examples_c/getting_started/example_database_read.c
+examples_c/getting_started/gettingstarted_common.c
examples_cxx/AccessExample.cpp app=excxx_access
examples_cxx/BtRecExample.cpp app=excxx_btrec
examples_cxx/EnvExample.cpp app=excxx_env
examples_cxx/LockExample.cpp app=excxx_lock
examples_cxx/MpoolExample.cpp app=excxx_mpool
+examples_cxx/SequenceExample.cpp
examples_cxx/TpcbExample.cpp app=excxx_tpcb
-fileops/fileops_auto.c dynamic static vx
-fileops/fop_basic.c dynamic static vx
-fileops/fop_rec.c dynamic static vx
-fileops/fop_util.c dynamic static vx
+examples_cxx/getting_started/MyDb.cpp
+examples_cxx/getting_started/excxx_example_database_load.cpp
+examples_cxx/getting_started/excxx_example_database_read.cpp
+fileops/fileops_auto.c dynamic small static vx vxsmall
+fileops/fileops_autop.c app=db_printlog
+fileops/fop_basic.c dynamic small static vx vxsmall
+fileops/fop_rec.c dynamic small static vx vxsmall
+fileops/fop_util.c dynamic small static vx vxsmall
+gen_db_server.c
hash/hash.c dynamic static vx
hash/hash_auto.c dynamic static vx
+hash/hash_autop.c app=db_printlog
hash/hash_conv.c dynamic static vx
hash/hash_dup.c dynamic static vx
-hash/hash_func.c dynamic static vx
+hash/hash_func.c dynamic small static vx vxsmall
hash/hash_meta.c dynamic static vx
hash/hash_method.c dynamic static vx
hash/hash_open.c dynamic static vx
@@ -170,124 +206,125 @@ hash/hash_page.c dynamic static vx
hash/hash_rec.c dynamic static vx
hash/hash_reclaim.c dynamic static vx
hash/hash_stat.c dynamic static vx
+hash/hash_stub.c small vxsmall
hash/hash_upgrade.c dynamic static vx
hash/hash_verify.c dynamic static vx
-hmac/hmac.c dynamic static vx
-hmac/sha1.c dynamic static vx
+hmac/hmac.c dynamic small static vx vxsmall
+hmac/sha1.c dynamic small static vx vxsmall
hsearch/hsearch.c dynamic static vx
-libdb_java/java_Db.c java
-libdb_java/java_DbEnv.c java
-libdb_java/java_DbLock.c java
-libdb_java/java_DbLogc.c java
-libdb_java/java_DbLsn.c java
-libdb_java/java_DbTxn.c java
-libdb_java/java_DbUtil.c java
-libdb_java/java_Dbc.c java
-libdb_java/java_Dbt.c java
-libdb_java/java_info.c java
-libdb_java/java_locked.c java
-libdb_java/java_stat_auto.c java
-libdb_java/java_util.c java
-lock/lock.c dynamic static vx
-lock/lock_deadlock.c dynamic static vx
-lock/lock_method.c dynamic static vx
-lock/lock_region.c dynamic static vx
-lock/lock_stat.c dynamic static vx
-lock/lock_util.c dynamic static vx
-log/log.c dynamic static vx
-log/log_archive.c dynamic static vx
-log/log_compare.c dynamic static vx
-log/log_get.c dynamic static vx
-log/log_method.c dynamic static vx
-log/log_put.c dynamic static vx
-mp/mp_alloc.c dynamic static vx
-mp/mp_bh.c dynamic static vx
-mp/mp_fget.c dynamic static vx
-mp/mp_fopen.c dynamic static vx
-mp/mp_fput.c dynamic static vx
-mp/mp_fset.c dynamic static vx
-mp/mp_method.c dynamic static vx
-mp/mp_region.c dynamic static vx
-mp/mp_register.c dynamic static vx
-mp/mp_stat.c dynamic static vx
-mp/mp_sync.c dynamic static vx
-mp/mp_trickle.c dynamic static vx
+libdb_java/db_java_wrap.c java
+lock/lock.c dynamic small static vx vxsmall
+lock/lock_deadlock.c dynamic small static vx vxsmall
+lock/lock_id.c dynamic small static vx vxsmall
+lock/lock_list.c dynamic small static vx vxsmall
+lock/lock_method.c dynamic small static vx vxsmall
+lock/lock_region.c dynamic small static vx vxsmall
+lock/lock_stat.c dynamic small static vx vxsmall
+lock/lock_timer.c dynamic small static vx vxsmall
+lock/lock_util.c dynamic small static vx vxsmall
+log/log.c dynamic small static vx vxsmall
+log/log_archive.c dynamic small static vx vxsmall
+log/log_compare.c dynamic small static vx vxsmall
+log/log_get.c dynamic small static vx vxsmall
+log/log_method.c dynamic small static vx vxsmall
+log/log_put.c dynamic small static vx vxsmall
+log/log_stat.c dynamic small static vx vxsmall
+mp/mp_alloc.c dynamic small static vx vxsmall
+mp/mp_bh.c dynamic small static vx vxsmall
+mp/mp_fget.c dynamic small static vx vxsmall
+mp/mp_fmethod.c dynamic small static vx vxsmall
+mp/mp_fopen.c dynamic small static vx vxsmall
+mp/mp_fput.c dynamic small static vx vxsmall
+mp/mp_fset.c dynamic small static vx vxsmall
+mp/mp_method.c dynamic small static vx vxsmall
+mp/mp_region.c dynamic small static vx vxsmall
+mp/mp_register.c dynamic small static vx vxsmall
+mp/mp_stat.c dynamic small static vx vxsmall
+mp/mp_sync.c dynamic small static vx vxsmall
+mp/mp_trickle.c dynamic small static vx vxsmall
mutex/mut_fcntl.c
mutex/mut_pthread.c
-mutex/mut_tas.c vx
-mutex/mut_win32.c dynamic static
-mutex/mutex.c dynamic static vx
+mutex/mut_tas.c vx vxsmall
+mutex/mut_win32.c dynamic small static
+mutex/mutex.c dynamic small static vx vxsmall
mutex/tm.c
os/os_abs.c
-os/os_alloc.c dynamic static vx
-os/os_clock.c vx
+os/os_alloc.c dynamic small static vx vxsmall
+os/os_clock.c vx vxsmall
os/os_config.c
-os/os_dir.c vx
-os/os_errno.c vx
-os/os_fid.c vx
-os/os_fsync.c vx
-os/os_handle.c vx
-os/os_id.c dynamic static vx
+os/os_dir.c vx vxsmall
+os/os_errno.c vx vxsmall
+os/os_fid.c vx vxsmall
+os/os_fsync.c vx vxsmall
+os/os_handle.c vx vxsmall
+os/os_id.c dynamic small static vx vxsmall
os/os_map.c
-os/os_method.c dynamic static vx
-os/os_oflags.c dynamic static vx
-os/os_open.c vx
-os/os_region.c dynamic static vx
-os/os_rename.c vx
-os/os_root.c dynamic static vx
-os/os_rpath.c dynamic static vx
-os/os_rw.c vx
-os/os_seek.c vx
-os/os_sleep.c vx
-os/os_spin.c vx
-os/os_stat.c vx
-os/os_tmpdir.c dynamic static vx
-os/os_unlink.c dynamic static vx
-os_vxworks/os_vx_abs.c vx
-os_vxworks/os_vx_config.c vx
-os_vxworks/os_vx_map.c vx
-os_win32/os_abs.c dynamic static
-os_win32/os_clock.c dynamic static
-os_win32/os_config.c dynamic static
-os_win32/os_dir.c dynamic static
-os_win32/os_errno.c dynamic static
-os_win32/os_fid.c dynamic static
-os_win32/os_fsync.c dynamic static
-os_win32/os_handle.c dynamic static
-os_win32/os_map.c dynamic static
-os_win32/os_open.c dynamic static
-os_win32/os_rename.c dynamic static
-os_win32/os_rw.c dynamic static
-os_win32/os_seek.c dynamic static
-os_win32/os_sleep.c dynamic static
-os_win32/os_spin.c dynamic static
-os_win32/os_stat.c dynamic static
-os_win32/os_type.c dynamic static
+os/os_method.c dynamic small static vx vxsmall
+os/os_oflags.c dynamic small static vx vxsmall
+os/os_open.c vx vxsmall
+os/os_region.c dynamic small static vx vxsmall
+os/os_rename.c vx vxsmall
+os/os_root.c dynamic small static vx vxsmall
+os/os_rpath.c dynamic small static vx vxsmall
+os/os_rw.c vx vxsmall
+os/os_seek.c vx vxsmall
+os/os_sleep.c vx vxsmall
+os/os_spin.c vx vxsmall
+os/os_stat.c vx vxsmall
+os/os_tmpdir.c dynamic small static vx vxsmall
+os/os_truncate.c vx vxsmall
+os/os_unlink.c vx vxsmall
+os_vxworks/os_vx_abs.c vx vxsmall
+os_vxworks/os_vx_config.c vx vxsmall
+os_vxworks/os_vx_map.c vx vxsmall
+os_win32/os_abs.c dynamic small static
+os_win32/os_clock.c dynamic small static
+os_win32/os_config.c dynamic small static
+os_win32/os_dir.c dynamic small static
+os_win32/os_errno.c dynamic small static
+os_win32/os_fid.c dynamic small static
+os_win32/os_fsync.c dynamic small static
+os_win32/os_handle.c dynamic small static
+os_win32/os_map.c dynamic small static
+os_win32/os_open.c dynamic small static
+os_win32/os_rename.c dynamic small static
+os_win32/os_rw.c dynamic small static
+os_win32/os_seek.c dynamic small static
+os_win32/os_sleep.c dynamic small static
+os_win32/os_spin.c dynamic small static
+os_win32/os_stat.c dynamic small static
+os_win32/os_truncate.c dynamic small static
+os_win32/os_unlink.c dynamic small static
qam/qam.c dynamic static vx
qam/qam_auto.c dynamic static vx
+qam/qam_autop.c app=db_printlog
qam/qam_conv.c dynamic static vx
qam/qam_files.c dynamic static vx
qam/qam_method.c dynamic static vx
qam/qam_open.c dynamic static vx
qam/qam_rec.c dynamic static vx
qam/qam_stat.c dynamic static vx
+qam/qam_stub.c small vxsmall
qam/qam_upgrade.c dynamic static vx
qam/qam_verify.c dynamic static vx
+rep/rep_auto.c dynamic static vx
+rep/rep_autop.c app=db_printlog
+rep/rep_backup.c dynamic static vx
rep/rep_method.c dynamic static vx
rep/rep_record.c dynamic static vx
rep/rep_region.c dynamic static vx
+rep/rep_stat.c dynamic static vx
+rep/rep_stub.c small vxsmall
rep/rep_util.c dynamic static vx
-rpc_client/client.c vx
-rpc_client/db_server_clnt.c vx
-rpc_client/gen_client.c vx
-rpc_client/gen_client_ret.c vx
+rpc_client/client.c
+rpc_client/gen_client.c
+rpc_client/gen_client_ret.c
rpc_server/c/db_server_proc.c
-rpc_server/c/db_server_svc.c
rpc_server/c/db_server_util.c
-rpc_server/c/db_server_xdr.c vx
-rpc_server/c/gen_db_server.c
rpc_server/cxx/db_server_cxxproc.cpp
rpc_server/cxx/db_server_cxxutil.cpp
+sequence/seq_stat.c dynamic small static
+sequence/sequence.c dynamic small static
tcl/tcl_compat.c tcl
tcl/tcl_db.c tcl
tcl/tcl_db_pkg.c tcl
@@ -298,13 +335,14 @@ tcl/tcl_lock.c tcl
tcl/tcl_log.c tcl
tcl/tcl_mp.c tcl
tcl/tcl_rep.c tcl
+tcl/tcl_seq.c tcl
tcl/tcl_txn.c tcl
tcl/tcl_util.c tcl
test_perf/db_perf.c app=db_perf
-test_perf/perf_cache_check.c app=db_perf
test_perf/perf_checkpoint.c app=db_perf
test_perf/perf_config.c app=db_perf
test_perf/perf_dbs.c app=db_perf
+test_perf/perf_dead.c app=db_perf
test_perf/perf_debug.c app=db_perf
test_perf/perf_file.c app=db_perf
test_perf/perf_key.c app=db_perf
@@ -314,19 +352,22 @@ test_perf/perf_op.c app=db_perf
test_perf/perf_parse.c app=db_perf
test_perf/perf_rand.c app=db_perf
test_perf/perf_spawn.c app=db_perf
+test_perf/perf_stat.c app=db_perf
+test_perf/perf_sync.c app=db_perf
test_perf/perf_thread.c app=db_perf
test_perf/perf_trickle.c app=db_perf
test_perf/perf_txn.c app=db_perf
test_perf/perf_util.c app=db_perf
test_perf/perf_vx.c
-txn/txn.c dynamic static vx
-txn/txn_auto.c dynamic static vx
-txn/txn_method.c dynamic static vx
-txn/txn_rec.c dynamic static vx
-txn/txn_recover.c dynamic static vx
-txn/txn_region.c dynamic static vx
-txn/txn_stat.c dynamic static vx
-txn/txn_util.c dynamic static vx
-xa/xa.c dynamic static vx
-xa/xa_db.c dynamic static vx
-xa/xa_map.c dynamic static vx
+txn/txn.c dynamic small static vx vxsmall
+txn/txn_auto.c dynamic small static vx vxsmall
+txn/txn_autop.c app=db_printlog
+txn/txn_method.c dynamic small static vx vxsmall
+txn/txn_rec.c dynamic small static vx vxsmall
+txn/txn_recover.c dynamic small static vx vxsmall
+txn/txn_region.c dynamic small static vx vxsmall
+txn/txn_stat.c dynamic small static vx vxsmall
+txn/txn_util.c dynamic small static vx vxsmall
+xa/xa.c dynamic small static vx vxsmall
+xa/xa_db.c dynamic small static vx vxsmall
+xa/xa_map.c dynamic small static vx vxsmall
diff --git a/storage/bdb/dist/template/db_server_proc b/storage/bdb/dist/template/db_server_proc
new file mode 100644
index 00000000000..224c83684fb
--- /dev/null
+++ b/storage/bdb/dist/template/db_server_proc
@@ -0,0 +1,1794 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <rpc/rpc.h>
+
+#include <string.h>
+#endif
+
+#include "db_server.h"
+
+#include "db_int.h"
+#include "dbinc/db_server_int.h"
+
+/* BEGIN __env_get_cachesize_proc */
+void
+__env_get_cachesize_proc(dbenvcl_id,
+ replyp)
+ long dbenvcl_id;
+ __env_get_cachesize_reply *replyp;
+/* END __env_get_cachesize_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_cachesize_proc */
+void
+__env_cachesize_proc(dbenvcl_id, gbytes, bytes,
+ ncache, replyp)
+ long dbenvcl_id;
+ u_int32_t gbytes;
+ u_int32_t bytes;
+ u_int32_t ncache;
+ __env_cachesize_reply *replyp;
+/* END __env_cachesize_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_close_proc */
+void
+__env_close_proc(dbenvcl_id, flags, replyp)
+ long dbenvcl_id;
+ u_int32_t flags;
+ __env_close_reply *replyp;
+/* END __env_close_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_create_proc */
+void
+__env_create_proc(timeout, replyp)
+ u_int32_t timeout;
+ __env_create_reply *replyp;
+/* END __env_create_proc */
+{
+ int ret;
+
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_dbremove_proc */
+void
+__env_dbremove_proc(dbenvcl_id, txnpcl_id, name,
+ subdb, flags, replyp)
+ long dbenvcl_id;
+ long txnpcl_id;
+ char *name;
+ char *subdb;
+ u_int32_t flags;
+ __env_dbremove_reply *replyp;
+/* END __env_dbremove_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_dbrename_proc */
+void
+__env_dbrename_proc(dbenvcl_id, txnpcl_id, name,
+ subdb, newname, flags, replyp)
+ long dbenvcl_id;
+ long txnpcl_id;
+ char *name;
+ char *subdb;
+ char *newname;
+ u_int32_t flags;
+ __env_dbrename_reply *replyp;
+/* END __env_dbrename_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_get_encrypt_flags_proc */
+void
+__env_get_encrypt_flags_proc(dbenvcl_id, replyp)
+ long dbenvcl_id;
+ __env_get_encrypt_flags_reply *replyp;
+/* END __env_get_encrypt_flags_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_encrypt_proc */
+void
+__env_encrypt_proc(dbenvcl_id, passwd, flags, replyp)
+ long dbenvcl_id;
+ char *passwd;
+ u_int32_t flags;
+ __env_encrypt_reply *replyp;
+/* END __env_encrypt_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_get_flags_proc */
+void
+__env_get_flags_proc(dbenvcl_id, replyp)
+ long dbenvcl_id;
+ __env_get_flags_reply *replyp;
+/* END __env_get_flags_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_flags_proc */
+void
+__env_flags_proc(dbenvcl_id, flags, onoff, replyp)
+ long dbenvcl_id;
+ u_int32_t flags;
+ u_int32_t onoff;
+ __env_flags_reply *replyp;
+/* END __env_flags_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_get_home_proc */
+void
+__env_get_home_proc(dbenvcl_id, replyp)
+ long dbenvcl_id;
+ __env_get_home_reply *replyp;
+/* END __env_get_home_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_get_open_flags_proc */
+void
+__env_get_open_flags_proc(dbenvcl_id, replyp)
+ long dbenvcl_id;
+ __env_get_open_flags_reply *replyp;
+/* END __env_get_open_flags_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_open_proc */
+void
+__env_open_proc(dbenvcl_id, home, flags,
+ mode, replyp)
+ long dbenvcl_id;
+ char *home;
+ u_int32_t flags;
+ u_int32_t mode;
+ __env_open_reply *replyp;
+/* END __env_open_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __env_remove_proc */
+void
+__env_remove_proc(dbenvcl_id, home, flags, replyp)
+ long dbenvcl_id;
+ char *home;
+ u_int32_t flags;
+ __env_remove_reply *replyp;
+/* END __env_remove_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_abort_proc */
+void
+__txn_abort_proc(txnpcl_id, replyp)
+ long txnpcl_id;
+ __txn_abort_reply *replyp;
+/* END __txn_abort_proc */
+{
+ int ret;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_begin_proc */
+void
+__txn_begin_proc(dbenvcl_id, parentcl_id,
+ flags, replyp)
+ long dbenvcl_id;
+ long parentcl_id;
+ u_int32_t flags;
+ __txn_begin_reply *replyp;
+/* END __txn_begin_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+ DB_TXN * parent;
+ ct_entry *parent_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+ ACTIVATE_CTP(parent_ctp, parentcl_id, CT_TXN);
+ parent = (DB_TXN *)parent_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_commit_proc */
+void
+__txn_commit_proc(txnpcl_id, flags, replyp)
+ long txnpcl_id;
+ u_int32_t flags;
+ __txn_commit_reply *replyp;
+/* END __txn_commit_proc */
+{
+ int ret;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_discard_proc */
+void
+__txn_discard_proc(txnpcl_id, flags, replyp)
+ long txnpcl_id;
+ u_int32_t flags;
+ __txn_discard_reply *replyp;
+/* END __txn_discard_proc */
+{
+ int ret;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_prepare_proc */
+void
+__txn_prepare_proc(txnpcl_id, gid, replyp)
+ long txnpcl_id;
+ u_int8_t *gid;
+ __txn_prepare_reply *replyp;
+/* END __txn_prepare_proc */
+{
+ int ret;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __txn_recover_proc */
+void
+__txn_recover_proc(dbenvcl_id, count,
+ flags, replyp, freep)
+ long dbenvcl_id;
+ u_int32_t count;
+ u_int32_t flags;
+ __txn_recover_reply *replyp;
+ int * freep;
+/* END __txn_recover_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_associate_proc */
+void
+__db_associate_proc(dbpcl_id, txnpcl_id, sdbpcl_id,
+ flags, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ long sdbpcl_id;
+ u_int32_t flags;
+ __db_associate_reply *replyp;
+/* END __db_associate_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+ DB * sdbp;
+ ct_entry *sdbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+ ACTIVATE_CTP(sdbp_ctp, sdbpcl_id, CT_DB);
+ sdbp = (DB *)sdbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_bt_maxkey_proc */
+void
+__db_bt_maxkey_proc(dbpcl_id, maxkey, replyp)
+ long dbpcl_id;
+ u_int32_t maxkey;
+ __db_bt_maxkey_reply *replyp;
+/* END __db_bt_maxkey_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_bt_minkey_proc */
+void
+__db_get_bt_minkey_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_bt_minkey_reply *replyp;
+/* END __db_get_bt_minkey_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_bt_minkey_proc */
+void
+__db_bt_minkey_proc(dbpcl_id, minkey, replyp)
+ long dbpcl_id;
+ u_int32_t minkey;
+ __db_bt_minkey_reply *replyp;
+/* END __db_bt_minkey_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_close_proc */
+void
+__db_close_proc(dbpcl_id, flags, replyp)
+ long dbpcl_id;
+ u_int32_t flags;
+ __db_close_reply *replyp;
+/* END __db_close_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_create_proc */
+void
+__db_create_proc(dbenvcl_id, flags, replyp)
+ long dbenvcl_id;
+ u_int32_t flags;
+ __db_create_reply *replyp;
+/* END __db_create_proc */
+{
+ int ret;
+ DB_ENV * dbenv;
+ ct_entry *dbenv_ctp;
+
+ ACTIVATE_CTP(dbenv_ctp, dbenvcl_id, CT_ENV);
+ dbenv = (DB_ENV *)dbenv_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_del_proc */
+void
+__db_del_proc(dbpcl_id, txnpcl_id, keydlen,
+ keydoff, keyulen, keyflags, keydata,
+ keysize, flags, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t flags;
+ __db_del_reply *replyp;
+/* END __db_del_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_encrypt_flags_proc */
+void
+__db_get_encrypt_flags_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_encrypt_flags_reply *replyp;
+/* END __db_get_encrypt_flags_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_encrypt_proc */
+void
+__db_encrypt_proc(dbpcl_id, passwd, flags, replyp)
+ long dbpcl_id;
+ char *passwd;
+ u_int32_t flags;
+ __db_encrypt_reply *replyp;
+/* END __db_encrypt_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_extentsize_proc */
+void
+__db_get_extentsize_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_extentsize_reply *replyp;
+/* END __db_get_extentsize_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_extentsize_proc */
+void
+__db_extentsize_proc(dbpcl_id, extentsize, replyp)
+ long dbpcl_id;
+ u_int32_t extentsize;
+ __db_extentsize_reply *replyp;
+/* END __db_extentsize_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_flags_proc */
+void
+__db_get_flags_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_flags_reply *replyp;
+/* END __db_get_flags_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_flags_proc */
+void
+__db_flags_proc(dbpcl_id, flags, replyp)
+ long dbpcl_id;
+ u_int32_t flags;
+ __db_flags_reply *replyp;
+/* END __db_flags_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_proc */
+void
+__db_get_proc(dbpcl_id, txnpcl_id, keydlen,
+ keydoff, keyulen, keyflags, keydata,
+ keysize, datadlen, datadoff, dataulen,
+ dataflags, datadata, datasize, flags, replyp, freep)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __db_get_reply *replyp;
+ int * freep;
+/* END __db_get_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_name_proc */
+void
+__db_get_name_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_name_reply *replyp;
+/* END __db_get_name_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_open_flags_proc */
+void
+__db_get_open_flags_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_open_flags_reply *replyp;
+/* END __db_get_open_flags_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_h_ffactor_proc */
+void
+__db_get_h_ffactor_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_h_ffactor_reply *replyp;
+/* END __db_get_h_ffactor_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_h_ffactor_proc */
+void
+__db_h_ffactor_proc(dbpcl_id, ffactor, replyp)
+ long dbpcl_id;
+ u_int32_t ffactor;
+ __db_h_ffactor_reply *replyp;
+/* END __db_h_ffactor_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_h_nelem_proc */
+void
+__db_get_h_nelem_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_h_nelem_reply *replyp;
+/* END __db_get_h_nelem_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_h_nelem_proc */
+void
+__db_h_nelem_proc(dbpcl_id, nelem, replyp)
+ long dbpcl_id;
+ u_int32_t nelem;
+ __db_h_nelem_reply *replyp;
+/* END __db_h_nelem_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_key_range_proc */
+void
+__db_key_range_proc(dbpcl_id, txnpcl_id, keydlen,
+ keydoff, keyulen, keyflags, keydata,
+ keysize, flags, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t flags;
+ __db_key_range_reply *replyp;
+/* END __db_key_range_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_lorder_proc */
+void
+__db_get_lorder_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_lorder_reply *replyp;
+/* END __db_get_lorder_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_lorder_proc */
+void
+__db_lorder_proc(dbpcl_id, lorder, replyp)
+ long dbpcl_id;
+ u_int32_t lorder;
+ __db_lorder_reply *replyp;
+/* END __db_lorder_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_open_proc */
+void
+__db_open_proc(dbpcl_id, txnpcl_id, name,
+ subdb, type, flags, mode, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ char *name;
+ char *subdb;
+ u_int32_t type;
+ u_int32_t flags;
+ u_int32_t mode;
+ __db_open_reply *replyp;
+/* END __db_open_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_pagesize_proc */
+void
+__db_get_pagesize_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_pagesize_reply *replyp;
+/* END __db_get_pagesize_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_pagesize_proc */
+void
+__db_pagesize_proc(dbpcl_id, pagesize, replyp)
+ long dbpcl_id;
+ u_int32_t pagesize;
+ __db_pagesize_reply *replyp;
+/* END __db_pagesize_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_pget_proc */
+void
+__db_pget_proc(dbpcl_id, txnpcl_id, skeydlen,
+ skeydoff, skeyulen, skeyflags, skeydata,
+ skeysize, pkeydlen, pkeydoff, pkeyulen,
+ pkeyflags, pkeydata, pkeysize, datadlen,
+ datadoff, dataulen, dataflags, datadata,
+ datasize, flags, replyp, freep)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t skeydlen;
+ u_int32_t skeydoff;
+ u_int32_t skeyulen;
+ u_int32_t skeyflags;
+ void *skeydata;
+ u_int32_t skeysize;
+ u_int32_t pkeydlen;
+ u_int32_t pkeydoff;
+ u_int32_t pkeyulen;
+ u_int32_t pkeyflags;
+ void *pkeydata;
+ u_int32_t pkeysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __db_pget_reply *replyp;
+ int * freep;
+/* END __db_pget_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_put_proc */
+void
+__db_put_proc(dbpcl_id, txnpcl_id, keydlen,
+ keydoff, keyulen, keyflags, keydata,
+ keysize, datadlen, datadoff, dataulen,
+ dataflags, datadata, datasize, flags, replyp, freep)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __db_put_reply *replyp;
+ int * freep;
+/* END __db_put_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_re_delim_proc */
+void
+__db_get_re_delim_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_re_delim_reply *replyp;
+/* END __db_get_re_delim_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_re_delim_proc */
+void
+__db_re_delim_proc(dbpcl_id, delim, replyp)
+ long dbpcl_id;
+ u_int32_t delim;
+ __db_re_delim_reply *replyp;
+/* END __db_re_delim_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_re_len_proc */
+void
+__db_get_re_len_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_re_len_reply *replyp;
+/* END __db_get_re_len_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_re_len_proc */
+void
+__db_re_len_proc(dbpcl_id, len, replyp)
+ long dbpcl_id;
+ u_int32_t len;
+ __db_re_len_reply *replyp;
+/* END __db_re_len_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_re_pad_proc */
+void
+__db_re_pad_proc(dbpcl_id, pad, replyp)
+ long dbpcl_id;
+ u_int32_t pad;
+ __db_re_pad_reply *replyp;
+/* END __db_re_pad_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_get_re_pad_proc */
+void
+__db_get_re_pad_proc(dbpcl_id, replyp)
+ long dbpcl_id;
+ __db_get_re_pad_reply *replyp;
+/* END __db_get_re_pad_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_remove_proc */
+void
+__db_remove_proc(dbpcl_id, name, subdb,
+ flags, replyp)
+ long dbpcl_id;
+ char *name;
+ char *subdb;
+ u_int32_t flags;
+ __db_remove_reply *replyp;
+/* END __db_remove_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_rename_proc */
+void
+__db_rename_proc(dbpcl_id, name, subdb,
+ newname, flags, replyp)
+ long dbpcl_id;
+ char *name;
+ char *subdb;
+ char *newname;
+ u_int32_t flags;
+ __db_rename_reply *replyp;
+/* END __db_rename_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_stat_proc */
+void
+__db_stat_proc(dbpcl_id, txnpcl_id,
+ flags, replyp, freep)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t flags;
+ __db_stat_reply *replyp;
+ int * freep;
+/* END __db_stat_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_sync_proc */
+void
+__db_sync_proc(dbpcl_id, flags, replyp)
+ long dbpcl_id;
+ u_int32_t flags;
+ __db_sync_reply *replyp;
+/* END __db_sync_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_truncate_proc */
+void
+__db_truncate_proc(dbpcl_id, txnpcl_id,
+ flags, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t flags;
+ __db_truncate_reply *replyp;
+/* END __db_truncate_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_cursor_proc */
+void
+__db_cursor_proc(dbpcl_id, txnpcl_id,
+ flags, replyp)
+ long dbpcl_id;
+ long txnpcl_id;
+ u_int32_t flags;
+ __db_cursor_reply *replyp;
+/* END __db_cursor_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+ DB_TXN * txnp;
+ ct_entry *txnp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+ ACTIVATE_CTP(txnp_ctp, txnpcl_id, CT_TXN);
+ txnp = (DB_TXN *)txnp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __db_join_proc */
+void
+__db_join_proc(dbpcl_id, curs, curslen,
+ flags, replyp)
+ long dbpcl_id;
+ u_int32_t * curs;
+ u_int32_t curslen;
+ u_int32_t flags;
+ __db_join_reply *replyp;
+/* END __db_join_proc */
+{
+ int ret;
+ DB * dbp;
+ ct_entry *dbp_ctp;
+
+ ACTIVATE_CTP(dbp_ctp, dbpcl_id, CT_DB);
+ dbp = (DB *)dbp_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_close_proc */
+void
+__dbc_close_proc(dbccl_id, replyp)
+ long dbccl_id;
+ __dbc_close_reply *replyp;
+/* END __dbc_close_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_count_proc */
+void
+__dbc_count_proc(dbccl_id, flags, replyp)
+ long dbccl_id;
+ u_int32_t flags;
+ __dbc_count_reply *replyp;
+/* END __dbc_count_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_del_proc */
+void
+__dbc_del_proc(dbccl_id, flags, replyp)
+ long dbccl_id;
+ u_int32_t flags;
+ __dbc_del_reply *replyp;
+/* END __dbc_del_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_dup_proc */
+void
+__dbc_dup_proc(dbccl_id, flags, replyp)
+ long dbccl_id;
+ u_int32_t flags;
+ __dbc_dup_reply *replyp;
+/* END __dbc_dup_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_get_proc */
+void
+__dbc_get_proc(dbccl_id, keydlen, keydoff,
+ keyulen, keyflags, keydata, keysize,
+ datadlen, datadoff, dataulen, dataflags,
+ datadata, datasize, flags, replyp, freep)
+ long dbccl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __dbc_get_reply *replyp;
+ int * freep;
+/* END __dbc_get_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_pget_proc */
+void
+__dbc_pget_proc(dbccl_id, skeydlen, skeydoff,
+ skeyulen, skeyflags, skeydata, skeysize,
+ pkeydlen, pkeydoff, pkeyulen, pkeyflags,
+ pkeydata, pkeysize, datadlen, datadoff,
+ dataulen, dataflags, datadata, datasize,
+ flags, replyp, freep)
+ long dbccl_id;
+ u_int32_t skeydlen;
+ u_int32_t skeydoff;
+ u_int32_t skeyulen;
+ u_int32_t skeyflags;
+ void *skeydata;
+ u_int32_t skeysize;
+ u_int32_t pkeydlen;
+ u_int32_t pkeydoff;
+ u_int32_t pkeyulen;
+ u_int32_t pkeyflags;
+ void *pkeydata;
+ u_int32_t pkeysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __dbc_pget_reply *replyp;
+ int * freep;
+/* END __dbc_pget_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
+/* BEGIN __dbc_put_proc */
+void
+__dbc_put_proc(dbccl_id, keydlen, keydoff,
+ keyulen, keyflags, keydata, keysize,
+ datadlen, datadoff, dataulen, dataflags,
+ datadata, datasize, flags, replyp, freep)
+ long dbccl_id;
+ u_int32_t keydlen;
+ u_int32_t keydoff;
+ u_int32_t keyulen;
+ u_int32_t keyflags;
+ void *keydata;
+ u_int32_t keysize;
+ u_int32_t datadlen;
+ u_int32_t datadoff;
+ u_int32_t dataulen;
+ u_int32_t dataflags;
+ void *datadata;
+ u_int32_t datasize;
+ u_int32_t flags;
+ __dbc_put_reply *replyp;
+ int * freep;
+/* END __dbc_put_proc */
+{
+ int ret;
+ DBC * dbc;
+ ct_entry *dbc_ctp;
+
+ ACTIVATE_CTP(dbc_ctp, dbccl_id, CT_CURSOR);
+ dbc = (DBC *)dbc_ctp->ct_anyp;
+
+ /*
+ * XXX Code goes here
+ */
+
+ replyp->status = ret;
+ return;
+}
+
diff --git a/storage/bdb/dist/template/gen_client_ret b/storage/bdb/dist/template/gen_client_ret
new file mode 100644
index 00000000000..3d897e60995
--- /dev/null
+++ b/storage/bdb/dist/template/gen_client_ret
@@ -0,0 +1,723 @@
+/* Do not edit: automatically built by gen_rpc.awk. */
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+#include "db_int.h"
+#include "dbinc/txn.h"
+
+/*
+ * PUBLIC: int __dbcl_env_create_ret __P((DB_ENV *, long,
+ * PUBLIC: __env_create_reply *));
+ */
+int
+__dbcl_env_create_ret(dbenv, timeout, replyp)
+ DB_ENV * dbenv;
+ long timeout;
+ __env_create_reply *replyp;
+{
+ int ret;
+ long env;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ env = replyp->envcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_env_open_ret __P((DB_ENV *, const char *, u_int32_t, int,
+ * PUBLIC: __env_open_reply *));
+ */
+int
+__dbcl_env_open_ret(dbenv, home, flags, mode, replyp)
+ DB_ENV * dbenv;
+ const char * home;
+ u_int32_t flags;
+ int mode;
+ __env_open_reply *replyp;
+{
+ int ret;
+ long env;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ env = replyp->envcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_env_remove_ret __P((DB_ENV *, const char *, u_int32_t,
+ * PUBLIC: __env_remove_reply *));
+ */
+int
+__dbcl_env_remove_ret(dbenv, home, flags, replyp)
+ DB_ENV * dbenv;
+ const char * home;
+ u_int32_t flags;
+ __env_remove_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_txn_abort_ret __P((DB_TXN *, __txn_abort_reply *));
+ */
+int
+__dbcl_txn_abort_ret(txnp, replyp)
+ DB_TXN * txnp;
+ __txn_abort_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_txn_begin_ret __P((DB_ENV *, DB_TXN *, DB_TXN **,
+ * PUBLIC: u_int32_t, __txn_begin_reply *));
+ */
+int
+__dbcl_txn_begin_ret(dbenv, parent, txnpp, flags, replyp)
+ DB_ENV * dbenv;
+ DB_TXN * parent;
+ DB_TXN ** txnpp;
+ u_int32_t flags;
+ __txn_begin_reply *replyp;
+{
+ int ret;
+ long txnid;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ txnid = replyp->txnidcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_txn_commit_ret __P((DB_TXN *, u_int32_t,
+ * PUBLIC: __txn_commit_reply *));
+ */
+int
+__dbcl_txn_commit_ret(txnp, flags, replyp)
+ DB_TXN * txnp;
+ u_int32_t flags;
+ __txn_commit_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_txn_discard_ret __P((DB_TXN *, u_int32_t,
+ * PUBLIC: __txn_discard_reply *));
+ */
+int
+__dbcl_txn_discard_ret(txnp, flags, replyp)
+ DB_TXN * txnp;
+ u_int32_t flags;
+ __txn_discard_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_txn_recover_ret __P((DB_ENV *, DB_PREPLIST *, long,
+ * PUBLIC: long *, u_int32_t, __txn_recover_reply *));
+ */
+int
+__dbcl_txn_recover_ret(dbenv, preplist, count, retp, flags, replyp)
+ DB_ENV * dbenv;
+ DB_PREPLIST * preplist;
+ long count;
+ long * retp;
+ u_int32_t flags;
+ __txn_recover_reply *replyp;
+{
+ int ret;
+ u_int32_t *__db_txn;
+ u_int8_t *__db_gid;
+ long retcount;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Handle list
+ */
+
+
+ /*
+ * XXX Handle list
+ */
+
+ retcount = replyp->retcount;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_close_ret __P((DB *, u_int32_t, __db_close_reply *));
+ */
+int
+__dbcl_db_close_ret(dbp, flags, replyp)
+ DB * dbp;
+ u_int32_t flags;
+ __db_close_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_create_ret __P((DB *, DB_ENV *, u_int32_t,
+ * PUBLIC: __db_create_reply *));
+ */
+int
+__dbcl_db_create_ret(dbp, dbenv, flags, replyp)
+ DB * dbp;
+ DB_ENV * dbenv;
+ u_int32_t flags;
+ __db_create_reply *replyp;
+{
+ int ret;
+ long db;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ db = replyp->dbcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_get_ret __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t,
+ * PUBLIC: __db_get_reply *));
+ */
+int
+__dbcl_db_get_ret(dbp, txnp, key, data, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ DBT * key;
+ DBT * data;
+ u_int32_t flags;
+ __db_get_reply *replyp;
+{
+ int ret;
+ /* DBT key; */
+ /* DBT data; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->keydata; */
+ /* Handle replyp->datadata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_key_range_ret __P((DB *, DB_TXN *, DBT *,
+ * PUBLIC: DB_KEY_RANGE *, u_int32_t, __db_key_range_reply *));
+ */
+int
+__dbcl_db_key_range_ret(dbp, txnp, key, range, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ DBT * key;
+ DB_KEY_RANGE * range;
+ u_int32_t flags;
+ __db_key_range_reply *replyp;
+{
+ int ret;
+ double less;
+ double equal;
+ double greater;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ less = replyp->less;
+ equal = replyp->equal;
+ greater = replyp->greater;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_open_ret __P((DB *, DB_TXN *, const char *,
+ * PUBLIC: const char *, DBTYPE, u_int32_t, int, __db_open_reply *));
+ */
+int
+__dbcl_db_open_ret(dbp, txnp, name, subdb, type, flags, mode, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ const char * name;
+ const char * subdb;
+ DBTYPE type;
+ u_int32_t flags;
+ int mode;
+ __db_open_reply *replyp;
+{
+ int ret;
+ long db;
+ DBTYPE type;
+ int lorder;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ db = replyp->dbcl_id;
+ type = replyp->type;
+ lorder = replyp->lorder;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_pget_ret __P((DB *, DB_TXN *, DBT *, DBT *, DBT *,
+ * PUBLIC: u_int32_t, __db_pget_reply *));
+ */
+int
+__dbcl_db_pget_ret(dbp, txnp, skey, pkey, data, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ DBT * skey;
+ DBT * pkey;
+ DBT * data;
+ u_int32_t flags;
+ __db_pget_reply *replyp;
+{
+ int ret;
+ /* DBT skey; */
+ /* DBT pkey; */
+ /* DBT data; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->skeydata; */
+ /* Handle replyp->pkeydata; */
+ /* Handle replyp->datadata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_put_ret __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t,
+ * PUBLIC: __db_put_reply *));
+ */
+int
+__dbcl_db_put_ret(dbp, txnp, key, data, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ DBT * key;
+ DBT * data;
+ u_int32_t flags;
+ __db_put_reply *replyp;
+{
+ int ret;
+ /* DBT key; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->keydata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_remove_ret __P((DB *, const char *, const char *,
+ * PUBLIC: u_int32_t, __db_remove_reply *));
+ */
+int
+__dbcl_db_remove_ret(dbp, name, subdb, flags, replyp)
+ DB * dbp;
+ const char * name;
+ const char * subdb;
+ u_int32_t flags;
+ __db_remove_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_rename_ret __P((DB *, const char *, const char *,
+ * PUBLIC: const char *, u_int32_t, __db_rename_reply *));
+ */
+int
+__dbcl_db_rename_ret(dbp, name, subdb, newname, flags, replyp)
+ DB * dbp;
+ const char * name;
+ const char * subdb;
+ const char * newname;
+ u_int32_t flags;
+ __db_rename_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_stat_ret __P((DB *, DB_TXN *, void *, u_int32_t,
+ * PUBLIC: __db_stat_reply *));
+ */
+int
+__dbcl_db_stat_ret(dbp, txnp, sp, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ void * sp;
+ u_int32_t flags;
+ __db_stat_reply *replyp;
+{
+ int ret;
+ u_int32_t *__db_stats;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Handle list
+ */
+
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_truncate_ret __P((DB *, DB_TXN *, u_int32_t *,
+ * PUBLIC: u_int32_t, __db_truncate_reply *));
+ */
+int
+__dbcl_db_truncate_ret(dbp, txnp, countp, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ u_int32_t * countp;
+ u_int32_t flags;
+ __db_truncate_reply *replyp;
+{
+ int ret;
+ u_int32_t count;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ count = replyp->count;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_cursor_ret __P((DB *, DB_TXN *, DBC **, u_int32_t,
+ * PUBLIC: __db_cursor_reply *));
+ */
+int
+__dbcl_db_cursor_ret(dbp, txnp, dbcpp, flags, replyp)
+ DB * dbp;
+ DB_TXN * txnp;
+ DBC ** dbcpp;
+ u_int32_t flags;
+ __db_cursor_reply *replyp;
+{
+ int ret;
+ long dbcid;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ dbcid = replyp->dbcidcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_db_join_ret __P((DB *, DBC **, DBC **, u_int32_t,
+ * PUBLIC: __db_join_reply *));
+ */
+int
+__dbcl_db_join_ret(dbp, curs, dbcp, flags, replyp)
+ DB * dbp;
+ DBC ** curs;
+ DBC ** dbcp;
+ u_int32_t flags;
+ __db_join_reply *replyp;
+{
+ int ret;
+ long dbcid;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ dbcid = replyp->dbcidcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_close_ret __P((DBC *, __dbc_close_reply *));
+ */
+int
+__dbcl_dbc_close_ret(dbc, replyp)
+ DBC * dbc;
+ __dbc_close_reply *replyp;
+{
+ int ret;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_count_ret __P((DBC *, db_recno_t *, u_int32_t,
+ * PUBLIC: __dbc_count_reply *));
+ */
+int
+__dbcl_dbc_count_ret(dbc, countp, flags, replyp)
+ DBC * dbc;
+ db_recno_t * countp;
+ u_int32_t flags;
+ __dbc_count_reply *replyp;
+{
+ int ret;
+ db_recno_t dupcount;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ dupcount = replyp->dupcount;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_dup_ret __P((DBC *, DBC **, u_int32_t,
+ * PUBLIC: __dbc_dup_reply *));
+ */
+int
+__dbcl_dbc_dup_ret(dbc, dbcp, flags, replyp)
+ DBC * dbc;
+ DBC ** dbcp;
+ u_int32_t flags;
+ __dbc_dup_reply *replyp;
+{
+ int ret;
+ long dbcid;
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ dbcid = replyp->dbcidcl_id;
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_get_ret __P((DBC *, DBT *, DBT *, u_int32_t,
+ * PUBLIC: __dbc_get_reply *));
+ */
+int
+__dbcl_dbc_get_ret(dbc, key, data, flags, replyp)
+ DBC * dbc;
+ DBT * key;
+ DBT * data;
+ u_int32_t flags;
+ __dbc_get_reply *replyp;
+{
+ int ret;
+ /* DBT key; */
+ /* DBT data; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->keydata; */
+ /* Handle replyp->datadata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_pget_ret __P((DBC *, DBT *, DBT *, DBT *, u_int32_t,
+ * PUBLIC: __dbc_pget_reply *));
+ */
+int
+__dbcl_dbc_pget_ret(dbc, skey, pkey, data, flags, replyp)
+ DBC * dbc;
+ DBT * skey;
+ DBT * pkey;
+ DBT * data;
+ u_int32_t flags;
+ __dbc_pget_reply *replyp;
+{
+ int ret;
+ /* DBT skey; */
+ /* DBT pkey; */
+ /* DBT data; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->skeydata; */
+ /* Handle replyp->pkeydata; */
+ /* Handle replyp->datadata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
+/*
+ * PUBLIC: int __dbcl_dbc_put_ret __P((DBC *, DBT *, DBT *, u_int32_t,
+ * PUBLIC: __dbc_put_reply *));
+ */
+int
+__dbcl_dbc_put_ret(dbc, key, data, flags, replyp)
+ DBC * dbc;
+ DBT * key;
+ DBT * data;
+ u_int32_t flags;
+ __dbc_put_reply *replyp;
+{
+ int ret;
+ /* DBT key; */
+
+ if (replyp->status != 0)
+ return (replyp->status);
+ /* Handle replyp->keydata; */
+
+ /*
+ * XXX Code goes here
+ */
+
+ return (replyp->status);
+}
+
diff --git a/storage/bdb/dist/template/rec_btree b/storage/bdb/dist/template/rec_btree
new file mode 100644
index 00000000000..0b2c96182c4
--- /dev/null
+++ b/storage/bdb/dist/template/rec_btree
@@ -0,0 +1,633 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__bam.h"
+#include "dbinc/log.h"
+
+/*
+ * __bam_split_recover --
+ * Recovery function for split.
+ *
+ * PUBLIC: int __bam_split_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_split_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_split_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_split_print);
+ REC_INTRO(__bam_split_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_rsplit_recover --
+ * Recovery function for rsplit.
+ *
+ * PUBLIC: int __bam_rsplit_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_rsplit_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_rsplit_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_rsplit_print);
+ REC_INTRO(__bam_rsplit_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_adj_recover --
+ * Recovery function for adj.
+ *
+ * PUBLIC: int __bam_adj_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_adj_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_adj_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_adj_print);
+ REC_INTRO(__bam_adj_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_cadjust_recover --
+ * Recovery function for cadjust.
+ *
+ * PUBLIC: int __bam_cadjust_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_cadjust_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_cadjust_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_cadjust_print);
+ REC_INTRO(__bam_cadjust_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_cdel_recover --
+ * Recovery function for cdel.
+ *
+ * PUBLIC: int __bam_cdel_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_cdel_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_cdel_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_cdel_print);
+ REC_INTRO(__bam_cdel_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_repl_recover --
+ * Recovery function for repl.
+ *
+ * PUBLIC: int __bam_repl_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_repl_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_repl_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_repl_print);
+ REC_INTRO(__bam_repl_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_root_recover --
+ * Recovery function for root.
+ *
+ * PUBLIC: int __bam_root_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_root_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_root_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_root_print);
+ REC_INTRO(__bam_root_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_curadj_recover --
+ * Recovery function for curadj.
+ *
+ * PUBLIC: int __bam_curadj_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_curadj_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_curadj_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_curadj_print);
+ REC_INTRO(__bam_curadj_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_rcuradj_recover --
+ * Recovery function for rcuradj.
+ *
+ * PUBLIC: int __bam_rcuradj_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_rcuradj_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_rcuradj_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_rcuradj_print);
+ REC_INTRO(__bam_rcuradj_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __bam_relink_recover --
+ * Recovery function for relink.
+ *
+ * PUBLIC: int __bam_relink_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__bam_relink_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __bam_relink_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__bam_relink_print);
+ REC_INTRO(__bam_relink_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_crdel b/storage/bdb/dist/template/rec_crdel
new file mode 100644
index 00000000000..430806e1628
--- /dev/null
+++ b/storage/bdb/dist/template/rec_crdel
@@ -0,0 +1,75 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__crdel.h"
+#include "dbinc/log.h"
+
+/*
+ * __crdel_metasub_recover --
+ * Recovery function for metasub.
+ *
+ * PUBLIC: int __crdel_metasub_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__crdel_metasub_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __crdel_metasub_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__crdel_metasub_print);
+ REC_INTRO(__crdel_metasub_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_db b/storage/bdb/dist/template/rec_db
new file mode 100644
index 00000000000..5c4c8f08d94
--- /dev/null
+++ b/storage/bdb/dist/template/rec_db
@@ -0,0 +1,757 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__db.h"
+#include "dbinc/log.h"
+
+/*
+ * __db_addrem_recover --
+ * Recovery function for addrem.
+ *
+ * PUBLIC: int __db_addrem_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_addrem_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_addrem_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_addrem_print);
+ REC_INTRO(__db_addrem_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_big_recover --
+ * Recovery function for big.
+ *
+ * PUBLIC: int __db_big_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_big_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_big_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_big_print);
+ REC_INTRO(__db_big_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_ovref_recover --
+ * Recovery function for ovref.
+ *
+ * PUBLIC: int __db_ovref_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_ovref_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_ovref_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_ovref_print);
+ REC_INTRO(__db_ovref_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_debug_recover --
+ * Recovery function for debug.
+ *
+ * PUBLIC: int __db_debug_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_debug_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_debug_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_debug_print);
+ REC_INTRO(__db_debug_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_noop_recover --
+ * Recovery function for noop.
+ *
+ * PUBLIC: int __db_noop_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_noop_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_noop_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_noop_print);
+ REC_INTRO(__db_noop_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_alloc_recover --
+ * Recovery function for pg_alloc.
+ *
+ * PUBLIC: int __db_pg_alloc_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_alloc_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_alloc_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_alloc_print);
+ REC_INTRO(__db_pg_alloc_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_free_recover --
+ * Recovery function for pg_free.
+ *
+ * PUBLIC: int __db_pg_free_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_free_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_free_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_free_print);
+ REC_INTRO(__db_pg_free_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_cksum_recover --
+ * Recovery function for cksum.
+ *
+ * PUBLIC: int __db_cksum_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_cksum_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_cksum_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_cksum_print);
+ REC_INTRO(__db_cksum_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_freedata_recover --
+ * Recovery function for pg_freedata.
+ *
+ * PUBLIC: int __db_pg_freedata_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_freedata_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_freedata_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_freedata_print);
+ REC_INTRO(__db_pg_freedata_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_prepare_recover --
+ * Recovery function for pg_prepare.
+ *
+ * PUBLIC: int __db_pg_prepare_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_prepare_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_prepare_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_prepare_print);
+ REC_INTRO(__db_pg_prepare_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_new_recover --
+ * Recovery function for pg_new.
+ *
+ * PUBLIC: int __db_pg_new_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_new_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_new_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_new_print);
+ REC_INTRO(__db_pg_new_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __db_pg_init_recover --
+ * Recovery function for pg_init.
+ *
+ * PUBLIC: int __db_pg_init_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__db_pg_init_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __db_pg_init_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__db_pg_init_print);
+ REC_INTRO(__db_pg_init_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_dbreg b/storage/bdb/dist/template/rec_dbreg
new file mode 100644
index 00000000000..bbdf19d5ffc
--- /dev/null
+++ b/storage/bdb/dist/template/rec_dbreg
@@ -0,0 +1,75 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__dbreg.h"
+#include "dbinc/log.h"
+
+/*
+ * __dbreg_register_recover --
+ * Recovery function for register.
+ *
+ * PUBLIC: int __dbreg_register_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__dbreg_register_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __dbreg_register_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__dbreg_register_print);
+ REC_INTRO(__dbreg_register_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_fileops b/storage/bdb/dist/template/rec_fileops
new file mode 100644
index 00000000000..c1487835ea9
--- /dev/null
+++ b/storage/bdb/dist/template/rec_fileops
@@ -0,0 +1,323 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__fop.h"
+#include "dbinc/log.h"
+
+/*
+ * __fop_create_recover --
+ * Recovery function for create.
+ *
+ * PUBLIC: int __fop_create_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__fop_create_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __fop_create_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__fop_create_print);
+ REC_INTRO(__fop_create_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __fop_remove_recover --
+ * Recovery function for remove.
+ *
+ * PUBLIC: int __fop_remove_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__fop_remove_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __fop_remove_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__fop_remove_print);
+ REC_INTRO(__fop_remove_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __fop_write_recover --
+ * Recovery function for write.
+ *
+ * PUBLIC: int __fop_write_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__fop_write_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __fop_write_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__fop_write_print);
+ REC_INTRO(__fop_write_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __fop_rename_recover --
+ * Recovery function for rename.
+ *
+ * PUBLIC: int __fop_rename_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__fop_rename_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __fop_rename_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__fop_rename_print);
+ REC_INTRO(__fop_rename_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __fop_file_remove_recover --
+ * Recovery function for file_remove.
+ *
+ * PUBLIC: int __fop_file_remove_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__fop_file_remove_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __fop_file_remove_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__fop_file_remove_print);
+ REC_INTRO(__fop_file_remove_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_hash b/storage/bdb/dist/template/rec_hash
new file mode 100644
index 00000000000..b5160d50a56
--- /dev/null
+++ b/storage/bdb/dist/template/rec_hash
@@ -0,0 +1,571 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__ham.h"
+#include "dbinc/log.h"
+
+/*
+ * __ham_insdel_recover --
+ * Recovery function for insdel.
+ *
+ * PUBLIC: int __ham_insdel_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_insdel_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_insdel_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_insdel_print);
+ REC_INTRO(__ham_insdel_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_newpage_recover --
+ * Recovery function for newpage.
+ *
+ * PUBLIC: int __ham_newpage_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_newpage_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_newpage_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_newpage_print);
+ REC_INTRO(__ham_newpage_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_splitdata_recover --
+ * Recovery function for splitdata.
+ *
+ * PUBLIC: int __ham_splitdata_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_splitdata_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_splitdata_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_splitdata_print);
+ REC_INTRO(__ham_splitdata_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_replace_recover --
+ * Recovery function for replace.
+ *
+ * PUBLIC: int __ham_replace_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_replace_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_replace_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_replace_print);
+ REC_INTRO(__ham_replace_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_copypage_recover --
+ * Recovery function for copypage.
+ *
+ * PUBLIC: int __ham_copypage_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_copypage_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_copypage_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_copypage_print);
+ REC_INTRO(__ham_copypage_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_metagroup_recover --
+ * Recovery function for metagroup.
+ *
+ * PUBLIC: int __ham_metagroup_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_metagroup_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_metagroup_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_metagroup_print);
+ REC_INTRO(__ham_metagroup_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_groupalloc_recover --
+ * Recovery function for groupalloc.
+ *
+ * PUBLIC: int __ham_groupalloc_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_groupalloc_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_groupalloc_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_groupalloc_print);
+ REC_INTRO(__ham_groupalloc_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_curadj_recover --
+ * Recovery function for curadj.
+ *
+ * PUBLIC: int __ham_curadj_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_curadj_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_curadj_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_curadj_print);
+ REC_INTRO(__ham_curadj_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __ham_chgpg_recover --
+ * Recovery function for chgpg.
+ *
+ * PUBLIC: int __ham_chgpg_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__ham_chgpg_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __ham_chgpg_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__ham_chgpg_print);
+ REC_INTRO(__ham_chgpg_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_qam b/storage/bdb/dist/template/rec_qam
new file mode 100644
index 00000000000..ffe0d63e445
--- /dev/null
+++ b/storage/bdb/dist/template/rec_qam
@@ -0,0 +1,323 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__qam.h"
+#include "dbinc/log.h"
+
+/*
+ * __qam_incfirst_recover --
+ * Recovery function for incfirst.
+ *
+ * PUBLIC: int __qam_incfirst_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__qam_incfirst_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __qam_incfirst_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__qam_incfirst_print);
+ REC_INTRO(__qam_incfirst_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __qam_mvptr_recover --
+ * Recovery function for mvptr.
+ *
+ * PUBLIC: int __qam_mvptr_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__qam_mvptr_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __qam_mvptr_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__qam_mvptr_print);
+ REC_INTRO(__qam_mvptr_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __qam_del_recover --
+ * Recovery function for del.
+ *
+ * PUBLIC: int __qam_del_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__qam_del_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __qam_del_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__qam_del_print);
+ REC_INTRO(__qam_del_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __qam_add_recover --
+ * Recovery function for add.
+ *
+ * PUBLIC: int __qam_add_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__qam_add_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __qam_add_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__qam_add_print);
+ REC_INTRO(__qam_add_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __qam_delext_recover --
+ * Recovery function for delext.
+ *
+ * PUBLIC: int __qam_delext_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__qam_delext_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __qam_delext_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__qam_delext_print);
+ REC_INTRO(__qam_delext_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/template/rec_rep b/storage/bdb/dist/template/rec_rep
new file mode 100644
index 00000000000..872812cd069
--- /dev/null
+++ b/storage/bdb/dist/template/rec_rep
@@ -0,0 +1,13 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__rep.h"
+#include "dbinc/log.h"
+
diff --git a/storage/bdb/dist/template/rec_txn b/storage/bdb/dist/template/rec_txn
new file mode 100644
index 00000000000..e3ee4c89648
--- /dev/null
+++ b/storage/bdb/dist/template/rec_txn
@@ -0,0 +1,323 @@
+#include "db_config.h"
+
+#ifndef NO_SYSTEM_INCLUDES
+#include <sys/types.h>
+
+#include <string.h>
+#endif
+
+#include "db_int.h"
+#include "dbinc/db_page.h"
+#include "dbinc/__txn.h"
+#include "dbinc/log.h"
+
+/*
+ * __txn_regop_recover --
+ * Recovery function for regop.
+ *
+ * PUBLIC: int __txn_regop_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__txn_regop_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __txn_regop_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__txn_regop_print);
+ REC_INTRO(__txn_regop_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __txn_ckp_recover --
+ * Recovery function for ckp.
+ *
+ * PUBLIC: int __txn_ckp_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__txn_ckp_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __txn_ckp_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__txn_ckp_print);
+ REC_INTRO(__txn_ckp_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __txn_child_recover --
+ * Recovery function for child.
+ *
+ * PUBLIC: int __txn_child_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__txn_child_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __txn_child_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__txn_child_print);
+ REC_INTRO(__txn_child_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __txn_xa_regop_recover --
+ * Recovery function for xa_regop.
+ *
+ * PUBLIC: int __txn_xa_regop_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__txn_xa_regop_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __txn_xa_regop_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__txn_xa_regop_print);
+ REC_INTRO(__txn_xa_regop_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
+/*
+ * __txn_recycle_recover --
+ * Recovery function for recycle.
+ *
+ * PUBLIC: int __txn_recycle_recover
+ * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
+ */
+int
+__txn_recycle_recover(dbenv, dbtp, lsnp, op, info)
+ DB_ENV *dbenv;
+ DBT *dbtp;
+ DB_LSN *lsnp;
+ db_recops op;
+ void *info;
+{
+ __txn_recycle_args *argp;
+ DB *file_dbp;
+ DBC *dbc;
+ DB_MPOOLFILE *mpf;
+ PAGE *pagep;
+ int cmp_n, cmp_p, modified, ret;
+
+ REC_PRINT(__txn_recycle_print);
+ REC_INTRO(__txn_recycle_read, 1);
+
+ if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0)
+ if (DB_REDO(op)) {
+ if ((ret = mpf->get(mpf,
+ &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0)
+ goto out;
+ } else {
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+ goto out;
+ }
+
+ modified = 0;
+ cmp_n = log_compare(lsnp, &LSN(pagep));
+
+ /*
+ * Use this when there is something like "pagelsn" in the argp
+ * structure. Sometimes, you might need to compare meta-data
+ * lsn's instead.
+ *
+ * cmp_p = log_compare(&LSN(pagep), argp->pagelsn);
+ */
+ if (cmp_p == 0 && DB_REDO(op)) {
+ /* Need to redo update described. */
+ modified = 1;
+ } else if (cmp_n == 0 && !DB_REDO(op)) {
+ /* Need to undo update described. */
+ modified = 1;
+ }
+ if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0))
+ goto out;
+
+ *lsnp = argp->prev_lsn;
+ ret = 0;
+
+out: REC_CLOSE;
+}
+
diff --git a/storage/bdb/dist/vx_2.0/BerkeleyDB.wpj b/storage/bdb/dist/vx_2.0/BerkeleyDB.wpj
index 78684d90067..692d1b40bb6 100644
--- a/storage/bdb/dist/vx_2.0/BerkeleyDB.wpj
+++ b/storage/bdb/dist/vx_2.0/BerkeleyDB.wpj
@@ -1,7 +1,7 @@
Document file - DO NOT EDIT
<BEGIN> BUILD_PENTIUM_debug_BUILDRULE
-BerkeleyDB.out
+BerkeleyDB20.out
<END>
<BEGIN> BUILD_PENTIUM_debug_MACRO_AR
@@ -9,7 +9,7 @@ ar386
<END>
<BEGIN> BUILD_PENTIUM_debug_MACRO_ARCHIVE
-$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB_sim.a
+$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB20_sim.a
<END>
<BEGIN> BUILD_PENTIUM_debug_MACRO_AS
@@ -109,7 +109,7 @@ size386
<END>
<BEGIN> BUILD_PENTIUM_release_BUILDRULE
-BerkeleyDB.out
+BerkeleyDB20.out
<END>
<BEGIN> BUILD_PENTIUM_release_MACRO_AR
@@ -117,7 +117,7 @@ ar386
<END>
<BEGIN> BUILD_PENTIUM_release_MACRO_ARCHIVE
-$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB_sim.a
+$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB20_sim.a
<END>
<BEGIN> BUILD_PENTIUM_release_MACRO_AS
@@ -143,7 +143,7 @@ cc386
-DCPU=PENTIUM \
-O2 \
-I$(PRJ_DIR) \
- -I$(PRJ_DIR)/..
+ -I$(PRJ_DIR)/..
<END>
<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS_AS
@@ -217,11 +217,11 @@ size386
::tc_PENTIUMgnu
<END>
-<BEGIN> BUILD_RULE_BerkeleyDB.out
+<BEGIN> BUILD_RULE_BerkeleyDB20.out
<END>
-<BEGIN> BUILD_RULE_BerkeleyDB_sim.out
+<BEGIN> BUILD_RULE_BerkeleyDB20_sim.out
<END>
diff --git a/storage/bdb/dist/vx_2.0/BerkeleyDBsmall.wpj b/storage/bdb/dist/vx_2.0/BerkeleyDBsmall.wpj
new file mode 100644
index 00000000000..3c9fd350fa1
--- /dev/null
+++ b/storage/bdb/dist/vx_2.0/BerkeleyDBsmall.wpj
@@ -0,0 +1,251 @@
+Document file - DO NOT EDIT
+
+<BEGIN> BUILD_PENTIUM_debug_BUILDRULE
+BerkeleyDB20small.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AR
+ar386
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB20small_sim.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AS
+cc386
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CC
+cc386
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS
+-g \
+ -mpentium \
+ -ansi \
+ -nostdinc \
+ -DRW_MULTI_THREAD \
+ -D_REENTRANT \
+ -fvolatile \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM \
+ -O0 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/.. \
+ -DDIAGNOSTIC \
+ -DDEBUG
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS_AS
+-g \
+ -mpentium \
+ -ansi \
+ -nostdinc \
+ -fvolatile \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -x \
+ assembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CPP
+cc386 -E -P -xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD
+ld386
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_NM
+nm386 -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_SIZE
+size386
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_TC
+::tc_PENTIUMgnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_BUILDRULE
+BerkeleyDB20small.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AR
+ar386
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB20small_sim.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AS
+cc386
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CC
+cc386
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS
+-mpentium \
+ -ansi \
+ -nostdinc \
+ -DRW_MULTI_THREAD \
+ -D_REENTRANT \
+ -fvolatile \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM \
+ -O2 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/..
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS_AS
+-g \
+ -mpentium \
+ -ansi \
+ -nostdinc \
+ -fvolatile \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -x \
+ assembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CPP
+cc386 -E -P -xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD
+ld386
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LDDEPS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_NM
+nm386 -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_SIZE
+size386
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_TC
+::tc_PENTIUMgnu
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB20small.out
+
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB20small_sim.out
+
+<END>
+
+<BEGIN> BUILD_RULE_archive
+
+<END>
+
+<BEGIN> BUILD_RULE_objects
+
+<END>
+
+<BEGIN> BUILD__CURRENT
+PENTIUM_debug
+<END>
+
+<BEGIN> BUILD__LIST
+PENTIUM_release PENTIUM_debug
+<END>
+
+<BEGIN> CORE_INFO_TYPE
+::prj_vxApp
+<END>
+
+<BEGIN> CORE_INFO_VERSION
+2.0
+<END>
+
diff --git a/storage/bdb/dist/vx_2.0/wpj.in b/storage/bdb/dist/vx_2.0/wpj.in
index 2b942bb562c..a38cf7251a6 100644
--- a/storage/bdb/dist/vx_2.0/wpj.in
+++ b/storage/bdb/dist/vx_2.0/wpj.in
@@ -1,7 +1,7 @@
Document file - DO NOT EDIT
<BEGIN> BUILD_PENTIUMgnu_BUILDRULE
-__DB_APPLICATION_NAME__.out
+__DB_APPLICATION_NAME__20.out
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
@@ -9,7 +9,7 @@ ar386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
-$(PRJ_DIR)/PENTIUMgnu/__DB_APPLICATION_NAME__.a
+$(PRJ_DIR)/PENTIUMgnu/__DB_APPLICATION_NAME__20.a
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
@@ -111,7 +111,7 @@ size386
<END>
-<BEGIN> BUILD_RULE___DB_APPLICATION_NAME__.out
+<BEGIN> BUILD_RULE___DB_APPLICATION_NAME__20.out
<END>
diff --git a/storage/bdb/dist/vx_2.2/BerkeleyDB.wpj b/storage/bdb/dist/vx_2.2/BerkeleyDB.wpj
new file mode 100644
index 00000000000..e27a231f76f
--- /dev/null
+++ b/storage/bdb/dist/vx_2.2/BerkeleyDB.wpj
@@ -0,0 +1,310 @@
+Document file - DO NOT EDIT
+
+<BEGIN> BUILD_PENTIUM_debug_BUILDRULE
+BerkeleyDB22.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AR
+arpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUM_debug/BerkeleyDB22.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AS
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CC
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CC_ARCH_SPEC
+-mcpu=pentiumpro -march=pentiumpro
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu \
+ -O0 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/.. \
+ -DDIAGNOSTIC \
+ -DDEBUG
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS_AS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -xassembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CPP
+ccpentium -E -P
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_HEX_FLAGS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD
+ldpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD_PARTIAL
+ccpentium -r -nostdlib -Wl,-X
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_NM
+nmpentium -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_DEPEND
+-M -w
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
+-MD
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_LANG_C
+-xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_UNDEFINE_MACRO
+-U
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_SIZE
+sizepentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_TOOL_FAMILY
+gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_TC
+::tc_PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_BUILDRULE
+BerkeleyDB22.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AR
+arpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUM_release/BerkeleyDB22.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AS
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CC
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CC_ARCH_SPEC
+-mcpu=pentiumpro -march=pentiumpro
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu \
+ -O2 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/..
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS_AS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -xassembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CPP
+ccpentium -E -P
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_HEX_FLAGS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD
+ldpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD_PARTIAL
+ccpentium -r -nostdlib -Wl,-X
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_NM
+nmpentium -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_DEPEND
+-M -w
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
+-MD
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_LANG_C
+-xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_UNDEFINE_MACRO
+-U
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_SIZE
+sizepentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_TOOL_FAMILY
+gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_TC
+::tc_PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB22.out
+
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB22.pl
+
+<END>
+
+<BEGIN> BUILD_RULE_archive
+
+<END>
+
+<BEGIN> BUILD_RULE_objects
+
+<END>
+
+<BEGIN> BUILD__CURRENT
+PENTIUM_debug
+<END>
+
+<BEGIN> BUILD__LIST
+PENTIUM_release PENTIUM_debug
+<END>
+
+<BEGIN> CORE_INFO_TYPE
+::prj_vxApp
+<END>
+
+<BEGIN> CORE_INFO_VERSION
+2.2
+<END>
+
diff --git a/storage/bdb/dist/vx_2.2/BerkeleyDBsmall.wpj b/storage/bdb/dist/vx_2.2/BerkeleyDBsmall.wpj
new file mode 100644
index 00000000000..bfbdadc46a5
--- /dev/null
+++ b/storage/bdb/dist/vx_2.2/BerkeleyDBsmall.wpj
@@ -0,0 +1,310 @@
+Document file - DO NOT EDIT
+
+<BEGIN> BUILD_PENTIUM_debug_BUILDRULE
+BerkeleyDB22small.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AR
+arpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUM_debug/BerkeleyDB22small.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_AS
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CC
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CC_ARCH_SPEC
+-mcpu=pentiumpro -march=pentiumpro
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu \
+ -O0 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/.. \
+ -DDIAGNOSTIC \
+ -DDEBUG
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CFLAGS_AS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -xassembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_CPP
+ccpentium -E -P
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_HEX_FLAGS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD
+ldpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD_PARTIAL
+ccpentium -r -nostdlib -Wl,-X
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_NM
+nmpentium -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_DEPEND
+-M -w
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
+-MD
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_LANG_C
+-xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_OPTION_UNDEFINE_MACRO
+-U
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_SIZE
+sizepentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_MACRO_TOOL_FAMILY
+gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_debug_TC
+::tc_PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_BUILDRULE
+BerkeleyDB22small.out
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AR
+arpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUM_release/BerkeleyDB22small.a
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_AS
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CC
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CC_ARCH_SPEC
+-mcpu=pentiumpro -march=pentiumpro
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu \
+ -O2 \
+ -I$(PRJ_DIR) \
+ -I$(PRJ_DIR)/..
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CFLAGS_AS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -xassembler-with-cpp \
+ -I. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_CPP
+ccpentium -E -P
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_HEX_FLAGS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD
+ldpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD_PARTIAL
+ccpentium -r -nostdlib -Wl,-X
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_NM
+nmpentium -g
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_DEPEND
+-M -w
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
+-MD
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_LANG_C
+-xc
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_OPTION_UNDEFINE_MACRO
+-U
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_SIZE
+sizepentium
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_MACRO_TOOL_FAMILY
+gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM_release_TC
+::tc_PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB22small.out
+
+<END>
+
+<BEGIN> BUILD_RULE_BerkeleyDB22small.pl
+
+<END>
+
+<BEGIN> BUILD_RULE_archive
+
+<END>
+
+<BEGIN> BUILD_RULE_objects
+
+<END>
+
+<BEGIN> BUILD__CURRENT
+PENTIUM_debug
+<END>
+
+<BEGIN> BUILD__LIST
+PENTIUM_release PENTIUM_debug
+<END>
+
+<BEGIN> CORE_INFO_TYPE
+::prj_vxApp
+<END>
+
+<BEGIN> CORE_INFO_VERSION
+2.2
+<END>
+
diff --git a/storage/bdb/dist/vx_2.2/wpj.in b/storage/bdb/dist/vx_2.2/wpj.in
new file mode 100644
index 00000000000..d883ef2b193
--- /dev/null
+++ b/storage/bdb/dist/vx_2.2/wpj.in
@@ -0,0 +1,194 @@
+Document file - DO NOT EDIT
+
+<BEGIN> BUILD_PENTIUM2gnu_BUILDRULE
+__DB_APPLICATION_NAME__22.out
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_AR
+arpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_ARCHIVE
+$(PRJ_DIR)/PENTIUM2gnu/__DB_APPLICATION_NAME__22.a
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_AS
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_CC
+ccpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_CC_ARCH_SPEC
+-mcpu=pentiumpro -march=pentiumpro
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_CFLAGS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -DRW_MULTI_THREAD \
+ -D_REENTRANT \
+ -fvolatile \
+ -fno-builtin \
+ -fno-defer-pop \
+ -I$(PRJ_DIR)/.. \
+ -I$(PRJ_DIR)/../.. \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_CFLAGS_AS
+-g \
+ -mcpu=pentiumpro \
+ -march=pentiumpro \
+ -ansi \
+ -nostdlib \
+ -fno-builtin \
+ -fno-defer-pop \
+ -P \
+ -xassembler-with-cpp \
+ -I$(WIND_BASE)/target/h \
+ -DCPU=PENTIUM2 \
+ -DTOOL_FAMILY=gnu \
+ -DTOOL=gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_CPP
+ccpentium -E -P
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_HEX_FLAGS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_LD
+ldpentium
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_LDFLAGS
+-X -N
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_LD_PARTIAL
+ccpentium -r -nostdlib -Wl,-X
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_LD_PARTIAL_FLAGS
+-X -r
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_NM
+nmpentium -g
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_DEFINE_MACRO
+-D
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_DEPEND
+-M -w
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
+-MD
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_INCLUDE_DIR
+-I
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_LANG_C
+-xc
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_OPTION_UNDEFINE_MACRO
+-U
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_POST_BUILD_RULE
+
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_PRJ_LIBS
+
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_SIZE
+sizepentium
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_MACRO_TOOL_FAMILY
+gnu
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_RO_DEPEND_PATH
+{$(WIND_BASE)/target/h/} \
+ {$(WIND_BASE)/target/src/} \
+ {$(WIND_BASE)/target/config/}
+<END>
+
+<BEGIN> BUILD_PENTIUM2gnu_TC
+::tc_PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD_RULE_archive
+
+<END>
+
+<BEGIN> BUILD_RULE___DB_APPLICATION_NAME__22.out
+
+<END>
+
+<BEGIN> BUILD_RULE___DB_APPLICATION_NAME__22.pl
+
+<END>
+
+<BEGIN> BUILD_RULE_objects
+
+<END>
+
+<BEGIN> BUILD__CURRENT
+PENTIUM2gnu
+<END>
+
+<BEGIN> BUILD__LIST
+PENTIUM2gnu
+<END>
+
+<BEGIN> CORE_INFO_TYPE
+::prj_vxApp
+<END>
+
+<BEGIN> CORE_INFO_VERSION
+2.2
+<END>
+
+<BEGIN> FILE___DB_APPLICATION_NAME__.c_dependDone
+FALSE
+<END>
+
+<BEGIN> FILE___DB_APPLICATION_NAME__.c_dependencies
+
+<END>
+
+<BEGIN> FILE___DB_APPLICATION_NAME__.c_objects
+__DB_APPLICATION_NAME__.o
+<END>
+
+<BEGIN> FILE___DB_APPLICATION_NAME__.c_tool
+C/C++ compiler
+<END>
+
+<BEGIN> PROJECT_FILES
+$(PRJ_DIR)/__DB_APPLICATION_NAME__.c
+<END>
+
+<BEGIN> userComments
+__DB_APPLICATION_NAME__
+<END>
diff --git a/storage/bdb/dist/vx_config.in b/storage/bdb/dist/vx_config.in
index 43fc8eb71f3..29e679e548f 100644
--- a/storage/bdb/dist/vx_config.in
+++ b/storage/bdb/dist/vx_config.in
@@ -5,6 +5,12 @@
/* Define to 1 if you want to build a version for running the test suite. */
/* #undef CONFIG_TEST */
+/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using
+ an operating system environment that supports Win32 calls and semantics. We
+ don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though
+ Cygwin/GCC closely emulates the Unix environment. */
+/* #undef DB_WIN32 */
+
/* !!!
* The DEBUG option may be added using the Tornado project build.
* DO NOT modify it here.
@@ -29,7 +35,7 @@
#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if Berkeley DB release includes strong cryptography. */
-/* #undef HAVE_CRYPTO */
+#define HAVE_CRYPTO 1
/* Define to 1 if you have the `directio' function. */
/* #undef HAVE_DIRECTIO */
@@ -47,27 +53,42 @@
/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */
/* #undef HAVE_FCNTL_F_SETFD */
+/* Define to 1 if you have the `fdatasync' function. */
+/* #undef HAVE_FDATASYNC */
+
/* Define to 1 if allocated filesystem blocks are not zeroed. */
#define HAVE_FILESYSTEM_NOTZERO 1
+/* Define to 1 if you have the `ftruncate' function. */
+/* #undef HAVE_FTRUNCATE */
+
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getopt' function. */
/* #undef HAVE_GETOPT */
+/* Define to 1 if you have the `getrusage' function. */
+/* #undef HAVE_GETRUSAGE */
+
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
/* Define to 1 if you have the `getuid' function. */
/* #undef HAVE_GETUID */
+/* Define to 1 if building Hash access method. */
+#define HAVE_HASH 1
+
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
+/* Define to 1 if the system has the type `long long'. */
+/* #undef HAVE_LONG_LONG */
+
/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1
@@ -104,6 +125,9 @@
/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */
+/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
+/* #undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY */
+
/* Define to 1 to use the UNIX fcntl system call mutexes. */
/* #undef HAVE_MUTEX_FCNTL */
@@ -120,12 +144,9 @@
/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */
/* #undef HAVE_MUTEX_MSEM_INIT */
-/* Define to 1 to use the GCC compiler and Apple PowerPC assembly language. */
-/* #undef HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY */
-
-/* Define to 1 to use the GCC compiler and generic PowerPC assembly language.
+/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes.
*/
-/* #undef HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY */
+/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */
/* #undef HAVE_MUTEX_PTHREADS */
@@ -133,6 +154,10 @@
/* Define to 1 to use Reliant UNIX initspin mutexes. */
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
+/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes.
+ */
+/* #undef HAVE_MUTEX_S390_CC_ASSEMBLY */
+
/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */
/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */
@@ -163,6 +188,9 @@
/* Define to 1 to configure mutexes intra-process only. */
/* #undef HAVE_MUTEX_THREAD_ONLY */
+/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */
+/* #undef HAVE_MUTEX_TRU64_CC_ASSEMBLY */
+
/* Define to 1 to use the UNIX International mutexes. */
/* #undef HAVE_MUTEX_UI_THREADS */
@@ -175,9 +203,12 @@
/* Define to 1 to use VxWorks mutexes. */
#define HAVE_MUTEX_VXWORKS 1
-/* Define to 1 to use Windows mutexes. */
+/* Define to 1 to use the MSVC compiler and Windows mutexes. */
/* #undef HAVE_MUTEX_WIN32 */
+/* Define to 1 to use the GCC compiler and Windows mutexes. */
+/* #undef HAVE_MUTEX_WIN32_GCC */
+
/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
@@ -199,12 +230,18 @@
/* Define to 1 if building on QNX. */
/* #undef HAVE_QNX */
-/* Define to 1 if you have the `qsort' function. */
-#define HAVE_QSORT 1
+/* Define to 1 if building Queue access method. */
+#define HAVE_QUEUE 1
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if building replication support. */
+#define HAVE_REPLICATION 1
+
/* Define to 1 if building RPC client/server. */
/* #undef HAVE_RPC */
@@ -214,12 +251,21 @@
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
+/* Define to 1 if building sequence support. */
+/* #undef HAVE_SEQUENCE */
+
/* Define to 1 if you have the `shmget' function. */
/* #undef HAVE_SHMGET */
/* Define to 1 if you have the `snprintf' function. */
/* #undef HAVE_SNPRINTF */
+/* Define to 1 if you have the `srand' function. */
+#define HAVE_SRAND 1
+
+/* Define to 1 if building statistics support. */
+#define HAVE_STATISTICS 1
+
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
@@ -241,6 +287,9 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
@@ -254,6 +303,9 @@
*/
/* #undef HAVE_SYS_DIR_H */
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+/* #undef HAVE_SYS_FCNTL_H */
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
@@ -276,6 +328,12 @@
/* Define to 1 if unlink of file with open file descriptors will fail. */
#define HAVE_UNLINK_WITH_OPEN_FAILURE 1
+/* Define to 1 if the system has the type `unsigned long long'. */
+/* #undef HAVE_UNSIGNED_LONG_LONG */
+
+/* Define to 1 if building access method verification support. */
+#define HAVE_VERIFY 1
+
/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */
@@ -288,6 +346,9 @@
/* Define to 1 if you have the `_fstati64' function. */
/* #undef HAVE__FSTATI64 */
+/* Define to a value if using non-standard mutex alignment. */
+/* #undef MUTEX_ALIGN */
+
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "support@sleepycat.com"
@@ -312,7 +373,7 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
-/* Define to 1 to mask harmless unitialized memory read/writes. */
+/* Define to 1 to mask harmless uninitialized memory read/writes. */
/* #undef UMRW */
/* Number of bits in a file offset, on hosts where this is settable. */
diff --git a/storage/bdb/dist/vx_setup/CONFIG.in b/storage/bdb/dist/vx_setup/CONFIG.in
index 6ccceee7034..1fccd1d2ed6 100644
--- a/storage/bdb/dist/vx_setup/CONFIG.in
+++ b/storage/bdb/dist/vx_setup/CONFIG.in
@@ -1,4 +1,4 @@
-#
+#
# Install configuration file.
#
# Note: This file may be modified during the pool manufacturing process to
diff --git a/storage/bdb/dist/vx_setup/LICENSE.TXT b/storage/bdb/dist/vx_setup/LICENSE.TXT
index 7814c679cd7..f31971375f3 100644
--- a/storage/bdb/dist/vx_setup/LICENSE.TXT
+++ b/storage/bdb/dist/vx_setup/LICENSE.TXT
@@ -1,3 +1,3 @@
-Copyright (c) 1996-2002
+Copyright (c) 1996-2004
Sleepycat Software. All rights reserved.
See the file LICENSE for redistribution information.
diff --git a/storage/bdb/dist/vx_setup/vx_allfile.in b/storage/bdb/dist/vx_setup/vx_allfile.in
index 61a1b8ee805..8d87fa97b59 100644
--- a/storage/bdb/dist/vx_setup/vx_allfile.in
+++ b/storage/bdb/dist/vx_setup/vx_allfile.in
@@ -1,5 +1,7 @@
-windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB.wpj
-windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB.wsp
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB20.wpj
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB20.wsp
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB20.wpj
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/BerkeleyDB22.wsp
windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/db.h
windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/db_config.h
windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/db_int.h
diff --git a/storage/bdb/dist/vx_setup/vx_demofile.in b/storage/bdb/dist/vx_setup/vx_demofile.in
index 42a698ea367..772f4cb4bc0 100644
--- a/storage/bdb/dist/vx_setup/vx_demofile.in
+++ b/storage/bdb/dist/vx_setup/vx_demofile.in
@@ -1,3 +1,4 @@
-windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/dbdemo/dbdemo.wpj
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/dbdemo/dbdemo20.wpj
+windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/dbdemo/dbdemo22.wpj
windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/dbdemo/README
windlink/sleepycat/BerkeleyDB.@DB_VERSION_MAJOR@.@DB_VERSION_MINOR@.@DB_VERSION_PATCH@/build_vxworks/dbdemo/dbdemo.c
diff --git a/storage/bdb/dist/win_config.in b/storage/bdb/dist/win_config.in
index 09acab28806..3406c8774f4 100644
--- a/storage/bdb/dist/win_config.in
+++ b/storage/bdb/dist/win_config.in
@@ -1,6 +1,12 @@
/* Define to 1 if you want to build a version for running the test suite. */
/* #undef CONFIG_TEST */
+/* We use DB_WIN32 much as one would use _WIN32 -- to specify that we're using
+ an operating system environment that supports Win32 calls and semantics. We
+ don't use _WIN32 because Cygwin/GCC also defines _WIN32, even though
+ Cygwin/GCC closely emulates the Unix environment. */
+#define DB_WIN32 1
+
/* Define to 1 if you want a debugging version. */
/* #undef DEBUG */
#if defined(_DEBUG)
@@ -22,7 +28,9 @@
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if Berkeley DB release includes strong cryptography. */
-/* #undef HAVE_CRYPTO */
+#ifndef HAVE_SMALLBUILD
+#define HAVE_CRYPTO 1
+#endif
/* Define to 1 if you have the `directio' function. */
/* #undef HAVE_DIRECTIO */
@@ -40,27 +48,44 @@
/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */
/* #undef HAVE_FCNTL_F_SETFD */
+/* Define to 1 if you have the `fdatasync' function. */
+/* #undef HAVE_FDATASYNC */
+
/* Define to 1 if allocated filesystem blocks are not zeroed. */
#define HAVE_FILESYSTEM_NOTZERO 1
+/* Define to 1 if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE 1
+
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getopt' function. */
/* #undef HAVE_GETOPT */
+/* Define to 1 if you have the `getrusage' function. */
+/* #undef HAVE_GETRUSAGE */
+
/* Define to 1 if you have the `gettimeofday' function. */
/* #undef HAVE_GETTIMEOFDAY */
/* Define to 1 if you have the `getuid' function. */
/* #undef HAVE_GETUID */
+/* Define to 1 if building Hash access method. */
+#ifndef HAVE_SMALLBUILD
+#define HAVE_HASH 1
+#endif
+
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* Define to 1 if you have the `nsl' library (-lnsl). */
/* #undef HAVE_LIBNSL */
+/* Define to 1 if the system has the type `long long'. */
+#define HAVE_LONG_LONG 1
+
/* Define to 1 if you have the `memcmp' function. */
#define HAVE_MEMCMP 1
@@ -97,6 +122,9 @@
/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */
/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */
+/* Define to 1 to use the Apple/Darwin _spin_lock_try mutexes. */
+/* #undef HAVE_MUTEX_DARWIN_SPIN_LOCK_TRY */
+
/* Define to 1 to use the UNIX fcntl system call mutexes. */
/* #undef HAVE_MUTEX_FCNTL */
@@ -113,12 +141,9 @@
/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */
/* #undef HAVE_MUTEX_MSEM_INIT */
-/* Define to 1 to use the GCC compiler and Apple PowerPC assembly language. */
-/* #undef HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY */
-
-/* Define to 1 to use the GCC compiler and generic PowerPC assembly language.
+/* Define to 1 to use the GCC compiler and PowerPC assembly language mutexes.
*/
-/* #undef HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY */
+/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */
/* #undef HAVE_MUTEX_PTHREADS */
@@ -126,6 +151,10 @@
/* Define to 1 to use Reliant UNIX initspin mutexes. */
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
+/* Define to 1 to use the IBM C compiler and S/390 assembly language mutexes.
+ */
+/* #undef HAVE_MUTEX_S390_CC_ASSEMBLY */
+
/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */
/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */
@@ -156,6 +185,9 @@
/* Define to 1 to configure mutexes intra-process only. */
/* #undef HAVE_MUTEX_THREAD_ONLY */
+/* Define to 1 to use the CC compiler and Tru64 assembly language mutexes. */
+/* #undef HAVE_MUTEX_TRU64_CC_ASSEMBLY */
+
/* Define to 1 to use the UNIX International mutexes. */
/* #undef HAVE_MUTEX_UI_THREADS */
@@ -168,9 +200,12 @@
/* Define to 1 to use VxWorks mutexes. */
/* #undef HAVE_MUTEX_VXWORKS */
-/* Define to 1 to use Windows mutexes. */
+/* Define to 1 to use the MSVC compiler and Windows mutexes. */
#define HAVE_MUTEX_WIN32 1
+/* Define to 1 to use the GCC compiler and Windows mutexes. */
+/* #undef HAVE_MUTEX_WIN32_GCC */
+
/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
@@ -192,12 +227,22 @@
/* Define to 1 if building on QNX. */
/* #undef HAVE_QNX */
-/* Define to 1 if you have the `qsort' function. */
-#define HAVE_QSORT 1
+/* Define to 1 if building Queue access method. */
+#ifndef HAVE_SMALLBUILD
+#define HAVE_QUEUE 1
+#endif
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
+/* Define to 1 if you have the `rand' function. */
+#define HAVE_RAND 1
+
+/* Define to 1 if building replication support. */
+#ifndef HAVE_SMALLBUILD
+#define HAVE_REPLICATION 1
+#endif
+
/* Define to 1 if building RPC client/server. */
/* #undef HAVE_RPC */
@@ -207,12 +252,21 @@
/* Define to 1 if you have the `select' function. */
/* #undef HAVE_SELECT */
+/* Define to 1 if building sequence support. */
+#define HAVE_SEQUENCE 1
+
/* Define to 1 if you have the `shmget' function. */
/* #undef HAVE_SHMGET */
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
+/* Define to 1 if you have the `srand' function. */
+#define HAVE_SRAND 1
+
+/* Define to 1 if building statistics support. */
+#define HAVE_STATISTICS 1
+
/* Define to 1 if you have the <stdint.h> header file. */
/* #undef HAVE_STDINT_H */
@@ -234,6 +288,9 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
@@ -247,6 +304,9 @@
*/
/* #undef HAVE_SYS_DIR_H */
+/* Define to 1 if you have the <sys/fcntl.h> header file. */
+#define HAVE_SYS_FCNTL_H 1
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
@@ -269,6 +329,14 @@
/* Define to 1 if unlink of file with open file descriptors will fail. */
/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */
+/* Define to 1 if the system has the type `unsigned long long'. */
+#define HAVE_UNSIGNED_LONG_LONG 1
+
+/* Define to 1 if building access method verification support. */
+#ifndef HAVE_SMALLBUILD
+#define HAVE_VERIFY 1
+#endif
+
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
@@ -281,6 +349,9 @@
/* Define to 1 if you have the `_fstati64' function. */
#define HAVE__FSTATI64 1
+/* Define to a value if using non-standard mutex alignment. */
+/* #undef MUTEX_ALIGN */
+
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "support@sleepycat.com"
@@ -305,7 +376,7 @@
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */
-/* Define to 1 to mask harmless unitialized memory read/writes. */
+/* Define to 1 to mask harmless uninitialized memory read/writes. */
/* #undef UMRW */
/* Number of bits in a file offset, on hosts where this is settable. */
@@ -359,81 +430,13 @@
#define vsnprintf __db_Cvsnprintf
#endif
-/*
- * XXX
- * The following is not part of the automatic configuration setup, but
- * provides the information necessary to build Berkeley DB on Windows.
- */
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <direct.h>
-#include <fcntl.h>
-#include <io.h>
-#include <limits.h>
-#include <memory.h>
-#include <process.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-
-/*
- * To build Tcl interface libraries, the include path must be configured to
- * use the directory containing <tcl.h>, usually the include directory in
- * the Tcl distribution.
- */
-#ifdef DB_TCL_SUPPORT
-#include <tcl.h>
-#endif
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-/*
- * All of the necessary includes have been included, ignore the #includes
- * in the Berkeley DB source files.
- */
-#define NO_SYSTEM_INCLUDES
-
-/*
- * Win32 has getcwd, snprintf and vsnprintf, but under different names.
- */
-#define getcwd(buf, size) _getcwd(buf, size)
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-
-/*
- * Win32 does not define getopt and friends in any header file, so we must.
- */
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern int optind;
-extern char *optarg;
-extern int getopt(int, char * const *, const char *);
-#if defined(__cplusplus)
-}
-#endif
-
-/*
- * We use DB_WIN32 much as one would use _WIN32, to determine that we're
- * using an operating system environment that supports Win32 calls
- * and semantics. We don't use _WIN32 because cygwin/gcc also defines
- * that, even though it closely emulates the Unix environment.
- */
-#define DB_WIN32 1
+#include "win_db.h"
/*
- * This is a grievous hack -- once we've included windows.h, we have no choice
- * but to use ANSI-style varargs (because it pulls in stdarg.h for us). DB's
- * code decides which type of varargs to use based on the state of __STDC__.
- * Sensible. Unfortunately, Microsoft's compiler _doesn't_ define __STDC__
- * unless you invoke it with arguments turning OFF all vendor extensions. Even
- * more unfortunately, if we do that, it fails to parse windows.h!!!!! So, we
- * define __STDC__ here, after windows.h comes in. Note: the compiler knows
- * we've defined it, and starts enforcing strict ANSI compilance from this point
- * on.
+ * Microsoft's compiler _doesn't_ define __STDC__ unless you invoke it with
+ * arguments turning OFF all vendor extensions. Even more unfortunately, if
+ * we do that, it fails to parse windows.h!!!!! So, we define __STDC__ here,
+ * after windows.h comes in. Note: the compiler knows we've defined it, and
+ * starts enforcing strict ANSI compliance from this point on.
*/
#define __STDC__ 1
diff --git a/storage/bdb/dist/win_db.in b/storage/bdb/dist/win_db.in
new file mode 100644
index 00000000000..609d8460afa
--- /dev/null
+++ b/storage/bdb/dist/win_db.in
@@ -0,0 +1,100 @@
+/*-
+ * $Id: win_db.in,v 11.4 2004/10/07 13:59:24 carol Exp $
+ *
+ * The following provides the information necessary to build Berkeley
+ * DB on native Windows, and other Windows environments such as MinGW.
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <direct.h>
+#include <fcntl.h>
+#include <io.h>
+#include <limits.h>
+#include <memory.h>
+#include <process.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <tchar.h>
+#include <time.h>
+#include <errno.h>
+
+/*
+ * To build Tcl interface libraries, the include path must be configured to
+ * use the directory containing <tcl.h>, usually the include directory in
+ * the Tcl distribution.
+ */
+#ifdef DB_TCL_SUPPORT
+#include <tcl.h>
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+/*
+ * All of the necessary includes have been included, ignore the #includes
+ * in the Berkeley DB source files.
+ */
+#define NO_SYSTEM_INCLUDES
+
+/*
+ * Win32 has getcwd, snprintf and vsnprintf, but under different names.
+ */
+#define getcwd(buf, size) _getcwd(buf, size)
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+
+/*
+ * Windows defines off_t to long (i.e., 32 bits).
+ */
+#define off_t __db_off_t
+typedef __int64 off_t;
+
+/*
+ * Win32 does not define getopt and friends in any header file, so we must.
+ */
+#if defined(__cplusplus)
+extern "C" {
+#endif
+extern int optind;
+extern char *optarg;
+extern int getopt(int, char * const *, const char *);
+#if defined(__cplusplus)
+}
+#endif
+
+#ifdef _UNICODE
+#define TO_TSTRING(dbenv, s, ts, ret) do { \
+ int __len = strlen(s) + 1; \
+ ts = NULL; \
+ if ((ret = __os_malloc((dbenv), \
+ __len * sizeof (_TCHAR), &(ts))) == 0 && \
+ MultiByteToWideChar(CP_UTF8, 0, \
+ (s), -1, (ts), __len) == 0) \
+ ret = __os_get_errno(); \
+ } while (0)
+
+#define FROM_TSTRING(dbenv, ts, s, ret) { \
+ int __len = WideCharToMultiByte(CP_UTF8, 0, ts, -1, \
+ NULL, 0, NULL, NULL); \
+ s = NULL; \
+ if ((ret = __os_malloc((dbenv), __len, &(s))) == 0 && \
+ WideCharToMultiByte(CP_UTF8, 0, \
+ (ts), -1, (s), __len, NULL, NULL) == 0) \
+ ret = __os_get_errno(); \
+ } while (0)
+
+#define FREE_STRING(dbenv, s) do { \
+ if ((s) != NULL) { \
+ __os_free((dbenv), (s)); \
+ (s) = NULL; \
+ } \
+ } while (0)
+
+#else
+#define TO_TSTRING(dbenv, s, ts, ret) (ret) = 0, (ts) = (_TCHAR *)(s)
+#define FROM_TSTRING(dbenv, ts, s, ret) (ret) = 0, (s) = (char *)(ts)
+#define FREE_STRING(dbenv, ts)
+#endif
diff --git a/storage/bdb/dist/win_exports.in b/storage/bdb/dist/win_exports.in
index 52df529d028..9087875ccf6 100644
--- a/storage/bdb/dist/win_exports.in
+++ b/storage/bdb/dist/win_exports.in
@@ -1,15 +1,13 @@
-# $Id: win_exports.in,v 1.25 2002/08/29 14:22:21 margo Exp $
+# $Id: win_exports.in,v 1.41 2004/10/12 17:44:10 bostic Exp $
# Standard interfaces.
db_create
db_env_create
+ db_sequence_create
db_strerror
db_version
db_xa_switch
log_compare
- txn_abort
- txn_begin
- txn_commit
# Library configuration interfaces.
db_env_set_func_close
@@ -18,10 +16,13 @@
db_env_set_func_exists
db_env_set_func_free
db_env_set_func_fsync
+ db_env_set_func_ftruncate
db_env_set_func_ioinfo
db_env_set_func_malloc
db_env_set_func_map
db_env_set_func_open
+ db_env_set_func_pread
+ db_env_set_func_pwrite
db_env_set_func_read
db_env_set_func_realloc
db_env_set_func_rename
@@ -43,6 +44,8 @@
__db_dbm_init
__db_dbm_nextkey
__db_dbm_store
+ __db_get_flags_fn
+ __db_get_seq_flags_fn
__db_hcreate
__db_hdestroy
__db_hsearch
@@ -70,8 +73,7 @@
__ham_func4
__ham_func5
__ham_test
- __lock_dump_region
- __memp_dump_region
+ __lock_id_set
__os_calloc
__os_closehandle
__os_free
@@ -84,44 +86,78 @@
__os_strdup
__os_umalloc
__os_write
+ __txn_id_set
#These are needed for linking tools or java.
- __bam_init_print
+ __bam_adj_read
+ __bam_cadjust_read
+ __bam_cdel_read
+ __bam_curadj_read
__bam_pgin
__bam_pgout
- __crdel_init_print
+ __bam_rcuradj_read
+ __bam_relink_read
+ __bam_repl_read
+ __bam_root_read
+ __bam_rsplit_read
+ __bam_split_read
+ __crdel_metasub_read
+ __db_addrem_read
+ __db_big_read
+ __db_cksum_read
+ __db_debug_read
__db_dispatch
- __db_dump
- __db_e_stat
+ __db_dumptree
__db_err
+ __db_fileid_reset
__db_getlong
__db_getulong
__db_global_values
- __db_init_print
- __db_inmemdbflags
__db_isbigendian
+ __db_lsn_reset
+ __db_noop_read
__db_omode
__db_overwrite
+ __db_ovref_read
+ __db_pg_alloc_read
+ __db_pg_free_read
+ __db_pg_freedata_read
+ __db_pg_init_read
+ __db_pg_new_read
+ __db_pg_prepare_read
__db_pgin
__db_pgout
- __db_prdbt
- __db_prfooter
- __db_prheader
+ __db_pr_callback
__db_rpath
+ __db_stat_pp
+ __db_stat_print_pp
__db_util_cache
__db_util_interrupted
__db_util_logset
__db_util_siginit
__db_util_sigresend
- __db_verify_callback
__db_verify_internal
- __dbreg_init_print
- __fop_init_print
+ __dbreg_register_read
+ __fop_create_read
+ __fop_file_remove_read
+ __fop_remove_read
+ __fop_rename_read
+ __fop_write_read
+ __ham_chgpg_read
+ __ham_copypage_read
+ __ham_curadj_read
__ham_get_meta
- __ham_init_print
+ __ham_groupalloc_read
+ __ham_insdel_read
+ __ham_metagroup_read
+ __ham_newpage_read
__ham_pgin
__ham_pgout
__ham_release_meta
+ __ham_replace_read
+ __ham_splitdata_read
+ __lock_list_print
+ __log_stat_pp
__os_clock
__os_get_errno
__os_id
@@ -129,6 +165,15 @@
__os_sleep
__os_ufree
__os_yield
- __qam_init_print
+ __qam_add_read
+ __qam_del_read
+ __qam_delext_read
+ __qam_incfirst_read
+ __qam_mvptr_read
__qam_pgin_out
- __txn_init_print
+ __rep_stat_print
+ __txn_child_read
+ __txn_ckp_read
+ __txn_recycle_read
+ __txn_regop_read
+ __txn_xa_regop_read
diff --git a/storage/bdb/dist/winmsi/dbcorewix.in b/storage/bdb/dist/winmsi/dbcorewix.in
new file mode 100644
index 00000000000..03635177de0
--- /dev/null
+++ b/storage/bdb/dist/winmsi/dbcorewix.in
@@ -0,0 +1,196 @@
+<!-- $Id: dbcorewix.in,v 1.8 2005/04/18 18:40:27 philipr Exp $
+ -
+ - Dbcorewix.in is the DB core WiX input file, and is used by
+ - s_winmsi to create dbcore.wxs (an input to WiX).
+ - Most everything here is pure 'WiX' syntax within XML,
+ - the exceptions are:
+ - 1) everything is pushed through the m4 preprocessor first.
+ - this makes certain boilerplate actions in the UI tolerable.
+ - We put all needed defines at the top of this file.
+ - 2) a very few identifiers beginning with WIX_DB_*
+ - are predefined as m4 macros on the command line.
+ - These are items that only the caller (s_winmsi) can know.
+ -
+ - M4 makes many things easier, but there are peculiarities.
+ - In particular, if you are using a macro with args, like
+ - TOPSTRIPE, note that *any* occurance of the characters "( ) ,"
+ - are interpreted by m4, even if they occur in an Xml comment or string.
+ - Remember this when editing this file!
+ -
+ - Beyond that, there is a lot to understand about WiX
+ - and how this file operates, to get started, look at
+ - various WiX tutorials, like:
+ - http://www.ondotnet.com/pub/a/dotnet/2004/04/19/wix.html
+ - http://blogs.msdn.com/robmen/archive/2004/04/05/107709.aspx
+ - Also view the lecture covered here:
+ - http://blogs.msdn.com/robmen/archive/2004/09/23/233684.aspx
+ -
+ - Finally, understand that WiX is an XML layering above the concepts
+ - defined by the world of the MSI installer. To really know how to do WiX,
+ - (and especially the UI), you need to understand the MSI installer.
+ - A key point is that MSI (and hence WiX) is not really procedural.
+ - MSI defines a number of tables (like Feature or CustomAction) in
+ - an internal database. WiX merely specifies how to fill these tables,
+ - and the msiexec program merely cranks through the various tables,
+ - processing each row. It is true that you can do procedural things
+ - via CustomActions, but to get them in order, you must specify columns
+ - in the table with things like After="SomeOtherRowId".
+ -
+ - See "About the User Interface" and subordinate documents:
+ - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/about_the_user_interface.asp
+-->
+
+m4_include(WIX_DB_SHARED_WINMSIDIR/dbwix.m4) <!-- Define common macros -->
+
+<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
+
+ <!-- The ???? stuff asks WiX to create a unique GUID for us -->
+ <Product Id='????????-????-????-????-????????????'
+ Name='Berkeley DB WIX_DB_VERSION' Version='WIX_DB_VERSION.0'
+ Manufacturer='Sleepycat Software, Inc.' Language='1033'>
+
+ <!-- Store files as a compressed 'cabinet' embedded in the .MSI file. -->
+ <Package Id='????????-????-????-????-????????????'
+ Keywords="Embedded Database Datastore"
+ Description='Berkeley DB WIX_DB_VERSION'
+ Comments='includes sources and binaries' InstallerVersion='200'
+ Compressed='yes' Platforms="Intel"
+ Languages="1033" SummaryCodepage="1252" />
+
+ <Media Id='1' Cabinet='dbcore.cab' EmbedCab='yes' />
+
+ COMMON_PROPERTIES()
+
+ <!-- Declare properties for environment -->
+ WIX_DB_ENV_FEATURE_PROPS()
+
+ <Condition Message=
+ "To install [ProductName], you must be running Windows 2000 or Windows XP.">
+ <![CDATA[VersionNT>=500]]></Condition>
+
+ <Condition Message=
+ "You must have administrative access to install this product.">
+ NOT Priviledged
+ </Condition>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="DesktopFolder" Name="." SourceName="." />
+ <Directory Id="FavoritesFolder" Name="." SourceName="." />
+
+ <Directory Id="ProgramFilesFolder" Name="." SourceName=".">
+ <Directory Id="SleepycatSoftwareFolder" Name="Sleepy~1"
+ LongName="Sleepycat Software">
+ <Directory Id="INSTALLDIR" Name="WIX_DB_8CHAR_VERSION"
+ LongName="Berkeley DB WIX_DB_VERSION">
+ <Directory Id="INSTALLUTIL" Name="instutil"
+ LongName="installutil">
+ </Directory>
+
+
+ <!-- Note: these guids must be changed when an installer
+ - for a new release is made available.
+ -
+ - TODO: to play by the rules of components (see
+ - http://blogs.msdn.com/robmen/archive/2003/10/18/56497.aspx,
+ - "Component Rules 101" by Rob Mensching),
+ - we should devise a strategy for ALL guids (remember
+ - many are created by s_winmsi). This should work:
+ -
+ - Each guid is composed of three parts, like so:
+ - PPPPPPPP-VVVV-VVVV-HHHH-HHHHHHHHHHHH
+ - The P part is unique to the product, e.g.
+ - the bdb core installer might always use 9A3FE019.
+ - The V part is the version of the product, e.g.
+ - 4.2.37 might be translated as 0402-0025 # 25 is 37 in hex
+ - The H part is a hash value created from the directory
+ - that houses the component. Like if the component for
+ - the directory "bin/Debug" hashed to 1234567890abcdef,
+ - then the H part is 1234-567890abcdef.
+ -
+ - This scheme guarantees that rebuilds of the installer
+ - over the same release tree get the same GUIDs.
+ - But for a different release tree (which *should* get
+ - installed in a different directory, since install
+ - directories are named by release number), we will get
+ - completely different GUIDs.
+ -->
+ <Component Id="RequiredFiles"
+ Guid="13E1DF48-903B-11D9-8BDE-F66BAD1E3F3A"
+ KeyPath="yes" SharedDllRefCount="yes"
+ Location="either" DiskId="1">
+
+ <File Id="LICENSE.txt" Name="LICENSE.txt"
+ src="WIX_DB_SRCDIR\LICENSE" />
+ <File Id="README.txt" Name="README.txt"
+ src="WIX_DB_SRCDIR\README" />
+ <Registry Id="RootDir.RegistryVal" Root="HKLM"
+ Key="SOFTWARE\Sleepycat Software\Berkeley DB\WIX_DB_VERSION"
+ Name="RootDirectory" Value="[INSTALLDIR]" Type="string"
+ Action="write" />
+ <CreateFolder />
+ </Component>
+
+ COMMON_COMPONENTS()
+
+ <!-- <Directory>, <Component> generated from files.in -->
+ WIX_DB_DIRECTORY_STRUCTURE()
+
+ </Directory>
+ </Directory>
+ </Directory>
+ <Directory Id="ProgramMenuFolder" Name="." SourceName=".">
+ <Directory Id="BerkeleyDbMenu" Name="WIX_DB_8CHAR_VERSION"
+ LongName="Berkeley DB WIX_DB_VERSION" />
+ </Directory>
+ </Directory>
+
+ <!-- <File>, <Shortcut> generated from links.in -->
+ WIX_DB_LINKS()
+
+ COMMON_FEATURES(`Berkeley DB')
+
+ <!-- ================================================================ -->
+ <UI>
+
+ <Property Id="DefaultUIFont"><![CDATA[Tahoma8]]></Property>
+ <TextStyle Id="Tahoma8" FaceName="Tahoma" Size="8" />
+
+ DIALOG_WELCOME(MainWelcomeDlg, , ShowLicenseDlg)
+ DIALOG_LICENSE(ShowLicenseDlg, MainWelcomeDlg, TargetFolderDlg,
+ `Berkeley DB')
+ DIALOG_TARGET(TargetFolderDlg, ShowLicenseDlg, FeatureSelectionDlg)
+ DIALOG_FEATURE(FeatureSelectionDlg, TargetFolderDlg, EnvVarDlg,
+ `Debug libraries are needed for working C/C++ examples.')
+ DIALOG_ENVIRONMENT(EnvVarDlg, FeatureSelectionDlg, ReadyToInstallDlg)
+ DIALOG_READY(ReadyToInstallDlg, EnvVarDlg, )
+
+ DIALOG_PROGRESS(ShowProgressDlg, , )
+ DIALOG_SUCCESS(InstallSuccessDlg, , , `Berkeley DB',
+ `in the product blog http://www.sleepycat.com/blogs/db or in the news group news://comp.databases.berkeley-db')
+
+ <!-- Here are extra admin dialogs -->
+ DIALOG_ADMIN_CANCEL(CancelInstallerDlg)
+ DIALOG_ADMIN_NOSPACE(OutOfSpaceDlg, FeatureSelectionDlg)
+ DIALOG_ADMIN_INTERRUPTED(InstallErrorDlg, Return)
+ DIALOG_ADMIN_INTERRUPTED(InstallCancelledDlg, Exit)
+
+
+ <!-- This sequence tells MSI what to do when (at the highest level) -->
+ <InstallUISequence>
+ <Show Dialog="InstallErrorDlg" OnExit="error" />
+ <Show Dialog="InstallCancelledDlg" OnExit="cancel" />
+ <Show Dialog="InstallSuccessDlg" OnExit="success" />
+ <Show Dialog="MainWelcomeDlg" After="CostFinalize" />
+ <Show Dialog="ShowProgressDlg" After="MainWelcomeDlg" />
+ </InstallUISequence>
+
+ COMMON_UI_TEXT()
+ <Property Id="MaxInstallSize">49 MB</Property>
+
+
+ </UI>
+
+ COMMON_EXECUTE_SEQUENCE()
+
+ </Product>
+</Wix>
diff --git a/storage/bdb/dist/winmsi/dbvarsbat.in b/storage/bdb/dist/winmsi/dbvarsbat.in
new file mode 100644
index 00000000000..b49375285f8
--- /dev/null
+++ b/storage/bdb/dist/winmsi/dbvarsbat.in
@@ -0,0 +1,25 @@
+@echo off
+
+:: $Id: dbvarsbat.in,v 1.2 2005/04/15 18:59:59 philipr Exp $
+:: This file sets the environment variables needed to run Berkeley DB.
+
+set DBROOTDIR=
+for /F "tokens=3 delims= " %%A in ('REG QUERY "HKLM\SOFTWARE\Sleepycat Software\Berkeley DB\WIX_DB_VERSION" /v RootDirectory') do set DBROOTDIR=%%A
+if ERRORLEVEL 2 goto MISSING
+if not defined DBROOTDIR goto MISSING
+
+echo Setting environment variables for Berkeley DB, installed in %DBROOTDIR%
+
+set PATH=%DBROOTDIR%\bin;%DBROOTDIR%\bin\debug;%PATH%
+set CLASSPATH=%CLASSPATH%;%DBROOTDIR%\jar\debug\db.jar;%DBROOTDIR%\jar\debug\dbexamples.jar;%CLASSPATH%;%DBROOTDIR%\jar\db.jar;%DBROOTDIR%\jar\dbexamples.jar
+goto END
+
+:MISSING
+echo
+echo NOTE:
+echo The Berkeley DB version could not be determined.
+echo If you are running on Windows 2000, make sure the
+echo REG.EXE program is installed from the Tools disk"
+echo
+
+:END
diff --git a/storage/bdb/dist/winmsi/dbwix.m4 b/storage/bdb/dist/winmsi/dbwix.m4
new file mode 100644
index 00000000000..42fa44e62a8
--- /dev/null
+++ b/storage/bdb/dist/winmsi/dbwix.m4
@@ -0,0 +1,833 @@
+<!-- $Id: dbwix.m4,v 1.7 2005/04/18 18:41:07 philipr Exp $
+ - This file is included by WiX input files to define m4 macros.
+ - m4 is tricky. It has NO notion of XML comments, so
+ - take care using these names in comments after they are defined,
+ - since they will be expanded (probably what you don't want).
+ -
+ - Note that this file is shared by multiple installers.
+ - If you want to change a definition to customize an individual project,
+ - consider redefining the macro in a local file.
+ -->
+
+<!-- Some basic UI characteristics -->
+m4_define(`DIALOG_WIDTH', `390')
+m4_define(`DIALOG_HEIGHT', `320')
+m4_define(`BOTTOMSTRIPE_Y', `m4_eval(DIALOG_HEIGHT-32)')
+m4_define(`NAVBUTTON_Y', `m4_eval(DIALOG_HEIGHT-23)')
+m4_define(`NAVBUTTON_DIM', `X="`$1'" Y="NAVBUTTON_Y" Width="66" Height="17"')
+
+<!-- _YPOS is a running total of the current Y position -->
+m4_define(`_YPOS', `0')
+m4_define(`SETY', `m4_define(`_YPOS', `$1')')
+m4_define(`INCY', `SETY(m4_eval(_YPOS+(`$1')))')
+
+<!-- PARTIALHEIGHT(yheight [, gap=10 ]) -->
+m4_define(`PARTIALHEIGHT', `Y="_YPOS" Height="`$1'" INCY(`$1') INCY(_GETGAP(`$2'))')
+m4_define(`_GETGAP', `m4_ifelse(`',`$1', 10, `$1')')
+m4_define(`FULLHEIGHT', `Y="_YPOS" Height="m4_eval(BOTTOMSTRIPE_Y - _YPOS - 10)"')
+
+<!-- BOTTOM_Y: bottom of the usable area before nav buttons -->
+m4_define(`BOTTOM_Y', `m4_eval(BOTTOMSTRIPE_Y - 10)')
+
+m4_define(`DIALOGPROP', `Width="DIALOG_WIDTH" Height="DIALOG_HEIGHT"
+ Title="[ProductName] - Installer" NoMinimize="yes"')
+
+m4_define(`TOPSTRIPE', `
+ SETY(`$1')
+ INCY(10)
+<!-- stripe bitmap removed for now until we get better quality bitmaps.
+ <Control Id="TopStripe" Type="Bitmap"
+ X="0" Y="0" Width="DIALOG_WIDTH" Height="`$1'" Text="Stripe" />
+-->
+ <Control Id="TopStripeBorder" Type="Line"
+ X="0" Y="`$1'" Width="DIALOG_WIDTH" Height="0" />
+ <Control Id="TopTitle" Type="Text"
+ X="8" Y="6" Width="292" Height="25" Transparent="yes">
+ <Text>{&amp;MSSansBold8}`$2'</Text>
+ </Control>
+ <Control Id="TopText" Type="Text"
+ X="16" Y="23" Width="m4_eval(DIALOG_WIDTH-34)"
+ Height="m4_eval(`$1' - 19)" Transparent="yes">
+ <Text>`$3'</Text>
+ </Control>')
+
+m4_define(`TEXTCONTROL', `
+ <Control Id="`$1'" Type="Text"
+ X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'">
+ <Text>`$3'</Text>
+ </Control>
+ INCY(`$2')')
+
+<!-- TEXTCONTROL2 (name,height,text). No newline -->
+m4_define(`TEXTCONTROL2', `
+ <Control Id="`$1'" Type="Text"
+ X="20" Y="_YPOS" Width="m4_eval(DIALOG_WIDTH-42)" Height="`$2'" Transparent="yes">
+ <Text>`$3'</Text>
+ </Control>')
+
+m4_define(`BOTTOMSTRIPE', `
+ <Control Id="BottomStripeBorder" Type="Line"
+ X="0" Y="BOTTOMSTRIPE_Y" Width="DIALOG_WIDTH" Height="0" />')
+
+m4_define(`NEWDIALOGEVENT', `
+ <Publish Event="NewDialog" Value="`$1'">
+ <![CDATA[1]]>
+ </Publish>')
+
+m4_define(`SPAWNDIALOGEVENT', `
+ <Publish Event="SpawnDialog" Value="`$1'">
+ <![CDATA[1]]>
+ </Publish>')
+
+<!-- use an arrow only if the text is Back, like this: "< Back" -->
+m4_define(`BACKBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(170)
+ Text="m4_ifelse(Back,`$1',&lt; )&amp;`$1'" `$2'>
+ `$3'
+ </Control>')
+
+<!-- use an arrow only if the text is Next, like this: "Next >" -->
+m4_define(`NEXTBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(236)
+ Default="yes" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
+ `$3'
+ </Control>')
+
+m4_define(`CANCELBUTTON_GENERIC', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(308)
+ Text="`$1'" `$2'>
+ `$3'
+ </Control>')
+
+m4_define(`NEXTBUTTON_NOTDEFAULT', `
+ <Control Id="`$1'" Type="PushButton"
+ NAVBUTTON_DIM(236)
+ Default="no" Text="&amp;`$1'm4_ifelse(Next,`$1', &gt;)" `$2'>
+ `$3'
+ </Control>')
+
+<!-- typical usages -->
+m4_define(`BACKBUTTON_DISABLED', `BACKBUTTON_GENERIC(Back, Disabled="yes")')
+m4_define(`BACKBUTTON', `BACKBUTTON_GENERIC(Back, , NEWDIALOGEVENT(`$1'))')
+m4_define(`NEXTBUTTON_DISABLED', `NEXTBUTTON_GENERIC(Next, Disabled="yes")')
+m4_define(`NEXTBUTTON', `NEXTBUTTON_GENERIC(Next, , NEWDIALOGEVENT(`$1'))')
+m4_define(`CANCELBUTTON', `CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
+ SPAWNDIALOGEVENT(CancelInstallerDlg))')
+
+<!-- a little (imperfect) magic to create some unique GUIDs. -->
+m4_define(`_GUIDSUFFIX', `10000000')
+m4_define(`_SETGUID', `m4_define(`_GUIDSUFFIX', `$1')')
+m4_define(`_GUIDINC', `_SETGUID(m4_eval(_GUIDSUFFIX+1))')
+m4_define(`GUID_CREATE_UNIQUE', `_GUIDINC()WIX_DB_GUID_PREFIX()`'_GUIDSUFFIX()')
+
+<!-- These three defines are data values, used by GUID_CREATE_PERSISTENT -->
+m4_define(`_WIXDB_PRODUCT', WIX_DB_PRODUCT_NAME)
+m4_define(`_WIXDB_VERSION', WIX_DB_VERSION)
+m4_define(`_WIXDB_CURDIR', `unknown')
+m4_define(`_WIXDB_CURFILE', `unknown')
+m4_define(`_WIXDB_SUBDIR', `')
+
+<!-- These defines set the data values above -->
+m4_define(`WIX_DB_SET_PRODUCT', `m4_define(`_WIXDB_PRODUCT', `$1')')
+m4_define(`WIX_DB_SET_VERSION', `m4_define(`_WIXDB_VERSION', `$1')')
+m4_define(`WIX_DB_SET_CURDIR', `m4_define(`_WIXDB_CURDIR', `$1')')
+m4_define(`WIX_DB_SET_CURFILE', `m4_define(`_WIXDB_CURFILE', `$1')')
+m4_define(`WIX_DB_SET_SUBDIR', `m4_define(`_WIXDB_SUBDIR', `$1')')
+
+m4_define(`_LASTCHAR', `m4_substr(`$1',m4_eval(m4_len(`$1')-1))')
+m4_define(`_LOPCHAR', `m4_substr(`$1',0,m4_eval(m4_len(`$1')-1))')
+m4_define(`_CHOPNAME', `m4_ifelse(_LASTCHAR(`$1'),/,`$1',`_CHOPNAME(_LOPCHAR(`$1'))')')
+m4_define(`WIX_DB_BEGIN_SUBDIR', `WIX_DB_SET_SUBDIR(_WIXDB_SUBDIR/`$1')')
+m4_define(`WIX_DB_END_SUBDIR', `WIX_DB_SET_SUBDIR(_LOPCHAR(_CHOPNAME(_WIXDB_SUBDIR)))')
+m4_define(`WIX_DB_CLEAR_SUBDIR', `WIX_DB_SET_SUBDIR()')
+
+<!-- Create a GUID from the current product, directory, file -->
+m4_define(`WIX_DB_PERSISTENT_GUID', `m4_esyscmd(echo "_WIXDB_PRODUCT @@ _WIXDB_VERSION @@ _WIXDB_CURDIR @@ _WIXDB_SUBDIR @@ _WIXDB_CURFILE" | openssl md5 | sed -e "s/^\(........\)\(....\)\(....\)\(....\)\(....\)\(............\)/\1-\2-\3-\4-\5/")')
+
+m4_define(`DB_LICENSE_INTRO', `The following license applies to this copy of software you are about to install. Please read it carefully before proceeding. Select below the nature of the license by which you will use this product. For more information about Sleepycat Software&apos;s licensing please refer to http://www.sleepycat.com/download/incensinginfo.shtml or contact us at info@sleepycat.com.')
+
+m4_define(`DB_ENVIRONMENT_INTRO', `[ProductName] will need to modify certain environment variables to work properly. If you elect not to set these variables you may find that some utilities`,' scripts and other parts of [ProductName] won&apos;t work properly. Please indicate that you skipped this step if you request support help from us.')
+
+m4_define(`COMMON_PROPERTIES', `
+ <Property Id="ApplicationUsers"><![CDATA[AnyUser]]></Property>
+ <Property Id="LicenseType"><![CDATA[Open]]></Property>
+
+ <!-- The ARP* properties affect the Add/Remove Programs dialog -->
+ <Property Id="ARPURLINFOABOUT"><![CDATA[http://www.sleepycat.com]]></Property>
+ <Property Id="ARPCONTACT"><![CDATA[support@sleepycat.com]]></Property>
+ <Property Id="ARPNOMODIFY"><![CDATA[1]]></Property>
+ <Property Id="ARPNOREPAIR"><![CDATA[1]]></Property>
+ <!-- TODO: this icon does not work here -->
+ <Property Id="ARPPRODUCTION"><![CDATA[IconWeb]]></Property>
+
+ <Property Id="INSTALLLEVEL"><![CDATA[200]]></Property>
+ <Property Id="FullOrCustom"><![CDATA[Full]]></Property>
+
+ <Property Id="DiscussionCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="AnnouncementsCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="NewsletterCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="EmailAddress" Hidden="yes"></Property>
+ <Property Id="SalesContactCheck" Hidden="yes"><![CDATA[yes]]></Property>
+ <Property Id="EnvironmentSetCheck" Hidden="yes"><![CDATA[1]]></Property>
+ <Property Id="EnvironmentGenCheck" Hidden="yes"><![CDATA[1]]></Property>
+<!-- (PBR) We use DebugCheck to track the state of the debug checkbox -->
+ <Property Id="DebugCheck" Hidden="yes"><![CDATA[yes]]></Property>
+
+ <!-- Part of the build process creates a program instenv.exe
+ - that is installed into InstUtil and used only by the installer.
+ - When a user wants to generate a file with environment vars,
+ - we launch instreg and that program creates it.
+ -
+ - The final location of the instenv.exe program is not known
+ - when we create this property, we set the real value of the
+ - property later.
+ -->
+
+ <Property Id="InstEnvironmentProgram"><![CDATA[0]]></Property>
+<!-- TODO: should not have to hardwire PATH and CLASSPATH here -->
+ <CustomAction Id="InstEnvironment" Property="InstEnvironmentProgram"
+ ExeCommand="[INSTALLDIR]\dbvars.bat PATH=[PATHEscValue] CLASSPATH=[CLASSPATHEscValue]" Return="asyncNoWait"/>
+
+ <!-- Some properties to aid in debugging.
+ - Sometimes creating a msg dialog is the easiest way to see the
+ - value of a property. To make this work when you hit the next
+ - button, add this to your NEXTBUTTON__GENERIC call:
+
+ <Publish Event="DoAction" Value="InstDebug"><![CDATA[1]]></Publish>
+
+ -->
+ <Property Id="DebugUserId">dda</Property>
+ <Property Id="DebugShowProgram">msg.exe</Property>
+
+ <!-- tweek me as needed -->
+ <CustomAction Id="InstDebug" Property="DebugShowProgram"
+ ExeCommand="[DebugUserId] InstEnvironmentProgram=[InstEnvironmentProgram]= EnvironmentGenCheck=[EnvironmentGenCheck]= AlwaysInstall=[!AlwaysInstall]=" Return="asyncNoWait" />
+
+ <Property Id="NULL" Hidden="yes"></Property>
+ <Property Id="FeatureList" Hidden="yes"></Property>
+ <Property Id="DoInstallDebug" Hidden="yes">yes</Property>
+ <Property Id="DoInstallEnvironment" Hidden="yes">yes</Property>
+
+ <Binary Id="SleepycatLogo" src="WIX_DB_IMAGEDIR\sleepycat.jpg" />
+ <Binary Id="Stripe" src="WIX_DB_IMAGEDIR\topstripe.ibd" />
+
+ <!-- TODO: does not work yet -->
+ <Binary Id="IconWeb" src="WIX_DB_IMAGEDIR\caticon.ibd" />
+
+ <!-- These are 16x16 Windows ico files -->
+ <Binary Id="IconCreateDir" src="WIX_DB_IMAGEDIR\foldernew.ibd" />
+ <Binary Id="IconUp" src="WIX_DB_IMAGEDIR\folderup.ibd" />
+
+')
+
+m4_define(`COMMON_COMPONENTS', `
+ <Component Id="RequiredCommonFiles"
+ Guid="545CFE00-93D7-11D9-EAD3-F63F68BDEB1A"
+ KeyPath="yes" SharedDllRefCount="yes"
+ Location="either" DiskId="1">
+ <Registry Id="Ext.Registry" Root="HKCR"
+ Key=".bdbsc"
+ Value="Sleepycat.InformationalShortcut"
+ Type="string" Action="write" />
+ <Registry Id="Name.Registry" Root="HKCR"
+ Key="Sleepycat.InformationalShortcut"
+ Value="Sleepycat Software Informational Shortcut"
+ Type="string" Action="write" />
+ <Registry Id="Tip.Registry" Root="HKCR"
+ Key="Sleepycat.InformationalShortcut" Name="InfoTip"
+ Value="Sleepycat Software Informational Shortcut"
+ Type="string" Action="write" />
+ <Registry Id="NoShow.Registry" Root="HKCR"
+ Key="Sleepycat.InformationalShortcut" Name="NeverShowExt"
+ Type="string" Action="write" />
+ <Registry Id="Icon.Registry" Root="HKCR"
+ Key="Sleepycat.InformationalShortcut\DefaultIcon"
+ Value="[INSTALLDIR]\installutil\webicon.ico"
+ Type="string" Action="write" />
+ <Registry Id="Command.Registry" Root="HKCR"
+ Key="Sleepycat.InformationalShortcut\shell\open\command"
+ Value="rundll32.exe shdocvw.dll,OpenURL %1"
+ Type="string" Action="write" />
+ <Registry Id="Explore.Registry" Root="HKCU"
+ Key="Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bdbsc\OpenWithProgIds\Sleepycat.InformationalShortcut"
+ Action="write" />
+ <Registry Id="HklmExt.Registry" Root="HKLM"
+ Key="Software\Classes\.bdbsc"
+ Value="Sleepycat.InformationalShortcut"
+ Type="string" Action="write" />
+ <Registry Id="HklmCommand.Registry" Root="HKLM"
+ Key="Software\Classes\Sleepycat.InformationalShortcut\shell\open\command"
+ Value="rundll32.exe shdocvw.dll,OpenURL %1"
+ Type="string" Action="write" />
+ </Component>
+')
+
+m4_define(`COMMON_UI_TEXT', `
+ <!-- These are needed to show various canned text -->
+ <UIText Id="AbsentPath" />
+ <UIText Id="NewFolder">Fldr|New Folder</UIText>
+ <UIText Id="bytes">bytes</UIText>
+ <UIText Id="GB">GB</UIText>
+ <UIText Id="KB">KB</UIText>
+ <UIText Id="MB">MB</UIText>
+ <UIText Id="MenuAbsent">This feature will not be installed.</UIText>
+ <UIText Id="MenuAllLocal">This feature, and all subfeatures, will be installed.</UIText>
+ <UIText Id="MenuLocal">This feature will be installed.</UIText>
+ <UIText Id="SelAbsentAbsent">This feature will remain uninstalled.</UIText>
+ <UIText Id="SelAbsentLocal">This feature will be installed.</UIText>
+ <UIText Id="SelChildCostNeg">This feature frees up [1] on your hard drive.</UIText>
+ <UIText Id="SelChildCostPos">This feature requires [1] on your hard drive.</UIText>
+ <UIText Id="SelCostPending">Compiling cost for this feature...</UIText>
+ <UIText Id="SelLocalAbsent">This feature will be completely removed.</UIText>
+ <UIText Id="SelLocalLocal">This feature will remain installed.</UIText>
+ <UIText Id="SelParentCostNegNeg">This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.</UIText>
+ <UIText Id="SelParentCostNegPos">This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.</UIText>
+ <UIText Id="SelParentCostPosNeg">This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.</UIText>
+ <UIText Id="SelParentCostPosPos">This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.</UIText>
+ <UIText Id="TimeRemaining">Time remaining: {[1] min }[2] sec</UIText>
+ <UIText Id="VolumeCostAvailable">Available</UIText>
+ <UIText Id="VolumeCostDifference">Differences</UIText>
+ <UIText Id="VolumeCostRequired">Required</UIText>
+ <UIText Id="VolumeCostSize">Disk Size</UIText>
+ <UIText Id="VolumeCostVolume">Volume</UIText>
+')
+
+m4_define(`COMMON_FEATURES', `
+ <!-- Here we list all the features to be installed.
+ - There is one canned feature, the rest of the
+ - features come from features.in, by way of a file
+ - that gets included.
+ -->
+ <Feature Id="AlwaysInstall" Title="Always Install"
+ Description="`$1'" Display="hidden" Level="1"
+ AllowAdvertise="no"
+ ConfigurableDirectory="INSTALLDIR" Absent="disallow">
+ <ComponentRef Id="RequiredFiles" />
+ <ComponentRef Id="RequiredCommonFiles" />
+ </Feature>
+
+ <!-- <Feature>, <ComponentRef> generated from {features,files}.in -->
+ WIX_DB_FEATURE_STRUCTURE()
+')
+
+m4_define(`COMMON_EXECUTE_SEQUENCE', `
+ <!-- TODO: fix comment
+ - We modify the execute sequence to insert some custom actions:
+ - we want the instenv program to run during install (after files
+ - are installed), and during uninstall (before files are removed).
+ - We set a condition on the custom actions to make this happen.
+ - The "!ident" notation indicates the current action for a feature
+ - with that identifier. We use the AlwaysInstall feature because
+ - it is always present in our feature list. A value of 3 means
+ - it is being installed locally, 1 means it is being uninstalled.
+ - TODO: removed for now
+ <Custom Action="InstEnvironment" After="PublishProduct">
+ <![CDATA[Not Installed]]></Custom>
+ -->
+ <InstallExecuteSequence>
+ </InstallExecuteSequence>
+')
+
+<!--
+ - Here are macros for each dialog that is shared by the installers.
+ - The idea for any customization is that each installer
+ - could potentially override a particular dialog.
+ - However, if it is feasible to share code, any of these
+ - dialogs could be parameterized further.
+ -
+ - In general, these macros have 3 parameters.
+ - The first is the id name of the dialog.
+ - The second is the id of the previous dialog (for the Back button).
+ - The third is the id of the next dialog (for the Next button).
+ -->
+m4_define(`DIALOG_WELCOME', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ BOTTOMSTRIPE()
+ BACKBUTTON_DISABLED()
+ CANCELBUTTON()
+ NEXTBUTTON(`$3')
+
+ TOPSTRIPE(54, `Welcome',
+`The Installer will install [ProductName] on your computer.
+To continue, click Next.')
+
+ <Control Id="Logo" Type="Bitmap" Text="SleepycatLogo"
+ X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) />
+ </Dialog>
+')
+
+<!-- Takes a 4th parameter, a short product name, like "Berkeley DB" -->
+m4_define(`DIALOG_LICENSE', `
+ <RadioGroup Property="LicenseType">
+ <RadioButton Value="Open"
+ X="0" Y="0" Width="310" Height="15"
+ Text="I qualify for the &amp;open source license shown above" />
+ <RadioButton Value="Commercial"
+ X="0" Y="15" Width="310" Height="15"
+ Text="I will need a co&amp;mmercial license when I ship my product" />
+ </RadioGroup>
+
+ <Dialog Id="`$1'" DIALOGPROP>
+
+ TOPSTRIPE(84, `Open Source License', DB_LICENSE_INTRO(`$4'))
+ BOTTOMSTRIPE()
+ BACKBUTTON(`$2')
+ CANCELBUTTON()
+ NEXTBUTTON(`$3')
+
+ <Control Id="LicenseText" Type="ScrollableText" X="8" Width="368"
+ PARTIALHEIGHT(130) Sunken="yes">
+ <Text>WIX_DB_LICENSE_RTF()</Text>
+ </Control>
+
+ <Control Id="LicenseRadio" Type="RadioButtonGroup" X="8" Width="340"
+ PARTIALHEIGHT(35) Property="LicenseType" />
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_TARGET', `
+
+ <RadioGroup Property="ApplicationUsers">
+ <RadioButton Value="AnyUser" X="0" Y="0" Width="270" Height="15"
+ Text="&amp;Anyone who uses this computer (all users)" />
+ <RadioButton Value="CurUser" X="0" Y="15" Width="270" Height="15"
+ Text="Only for the current user" />
+ </RadioGroup>
+
+ <Dialog Id="`$1'" DIALOGPROP>
+
+ TOPSTRIPE(44, `Installation Folder',
+ `Click Next to install to the default folder.')
+ BOTTOMSTRIPE()
+ BACKBUTTON(`$2')
+ CANCELBUTTON()
+
+ NEXTBUTTON_GENERIC(Next,,
+ NEWDIALOGEVENT(`$3')
+ <Publish Event="SetInstallLevel" Value="300">
+ <![CDATA[0]]></Publish>
+ <Publish Property="ALLUSERS" Value="1">
+ <![CDATA[ApplicationUsers = "AnyUser"]]></Publish>
+ <Publish Property="ALLUSERS" Value="{}">
+ <![CDATA[ApplicationUsers = "CurUser"]]></Publish>
+ <Publish Property="SelectedSetupType" Value="Custom">
+ <![CDATA[1]]></Publish>
+
+ )
+
+ TEXTCONTROL(InstallToText, 16, `Install [ProductName] to:')
+
+ <Control Id="ChangeFolder" Type="PushButton" X="318" Y="_YPOS"
+ Width="66" Height="17" Text="&amp;Change...">
+ <Publish Event="SpawnDialog" Value="ChangeFolderDlg">
+ <![CDATA[1]]></Publish>
+ <Publish Property="NewInstallDir" Value="INSTALLDIR">
+ <![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="InstallToValue" Type="Text" X="40" Width="250"
+ PARTIALHEIGHT(20, 20)
+ Property="NewInstallDir" Text="[INSTALLDIR]" />
+
+ TEXTCONTROL(InstallForText, 14, `Install [ProductName] for:')
+
+ <Control Id="InstallForRadio" Type="RadioButtonGroup" PARTIALHEIGHT(50)
+ X="40" Width="310" Property="ApplicationUsers" />
+ </Dialog>
+
+ <Dialog Id="ChangeFolderDlg" DIALOGPROP>
+ TOPSTRIPE(44, `Change the Installation Folder',
+ `Browse to the folder you want to install to.')
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(OK,,
+ <Publish Event="SetTargetPath"
+ Value="[NewInstallDir]"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Cancel="yes",
+ <Publish Event="Reset" Value="0"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="Return"><![CDATA[1]]></Publish>
+ )
+
+ TEXTCONTROL(LookText, 15, `&amp;Install into:')
+
+ <Control Id="DirCombo" Type="DirectoryCombo"
+ X="20" Width="270" Y="_YPOS" Height="80"
+ Property="NewInstallDir" Indirect="yes" Removable="yes"
+ Fixed="yes" Remote="yes" CDROM="yes" RAMDisk="yes" Floppy="yes" />
+
+ <Control Id="FolderUp" Type="PushButton"
+ X="320" Width="19" Y="_YPOS" Height="19"
+ ToolTip="Up One Level" Icon="yes" FixedSize="yes"
+ IconSize="16" Text="IconUp">
+ <Publish Event="DirectoryListUp" Value="0"><![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="FolderCreate" Type="PushButton"
+ X="345" Width="19" Y="_YPOS" Height="19"
+ ToolTip="Create New Folder" Icon="yes" FixedSize="yes"
+ IconSize="16" Text="IconCreateDir">
+ <Publish Event="DirectoryListNew" Value="0"><![CDATA[1]]></Publish>
+ </Control>
+
+ INCY(25)
+ <Control Id="DirList" Type="DirectoryList"
+ X="20" Width="342" PARTIALHEIGHT(100, 5)
+ Property="NewInstallDir" Sunken="yes"
+ Indirect="yes" TabSkip="no" />
+
+ <Control Id="FolderText" Type="Text"
+ X="20" Width="99" PARTIALHEIGHT(14, 1)
+ TabSkip="no" Text="&amp;Folder name:" />
+
+ <Control Id="PathEditControl" Type="PathEdit"
+ X="20" Width="342" PARTIALHEIGHT(17)
+ Property="NewInstallDir" Sunken="yes" Indirect="yes" />
+
+ </Dialog>
+
+')
+
+<!-- Takes a 4th parameter, any extra text (restrictions) for debug libs -->
+m4_define(`DIALOG_FEATURE', `
+ <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
+
+ TOPSTRIPE(36, `Feature Selection',
+ `Select the features of [ProductName] you want. Maximum install size is [MaxInstallSize].')
+ BOTTOMSTRIPE()
+ CANCELBUTTON
+ BACKBUTTON(`$2')
+
+ NEXTBUTTON_GENERIC(Next,,
+ <Publish Event="NewDialog" Value="`$3'">
+ <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
+ <Publish Event="NewDialog" Value="OutOfSpaceDlg">
+ <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
+ <Publish Property="FullOrCustom" Value="Custom">
+ <![CDATA[1]]></Publish>
+
+ <!--
+ - This updates the FeatureList property and the
+ - properties like PATHValue that track the value
+ - to be displayed for environment variables.
+ -->
+ WIX_DB_ENV_FEATURE_SET()
+ )
+
+
+ <!-- TODO: When the debug checkbox is clicked,
+ - we would like to update the disk space usage numbers
+ - as shown in the SelectionTreeControl. Tried this:
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+ - but it made all the numbers zero. Probably need
+ - to perform a whole sequence, (like CostInitialize,...)
+ -->
+
+
+ TEXTCONTROL(ClickText, 15,
+`Click on an icon in the list below to change how a feature is installed.')
+ INCY(5)
+
+ <Control Id="SelectionTreeControl" Type="SelectionTree"
+ X="8" Width="220" FULLHEIGHT
+ Property="NewInstallDir" Sunken="yes" TabSkip="no" />
+
+ <Control Id="GroupBoxControl" Type="GroupBox"
+ X="235" Width="131" FULLHEIGHT
+ Text="Feature Description" />
+ INCY(15)
+
+ <Control Id="ItemDescription" Type="Text"
+ X="241" Width="120" PARTIALHEIGHT(50) >
+ <Text></Text>
+ <Subscribe Event="SelectionDescription" Attribute="Text" />
+ </Control>
+
+ <Control Id="Size" Type="Text"
+ X="241" Width="120" PARTIALHEIGHT(50)
+ Text="Feature size">
+ <Subscribe Event="SelectionSize" Attribute="Text" />
+ </Control>
+
+ </Dialog>
+')
+
+<!--
+ - Note: for Win/9X, Win/ME
+ - Here we must do costfinalize whenever leaving
+ - this dialog (via Back or Next) because changing whether we have
+ - environment enabled or not changes the list of features
+ - (which is finalized by costfinalize).
+ - Calling costfinalize more than once is apparently not
+ - supported on older (9X,ME) systems.
+ -->
+m4_define(`DIALOG_ENVIRONMENT', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(84, `Setting Environment Variables', DB_ENVIRONMENT_INTRO)
+ BOTTOMSTRIPE()
+ CANCELBUTTON
+ BACKBUTTON_GENERIC(Back, ,
+ NEWDIALOGEVENT(`$2')
+<!--PBR (4/4/2005) I removed this because it resets the feature choices
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+-->
+ )
+ NEXTBUTTON_GENERIC(Next, ,
+ NEWDIALOGEVENT(`$3')
+<!--PBR (4/4/2005) I removed this because it resets the feature choices
+ <Publish Event="DoAction" Value="CostFinalize">
+ <![CDATA[1]]></Publish>
+-->
+ <Publish Property="DoInstallEnvironment" Value="yes">
+ <![CDATA[EnvironmentSetCheck = "1"]]></Publish>
+ <Publish Property="DoInstallEnvironment" Value="no">
+ <![CDATA[EnvironmentSetCheck <> "1"]]></Publish>
+ )
+
+ <Control Id="SetEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 5)
+ Text="Set the values in the environment variables"
+ X="26" Width="250" Property="EnvironmentSetCheck" CheckBoxValue="1"/>
+ <Control Id="GenEnvBox" Type="CheckBox" PARTIALHEIGHT(15, 8)
+ Text="Generate a dbvars.bat file with the given values"
+ X="26" Width="250" Property="EnvironmentGenCheck" CheckBoxValue="1"/>
+ INCY(5)
+
+ TEXTCONTROL(ReviewText, 12,
+`Here are the new environment values:')
+
+ <Control Id="LargeBox" Type="Text"
+ X="19" Width="340" FULLHEIGHT
+ Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
+
+ INCY(5)
+
+ <!-- Show the properties for environment -->
+ WIX_DB_ENV_FEATURE_SHOW()
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_READY', `
+ <Dialog Id="`$1'" DIALOGPROP TrackDiskSpace="yes">
+ NEXTBUTTON_GENERIC(Install,,
+ <Publish Event="NewDialog" Value="OutOfSpaceDlg">
+ <![CDATA[OutOfNoRbDiskSpace = 1]]></Publish>
+ <Publish Event="EndDialog" Value="Return">
+ <![CDATA[OutOfNoRbDiskSpace <> 1]]></Publish>
+
+<!-- Note: we set the name of the instenv now because we do not know
+ the installed pathname at the beginning of the execution -->
+
+ <Publish Property="InstEnvironmentProgram"
+ Value="[INSTALLDIR]\installutil\bin\instenv.exe">
+ <![CDATA[1]]></Publish>
+ )
+
+ TOPSTRIPE(44, `Ready', `The installer is ready to begin.')
+ BOTTOMSTRIPE()
+ CANCELBUTTON()
+ BACKBUTTON(`$2')
+
+ TEXTCONTROL(ReviewText, 24,
+`If you want to review or change any of your installation settings, click Back to the Feature Selection. Click Cancel to exit the installer.')
+
+ <Control Id="LargeBox" Type="Text"
+ X="19" Width="340" FULLHEIGHT
+ Disabled="yes" Sunken="yes" Transparent="yes" TabSkip="no" />
+
+ INCY(5)
+
+ <Control Id="DestinationText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(11, 4)
+ TabSkip="no" Text="Destination Folder:" />
+
+ <Control Id="DestinationValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(13, 8)
+ TabSkip="no" Text="[INSTALLDIR]" />
+
+ <Control Id="FeatureListText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(13, 4)
+ TabSkip="no" Text="Features to be installed:" />
+
+ <Control Id="FeatureListValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(30, 8)
+ TabSkip="no" Text="Shortcuts[FeatureList]" />
+
+ <Control Id="EnvironmentText" Type="Text"
+ X="23" Width="316" PARTIALHEIGHT(15, 0)
+ TabSkip="no" Text="Environment Variables:" />
+
+ <Control Id="EnvironmentValue" Type="Text"
+ X="37" Width="316" PARTIALHEIGHT(20, 0)
+ TabSkip="no" Text="[DoInstallEnvironment]" />
+
+ </Dialog>
+
+')
+
+m4_define(`DIALOG_PROGRESS', `
+ <Dialog Id="`$1'" DIALOGPROP Modeless="yes">
+ BOTTOMSTRIPE()
+ BACKBUTTON_DISABLED()
+ CANCELBUTTON()
+ NEXTBUTTON_DISABLED()
+
+ TOPSTRIPE(44, `Installer Progress', `Installing [ProductName].')
+
+ <Control Id="ActionText" Type="Text"
+ X="59" Y="100" Width="275" Height="12">
+ <Subscribe Event="ActionText" Attribute="Text" />
+ </Control>
+
+ <Control Id="ActionProgress95" Type="ProgressBar"
+ X="59" Y="113" Width="275" Height="12"
+ ProgressBlocks="yes" Text="Progress done">
+ <Subscribe Event="InstallFiles" Attribute="Progress" />
+ <Subscribe Event="MoveFiles" Attribute="Progress" />
+ <Subscribe Event="RemoveFiles" Attribute="Progress" />
+ <Subscribe Event="RemoveRegistryValues" Attribute="Progress" />
+ <Subscribe Event="WriteIniValues" Attribute="Progress" />
+ <Subscribe Event="WriteRegistryValues" Attribute="Progress" />
+ <Subscribe Event="UnmoveFiles" Attribute="Progress" />
+ <Subscribe Event="AdminInstallFinalize" Attribute="Progress" />
+ <Subscribe Event="SetProgress" Attribute="Progress" />
+ </Control>
+ </Dialog>
+')
+
+<!--
+ - Takes two extra parameters (in addition to the usual dialog parms)
+ - 4th: a short product name, like "Berkeley DB"
+ - 5th: a description of where to find online info, like "on www.xyz.com"
+ -->
+m4_define(`DIALOG_SUCCESS', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(Finish, Cancel="yes",
+ <Publish Event="DoAction" Value="CleanUp">
+ <![CDATA[ISSCRIPTRUNNING="1"]]></Publish>
+ <Publish Event="EndDialog" Value="Exit">
+ <![CDATA[1]]></Publish>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Disabled="yes", )
+ BACKBUTTON_DISABLED()
+
+ TOPSTRIPE(44, `Installed', `[ProductName] is now installed.')
+
+ TEXTCONTROL(InstallSuccessText, 80,
+`Please contact support@sleepycat.com for any technical issues or info@sleepycat.com for sales and licensing questions.
+
+Information about this product can also be found $5.
+
+Thank you for installing [ProductName].')
+
+ <Control Id="Image" Type="Bitmap" Text="SleepycatLogo"
+ X="0" Width="DIALOG_WIDTH" FULLHEIGHT TabSkip="no" />
+
+ </Dialog>
+')
+
+
+m4_define(`DIALOG_ADMIN_INTERRUPTED', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(44, `Interrupted',
+`The installer was interrupted before [ProductName] could be completely installed.')
+
+ BOTTOMSTRIPE()
+ NEXTBUTTON_GENERIC(Finish, Cancel="yes",
+ <Publish Event="DoAction" Value="CleanUp">
+ <![CDATA[ISSCRIPTRUNNING="1"]]></Publish>
+ <Publish Event="EndDialog" Value="Exit">
+ <![CDATA[1]]></Publish>
+ <Condition Action="default">
+ <![CDATA[NOT UpdateStarted]]></Condition>
+ )
+ CANCELBUTTON_GENERIC(Cancel, Disabled="yes",
+ <Publish Property="Suspend" Value="1"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
+ <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
+ )
+ BACKBUTTON_GENERIC(Back, Disabled="yes",
+ <Publish Property="Suspend" Value="{}"><![CDATA[1]]></Publish>
+ <Publish Event="EndDialog" Value="`$2'"><![CDATA[1]]></Publish>
+ <Condition Action="disable"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="enable"><![CDATA[UpdateStarted]]></Condition>
+ <Condition Action="default"><![CDATA[UpdateStarted]]></Condition>
+ )
+
+ <Control Id="NotModifiedText" Type="Text"
+ X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
+ <Text>Your system has not been modified. To complete the installation later, please run the installer again.</Text>
+ <Condition Action="hide"><![CDATA[UpdateStarted]]></Condition>
+ <Condition Action="show"><![CDATA[NOT UpdateStarted]]></Condition>
+ </Control>
+
+ <Control Id="YesModifiedText" Type="Text"
+ X="20" Y="_YPOS" Width="228" Height="50" Transparent="yes">
+ <Text>The product may be partially installed. Any installed elements will be removed when you exit.</Text>
+ <Condition Action="hide"><![CDATA[NOT UpdateStarted]]></Condition>
+ <Condition Action="show"><![CDATA[UpdateStarted]]></Condition>
+ </Control>
+ INCY(30)
+
+ TEXTCONTROL(FinishText, 25, `Click Finish to exit the install.')
+
+ <Control Id="Image" Type="Bitmap"
+ X="0" Width="DIALOG_WIDTH" PARTIALHEIGHT(168) Text="SleepycatLogo" />
+ </Dialog>
+')
+
+m4_define(`DIALOG_ADMIN_CANCEL', `
+
+ <Dialog Id="`$1'" Width="280" Height="90"
+ Title="[ProductName] - Installer" NoMinimize="yes">
+
+ SETY(20)
+ TEXTCONTROL(CancelText, 24,
+`Are you sure you want to cancel [ProductName] installation?')
+
+ <Control Id="YesButton" Type="PushButton"
+ X="60" Y="60" Width="66" Height="17" Text="&amp;Yes">
+ <Publish Event="DoAction" Value="CleanUp">
+ <![CDATA[ISSCRIPTRUNNING="1"]]></Publish>
+ <Publish Event="EndDialog" Value="Exit"><![CDATA[1]]></Publish>
+ </Control>
+
+ <Control Id="NoButton" Type="PushButton"
+ X="130" Y="60" Width="66" Height="17"
+ Default="yes" Cancel="yes" Text="&amp;No">
+ <Publish Event="EndDialog" Value="Return">
+ <![CDATA[1]]></Publish>
+ </Control>
+
+ </Dialog>
+')
+
+m4_define(`DIALOG_ADMIN_NOSPACE', `
+ <Dialog Id="`$1'" DIALOGPROP>
+ TOPSTRIPE(44, `Out of Disk Space',
+`The disk does not have enough space for the selected features.')
+ BOTTOMSTRIPE()
+
+ CANCELBUTTON_GENERIC(OK, Default="yes" Cancel="yes",
+ <Publish Event="NewDialog" Value="`$2'">
+ <![CDATA[ACTION <> "ADMIN"]]></Publish>
+ )
+
+ TEXTCONTROL(NoSpaceText, 43,
+`The highlighted volumes (if any) do not have enough disk space for the currently selected features. You can either remove files from the highlighted volumes, or choose to install fewer features, or choose a different destination drive.')
+
+ <Control Id="VolumeCostListControl" Type="VolumeCostList"
+ X="23" Width="310" FULLHEIGHT
+ Sunken="yes" Fixed="yes" Remote="yes">
+ <Text>{120}{70}{70}{70}{70}</Text>
+ </Control>
+ </Dialog>
+')
diff --git a/storage/bdb/dist/winmsi/environment.in b/storage/bdb/dist/winmsi/environment.in
new file mode 100644
index 00000000000..4f394f73a57
--- /dev/null
+++ b/storage/bdb/dist/winmsi/environment.in
@@ -0,0 +1,23 @@
+# $Id: environment.in,v 1.5 2005/04/15 19:00:19 philipr Exp $
+# Lists environment variables needed to install particular
+# features in Windows. Feature names must be
+# listed in features.in . The meaning of each line is:
+# if a given FEATURE is selected, add to the environment VARIABLE
+# the given VALUE (relative to the root of the tree).
+# Options may be +first or +last to put it at the beginning or end
+# of the variable. The items are processed in the order given here,
+# so an entry with +first will no longer be first if another line
+# with +first follows it.
+
+# Note: columns below must be separated by tabs.
+
+# feature variable value options
+
+DCoreAPI PATH /bin\\debug +first
+CoreAPI PATH /bin +first
+
+# The debug versions go last, they are preferred if they are installed.
+JavaEx CLASSPATH /jar\\dbexamples.jar +last
+JavaAPI CLASSPATH /jar\\db.jar +last
+DJavaEx CLASSPATH /jar\\debug\\dbexamples.jar +last
+DJavaAPI CLASSPATH /jar\\debug\\db.jar +last
diff --git a/storage/bdb/dist/winmsi/features.in b/storage/bdb/dist/winmsi/features.in
new file mode 100644
index 00000000000..ead896050cf
--- /dev/null
+++ b/storage/bdb/dist/winmsi/features.in
@@ -0,0 +1,33 @@
+# $Id: features.in,v 1.5 2005/04/15 19:03:35 philipr Exp $
+# Lists features that can be installed on Windows,
+# and their dependencies.
+
+# Note: columns below must be separated by tabs.
+#
+# Feature: the feature identifier. If it is dependent on another feature,
+# that is specified via Dependent/Featurename
+# Short name: the name as it shows in the installer's tree display
+# Description: the description that shows when the item is selected
+#
+# Options are one or more of:
+# +default: the feature is installed by default
+# +required: the feature cannot be deselected (implies default)
+# +invisible: the feature is not shown to the user (implies required)
+#
+
+# feature short name description options
+
+CoreAPI "Core Features" "C/C++ API and required binaries" +required
+CoreAPI/DCoreAPI "Debug Core Features" ""
+CoreTools "Tools and Utilities" "Compiled tools for DB maintenance" +default
+CoreEx "C/C++ Examples" "C and C++ compiled examples (requires debug libraries to function)" +default
+
+JavaAPI "Java" "Java API JAR and JNI native libraries"
+JavaAPI/JavaEx "Java Examples" "Java examples JAR"
+JavaAPI/DJavaAPI "Debug Java" ""
+JavaAPI/DJavaAPI/DJavaEx "Debug Java Examples" ""
+PerlAPI "Perl" "Perl API .pm and .pod files"
+TclAPI "Tcl" "Tcl API binaries"
+TclAPI/DTclAPI "Debug Tcl" ""
+Docs "Documentation" "Documentation for all products"
+Sources "Source files" "Source files for all products" +default
diff --git a/storage/bdb/dist/winmsi/files.in b/storage/bdb/dist/winmsi/files.in
new file mode 100644
index 00000000000..b3d5f4ba8bd
--- /dev/null
+++ b/storage/bdb/dist/winmsi/files.in
@@ -0,0 +1,87 @@
+# $Id: files.in,v 1.7 2005/04/15 19:00:36 philipr Exp $
+# Lists files needed to install particular
+# features in Windows. Feature names must be
+# listed in features.in .
+
+# Note: columns below must be separated by tabs.
+
+# feature source file targdir shortname
+
+CoreAPI build_win32/Release/libdb43.dll /bin/
+DCoreAPI build_win32/Debug/libdb43d.dll /bin/debug/
+DCoreAPI build_win32/Debug/db_dll.pdb /bin/debug/
+CoreAPI build_win32/Release/libdb43.lib /lib/
+DCoreAPI build_win32/Debug/libdb43d.lib /lib/
+CoreAPI build_win32/Release/msvcr71.dll /bin/
+DCoreAPI build_win32/Debug/msvcr71d.dll /bin/debug/
+CoreAPI build_win32/Release/msvcp71.dll /bin/
+DCoreAPI build_win32/Debug/msvcp71d.dll /bin/debug/
+
+# After the build process, we create an installed_include directory
+# housing all the needed include files, for user convenience
+CoreAPI installed_include/ /include/
+
+CoreAPI ${PRODUCT_SHARED_WINMSIDIR}/images/webicon.ico /installutil/
+CoreAPI ${PRODUCT_STAGE}/dbvars.bat /
+
+# We don't include the .lib files for Java, nobody needs to
+# link C/C++ against the java library
+JavaAPI build_win32/Release/libdb_java43.dll /bin/ dbj43.dll
+DJavaAPI build_win32/Debug/libdb_java43d.dll /bin/debug/ dbj43d.dll
+DJavaAPI build_win32/Debug/db_java.pdb /bin/debug/
+JavaAPI build_win32/Release/db.jar /jar/
+DJavaAPI build_win32/Debug/db.jar /jar/debug/
+
+JavaEx build_win32/Release/dbexamples.jar /jar/ dbexam~1.jar
+DJavaEx build_win32/Debug/dbexamples.jar /jar/debug/ dbexam~1.jar
+
+# We don't include the .lib files for Tcl, nobody needs to
+# link C/C++ against the Tcl library
+DTclAPI build_win32/Debug/libdb_tcl43d.dll /bin/debug/ dbt43d.dll
+DTclAPI build_win32/Debug/db_tcl.pdb /bin/debug/
+TclAPI build_win32/Release/libdb_tcl43.dll /bin/ dbt43.dll
+
+PerlAPI perl/BerkeleyDB/blib/ /lib/perl/
+
+CoreTools build_win32/Release/db_archive.exe /bin/ db_arc~1.exe
+CoreTools build_win32/Release/db_checkpoint.exe /bin/ db_che~1.exe
+CoreTools build_win32/Release/db_deadlock.exe /bin/ db_dea~1.exe
+CoreTools build_win32/Release/db_dump.exe /bin/ db_dump.exe
+CoreTools build_win32/Release/db_load.exe /bin/ db_load.exe
+CoreTools build_win32/Release/db_printlog.exe /bin/ db_pri~1.exe
+CoreTools build_win32/Release/db_recover.exe /bin/ db_rec~1.exe
+CoreTools build_win32/Release/db_stat.exe /bin/ db_sta~1.exe
+CoreTools build_win32/Release/db_upgrade.exe /bin/ db_upg~1.exe
+CoreTools build_win32/Release/db_verify.exe /bin/ db_ver~1.exe
+
+CoreEx build_win32/Debug/ex_access.exe /bin/debug/ ex_acc~1.exe
+CoreEx build_win32/Debug/ex_access.pdb /bin/debug/ ex_acc~1.pdb
+CoreEx build_win32/Debug/ex_btrec.exe /bin/debug/ ex_btr~1.exe
+CoreEx build_win32/Debug/ex_btrec.pdb /bin/debug/ ex_btr~1.pdb
+CoreEx build_win32/Debug/ex_env.exe /bin/debug/ ex_env.exe
+CoreEx build_win32/Debug/ex_env.pdb /bin/debug/ ex_env.pdb
+CoreEx build_win32/Debug/ex_lock.exe /bin/debug/ ex_loc~1.exe
+CoreEx build_win32/Debug/ex_lock.pdb /bin/debug/ ex_loc~1.pdb
+CoreEx build_win32/Debug/ex_mpool.pdb /bin/debug/ ex_mpo~1.pdb
+CoreEx build_win32/Debug/ex_mpool.exe /bin/debug/ ex_mpo~1.exe
+CoreEx build_win32/Debug/ex_repquote.exe /bin/debug/ ex_rep~1.exe
+CoreEx build_win32/Debug/ex_repquote.pdb /bin/debug/ ex_rep~1.pdb
+CoreEx build_win32/Debug/ex_tpcb.exe /bin/debug/ ex_tpcb.exe
+CoreEx build_win32/Debug/ex_tpcb.pdb /bin/debug/ ex_tpcb.pdb
+
+CoreEx build_win32/Debug/excxx_access.exe /bin/debug/ excxx_ac.exe
+CoreEx build_win32/Debug/excxx_access.pdb /bin/debug/ excxx_ac.pdb
+CoreEx build_win32/Debug/excxx_btrec.exe /bin/debug/ excxx_bt.exe
+CoreEx build_win32/Debug/excxx_btrec.pdb /bin/debug/ excxx_bt.pdb
+CoreEx build_win32/Debug/excxx_env.exe /bin/debug/ excxx_en.exe
+CoreEx build_win32/Debug/excxx_env.pdb /bin/debug/ excxx_en.pdb
+CoreEx build_win32/Debug/excxx_lock.exe /bin/debug/ excxx_lk.exe
+CoreEx build_win32/Debug/excxx_lock.pdb /bin/debug/ excxx_lk.pdb
+CoreEx build_win32/Debug/excxx_mpool.exe /bin/debug/ excxx_mp.exe
+CoreEx build_win32/Debug/excxx_mpool.pdb /bin/debug/ excxx_mp.pdb
+CoreEx build_win32/Debug/excxx_tpcb.exe /bin/debug/ excxx_tp.exe
+CoreEx build_win32/Debug/excxx_tpcb.pdb /bin/debug/ excxx_tp.pdb
+
+Docs ${PRODUCT_STAGE}/docs/ /docs/
+
+Sources ${PRODUCT_STAGE}/Sources/ /db-${PRODUCT_VERSION}/
diff --git a/storage/bdb/dist/winmsi/images/caticon.ibd b/storage/bdb/dist/winmsi/images/caticon.ibd
new file mode 100644
index 00000000000..e8b17bff46f
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/caticon.ibd
Binary files differ
diff --git a/storage/bdb/dist/winmsi/images/foldernew.ibd b/storage/bdb/dist/winmsi/images/foldernew.ibd
new file mode 100644
index 00000000000..10824136851
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/foldernew.ibd
Binary files differ
diff --git a/storage/bdb/dist/winmsi/images/folderup.ibd b/storage/bdb/dist/winmsi/images/folderup.ibd
new file mode 100644
index 00000000000..f1d36969726
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/folderup.ibd
Binary files differ
diff --git a/storage/bdb/dist/winmsi/images/sleepycat.jpg b/storage/bdb/dist/winmsi/images/sleepycat.jpg
new file mode 100644
index 00000000000..213167760c4
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/sleepycat.jpg
Binary files differ
diff --git a/storage/bdb/dist/winmsi/images/topstripe.ibd b/storage/bdb/dist/winmsi/images/topstripe.ibd
new file mode 100644
index 00000000000..be72f906702
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/topstripe.ibd
Binary files differ
diff --git a/storage/bdb/dist/winmsi/images/webicon.ico b/storage/bdb/dist/winmsi/images/webicon.ico
new file mode 100644
index 00000000000..e8b17bff46f
--- /dev/null
+++ b/storage/bdb/dist/winmsi/images/webicon.ico
Binary files differ
diff --git a/storage/bdb/dist/winmsi/links.in b/storage/bdb/dist/winmsi/links.in
new file mode 100644
index 00000000000..121102f2419
--- /dev/null
+++ b/storage/bdb/dist/winmsi/links.in
@@ -0,0 +1,18 @@
+# $Id: links.in,v 1.3 2005/04/15 19:01:13 philipr Exp $
+# Lists links to Web sites to be installed on Windows.
+# If the URL starts with file: it is assumed to be a local file,
+# relative to the installation directory.
+
+# Note: columns below must be separated by tabs.
+
+# shortname name URL
+
+sleepycp "Command Prompt" "cmd:dbvars.bat"
+sleepywb "Sleepycat Website" "http://www.sleepycat.com"
+sleepych "Change Log for Berkeley DB WIX_DB_VERSION" "http://www.sleepycat.com/update/WIX_DB_VERSION/if.WIX_DB_VERSION.html"
+sleepynw "Berkeley DB Newsgroup" "http://groups-beta.google.com/group/comp.databases.berkeley-db"
+sleepybl "Blog for Berkeley DB" "http://www.sleepycat.com/blogs/db/"
+sleepysu "Support for Berkeley DB" "http://www.sleepycat.com/supports/index.shtml"
+sleepyon "Online Documentation" "http://www.sleepycat.com/supports/documentation.shtml/"
+sleepyst "Company Store" "http://www.companystuffonline.com/sleepycat/"
+sleepyld "On disk Documentation" "file:docs/index.html"
diff --git a/storage/bdb/dist/winmsi/s_winmsi.fcn b/storage/bdb/dist/winmsi/s_winmsi.fcn
new file mode 100644
index 00000000000..e053e25ea59
--- /dev/null
+++ b/storage/bdb/dist/winmsi/s_winmsi.fcn
@@ -0,0 +1,1426 @@
+# $Id: s_winmsi.fcn,v 1.8 2005/04/16 15:56:44 philipr Exp $
+#
+# The common functions used by the s_winmsi scripts (both
+# for core DB and DB/XML).
+#
+# This script uses several bash extensions that are convenient
+# since we "know" it will always run under Cygwin: shell functions,
+# 'return', declaration of 'local' variables, $(command) syntax,
+# ${#X} (counting chars), ${X#regexp} (searching) $((expr)) (arithmetic)
+#
+# These functions use 'global' variables:
+# ERRORLOG - a filename
+# PRODUCT_NAME - e.g. "Berkeley DB"
+# PRODUCT_VERSION - e.g. "4.1.25", derived from dist/RELEASE
+# PRODUCT_STAGE - the staging directory for temp files and builds
+# PRODUCT_LICENSEDIR - the tree containing LICENSE and README
+# PRODUCT_SUB_BLDDIR - top of the subproduct build e.g. "dbxml-2.0.1/dbxml"
+# PRODUCT_BLDDIR - top of the build tree e.g. "dbxml-2.0.1"
+# PRODUCT_SRCDIR - the dir we unzip to e.g. "dbxml-2.0.1"
+# PRODUCT_DBBUILDDIR - where build_unix dir is for Berkeley DB (for Perl)
+# PRODUCT_SHARED_WINMSIDIR - where the master winmsi directory is
+# PRODUCT_IMAGEDIR - where the images are (usually winmsi/images)
+# PRODUCT_ZIP_FILEFMT - what zip file looks like e.g. "db-X.Y.Z.NC.zip"
+# PRODUCT_MSI_FILEFMT - what msi file looks like e.g. "db-X.Y.Z.NC.msi"
+#
+# Some of these may seem redundant, but there are options to take
+# an already built tree from a different place than where we'll unzip
+# to and take our sources from, for example. This allows a lot of flexibility
+# for development and debugging (especially when these trees can be huge).
+
+# This is the magic tag that creates a new unique GUID in Wix.
+# GUIDs are needed on every <Component ... > entry to ensure
+# that the component can be uninstalled.
+GENGUID='Guid="GUID_CREATE_UNIQUE()"'
+PERSISTGUID='Guid="WIX_DB_PERSISTENT_GUID()"'
+
+# MakeRtf()
+# Standard input is plain text, standard output is RTF.
+#
+MakeRtf() {
+ temp1=/tmp/sbm$$a
+ cat > $temp1
+
+
+# Courier is a good font, but the lines with all caps
+# overflows our current dialog size:
+# {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
+# \viewkind4\uc1\pard\lang1033\f0\fs16
+#
+# Using Small fonts works:
+# {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Small Fonts;}}
+# {\colortbl ;\red0\green0\blue0;}
+# \viewkind4\uc1\pard\cf1\lang1033\f0\fs14
+
+# Arial is the best compromise:
+ sed -e 's/^ *//' << 'EndOfRTFHeader'
+ {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
+ {\colortbl ;\red0\green0\blue0;}
+ \viewkind4\uc1\pard\cf1\lang1033\f0\fs16
+EndOfRTFHeader
+
+# Embedded '<' and '>' can cause problems for Wix
+ sed -e 's:$:\\par:' -e 's:<: \\lquote :' -e 's:>: \\rquote :' < $temp1
+ echo -n '}'
+ rm -f $temp1
+}
+
+# NextId()
+# Get the next available unique id, a simple integer counter.
+# We use a file, rather than a shell variable to track the
+# number, because this is called from subshells at various
+# points, and they cannot affect the variables in the parent shell.
+#
+ComponentID=component.id
+NextId()
+{
+ local id=`cat $ComponentID 2>/dev/null`
+ if [ "$id" = '' ]; then
+ id=0
+ fi
+ id=$(($id + 1))
+ echo "$id" > $ComponentID
+ echo "$id"
+}
+
+# CleanFileName(FILENAME)
+# Removes any strange characters in file names,
+# returning the new name on standard output.
+CleanFileName()
+{
+ echo "$1" | sed -e 's/[-%@!]//g'
+}
+
+# GetShortName(FILENAME)
+# Get a Windows short name for the file,
+# to fit into the 8.3 name space.
+# This is not a great algorithm, but it works.
+# The fact is, the names must be unique, but on
+# Win2000 and WinXP, we'll never see them.
+
+ShortID=short.id
+GetShortName()
+{
+ local name=`echo "$1" | tr '[a-z]' '[A-Z]'`
+
+ # See if the name fits into 8.3. If so,
+ # return it right away.
+ #
+ case "$name" in
+ ?????????*.* ) ;;
+ *.????* ) ;;
+ *.*.* ) ;;
+ *[-%@!]* ) ;;
+ *.* ) echo "$name"
+ return
+ ;;
+ * )
+ if [ "${#1}" -le 8 ]; then
+ echo "$name"
+ return
+ fi
+ ;;
+ esac
+
+ # From NAMEISLONG.EXTLONG, build a name
+ # like NAME~ZZZ.EXT, where ZZZ is a unique (hex)
+ # number we build. This is
+
+ local id=`cat $ShortID 2>/dev/null`
+ if [ "$id" = '' ]; then
+ id=0
+ fi
+ id=$(($id + 1))
+ echo "$id" > $ShortID
+ if [ "$id" -ge 4096 ]; then
+ echo "BADBADBAD.TXT" # return something that will give an error
+ Error "ShortId overflow"
+ exit 1
+ fi
+
+ # Convert the id to hex (I ran out of space using decimal)
+ # This is too slow: id=`echo 16 o $id p | dc`
+ id=`printf "%x" $id`
+
+ # Collect and clean up the part of the name before, and after, the dot
+ local before=`CleanFileName "$name" | sed -e 's/^\([^.]*\)[.].*$/\1/'`
+ local after=`CleanFileName "$name" | sed -e 's/^[^.]*[.]\(.*\)$/\1/'`
+
+ # Make sure the before part fits in 5 chars (not 8, since
+ # we need a few for the unique number).
+ if [ "${#before}" -gt 5 ]; then
+ before=`echo "$before" | sed -e 's/^\(.....\).*/\1/'`
+ fi
+ if [ "${#after}" -gt 3 ]; then
+ after=`echo "$after" | sed -e 's/^\(...\).*/\1/'`
+ fi
+ echo "${before}~${id}.${after}"
+}
+
+# Progress([OPTION,]STRING...)
+# Show a major processing step via echo to stdout and to the error log.
+# An OPTION is "-minor", indicating no big banner.
+#
+Progress()
+{
+ if [ "$1" = -minor ]; then
+ shift
+ else
+ echo "" >> $ERRORLOG
+ echo "============================" >> $ERRORLOG
+ fi
+ echo "$@" >> $ERRORLOG
+ echo "$@" >&15
+}
+
+# Error(STRING...)
+# Show an error in a standard way.
+#
+Error()
+{
+ echo "" >> $ERRORLOG
+ echo "****************** FAIL ******************" >> $ERRORLOG
+ echo "ERROR: $@" >> $ERRORLOG
+ echo "ERROR: $@" >&15
+ echo "See $ERRORLOG for details" >&15
+ return 1
+}
+
+# RequireFileInPath(NAME, PATHVAL, FILE)
+# Look for FILE in the path that has value PATHVAL.
+# The path's name is NAME if it needs to be shown.
+#
+RequireFileInPath()
+{
+ local type="$1"
+ local origpath="$2"
+ local file="$3"
+ local upath="$origpath"
+ if [ "$1" != PATH ]; then
+ upath=`cygpath -up "$origpath"`
+ fi
+
+ SAVEIFS="$IFS"
+ IFS=":"
+ found=no
+ for dir in $upath; do
+ if [ -f "$dir/$file" ]; then
+ IFS="$SAVEIFS"
+ return
+ fi
+ done
+ IFS="$SAVEIFS"
+ Error "File $file not found in $type path: $origpath"
+ exit 1
+}
+
+# Rand4X()
+# Return 4 random hex digits on output
+#
+Rand4X() {
+ # The sed command pads the front with 0's as needed
+ (echo 'obase=16'; echo $RANDOM ) | bc |
+ sed -e 's/^/0000/' -e 's/^.*\(....\)$/\1/'
+
+}
+
+# RunM4()
+# Run M4, making appropriate substitutions.
+# This function uses GLOBAL variables: PRODUCT_VERSION (e.g. "4.1.25")
+# and PRODUCT_LICENSEDIR, which is where certain text files are found
+#
+RunM4() {
+
+ # Given a version number, like 2.3.45, we want to
+ # create a 8 character name for the directory like db2_3_45.
+ # This name is under a "Sleepycat Software" directory,
+ # so it only needs to be unique within the universe of BDB versions.
+ # TODO: instead of using a version number like $DB_VERSION,
+ # maybe use $DB_VERSION_UNIQUE_NAME which looks like "_2003"
+
+ local DB_8CHAR_VERSION=`echo $PRODUCT_VERSION | sed -e 's/[.]/_/g'`
+ if [ ${#DB_8CHAR_VERSION} -le 6 ]; then
+ DB_8CHAR_VERSION="db$DB_8CHAR_VERSION"
+ elif [ ${#DB_8CHAR_VERSION} -le 7 ]; then
+ DB_8CHAR_VERSION="d$DB_8CHAR_VERSION"
+ else
+ Error "Version number too large for simple version number algorithm"
+ exit 1
+ fi
+
+ # Remove leading ./ from PRODUCT_LICENSEDIR if present.
+ local licensedir=`cygpath -w "$PRODUCT_LICENSEDIR"`
+
+ # Create a GUID prefix of the form: ????????-????-????-????-????
+ # This leaves 8 digits of GUID to be manipulated by m4.
+ local GUID_PREFIX="`Rand4X``Rand4X`-`Rand4X`-`Rand4X`-`Rand4X`-`Rand4X`"
+
+ # -P requires that all m4 macros, like define, eval, etc.
+ # are prefixed, like m4_define, m4_eval, etc. This avoids
+ # various name conflicts with input files.
+ # TODO: rename DB_SRCDIR as DB_LICENSEDIR
+ m4 -P \
+ -DWIX_DB_VERSION="$PRODUCT_VERSION" \
+ -DWIX_DB_8CHAR_VERSION="$DB_8CHAR_VERSION" \
+ -DWIX_DB_GUID_PREFIX="$GUID_PREFIX" \
+ -DWIX_DB_PRODUCT_NAME="$PRODUCT_NAME" \
+ -DWIX_DB_SRCDIR="$licensedir" \
+ -DWIX_DB_TOP="`cygpath -w $PRODUCT_BLDDIR`" \
+ -DWIX_DB_SHARED_WINMSIDIR="$PRODUCT_SHARED_WINMSIDIR" \
+ -DWIX_DB_IMAGEDIR="`cygpath -w $PRODUCT_IMAGEDIR`" \
+ -DWIX_DB_FEATURE_STRUCTURE="m4_include(features.wixinc)" \
+ -DWIX_DB_DIRECTORY_STRUCTURE="m4_include(directory.wixinc)" \
+ -DWIX_DB_LINKS="m4_include(links.wixinc)" \
+ -DWIX_DB_LICENSE_RTF="m4_include(license.rtf)" \
+ -DWIX_DB_ENV_FEATURE_PROPS="m4_include(envprops.wixinc)" \
+ -DWIX_DB_ENV_FEATURE_SET="m4_include(envset.wixinc)" \
+ -DWIX_DB_ENV_FEATURE_SHOW="m4_include(envshow.wixinc)"
+}
+
+# RunTallow(DIR, OPTIONS)
+# Run Tallow, a tool from the WiX distribution
+RunTallow() {
+ local dir="$1"
+ shift
+
+ Id1=`NextId`
+ Id2=`NextId`
+ Id3=`NextId`
+
+ # Tallow is a tool that walks a tree, producing
+ # a WiX directory heirarchy naming the files.
+ # The IDs it produces are not unique (between tallow
+ # runs), so we must make them so here. Thus "directory78"
+ # becomes "MyFeatureName.123.78" where 123 is an id from NextId.
+ # Secondly, instead of using the tallow output as a separately
+ # compiled fragment, we want to include it directly, so
+ # we need to strip out some extraneous XML entries at the top
+ # and bottom of its output.
+ #
+ # Another thing we do is when we see <Directory></Directory>
+ # pairs, we call m4 macros WIX_DB_{BEGIN,END}_SUBDIR because
+ # we need to track the current directory to generate 'persistent'
+ # GUIDs. See the discussion about GUIDs in dbwix.m4 .
+ #
+ # !!! For stripping out the extraneous XML, we rely heavily
+ # !!! on the output format, so this is likely to be fragile
+ # !!! between versions of tallow. Fortunately, it should fail hard.
+ #
+ echo "=============" >> tallow.log
+ echo tallow -nologo -d `cygpath -w "$dir"` "$@" >> tallow.log
+ echo " <!-- TALLOW output begins here -->"
+ tallow -nologo -d `cygpath -w "$dir"` "$@" > tallow.out || exit 1
+ cat tallow.out >> tallow.log
+ echo "-------------" >> tallow.log
+
+ sed -e '1,/<DirectoryRef/d' -e '/<\/DirectoryRef/,$d' \
+ -e "s/Id=\"directory/Id=\"$feature.$Id1./" \
+ -e "s/Id=\"component/Id=\"$feature.$Id2./" \
+ -e "s/Id=\"file/Id=\"$feature.$Id3./" \
+ -e '/^ <Directory/d' \
+ -e '/^ <\/Directory/d' \
+ -e '/<Directory/s/Name=\"\([^"]*\)"/Name="\1" WIX_DB_BEGIN_SUBDIR(\1) /' \
+ -e '/<\/Directory>/s/$/ WIX_DB_END_SUBDIR()/' \
+ -e "/<Component/s/>/ $PERSISTGUID>/" \
+ < tallow.out > tallow.postsed || exit 1
+
+ echo 'WIX_DB_SET_CURFILE()'
+ echo 'WIX_DB_CLEAR_SUBDIR()'
+ cat tallow.postsed
+ echo 'WIX_DB_CLEAR_SUBDIR()'
+
+ cat tallow.postsed >> tallow.log
+ echo " <!-- TALLOW output ends here -->"
+}
+
+# ProcessFeatures(INFILES, INFEATURES, INENV, OUTDIRECTORIES, OUTFEATURES,
+# OUTSET)
+# Use the files.in and features.in files as
+# input to create two output files, one containing a WiX XML
+# fragment showing directories and needed files,
+# and another containing a WiX XML fragment showing
+# the features in a dependency tree.
+#
+# This creates the heart of the installer flexibility.
+#
+ProcessFeatures() {
+ InFiles="infiles.tmp"; CleanInputFile "$1" "$InFiles" 3 4
+ InFeatures="infeatures.tmp"; CleanInputFile "$2" "$InFeatures" 3 4
+ InEnv="inenv.tmp"; CleanInputFile "$3" "$InEnv" 3 4
+ OutDirs="$4"
+ OutFeatures="$5"
+ OutSet="$6"
+
+ rm -f $OutDirs; touch $OutDirs
+ rm -f $OutFeatures; touch $OutFeatures
+
+ # Initialize the feature list.
+ # This will be expanded (per feature) in ProcessOneFeature
+ #
+ XmlLevel=4
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[NULL]\">" >> $OutSet
+ Xecho " <![CDATA[1]]></Publish>" >> $OutSet
+
+ Dirs=`cut -f 3 < $InFiles | sort | uniq`
+ Prevdir="/"
+ ProcessDirTransition "$Prevdir" "/" >> $OutDirs
+
+ for Dir in $Dirs; do
+ ProcessDirTransition "$Prevdir" "$Dir" >> $OutDirs
+ ProcessOneDirectory "$Dir" < $InFiles >> $OutDirs || exit 1
+ Prevdir="$Dir"
+ done
+ ProcessDirTransition "$Prevdir" "/" >> $OutDirs
+
+ cat $InEnv | (
+ read line
+ while [ "$line" != '' ]; do
+ local FeatureName=`echo "$line" | cut -f 1`
+ local EnvVariable=`echo "$line" | cut -f 2`
+ local EnvValue=`echo "$line" | cut -f 3`
+ local EnvOption=`echo "$line" | cut -f 4`
+ ProcessOneEnv "$FeatureName" "$EnvVariable" "$EnvValue" "$EnvOption" "$OutDirs" "$OutSet"
+ read line
+ done
+ return 0
+ ) || Error "Error processing environment" || exit 1
+
+ cat $InFeatures | (
+ read line
+ while [ "$line" != '' ]; do
+ local FeaturePath=`echo "$line" | cut -f 1`
+ local ShortName=`echo "$line" | cut -f 2 | StripDoubleQuotes`
+ local Description=`echo "$line" | cut -f 3 | StripDoubleQuotes`
+ local FeatureOptions=`echo "$line" | cut -f 4 | StripDoubleQuotes`
+ ProcessOneFeature "$FeaturePath" "$ShortName" "$Description" "$FeatureOptions" "$OutDirs" "$OutFeatures" "$OutSet"
+ read line
+ done
+ return 0
+ ) || Error "Error processing features" || exit 1
+
+# (PBR)
+# This test code didn't work. My hope was that I could force INSTALLLEVEL
+# to 4 and this would then enable the debug features.
+# Xecho "<Publish Property=\"INSTALLLEVEL\" Value=\"4\" />" >> $OutSet
+# Xecho "<Publish Event=\"SetInstallLevel\" Value=\"4\" />" >> $OutSet
+
+}
+
+# ProcessLinks(INLINKS, OUTFEATURES)
+# Process the INLINKS file, and produce XML on stdout.
+# Each line of the input file requires the creation
+# of a '.URL' file in the installation, and a Shortcut
+# in the Windows menu to point to that.
+# Also add the components generated to a feature, put in OUTFEATURES.
+#
+# TODO: We ought to have a Features column in the links.in file,
+# otherwise, the local doc link is always installed.
+#
+ProcessLinks() {
+ # Set a var to a carriage return without actually putting one in this file
+ local CR=`echo A | tr A '\015'`
+ local InLinks="infiles.tmp"; CleanInputFile "$1" "$InLinks" 3 4
+ local here_win=`cygpath -w $(pwd)`
+ # TODO: maybe get a real modification time, but not sure why we need it.
+ local MODTIMEHEX="0000000007DCC301DE"
+ XmlLevel=6
+ local OutFeatures="$2"
+
+ Xecho + "<Feature Id=\"LinksFeature\" Title=\"Links\"" >> $OutFeatures
+ Xecho " Description=\"Links\" Display=\"hidden\"" >> $OutFeatures
+ Xecho " Level=\"1\" AllowAdvertise=\"no\"" >> $OutFeatures
+ Xecho " ConfigurableDirectory=\"INSTALLUTIL\"" >> $$OUTFeatures
+ Xecho " Absent=\"disallow\">" >> $OutFeatures
+
+ Xecho "<DirectoryRef Id=\"INSTALLUTIL\">"
+ Xecho " <Directory Id=\"INSTALLURL\" Name=\"url\">"
+ Xecho "WIX_DB_SET_CURDIR(/installutil/url)"
+ cat $InLinks | (
+ read line
+ while [ "$line" != '' ]; do
+ local Shortname=`echo "$line" | cut -f 1 | StripDoubleQuotes`
+ local Name=`echo "$line" | cut -f 2 | StripDoubleQuotes`
+ local Url=`echo "$line" | cut -f 3 | StripDoubleQuotes`
+ read line
+
+ # We register the name .bdbsc extension to get the proper icon
+ local UrlName="$Shortname.bdbsc"
+ local UrlShortName="$Shortname.d1b"
+ local TargetFile="[INSTALLDIR]\\installutil\\url\\$UrlName"
+ local CreateUrlFile=true
+ local CommandShortcut=false
+ local Program=""
+ case "$Url" in
+ file:* ) CreateUrlFile=false
+ TargetFile=`echo $Url | sed -e 's/file://'`
+ TargetFile="[INSTALLDIR]"`cygpath -w $TargetFile`;;
+ cmd:* ) CreateUrlFile=false
+ UrlName="$Shortname.bat"
+ UrlShortName="$Shortname.bat"
+ TargetFile="[INSTALLDIR]\\installutil\\url\\$UrlName"
+ Program=`echo $Url | sed -e 's/cmd://'`
+ CommandShortcut=true;;
+ esac
+
+ Xecho "WIX_DB_SET_CURFILE($Shortname)"
+ Xecho + "<Component Id=\"Links.$Shortname\""
+ Xecho " $PERSISTGUID"
+ Xecho " SharedDllRefCount=\"yes\" Location=\"either\">"
+
+ if $CreateUrlFile; then
+ echo "[Default]$CR" > $UrlName
+ echo "BASEURL=$Url$CR" | RunM4 >> $UrlName || exit 1
+ echo "[InternetShortcut]$CR" >> $UrlName
+ echo "URL=$Url$CR" | RunM4 >> $UrlName || exit 1
+ echo "Modified=$MODTIMEHEX$CR" >> $UrlName
+ # TODO: we could have an Entry for IconFile=sleepyweb.ico IconIndex=1?
+ echo ''
+ Xecho "<File Id=\"File.$Shortname\" "
+ Xecho " LongName=\"$UrlName\" Name=\"$UrlShortName\""
+ Xecho " Compressed=\"yes\" DiskId=\"1\""
+ Xecho " src=\"$here_win\\$UrlName\" />"
+ fi
+
+ if $CommandShortcut; then
+ echo "@echo off" > $UrlName
+ echo "set DBROOTDIR=" >> $UrlName
+ echo "for /F \"tokens=3 delims= \" %%A in ('REG QUERY \"HKLM\\SOFTWARE\\Sleepycat Software\\$PRODUCT_NAME\\$PRODUCT_VERSION\" /v RootDirectory') do set DBROOTDIR=%%A" >> $UrlName
+ echo "if ERRORLEVEL 2 goto MISSING" >> $UrlName
+ echo "if not defined DBROOTDIR goto MISSING" >> $UrlName
+ echo "set FN=\"%DBROOTDIR%$Program\"" >> $UrlName
+ echo "if not exist %FN% goto NOTFOUND" >> $UrlName
+ echo "cmd /k \"%DBROOTDIR%$Program\"$CR" >> $UrlName
+ echo "goto END" >> $UrlName
+ echo ":NOTFOUND" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "echo Error: The program does not appear to be installed." >> $UrlName
+ echo "echo" >> $UrlName
+ echo "cmd /k" >> $UrlName
+ echo "goto END" >> $UrlName
+ echo ":MISSING" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "echo NOTE:" >> $UrlName
+ echo "echo The $PRODUCT_NAME version could not be determined." >> $UrlName
+ echo "echo If you are running on Windows 2000, make sure the" >> $UrlName
+ echo "echo REG.EXE program is installed from the Tools disk" >> $UrlName
+ echo "echo" >> $UrlName
+ echo "cmd /k" >> $UrlName
+ echo ":END" >> $UrlName
+
+ Xecho "<File Id=\"File.$Shortname\" "
+ Xecho " LongName=\"$UrlName\" Name=\"$UrlShortName\""
+ Xecho " Compressed=\"yes\" DiskId=\"1\""
+ Xecho " src=\"$here_win\\$UrlName\" />"
+
+ Xecho "<Shortcut Id=\"Short.$Shortname\" Directory=\"BerkeleyDbMenu\""
+ Xecho " Name=\"$Shortname\" LongName=\"$Name\""
+ Xecho " WorkingDirectory=\"[INSTALLDIR]\""
+ Xecho " Target='$TargetFile'"
+ Xecho " Show=\"normal\" />"
+ else
+ Xecho "<Shortcut Id=\"Short.$Shortname\" Directory=\"BerkeleyDbMenu\""
+ Xecho " Name=\"$Shortname\" LongName=\"$Name\""
+ Xecho " Target='$TargetFile'"
+ Xecho " Show=\"normal\" />"
+ fi
+
+
+ Xecho - "</Component>"
+
+ Xecho "<ComponentRef Id=\"Links.$Shortname\" />" >> $OutFeatures
+ done
+ return 0
+ ) || Error "Error processing links" || exit 1
+
+ Xecho "</Directory>"
+ Xecho "</DirectoryRef>"
+ Xecho - "</Feature>" >> $OutFeatures
+}
+
+# ProcessOneDirectory(DIRECTORYNAME)
+# Called by ProcessFeatures.
+# Argument is the directory name to process
+# Standard input is cleaned up files.in (dirname is 3rd column)
+# Standard output will be WiX XML Component/File entries
+#
+ProcessOneDirectory()
+{
+ Dir="$1"
+ grep " ${Dir} " | (
+ read line
+ while [ "$line" != '' ]; do
+ local feature=`echo "$line" | cut -f 1`
+ local srcfile=`echo "$line" | cut -f 2`
+ local targetdir=`echo "$line" | cut -f 3`
+ local shortname=`echo "$line" | cut -f 4`
+
+ ProcessOneDirectoryFile "$feature" "$srcfile" "$targetdir" "$shortname" || exit 1
+ read line
+ done
+ return 0
+ ) || Error "Error processing directory $Dir" || exit 1
+}
+
+# ProcessOneDirectoryFile(DIRECTORYNAME)
+# Called by ProcessOneDirectory to process a single file in a directory.
+# Standard output will be a single WiX XML Component/File entries
+#
+ProcessOneDirectoryFile()
+{
+ local feature="$1"
+ local srcfile="$2"
+ local targetdir="$3"
+ local shortname="$4"
+ local base=`basename $srcfile`
+
+ #echo "processing file $srcfile in $feature to directory $targetdir..." >&2
+
+ # Prepend the WIX_DB_TOP unless the source file is absolute
+
+ local root=
+ local checkfile=
+ local wsrcfile=
+
+ case "$srcfile" in
+ /* ) root=""
+ wsrcfile=`cygpath -w $srcfile`
+ checkfile="$srcfile"
+ ;;
+ * ) root="$PRODUCT_BLDDIR/"
+ wsrcfile="WIX_DB_TOP()\\`cygpath -w $srcfile`"
+ checkfile="$PRODUCT_BLDDIR/$srcfile"
+ ;;
+ esac
+
+ # If srcfile ends in / then we'll use tallow to walk the directory
+ case "$srcfile" in
+ */ ) if [ ! -d "$root$srcfile" ]; then
+ Error "$root$srcfile: not a directory"
+ exit 1
+ fi
+ Progress -minor " expanding $root$srcfile..."
+ RunTallow "$root$srcfile"
+ return 0
+ ;;
+ *'*'* )
+ local dirname=`dirname "$root$srcfile"`
+ RunTallow "$dirname" -df "$base"
+ return 0
+ ;;
+ esac
+
+ if [ "$shortname" = '' ]; then
+ shortname=`GetShortName "$base"`
+ fi
+ ID=`NextId`
+
+ if [ ! -r "$checkfile" ]; then
+ Error "$srcfile: file in feature $feature does not exist"
+ Error " curdir=`pwd`, pathname=$checkfile"
+ exit 1
+ fi
+
+ Xecho "WIX_DB_SET_CURFILE(${base})"
+ Xecho + "<Component Id=\"$feature.$ID\" Location=\"either\" $PERSISTGUID>"
+ Xecho "<File Id=\"${feature}.${ID}\" Name=\"${shortname}\" LongName=\"${base}\" Compressed=\"yes\" KeyPath=\"yes\" DiskId=\"1\" src=\"${wsrcfile}\" />"
+ Xecho - "</Component>"
+ return 0
+}
+
+# ProcessOneFeature(FEATUREPATH, SHORTNAME, DESCRIPTION, OPTS, INDIRECTORYFILE,
+# OUTFEATURE, OUTSET)
+# Called by ProcessFeatures to process a line in the features.in file.
+# The first three arguments are the values of the first three columns:
+# the feature dependency path (e.g. "Java/JavaExamples"), the short
+# name, and a descriptive name. The last argument is the directory
+# file that lists the components. We use the last name of the feature
+# path (e.g. JavaExamples) to locate all components (really directories)
+# named accordingly, so they can be listed as needed parts of the Feature.
+# Standard output will be WiX XML Feature entries.
+#
+ProcessOneFeature() {
+ local featurename="$1"
+ local shortname="$2"
+ local opts="$4"
+ local dirfile="$5"
+ local outfeature="$6"
+ local outset="$7"
+
+ XmlLevel=4
+ local featcount=0
+ local featurestring=""
+ while [ $(SlashCount $featurename) != 0 ]; do
+ Parent=`echo $featurename | sed -e 's:/.*::'`
+ featurename=`echo $featurename | sed -e 's:^[^/]*/::'`
+ featcount=$(($featcount + 1))
+ Xecho "<FeatureRef Id=\"$Parent\">" >> $outfeature
+ done
+
+
+ # TODO: how to get +default to work?
+ # have tried messing with level="0" (doesn't show it)
+ # InstallDefault=\"source\" (doesn't make a difference)
+ #
+ local leveldebug="Level=\"4\""
+ local levelparam="Level=\"1\""
+ local leveldisable="Level=\"0\""
+ local defparam="InstallDefault=\"source\""
+ local displayparam="Display=\"expand\""
+ local params="AllowAdvertise=\"no\""
+ local regfeature=""
+
+ local descparam=""
+ if [ "$3" != '' ]; then
+ descparam="Description=\"$3\""
+ fi
+
+ local opt
+ local reqtext=""
+ local isdebugFeature=false
+ for opt in $opts; do
+ case "$opt" in
+ +default ) ;;
+ +required ) params="$params Absent=\"disallow\""
+ reqtext=" (required)";;
+ +invisible ) displayparam="Display=\"hidden\""
+ params="$params Absent=\"disallow\"";;
+ +debug ) isdebugFeature=true;;
+
+ * ) Error "features.in: Bad option $opt"
+ exit 1;;
+ esac
+ done
+
+
+# (PBR)
+# I tried to get debugging features to work but I could not. The last thing I
+# tried was to set either ADDSOURCE or INSTALLLEVEL. Neither of these solutions
+# will cause the feature conditions to rerun. The only thing I've found to do
+# that is to rerun CostFinalize. The problem with this is it will re-enable all
+# the options again. I'm keeping the basic framework for +debug support
+ if "$isdebugFeature"; then
+ regfeature="${featurename:1}"
+ echo "regfeature = $regfeature"
+
+ Xecho + "<Feature Id=\"$featurename\" Title=\"$shortname$reqtext\" $descparam $params $displayparam $leveldebug $defparam>" >> $outfeature
+ else
+ Xecho + "<Feature Id=\"$featurename\" Title=\"$shortname$reqtext\" $descparam $params $displayparam $levelparam $defparam>" >> $outfeature
+ fi
+
+
+ grep 'Component.*Id="'$featurename'[.0-9]*"' "$dirfile" | sed -e 's/\(Id="[^"]*"\).*/\1 \/>/' -e 's/Component /ComponentRef /' >> $outfeature
+
+ # Create a separate subfeature for any environment variables
+ # associated with the main feature.
+ # The <Condition> stuff is the magic that enables/disables
+ # setting the environment variables depending on the check box property.
+
+ Xecho + "<Feature Id=\"env.$featurename\" Title=\"env vars\" $params Display=\"hidden\" $levelparam $defparam>" >> $outfeature
+
+ Xecho "<Condition $leveldisable><![CDATA[EnvironmentSetCheck<>1]]></Condition>" >> $outfeature
+ Xecho "<Condition $levelparam><![CDATA[EnvironmentSetCheck=1]]></Condition>" >> $outfeature
+ grep 'Component.*Id="env\.'$featurename'[.0-9]*"' "$dirfile" | sed -e 's/\(Id="[^"]*"\).*/\1 \/>/' -e 's/Component /ComponentRef /' >> $outfeature
+
+ Xecho - "</Feature>" >> $outfeature
+ Xecho - "</Feature>" >> $outfeature
+
+ while [ "$featcount" -gt 0 ]; do
+ Xecho - "</FeatureRef>" >> $outfeature
+ featcount=$(($featcount - 1))
+ done
+
+ # Append the name to the feature list if it is to be installed.
+ # This publish fragment gets 'executed' when leaving the
+ # dialog to select features. Note that we have to quote
+ # the comma for m4 (`,') since this appears in a macro usage.
+ #
+
+# (PBR)
+# This code sets ADDSOURCE to show which debug options to include. This does not work
+ # If this is a debug feature, only turn on the value if the parent is on
+ if "$isdebugFeature"; then
+ regfeature="${featurename:1}"
+
+# Xecho "<Publish Property=\"ADDSOURCE\" Value=\"[ADDSOURCE]\`,'\">" >> $outset
+# Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\" AND ADDSOURCE <> NULL]]></Publish>" >> $outset
+
+# Xecho "<Publish Property=\"ADDSOURCE\" Value=\"[ADDSOURCE]${featurename}\">" >> $outset
+# Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\"]]></Publish>" >> $outset
+
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[FeatureList]\`,' ${shortname}\">" >> $outset
+ Xecho " <![CDATA[&${regfeature} = 3 AND DebugCheck=\"yes\"]]></Publish>" >> $outset
+
+ else
+ Xecho "<Publish Property=\"FeatureList\" Value=\"[FeatureList]\`,' ${shortname}\">" >> $outset
+ Xecho " <![CDATA[&${featurename} = 3]]></Publish>" >> $outset
+ fi
+}
+
+# ProcessOneEnv(FEATURE, ENVNAME, ENVVALUE, OPTS, OUTDIRS, OUTSET)
+# Called by ProcessFeatures to process a line in the environment.in file.
+# The four arguments are the values of the four columns.
+# The output will be into two files:
+# OUTDIRS: WiX XML Component entries, that contain environment values.
+# This controls the actual setting of the variables.
+# OUTSET: WiX XML to set the installer variables if an env variable
+# is set or a feature selected.
+#
+ProcessOneEnv() {
+ local feature="$1"
+ local envname="$2"
+ local envvalue="$3"
+ local opts="$4"
+ local outdirs="$5"
+ local outset="$6"
+
+ # Make the path uniform.
+ # echo "c:\Program Files\...\/Lib/Hello" | sed -e 's:\\/:\\:' -e 's:/:\\:g`
+ # This produces c:\Program Files\...\Lib\Hello
+ case "$envvalue" in
+ /* ) envvalue=`echo "$envvalue" | sed -e 's:^/::'`
+ esac
+
+ local path="[INSTALLDIR]$envvalue"
+
+ local opt
+ part="last"
+ for opt in $opts; do
+ case "$opt" in
+ +first ) part="first";;
+ +last ) part="last";;
+ * ) Error "environment.in: Bad option $opt"
+ exit 1;;
+ esac
+ done
+
+ # Generate the OUTDIRS fragment
+ # This looks like:
+ #
+ # <Component Id="env.CoreAPI.43" Guid="4B75755F-1129-292C-3434-238410000247">
+ # <Environment Id="env.44" Name="+-LIB" Action="set"
+ # Permanent="no" Part="first" Value="[INSTALLDIR]Lib" />
+ # </Component>
+ #
+ # Having a unique guid makes uninstall work.
+ # Note: We really want these installed as System rather than
+ # User vars (using the System="yes" tag), but only if user
+ # installs for *all* users. There is no convenient way to
+ # do that, so we leave them as default (User variables).
+
+
+ XmlLevel=4
+ local Id=`NextId`
+ Xecho "WIX_DB_SET_CURFILE(${envname})" >> $outdirs
+ Xecho + "<Component Id=\"env.$feature.$Id\" $PERSISTGUID>" >> $outdirs
+ Id=`NextId`
+
+ Xecho "<Environment Id=\"env.$Id\" Name=\"+-$envname\" Action=\"set\"" >> $outdirs
+ Xecho " Permanent=\"no\" Part=\"$part\" Value=\"$path\" />" >> $outdirs
+
+ Xecho "</Component>" >> $outdirs
+
+ # Generate the OUTSET fragment
+ # This looks like:
+ #
+ # <Publish Property="CLASSPATHValue" Value="[INSTALLDIR]Lib/db.jar;[CLASSPATHValue]">
+ # <![CDATA[&JavaAPI = 3]]></Publish>
+ # <Publish Property="CLASSPATHEscValue" Value="[INSTALLDIR]Lib/db.jar;[CLASSPATHEscValue]">
+ # <![CDATA[&JavaAPI = 3]]></Publish>
+ #
+ # This is equivalent to pseudocode:
+ # if (InstallFeature(JavaAPI)) {
+ # Prepend CLASSPATHValue with "Lib/db.jar;"
+ # Prepend CLASSPATHEscValue with "Lib/db.jar;"
+ # }
+ #
+ XmlLevel=4
+ Xecho "<Publish Property=\"${envname}Value\" Value=\"[INSTALLDIR]${envvalue};[${envname}Value]\">" >> $outset
+ Xecho " <![CDATA[&${feature} = 3]]></Publish>" >> $outset
+
+ Xecho "<Publish Property=\"${envname}EscValue\" Value=\"[INSTALLDIR]${envvalue};[${envname}EscValue]\">" >> $outset
+ Xecho " <![CDATA[&${feature} = 3]]></Publish>" >> $outset
+
+
+}
+
+# CreateProperty(ID, VALUE)
+# Generate a <Property...> tag on the stdout
+CreateProperty() {
+ Xecho "<Property Id=\"$1\" Hidden=\"yes\"><![CDATA[$2]]></Property>"
+}
+
+# ProcessTagProperties(OUTPROPS)
+# Generate some identification tags as properties.
+# This will let us look at an installer and figure out
+# when it was built, etc.
+ProcessTagProperties() {
+ local outprops="$1"
+ local insdate=`date`
+ XmlLevel=4
+
+ CreateProperty _DB_MSI_INSTALLER_DATE "$insdate" >> $outprops
+ CreateProperty _DB_MSI_PRODUCT_NAME "$PRODUCT_NAME" >> $outprops
+ CreateProperty _DB_MSI_PRODUCT_VERSION "$PRODUCT_VERSION" >> $outprops
+ CreateProperty ARPCOMMENTS "Installer for $PRODUCT_NAME $PRODUCT_VERSION built on $insdate" >> $outprops
+}
+
+# ProcessEnv(INENVFILE, INBATFILE, OUTPROPS, OUTSET, OUTSHOW)
+# We generate some Property magic to show the user what is set.
+#
+ProcessEnv() {
+ InEnv="inenv.tmp"; CleanInputFile "$1" "$InEnv" 3 4
+ inbat="$2"
+ outprops="$3"
+ outset="$4"
+ outshow="$5"
+
+ # Get a list of the environment variables
+ local envvar
+ local envvars=`cut -f 2 < $InEnv | sort | uniq`
+
+ # For each environment var, create lines that declare
+ # a pair of properties in the envprops.wixinc file like:
+ #
+ # <Property Id="CLASSPATHValue" Hidden="yes"></Property>
+ # <Property Id="CLASSPATHEscValue" Hidden="yes"></Property>
+ #
+ # And create lines in the envset.wixinc file like:
+ #
+ # <Publish Property="CLASSPATHValue" Value="%CLASSPATH%">
+ # <![CDATA[1]]></Publish>
+ # <Publish Property="CLASSPATHEscValue" Value="\\%CLASSPATH\\%">
+ # <![CDATA[1]]></Publish>
+ #
+ # More will be added to that file later.
+ # Then, create lines in the envshow.wixinc file like:
+ #
+ # <Control Id="CLASSPATHText" Type="Text"
+ # X="23" Width="316" PARTIALHEIGHT(10, 2)
+ # TabSkip="no" Text="CLASSPATH:" />
+ #
+ # <Control Id="CLASSPATHValueText" Type="Text"
+ # X="37" Width="316" PARTIALHEIGHT(20, 7)
+ # TabSkip="no" Text="[CLASSPATHValue]" />
+
+ for envvar in $envvars; do
+ XmlLevel=4
+ CreateProperty "${envvar}Value" "" >> $outprops
+ CreateProperty "${envvar}EscValue" "" >> $outprops
+
+ XmlLevel=4
+ Xecho "<Publish Property=\"${envvar}Value\" Value=\"%${envvar}%\">" >> $outset
+ Xecho " <![CDATA[1]]></Publish>" >> $outset
+ Xecho "<Publish Property=\"${envvar}EscValue\" Value=\"\\%${envvar}\\%\">" >> $outset
+ Xecho " <![CDATA[1]]></Publish>" >> $outset
+
+ XmlLevel=4
+ Xecho "<Control Id=\"${envvar}Text\" Type=\"Text\"" >> $outshow
+ Xecho " X=\"23\" Width=\"316\" PARTIALHEIGHT(10, 2)" >> $outshow
+ Xecho " TabSkip=\"no\" Text=\"${envvar}:\" />" >> $outshow
+
+ Xecho "<Control Id=\"${envvar}ValueText\" Type=\"Text\"" >> $outshow
+ Xecho " X=\"37\" Width=\"316\" PARTIALHEIGHT(20, 7)" >> $outshow
+ Xecho " TabSkip=\"no\" Text=\"[${envvar}Value]\" />" >> $outshow
+
+ done
+
+ # Create the dbvars.bat file from the .bat template file
+ # TODO: the bat template file currently knows the variables
+ # and their values, it should get them from the environment.in
+
+ RunM4 <"$inbat" >"$PRODUCT_STAGE/dbvars.bat" || Error "m4 failed" || exit 1
+}
+
+
+# CleanInputFile(INFILENAME, OUTFILENAME, MINELEMENTS, MAXELEMENTS)
+# A filter to preprocess and validate input files.
+# We end up without comment lines, a single tab between elements,
+# and a trailing tab.
+# Also some selected shell variables are expanded for convenience.
+# We verify that each line has the number of elements that fall within
+# the given min and max.
+#
+CleanInputFile() {
+ sed \
+ -e 's/#.*//' \
+ -e 's/ * / /g' \
+ -e 's/ */ /g' \
+ -e '/^[ ]*$/d' \
+ -e 's/$/ /' \
+ -e 's/ */ /g' \
+ -e 's:\${PRODUCT_VERSION}:'"${PRODUCT_VERSION}":g \
+ -e 's:\${PRODUCT_STAGE}:'"${PRODUCT_STAGE}":g \
+ -e 's:\${PRODUCT_SHARED_WINMSIDIR}:'"${PRODUCT_SHARED_WINMSIDIR}":g \
+ < "$1" > "$2"
+
+ # count tabs on each line
+ sed -e 's/[^ ]//g' -e 's/[ ]/x/g' < "$2" | (
+ read line
+ linecount=1
+ while [ "$line" != '' ]; do
+ chars=`echo "$line" | wc -c`
+ chars=$(($chars - 1)) # Remove newline
+ if [ "$chars" -lt "$3" -o "$chars" -gt "$4" ]; then
+ Error "$1: Input file error on or after line $linecount"
+ fi
+ read line
+ linecount=$(($linecount + 1))
+ done
+ )
+}
+
+# StripDoubleQuotes()
+# In some input files, we allow double quotes around
+# multi-word strings for readability. We strip them
+# here from standard input and write to standard output.
+# We only expect them at the beginning and end.
+#
+StripDoubleQuotes() {
+ sed -e 's/^"//' -e 's/"$//'
+}
+
+# IndentXml(PLUSMINUS_ARG)
+# A global variable $XmlLevel is kept for the indent level.
+# Every call creates blank output that matches the indent level.
+# In addition, with a '-' argument, the indent level
+# decrements by one before printing.
+# With a '+', the indent level increments after printing.
+# This is generally just used by Xecho
+#
+XmlLevel=0
+IndentXml() {
+ if [ "$1" = '-' -a $XmlLevel != 0 ]; then
+ XmlLevel=$(($XmlLevel - 1))
+ fi
+ local idx=0
+ while [ "$idx" != "$XmlLevel" ]; do
+ echo -n ' '
+ idx=$(($idx + 1))
+ done
+ if [ "$1" = '+' ]; then
+ XmlLevel=$(($XmlLevel + 1))
+ fi
+}
+
+# Xecho [ - | + ] ...
+# echoes arguments (like) echo, except that the output
+# is indented for XML first. If +, the indentation changes
+# after printing, if -, the indentation changes before printing.
+#
+Xecho()
+{
+ local xarg=
+ if [ "$1" = '-' -o "$1" = '+' ]; then
+ xarg="$1"
+ shift
+ fi
+ IndentXml $xarg
+ echo "$@"
+}
+
+# SlashCount(PATH)
+# Returns the number of slashes in its argument
+# Note, we are relying on some advanced
+# features of bash shell substitution
+#
+SlashCount()
+{
+ local allslash=`echo "$1" | sed -e 's:[^/]*::g'`
+ echo "${#allslash}"
+}
+
+# ProcessDirTransition(PREVDIR, NEXTDIR)
+# Used by ProcessFeatures to create the parts
+# of an WiX <Directory> heirarchy (on stdout) needed to
+# transition from directory PREVDIR to NEXTDIR.
+# This may include any needed </Directory> entries as well.
+# For example, ProcessDirTransition /Bin/Stuff /Bin/Foo/Bar
+# produces:
+# </Directory> ...to go up one from 'Stuff'
+# <Directory Foo>
+# <Directory Bar>
+#
+ProcessDirTransition() {
+ local p="$1"
+ local n="$2"
+ if [ "$p" = '' ]; then p=/; fi
+ if [ "$n" = '' ]; then n=/; fi
+ local nextdir="$2"
+
+ # The number of slashes in $p is the current directory level.
+ XmlLevel=$(($(SlashCount $p) + 4))
+
+ while [ "$p" != / ]; do
+ if [ "${n#${p}}" != "$n" ]; then
+ break
+ fi
+
+ # go up one level, and keep $p terminated with a /
+ p=`dirname $p`
+ case "$p" in
+ */ ) ;;
+ * ) p=$p/;;
+ esac
+ Xecho - "</Directory>"
+ done
+ n=${n#${p}}
+ while [ "$n" != '' ]; do
+ local dirname=`echo $n | sed -e 's:/.*::'`
+ local cleanname=`CleanFileName "$dirname"`
+ local shortname=`GetShortName "$cleanname"`
+ local dirid=`NextId`
+
+ local larg=""
+ if [ "${shortname}" != "${dirname}" ]; then
+ larg="LongName=\"${dirname}\""
+ fi
+ Xecho + "<Directory Id=\"${cleanname}Dir.$dirid\" Name=\"${shortname}\" $larg>"
+
+ n=`echo $n | sed -e 's:^[^/]*/::'`
+ done
+
+ Xecho "WIX_DB_SET_CURDIR($nextdir)" # Tell the m4 macro what the current dir is
+}
+
+# SetupErrorLog()
+# Given the global variable ERRORLOG for the name of the
+# error output file, do any setup required to make that happen.
+#
+SetupErrorLog() {
+
+ # Before we start to use ERRORLOG, we get a full pathname,
+ # since the caller may change directories at times.
+ case "$ERRORLOG" in
+ /* ) ;;
+ *) ERRORLOG=`pwd`"/$ERRORLOG" ;;
+ esac
+
+ rm -f $ERRORLOG
+
+ # File descriptor tricks.
+ # Duplicate current stderr to 15, as we'll occasionally
+ # need to report progress to it. Then, redirect all
+ # stderr from now on to the ERRORLOG.
+ #
+ exec 15>&2
+ exec 2>>$ERRORLOG
+}
+
+# RequireCygwin
+# Cygwin does not install certain needed components by default.
+# Check to make sure that everything needed by the script
+# and functions is here.
+#
+RequireCygwin() {
+ Progress -minor "checking for Cygwin..."
+ RequireFileInPath PATH "$PATH" m4
+ RequireFileInPath PATH "$PATH" gcc
+ RequireFileInPath PATH "$PATH" make
+ RequireFileInPath PATH "$PATH" unzip
+ RequireFileInPath PATH "$PATH" bc
+ RequireFileInPath PATH "$PATH" openssl # needed for MD5 hashing
+}
+
+# RequireJava()
+# A java SDK (with include files) must be installed
+#
+RequireJava() {
+ Progress -minor "checking for Java..."
+ RequireFileInPath INCLUDE "$INCLUDE" jni.h
+ RequireFileInPath INCLUDE "$INCLUDE" jni_md.h
+ RequireFileInPath PATH "$PATH" jar.exe
+ RequireFileInPath PATH "$PATH" javac.exe
+}
+
+# RequireTcl()
+# A Tcl SDK (with compatible .lib files) must be installed
+#
+RequireTcl() {
+ Progress -minor "checking for Tcl..."
+ RequireFileInPath INCLUDE "$INCLUDE" tcl.h
+ RequireFileInPath LIB "$LIB" tcl84g.lib
+ RequireFileInPath LIB "$LIB" tcl84.lib
+}
+
+# RequireWix()
+# WiX must be installed
+#
+RequireWix() {
+ Progress -minor "checking for WiX..."
+ RequireFileInPath PATH "$PATH" candle.exe
+ RequireFileInPath PATH "$PATH" light.exe
+ RequireFileInPath PATH "$PATH" tallow.exe
+}
+
+# RequirePerl()
+# Perl must be installed
+#
+RequirePerl() {
+ Progress -minor "checking for Perl..."
+ RequireFileInPath PATH "$PATH" perl.exe
+}
+
+# RequirePython()
+# Python (and include files) must be installed
+#
+RequirePython() {
+ Progress -minor "checking for Python..."
+ RequireFileInPath INCLUDE "$INCLUDE" Python.h
+ RequireFileInPath PATH "$PATH" python.exe
+}
+
+# CreateDbPerl()
+# Build Perl interface (for Berkeley DB only).
+#
+CreateDbPerl() {
+
+ # First build Berkeley DB using cygwin, as that version is
+ # needed for the Perl build
+ local here=`pwd`
+ Progress "building using Cygwin tools (needed for perl)"
+ cd "${PRODUCT_DBBUILDDIR}"
+ insdir="${PRODUCT_STAGE}/install_unix"
+ ../dist/configure --prefix="$insdir" >>$ERRORLOG || exit 1
+ make install >>$ERRORLOG || exit 1
+
+ Progress "building perl"
+ cd ../perl/BerkeleyDB
+ BERKELEYDB_INCLUDE="$insdir/installed_include" BERKELEYDB_LIB="$insdir/lib" \
+ perl Makefile.PL >>$ERRORLOG || exit 1
+ make >>$ERRORLOG
+ cd $here
+}
+
+# CreateWindowsSystem()
+# Copy Window system files
+#
+CreateWindowsSystem() {
+ local here=`pwd`
+ Progress "Copy Window system files..."
+ cd "${PRODUCT_SUB_BLDDIR}"
+ cp -f $SYSTEMROOT/system32/msvcr71.dll build_win32/Release/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcp71.dll build_win32/Release/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcr71d.dll build_win32/Debug/ || exit 1
+ cp -f $SYSTEMROOT/system32/msvcp71d.dll build_win32/Debug/ || exit 1
+ cd $here
+}
+
+# CreateInclude(DIR, FILES)
+# Create an include directory populated with the files given
+#
+CreateInclude() {
+
+ local incdir="$1"
+ shift
+
+ Progress "creating the "$incdir" directory..."
+ rm -rf "$incdir"
+ mkdir "$incdir" || exit 1
+ cp -r "$@" "$incdir"
+}
+
+# CreateWindowsBuild()
+# Do the windows build as defined by the winbuild.bat file
+#
+CreateWindowsBuild() {
+ local here=`pwd`
+ Progress "building using Windows tools..."
+ cd "${PRODUCT_SUB_BLDDIR}" || exit 1
+
+ # Before starting, copy any installer tools here.
+ # This makes building these tools straightforward
+ # and the results are left in the build directory.
+ #
+ cp -r ${PRODUCT_SHARED_WINMSIDIR}/instenv .
+
+ # We create a wbuild.bat file, which is essentially
+ # identical, except it has the carriage returns added.
+ # This allows us to use our favorite editors on winbuild.bat .
+ #
+ sed -e 's/$//' < ${PRODUCT_STAGE}/../winbuild.bat | tr '\001' '\015' > wbuild.bat
+ # TODO: Needed?
+ rm -f build_win32/Berkeley_DB.sln
+ rm -f winbld.out winbld.err
+ touch winbld.out winbld.err
+ echo "Build output and errors are collected in" >> $ERRORLOG
+ echo " winbld.{out,err} until the build has completed." >> $ERRORLOG
+ cmd.exe /x /c call wbuild.bat
+ status=$?
+ cat winbld.out >> $ERRORLOG
+ if [ -s winbld.err -o "$status" != 0 ]; then
+ cat winbld.err >> $ERRORLOG
+ Error "Errors during windows build"
+ exit 1
+ fi
+ cd $here
+}
+
+# CreateSources(SOURCESDIR,DOCDIR...)
+# Create the sources directory, ignoring things in the docdirs
+#
+CreateSources() {
+ local sources="$1"
+
+ Progress "creating the Sources directory in $sources..."
+ rm -rf "$sources"
+ cp -r ${PRODUCT_SRCDIR} "$sources" || exit 1
+}
+
+# Usage()
+# Show the usage for this script.
+#
+Usage()
+{
+ echo "Usage: s_winmsi [ options ]" >&2
+ echo "Options: " >&2
+ echo " -input file use file rather than ${PRODUCT_ZIP_FILEFMT}" >&2
+ echo " where X.Y.Z is defined by ../RELEASE" >&2
+ echo " -output file use file rather than ${PRODUCT_MSI_FILEFMT}" >&2
+ echo " where X.Y.Z is defined by ../RELEASE" >&2
+ echo " -usebuild DIR use DIR for exes, DLLs, etc. " >&2
+ echo " rather than building from scratch" >&2
+ echo " -preserve preserve the winmsi/msi_staging directory" >&2
+ echo " -skipgen skip generating m4 include files" >&2
+}
+
+# SetupOptions()
+# Parse command line options and set global variables as indicated below.
+#
+SetupOptions() {
+ OPT_USEBUILD=
+ OPT_PRESERVE=false
+ OPT_INFILE=
+ OPT_OUTFILE=
+ OPT_SKIPGEN=false
+ while [ "$#" -gt 0 ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -usebuild ) OPT_USEBUILD="$1"; shift ;;
+ -skipgen ) OPT_SKIPGEN=true ;;
+ -preserve ) OPT_PRESERVE=true;;
+ -input ) OPT_INFILE="$1"; shift ;;
+ -output ) OPT_OUTFILE="$1"; shift ;;
+ * )
+ echo "ERROR: Unknown argument '$arg' to s_winmsi" >&2
+ Usage
+ exit 1
+ ;;
+ esac
+ done
+ if [ "$OPT_INFILE" = '' -o ! -f "$OPT_INFILE" ]; then
+ echo "$OPT_INFILE: not found"
+ exit 1
+ fi
+}
+
+# CreateStage()
+# Create the staging area
+#
+CreateStage() {
+ Progress "creating staging area..."
+ if [ "$PRODUCT_STAGE" = '' ]; then
+ Error "PRODUCT_STAGE not set"
+ exit 1
+ fi
+ if ! $OPT_PRESERVE; then
+ trap 'rm -rf ${PRODUCT_STAGE} ; exit 0' 0 1 2 3 13 15
+ fi
+ rm -rf ${PRODUCT_STAGE} || exit 1
+ mkdir ${PRODUCT_STAGE} || exit 1
+
+ cd ${PRODUCT_STAGE}
+
+ Progress "extracting $OPT_INFILE..."
+ unzip -q ../../$OPT_INFILE || exit 1
+
+ if [ ! -d $PRODUCT_LICENSEDIR ]; then
+ Error "$OPT_INFILE: no top level $PRODUCT_LICENSEDIR directory"
+ exit 1
+ fi
+}
+
+# CreateLicenseRtf(LICENSEIN, LICENSERTF)
+# From a text LICENSE file, create the equivalent in .rtf format.
+#
+CreateLicenseRtf() {
+ local licensein="$1"
+ local licensertf="$2"
+
+ if [ ! -f "$licensein" ]; then
+ Error "License file $licensein: does not exist"
+ exit 1
+ fi
+ Progress "creating ${licensertf}..."
+
+ # Build a list of references to components ids (i.e. directories)
+ # that are listed in the .wxs file. This is needed to refer to
+ # all of the source (sadly it appears there is no better way!)
+ #
+ if ! grep '^=-=-=-=' $licensein > /dev/null; then
+ Error "LICENSE has changed format, this script must be adapted"
+ exit 1
+ fi
+
+ sed -e '1,/^=-=-=-=-=/d' < $licensein | MakeRtf > $licensertf
+}
+
+
+# CreateMsi(INFILE,WXSFILE,MSIFILE)
+# Do the final creation of the output .MSI file.
+# It is assumed that all *.wixinc files are now in place.
+# INFILE is an absolute name of the m4 input WiX file.
+# WXSFILE is a short (basename) of the postprocessed WiX file,
+# after macro expansion, it will be left in staging directory.
+# MSIFILE is a short (basename) of the output .MSI name
+#
+CreateMsi() {
+ local infile="$1"
+ local wxs="$2"
+ local msifile="$3"
+ local o=`echo "$wxs" | sed -e 's/[.]wxs$//' -e 's/$/.wixobj/'`
+
+ rm -f $o $wxs
+
+ # Preprocess the ${PROD}wix.in file, adding the things we need
+ #
+ Progress "Running m4 to create $wxs..."
+ RunM4 < "$infile" > "$PRODUCT_STAGE/$wxs" || Error "m4 failed" || exit 1
+
+ local here=`pwd`
+ cd "$PRODUCT_STAGE"
+ rm -f "$o" "$msifile"
+ Progress "compiling $wxs..."
+ candle -w0 $wxs >> $ERRORLOG || Error "candle (compiler) failed" || exit 1
+
+ Progress "linking .msi file..."
+ light -o "$msifile" $o >> $ERRORLOG || Error "light (linker) failed" || exit 1
+ (rm -f "../../$msifile" && mv "$msifile" ../..) >> $ERRORLOG || exit 1
+ cd $here
+}
+
+# CreateWixIncludeFiles()
+# Do all processing of input files to produce
+# the include files that we need to process the Wix input file.
+#
+CreateWixIncludeFiles() {
+ local here=`pwd`
+ cd "$PRODUCT_STAGE"
+ # Touch all the wix include files in case any end up empty.
+ touch directory.wixinc features.wixinc envprops.wixinc \
+ envset.wixinc envshow.wixinc links.wixinc
+
+ Progress "tagging the installer..."
+ ProcessTagProperties envprops.wixinc
+
+ Progress "processing environment..."
+ ProcessEnv ../environment.in ../dbvarsbat.in envprops.wixinc envset.wixinc envshow.wixinc
+
+ Progress "processing features and files..."
+ ProcessFeatures ../files.in ../features.in ../environment.in \
+ directory.wixinc features.wixinc \
+ envset.wixinc
+
+ Progress "processing links..."
+ ProcessLinks ../links.in features.wixinc > links.wixinc
+ cd $here
+}
diff --git a/storage/bdb/dist/winmsi/winbuild.bat b/storage/bdb/dist/winmsi/winbuild.bat
new file mode 100644
index 00000000000..b8c9a34add2
--- /dev/null
+++ b/storage/bdb/dist/winmsi/winbuild.bat
@@ -0,0 +1,119 @@
+@echo off
+:: $Id: winbuild.bat,v 1.4 2005/04/15 19:01:52 philipr Exp $
+:: Helper script to build Berkeley DB libraries and executables
+:: using MSDEV
+::
+
+cd build_win32
+
+:: One of these calls should find the desired batch file
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat" && goto BATFOUND1
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\vsvars32.bat" && goto BATFOUND2
+
+call :TryBat "c:\Program Files\Microsoft Visual Studio.NET\Common7\Tools\vsvars32.bat" && goto BATFOUND3
+
+goto BATNOTFOUND
+
+:BATFOUND1
+echo Using Visual Studio .NET 2003
+goto BATFOUND
+
+:BATFOUND2
+echo Using Visual Studio .NET
+echo *********** CHECK: Make sure the binaries are built with the same system libraries that are shipped.
+goto BATFOUND
+
+:BATFOUND3
+echo Using Visual Studio.NET
+echo *********** CHECK: Make sure the binaries are built with the same system libraries that are shipped.
+goto BATFOUND
+
+:BATFOUND
+:CONVERSION
+start /wait devenv /useenv Berkeley_DB.dsw
+
+:: For some reason, the command doesn't wait, at least on XP.
+:: So we ask for input to continue.
+
+
+echo.
+echo ============================================================
+echo.
+echo Converting the Berkeley DB Workspace to a .NET Solution.
+echo This will run the IDE to interactively convert.
+echo.
+echo When prompted during the conversion, say: Yes-to-All.
+echo When finished with the conversion, do a Save-All and Exit.
+echo Then hit ENTER to continue this script.
+echo.
+echo ============================================================
+set result=y
+set /P result="Continue? [y] "
+if %result% == n goto NSTOP
+
+if exist Berkeley_DB.sln goto ENDCONVERSION
+echo ************* Berkeley_DB.sln was not created ***********
+echo Trying the conversion again...
+goto CONVERSION
+:ENDCONVERSION
+
+::intenv is used to set environment variables but this isn't used anymore
+::devenv /useenv /build Release /project instenv ..\instenv\instenv.sln >> ..\winbld.out 2>&1
+::if not %errorlevel% == 0 goto ERROR
+
+echo Building Berkeley DB
+devenv /useenv /build Debug /project build_all Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Release /project build_all Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Debug Static" /project build_all Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build "Release Static" /project build_all Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Debug /project ex_repquote Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Debug /project db_java Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Release /project db_java Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Debug /project db_tcl Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+devenv /useenv /build Release /project db_tcl Berkeley_DB.sln >> ..\winbld.out 2>&1
+if not %errorlevel% == 0 goto ERROR
+
+
+goto END
+
+
+:ERROR
+echo *********** ERROR: during win_build.bat *************
+echo *********** ERROR: during win_build.bat ************* >> ..\winbld.err
+exit 1
+goto END
+
+:NSTOP
+echo *********** ERROR: win_build.bat stop requested *************
+echo *********** ERROR: win_built.bat stop requested ************* >> ..\winbld.err
+exit 2
+goto END
+
+:BATNOTFOUND
+echo *********** ERROR: VC Config batch file not found *************
+echo *********** ERROR: VC Config batch file not found ************* >> ..\winbld.err
+exit 3
+goto END
+
+:: TryBat(BATPATH)
+:: If the BATPATH exists, use it and return 0,
+:: otherwise, return 1.
+
+:TryBat
+:: Filename = %1
+if not exist %1 exit /b 1
+call %1
+exit /b 0
+goto :EOF
+
+:END