From 3eb4b3b2f5d74cc16787b630a2645287b15bd0db Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Fri, 26 Aug 2011 15:34:52 +1000 Subject: Search for swig during configure for Python builds. --- build_posix/Make.base | 2 +- build_posix/configure.ac | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'build_posix') diff --git a/build_posix/Make.base b/build_posix/Make.base index 45a92a40424..eb65181f2ad 100644 --- a/build_posix/Make.base +++ b/build_posix/Make.base @@ -37,7 +37,7 @@ PY_SETUP_DEBUG = -g endif all-local: _wiredtiger.so $(PYSRC)/wiredtiger_wrap.c: wiredtiger.h $(PYSRC)/wiredtiger.i - @(cd $(PYSRC) && swig -python -I../../build_posix wiredtiger.i) + @(cd $(PYSRC) && $(SWIG) -python -I../../build_posix wiredtiger.i) _wiredtiger.so: $(wt_LTLIBRARIES) $(PYSRC)/wiredtiger_wrap.c @env CFLAGS="$(PYTHON_CFLAGS)" LDFLAGS="$(PYTHON_LDFLAGS)" \ diff --git a/build_posix/configure.ac b/build_posix/configure.ac index e94de245250..4a334d93f2f 100644 --- a/build_posix/configure.ac +++ b/build_posix/configure.ac @@ -64,6 +64,11 @@ AM_CONDITIONAL(DEBUG, test "$db_cv_enable_debug" = "yes") # Python API if test "$db_cv_enable_python" = "yes"; then AM_PATH_PYTHON([2.5]) + AC_PATH_PROG([SWIG], [swig]) + if test -z "$SWIG" ; then + AC_MSG_ERROR( + [Cannot find 'swig'. Download it from http://www.swig.org]) + fi fi AM_TYPES -- cgit v1.2.1