BerkeleyDB Ver.2 を一度でもコンパイルした経験がある方は、以下の問題で頭を痛めたのではないかと思う。
$ gzip -dc db-2.7.7.tar.gz | tar -xf - $ cd db-2.7.7 $ /usr/bin/gpatch -p0 < patch.Makefile.in patching file dist/Makefile.in $ cd build_unix $ CFLAGS='-O2 -march=i586 -fomit-frame-pointer -s -pipe' ; export CFLAGS $ ../dist/configure --enable-compat185 --enable-dump185 $ gmake $ su # /usr/ucb/install -g other -m 644 -o root libdb2.a /usr/local/lib # /usr/ucb/install -g other -m 755 -o root db_dump185 /usr/local/bin/db_dump185.2 # /usr/ucb/install -g other -m 755 -o root db_archive /usr/local/bin/db_archive.2 # /usr/ucb/install -g other -m 755 -o root db_checkpoint /usr/local/bin/db_checkpoint.2 # /usr/ucb/install -g other -m 755 -o root db_deadlock /usr/local/bin/db_deadlock.2 # /usr/ucb/install -g other -m 755 -o root db_dump /usr/local/bin/db_dump.2 # /usr/ucb/install -g other -m 755 -o root db_load /usr/local/bin/db_load.2 # /usr/ucb/install -g other -m 755 -o root db_printlog /usr/local/bin/db_printlog.2 # /usr/ucb/install -g other -m 755 -o root db_recover /usr/local/bin/db_recover.2 # /usr/ucb/install -g other -m 755 -o root db_stat /usr/local/bin/db_stat.2 # /usr/ucb/install -g other -m 644 -o root db.h /usr/local/include/db2.h # /usr/ucb/install -g other -m 644 -o root db_185.h /usr/local/include # /usr/ucb/install -g other -m 644 -o root ../dist/../include/db_cxx.h /usr/local/include#そう、手作業でやれってことよ。
$ gmake distclean $ CFLAGS='-O2 -march=i586 -fomit-frame-pointer -fpic -fPIC -s -pipe' ; export CFLAGS $ ../dist/configure --enable-compat185 $ gmake $ mkdir objs $ cd objs $ ar xv ../libdb2.a x - bt_compare.o x - bt_conv.o x - bt_curadj.o x - bt_cursor.o x - bt_delete.o x - bt_open.o x - bt_page.o x - bt_put.o x - bt_rec.o x - bt_recno.o x - bt_rsearch.o x - bt_search.o x - bt_split.o x - bt_stat.o x - btree_auto.o x - db.o x - db_appinit.o x - db_am.o x - db_apprec.o x - db_auto.o x - db_byteorder.o x - db_conv.o x - db_dispatch.o x - db_dup.o x - db_err.o x - db_iface.o x - db_join.o x - db_log2.o x - db_overflow.o x - db_pr.o x - db_rec.o x - db_region.o x - db_ret.o x - db_salloc.o x - db_shash.o x - dbm.o x - hash.o x - hash_auto.o x - hash_conv.o x - hash_dup.o x - hash_func.o x - hash_page.o x - hash_rec.o x - hash_stat.o x - hsearch.o x - lock.o x - lock_conflict.o x - lock_deadlock.o x - lock_util.o x - lock_region.o x - log.o x - log_archive.o x - log_auto.o x - log_compare.o x - log_findckp.o x - log_get.o x - log_put.o x - log_rec.o x - log_register.o x - mp_bh.o x - mp_fget.o x - mp_fopen.o x - mp_fput.o x - mp_fset.o x - mp_open.o x - mp_pr.o x - mp_region.o x - mp_sync.o x - mutex.o x - os_abs.o x - os_alloc.o x - os_config.o x - os_dir.o x - os_fid.o x - os_fsync.o x - os_map.o x - os_oflags.o x - os_open.o x - os_rpath.o x - os_rw.o x - os_seek.o x - os_sleep.o x - os_spin.o x - os_stat.o x - os_tmpdir.o x - os_unlink.o x - txn.o x - txn_auto.o x - txn_rec.o x - xa.o x - xa_db.o x - xa_map.o x - db185.o x - strsep.o $ gcc -shared -s -o libdb2.so ./*.o $ su # /usr/ucb/install -g other -m 644 -o root ./libdb2.so /usr/local/lib (以下2行はお好みに応じて) # cd /usr/local/lib # ln -s ./libdb2.so ./libdb.so.2 # exit $