# temporary beta testing version
VERSION = 1.6.10
TARDIR = 4ti2-$(VERSION)

# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
PRECONFIGURE = mkdir -p swig && autoreconf -vif

VERSION_ = $(shell echo $(VERSION) | sed 's/\./_/g')
URL = https://github.com/4ti2/4ti2/releases/download/Release_$(VERSION_)

ifeq (@ENABLE_STRIP@,yes)
INSTALLTARGET = install-strip
else 
INSTALLTARGET = install
endif

ifeq (@SHARED@,no)
# the default for 4ti2 is to not build shared libraries, but it does, anyway (?)
CONFIGOPTIONS += --disable-shared
else 
CONFIGOPTIONS += --enable-shared
endif

# This is how we control whether to link with libgmp.a or with libgmp.dylib:
# But using it leads to a mysterious linker bug on the Mac:
# BUILDOPTIONS = GMP_LIBS="@LIBS_GMP@" GLPK_LIBS="@LIBS_GLPK@"

# according to the documentation, specifying "no" for this option to configure should prevent GMP from being used,
# but it doesn't
  # --with-gmp={DIR|no}     Use the GMP library installed in DIR. If the
  #                         argument is no, do not use the GMP library; some
  #                         functionality will not be available then.

LICENSEFILES = README
include ../Makefile.library
Makefile: @srcdir@/Makefile.in ; cd ../.. && ./config.status libraries/4ti2/Makefile
# Local Variables:
# compile-command: "make -C $M2BUILDDIR/libraries/4ti2 "
# End:
