Skip to content

Commit

Permalink
check for valid swig in configure script (NanoComp#1144)
Browse files Browse the repository at this point in the history
* check for valid swig in configure script

* tweak
  • Loading branch information
stevengj authored Mar 5, 2020
1 parent 39b7498 commit 94ad86b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,21 @@ AC_TRY_COMPILE([], [_Pragma("ivdep")], [], [AC_DEFINE([_Pragma],[],[define to no

# checks for python
##############################################################################

AC_ARG_WITH(python,
[AC_HELP_STRING([--without-python], [compile without Python interface])],
with_python=$withval,with_python=yes)

AC_CHECK_PROG(SWIG, swig, swig, echo)
if test "$USE_MAINTAINER_MODE" = yes && (test "x$with_python" = "xyes" || test "x$with_scheme" = "xyes") && test "x$SWIG" = xecho; then
AC_MSG_ERROR([SWIG not found; configure --without-python --without-scheme or use a release tarball])
fi
if test "$USE_MAINTAINER_MODE" = yes && test "x$with_python" = "xyes"; then
if ($SWIG -version | grep "SWIG Version 4" > /dev/null 2>&1); then
AC_MSG_ERROR([SWIG version 4 is not supported for Python; configure --without-python or use a release tarball])
fi
fi

if test "x$with_python" = xno; then
have_python=no
else
Expand Down
1 change: 0 additions & 1 deletion python/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ endif
##################################################
if MAINTAINER_MODE

SWIG ?= swig
SWIG_VERSION = $(shell $(SWIG) -version | grep Version | awk '{print $$3}')
MEEP_SWIG_SRC = meep.i numpy.i vec.i

Expand Down
1 change: 0 additions & 1 deletion scheme/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ meep_wrap.o: meep_wrap.cxx $(srcdir)/meep-ctl-swig.hpp $(CTLHDRS)

if WITH_LIBCTL
if MAINTAINER_MODE
SWIG ?= swig
meep_wrap.cxx: meep.i meep_op_renames.i meep_enum_renames.i meep_renames.i ctl-io.i meep-ctl-swig.hpp meep_swig_bug_workaround.i $(LIBHDRS)
$(SWIG) -I$(top_srcdir)/src -c++ -guile -o $@ $(srcdir)/meep.i
patch -p0 $@ < $(srcdir)/meep_wrap.patch
Expand Down

0 comments on commit 94ad86b

Please sign in to comment.