3 AM_INIT_AUTOMAKE(bernstein, 0.01)
10 dnl Check for GMP library
11 AC_MSG_CHECKING(whether to use GMP)
13 [ --with-libgmp DIR Location of the GMP Distribution],
14 gmp_package=$withval, gmp_package=yes)
15 if test "x$gmp_package" = "xno"; then
17 AC_MSG_ERROR(Need gmp)
20 if test "x$gmp_package" != "xyes"; then
22 if test ! -d "$GMP_DIR"; then
23 AC_ERROR(Directory given for GMP Distribution is not a directory)
25 CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
26 LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
29 AC_CHECK_HEADER(gmp.h,
30 [AC_CHECK_LIB(gmp,main,
32 [poly_cv_gmpfatal="yes"])],
33 [poly_cv_gmpfatal="yes"])
34 if test "$poly_cv_gmpfatal" = "yes"; then
35 AC_MSG_ERROR([GMP not found])
40 [ --with-polylib=DIR DIR Location of PolyLib],
41 [ echo "Package polylib : $withval" && polylib_package=$withval],
42 [ polylib_package=yes ])
44 if test "$polylib_package" = "no"; then
45 AC_MSG_ERROR(Need polylib)
48 if test "$polylib_package" != "yes"; then
49 CPPFLAGS="-I$polylib_package/include $CPPFLAGS"
50 LDFLAGS="-L$polylib_package/lib $LDFLAGS"
51 LD_LIBRARY_PATH="$polylib_package/lib:$LD_LIBRARY_PATH"
52 export LD_LIBRARY_PATH
55 AC_CHECK_LIB(polylibgmp, PolyhedronTSort,[],[
56 AC_MSG_ERROR(Need polylib)
60 AM_PATH_GINAC(1.3.3, [], [
61 AC_MSG_ERROR(Need GiNaC)
65 AC_CONFIG_HEADERS(config.h)