AC_INIT
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE(isl, 0.00)
+AM_INIT_AUTOMAKE(isl, 0.04)
+AC_SUBST(versioninfo)
+versioninfo=4:0:0
AC_PROG_CC
AX_CC_MAXOPT
+AX_GCC_WARN_UNUSED_RESULT
AC_PROG_LIBTOOL
+AC_CHECK_PROG(PERL, perl, perl, [])
+AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, [])
+AC_CHECK_PROG(POD2HTML, pod2html, pod2html, [])
+
+AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML")
+
AX_CREATE_STDINT_H(include/isl_stdint.h)
AX_SUBMODULE(gmp,system,system)
CPPFLAGS="$SAVE_CPPFLAGS"
AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue)
-AX_SUBMODULE(polylib,no|system|build,no)
-
-have_polylib=false
-AC_SUBST(POLYLIB_CPPFLAGS)
-AC_SUBST(POLYLIB_LDFLAGS)
-AC_SUBST(POLYLIB_LIBS)
-case "$with_polylib" in
- build)
- polylibs=`echo @polylibs@ | $with_polylib_builddir/config.status --file=-`
- AC_MSG_NOTICE(Configured polylibs: $polylibs)
- isl_cv_polylib=missing
- for bits in $polylibs; do
- if test "$bits" = "libpolylibgmp.la"; then
- isl_cv_polylib=ok
- fi
- done
- if test "$isl_cv_polylib" = "missing"; then
- AC_MSG_ERROR(no gmp polylib configured)
- fi
- POLYLIB_CPPFLAGS="-I$with_polylib_builddir/include -I$polylib_srcdir/include"
- POLYLIB_LIBS="$with_polylib_builddir/libpolylibgmp.la"
- ;;
- system)
- POLYLIB_LIBS="-lpolylibgmp"
- if test "x$with_polylib_prefix" != "x"; then
- POLYLIB_CPPFLAGS="-I$with_polylib_prefix/include"
- POLYLIB_LDFLAGS="-L$with_polylib_prefix/lib"
- fi
- SAVE_CPPFLAGS="$CPPFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$POLYLIB_CPPFLAGS $CPPFLAGS"
- LDFLAGS="$POLYLIB_LDFLAGS $LDFLAGS"
- AC_CHECK_LIB(polylibgmp, PolyhedronTSort,[ true ],[
- AC_MSG_ERROR(Need polylib)
- ])
- CPPFLAGS="$SAVE_CPPFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
- ;;
- no)
- ;;
- *)
- AC_MSG_ERROR(unsupported)
- ;;
-esac
-if test "$with_polylib" != "no"; then
- AC_DEFINE(ISL_POLYLIB,,polylib is available)
- have_polylib=true
-fi
-AM_CONDITIONAL(HAVE_POLYLIB, test x$have_polylib = xtrue)
-
-AX_SUBMODULE(piplib,no|system|build|bundled,no)
+AX_SUBMODULE(piplib,no|system|build,no)
have_piplib=false
AC_SUBST(PIPLIB_CPPFLAGS)
AC_SUBST(PIPLIB_LDFLAGS)
AC_SUBST(PIPLIB_LIBS)
case "$with_piplib" in
- bundled)
- PIPLIB_CPPFLAGS="-I$srcdir/piplib/include"
- isl_configure_args="$isl_configure_args --with-bits=gmp"
- ;;
build)
PIPLIB_CPPFLAGS="-I$piplib_srcdir/include"
PIPLIB_LIBS="$with_piplib_builddir/libpiplibMP.la"
have_piplib=true
fi
AM_CONDITIONAL(HAVE_PIPLIB, test x$have_piplib = xtrue)
-AM_CONDITIONAL(BUNDLED_PIPLIB, test $with_piplib = bundled)
+
+PACKAGE_CFLAGS="-I$prefix/include/isl"
+AX_CREATE_PKGCONFIG_INFO
+
+AX_DETECT_GIT_HEAD
+echo '#define GIT_HEAD_ID "'$GIT_HEAD_ID'"' > gitversion.h
AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_HEADERS(include/isl_libs.h)
+AC_CONFIG_HEADERS(include/isl_config.h)
AC_CONFIG_FILES(Makefile)
-if test $with_piplib = bundled; then
- AC_CONFIG_SUBDIRS(piplib)
-fi
+AC_CONFIG_FILES(doc/Makefile)
AC_CONFIG_COMMANDS_POST([
dnl pass on arguments to subdir configures, but don't
- ac_configure_args="$ac_configure_args $isl_configure_args"
+ dnl add them to config.status
ac_configure_args="$ac_configure_args $isl_configure_args"
])
AC_OUTPUT