2 AM_INIT_AUTOMAKE(bernstein, 0.01)
9 dnl Check for GMP library
10 AC_MSG_CHECKING(whether to use GMP)
12 [ --with-libgmp DIR Location of the GMP Distribution],
13 gmp_package=$withval, gmp_package=yes)
14 if test "x$gmp_package" = "xno"; then
16 AC_MSG_ERROR(Need gmp)
19 if test "x$gmp_package" != "xyes"; then
21 if test ! -d "$GMP_DIR"; then
22 AC_ERROR(Directory given for GMP Distribution is not a directory)
24 CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
25 LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
28 AC_CHECK_HEADER(gmp.h,
29 [AC_CHECK_LIB(gmp,main,
31 [poly_cv_gmpfatal="yes"])],
32 [poly_cv_gmpfatal="yes"])
33 if test "$poly_cv_gmpfatal" = "yes"; then
34 AC_MSG_ERROR([GMP not found])
39 [ --with-polylib=DIR DIR Location of PolyLib],
40 [ echo "Package polylib : $withval" && polylib_package=$withval],
41 [ polylib_package=yes ])
43 if test "$polylib_package" = "no"; then
44 AC_MSG_ERROR(Need polylib)
47 if test "$polylib_package" != "yes"; then
48 CPPFLAGS="-I$polylib_package/include $CPPFLAGS"
49 LDFLAGS="-L$polylib_package/lib $LDFLAGS"
50 LD_LIBRARY_PATH="$polylib_package/lib:$LD_LIBRARY_PATH"
51 export LD_LIBRARY_PATH
54 AC_CHECK_LIB(polylibgmp, PolyhedronTSort,[],[
55 AC_MSG_ERROR(Need polylib)
58 AC_CONFIG_HEADERS(config.h)