3 AM_INIT_AUTOMAKE(bernstein, 0.02)
10 AC_ARG_WITH(default-prefix,
11 AS_HELP_STRING([--with-default-prefix=DIR],
12 [Default installation prefix of optional packages]))
13 if test "${with_default_prefix+set}" = set; then
14 if test "${with_libgmp+set}" != set -a \
15 -f "$with_default_prefix/include/gmp.h"; then
16 with_libgmp=$with_default_prefix
18 if test "${with_polylib+set}" != set -a \
19 -f "$with_default_prefix/include/polylib/polylibgmp.h"; then
20 with_polylib=$with_default_prefix
24 dnl Check for GMP library
25 AC_MSG_CHECKING(whether to use GMP)
27 [ --with-libgmp DIR Location of the GMP Distribution],
28 gmp_package=$withval, gmp_package=yes)
29 if test "x$gmp_package" = "xno"; then
31 AC_MSG_ERROR(Need gmp)
34 if test "x$gmp_package" != "xyes"; then
36 if test ! -d "$GMP_DIR"; then
37 AC_ERROR(Directory given for GMP Distribution is not a directory)
39 CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
40 LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
43 AC_CHECK_HEADER(gmp.h,
44 [AC_CHECK_LIB(gmp,main,
46 [poly_cv_gmpfatal="yes"])],
47 [poly_cv_gmpfatal="yes"])
48 if test "$poly_cv_gmpfatal" = "yes"; then
49 AC_MSG_ERROR([GMP not found])
54 [ --with-polylib=DIR DIR Location of PolyLib],
55 [ echo "Package polylib : $withval" && polylib_package=$withval],
56 [ polylib_package=yes ])
58 if test "$polylib_package" = "no"; then
59 AC_MSG_ERROR(Need polylib)
62 if test "$polylib_package" != "yes"; then
63 CPPFLAGS="-I$polylib_package/include $CPPFLAGS"
64 LDFLAGS="-L$polylib_package/lib $LDFLAGS"
65 LD_LIBRARY_PATH="$polylib_package/lib:$LD_LIBRARY_PATH"
66 export LD_LIBRARY_PATH
69 AC_CHECK_LIB(polylibgmp, PolyhedronTSort,[],[
70 AC_MSG_ERROR(Need polylib)
74 AM_PATH_GINAC(1.3.3, [], [
75 AC_MSG_ERROR(Need GiNaC)
79 AC_CONFIG_HEADERS(config.h)