diff options
-rw-r--r-- | .hgignore | 2 | ||||
-rw-r--r-- | build_posix/Make.base | 16 | ||||
-rw-r--r-- | build_posix/configure.ac | 12 | ||||
-rw-r--r-- | build_posix/makemake | 11 | ||||
-rw-r--r-- | build_posix/reconf | 12 | ||||
-rw-r--r-- | build_posix/wiredtiger.pc.in | 11 | ||||
-rw-r--r-- | lang/python/setup.py | 14 | ||||
-rw-r--r-- | test/suite/run.py | 2 |
8 files changed, 55 insertions, 25 deletions
diff --git a/.hgignore b/.hgignore index 55300df6f10..383d95f8688 100644 --- a/.hgignore +++ b/.hgignore @@ -5,7 +5,7 @@ ^build.*/(\.deps|COPYING|ChangeLog|INSTALL|Makefile.*|NEWS|README) ^build.*/(aclocal\.m4|config\..*|configure|stamp-h1|prototype.chk|w.*\.h) ^build.*/(ex_.*|lib.*|wt_.*|_wiredtiger.so) -^build_posix/gnu-support/(depcomp|install-sh|missing) +^build_posix/gnu-support/(compile|depcomp|install-sh|ltmain.sh|missing) ^build_posix/autom4te.cache ^docs/(doxygen.log|installdox|search) ^docs/[^/]*\.(css|html|js|png)$ diff --git a/build_posix/Make.base b/build_posix/Make.base index 9b3c593858e..dc170d419f6 100644 --- a/build_posix/Make.base +++ b/build_posix/Make.base @@ -1,6 +1,6 @@ wtdir = $(prefix)/wt -wt_LIBRARIES = libwiredtiger.a -LDADD = libwiredtiger.a -lpthread +wt_LTLIBRARIES = libwiredtiger.la +LDADD = $(wt_LTLIBRARIES) -lpthread wt_PROGRAMS = wt wt_SOURCES = util_create.c util_dump.c util_dumpfile.c util_getopt.c \ @@ -14,12 +14,20 @@ noinst_PROGRAMS = ex_access ex_all ex_call_center ex_config ex_cursor \ include_HEADERS= wiredtiger.h INCLUDES= -I../src/include +ACLOCAL_AMFLAGS = -I aclocal + Makefile.am: Make.base makemake ../dist/filelist @sh makemake +libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status libtool + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = wiredtiger-@WIREDTIGER_VERSION_MAJOR@.@WIREDTIGER_VERSION_MINOR@.pc + ../src/include/extern.h: prototype.chk -prototype.chk: $(libwiredtiger_a_SOURCES) +prototype.chk: $(libwiredtiger_la_SOURCES) @(cd ../dist && sh s_prototypes) && touch $@ if PYTHON @@ -31,7 +39,7 @@ all-local: _wiredtiger.so $(PYSRC)/wiredtiger_wrap.c: wiredtiger.h $(PYSRC)/wiredtiger.i @(cd $(PYSRC) && swig -python -I../../build_posix wiredtiger.i) -_wiredtiger.so: libwiredtiger.a $(PYSRC)/wiredtiger_wrap.c +_wiredtiger.so: $(wt_LTLIBRARIES) $(PYSRC)/wiredtiger_wrap.c @env CFLAGS="$(PYTHON_CFLAGS)" LDFLAGS="$(PYTHON_LDFLAGS)" \ $(PYTHON) $(PYSRC)/setup.py build_ext -b . -t . -f $(PY_SETUP_DEBUG) endif diff --git a/build_posix/configure.ac b/build_posix/configure.ac index b53d4f0aa58..eaf43ec4aea 100644 --- a/build_posix/configure.ac +++ b/build_posix/configure.ac @@ -6,9 +6,11 @@ AC_INIT(WiredTiger, [__EDIT_WIREDTIGER_VERSION__], [support@wiredtiger.com], wt-__EDIT_WIREDTIGER_VERSION__) +AC_CONFIG_AUX_DIR([gnu-support]) +AC_CONFIG_MACRO_DIR([aclocal]) AC_CONFIG_SRCDIR([../dist/RELEASE]) + AC_CONFIG_HEADERS([wiredtiger_config.h:config.hin]) -AC_CONFIG_AUX_DIR(gnu-support, aclocal) AC_SUBST(WIREDTIGER_VERSION_MAJOR) WIREDTIGER_VERSION_MAJOR="__EDIT_WIREDTIGER_VERSION_MAJOR__" @@ -20,6 +22,9 @@ AC_SUBST(WIREDTIGER_VERSION_STRING) WIREDTIGER_VERSION_STRING='"__EDIT_WIREDTIGER_VERSION_STRING__"' AC_SUBST(WIREDTIGER_VERSION_UNIQUE_NAME) +LT_INIT([dlopen]) +AC_SUBST([LIBTOOL_DEPS]) + AM_INIT_AUTOMAKE AM_OPTIONS @@ -73,7 +78,6 @@ fi AM_TYPES -AC_PROG_RANLIB AC_PROG_INSTALL AC_CHECK_LIB(pthread, pthread_create) @@ -85,5 +89,7 @@ AC_C_BIGENDIAN AC_CONFIG_FILES([ Makefile wiredtiger.h:../src/include/wiredtiger.in - wt_internal.h:../src/include/wt_internal.in]) + wt_internal.h:../src/include/wt_internal.in + wiredtiger-${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.pc:wiredtiger.pc.in + ]) AC_OUTPUT diff --git a/build_posix/makemake b/build_posix/makemake index e55678cb551..93c6e6eecfc 100644 --- a/build_posix/makemake +++ b/build_posix/makemake @@ -4,11 +4,14 @@ # All rights reserved. # Build Makefile.am +. ../dist/RELEASE + filelist=../dist/filelist set_sources() { echo - echo "libwiredtiger_a_SOURCES=\\" + echo "libwiredtiger_la_LDFLAGS = -release ${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}" + echo "libwiredtiger_la_SOURCES=\\" sed -e '/^[a-z]/! d' \ -e 's/.*/ ..\/& \\/' \ -e '$s/ \\$//' < $filelist @@ -25,4 +28,8 @@ set_vpath() echo "../src/utilities" } -(cat Make.base; set_vpath; set_sources) > Makefile.am +( + sed -e "s/@WIREDTIGER_VERSION_MAJOR@/$WIREDTIGER_VERSION_MAJOR/" \ + -e "s/@WIREDTIGER_VERSION_MINOR@/$WIREDTIGER_VERSION_MINOR/" \ + -e "s/@WIREDTIGER_VERSION_PATCH@/$WIREDTIGER_VERSION_PATCH/" \ + Make.base; set_vpath; set_sources) > Makefile.am diff --git a/build_posix/reconf b/build_posix/reconf index 86a4e4b42e6..5fc12a736a7 100644 --- a/build_posix/reconf +++ b/build_posix/reconf @@ -43,14 +43,7 @@ cp ../README README # Build Makefile.am sh ./makemake -# Build aclocal.m4. -aclocal -I aclocal - -# Create header file config.in. -autoheader - -# Configure. -autoconf +autoreconf --install # Edit version information we couldn't pre-compute. . ../dist/RELEASE @@ -62,9 +55,6 @@ sed -e "s/__EDIT_WIREDTIGER_VERSION_MAJOR__/$WIREDTIGER_VERSION_MAJOR/g" \ -e "s/__EDIT_WIREDTIGER_VERSION__/$WIREDTIGER_VERSION/g" configure > $t cp $t configure -# Build make files. -automake --add-missing --copy - # Make sure any missing files are writable chmod 755 gnu-support/* diff --git a/build_posix/wiredtiger.pc.in b/build_posix/wiredtiger.pc.in new file mode 100644 index 00000000000..b8981676feb --- /dev/null +++ b/build_posix/wiredtiger.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: WiredTiger +Description: The WiredTiger Data Engine +Requires: +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lsomething-@WIREDTIGER_VERISON_MAJOR@.@WIREDTIGER_VERSION_MIINOR@ +Cflags: -I${includedir}/wiredtiger-@WIREDTIGER_VERSION_MAJOR@.@WIREDTIGER_VERSION_MINOR@ diff --git a/lang/python/setup.py b/lang/python/setup.py index 5786c404faa..eaa3ee1330a 100644 --- a/lang/python/setup.py +++ b/lang/python/setup.py @@ -1,4 +1,4 @@ -import os +import re, os from distutils.core import setup, Extension # OS X hack: turn off the Universal binary support that is built into the @@ -8,11 +8,19 @@ if not 'ARCHFLAGS' in os.environ: dir = os.path.dirname(__file__) -setup(name='wiredtiger', version='1.0', +# Read the version information from dist/RELEASE +dist = os.path.join(os.path.dirname(os.path.dirname(dir)), 'dist') +for l in open(os.path.join(dist, 'RELEASE')): + if re.match(r'WIREDTIGER_VERSION_(?:MAJOR|MINOR|PATCH)=', l): + exec(l) + +wt_ver = '%d.%d' % (WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR) + +setup(name='wiredtiger', version=wt_ver, ext_modules=[Extension('_wiredtiger', [os.path.join(dir, 'wiredtiger_wrap.c')], include_dirs=['.'], - library_dirs=['.'], + library_dirs=['.libs'], libraries=['wiredtiger'], )], py_modules=['wiredtiger'], diff --git a/test/suite/run.py b/test/suite/run.py index 4ccdbfe5d17..e2e92cf18f0 100644 --- a/test/suite/run.py +++ b/test/suite/run.py @@ -28,7 +28,7 @@ import wttest from testscenarios.scenarios import generate_scenarios # These may be needed on some systems -#os.environ['LD_LIBRARY_PATH'] = os.environ['DYLD_LIBRARY_PATH'] = wt_builddir +#os.environ['LD_LIBRARY_PATH'] = os.environ['DYLD_LIBRARY_PATH'] = os.path.join(wt_builddir, '.libs') #export ARCH="x86_64" # may be needed on OS/X |