dpoly: add some documentation
[barvinok.git] / bernstein / configure.in
blobff13ee69b3f41d13f37fc5920e1e36ebf6ca2d52
1 AC_INIT
2 AC_CONFIG_AUX_DIR(.)
3 AM_INIT_AUTOMAKE(bernstein, 0.01)
4 AC_SUBST(versioninfo)
5 versioninfo=0:0:0
7 AC_CANONICAL_HOST
8 AC_PROG_LIBTOOL
10 dnl Check for GMP library
11 AC_MSG_CHECKING(whether to use GMP)
12 AC_ARG_WITH(libgmp, 
13         [  --with-libgmp           DIR Location of the GMP Distribution], 
14         gmp_package=$withval, gmp_package=yes)
15 if test "x$gmp_package" = "xno"; then
16         AC_MSG_RESULT(no)
17         AC_MSG_ERROR(Need gmp)
18 else
19         AC_MSG_RESULT(yes)
20         if test "x$gmp_package" != "xyes"; then
21             GMP_DIR=$gmp_package
22             if test ! -d "$GMP_DIR"; then
23                 AC_ERROR(Directory given for GMP Distribution is not a directory)
24             fi
25             CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
26             LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
27         fi
28         poly_cv_gmpfatal="no"
29         AC_CHECK_HEADER(gmp.h,
30                 [AC_CHECK_LIB(gmp,main,
31                     [],
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])
36         fi
39 AC_ARG_WITH(polylib,
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)
59 AC_LANG_PUSH(C++)
60 AM_PATH_GINAC(1.3.3, [], [
61     AC_MSG_ERROR(Need GiNaC)
63 AC_LANG_POP
65 AC_CONFIG_HEADERS(config.h)
66 AC_OUTPUT(Makefile)