remove a few duplicate definitions of MAXRAYS
[barvinok.git] / bernstein / configure.in
blob7adaef842c3976474c944fd69c59c90fff2c42f1
1 AC_INIT
2 AM_INIT_AUTOMAKE(bernstein, 0.01)
3 AC_SUBST(versioninfo)
4 versioninfo=0:0:0
6 AC_CANONICAL_HOST
7 AC_PROG_LIBTOOL
9 dnl Check for GMP library
10 AC_MSG_CHECKING(whether to use GMP)
11 AC_ARG_WITH(libgmp, 
12         [  --with-libgmp           DIR Location of the GMP Distribution], 
13         gmp_package=$withval, gmp_package=yes)
14 if test "x$gmp_package" = "xno"; then
15         AC_MSG_RESULT(no)
16         AC_MSG_ERROR(Need gmp)
17 else
18         AC_MSG_RESULT(yes)
19         if test "x$gmp_package" != "xyes"; then
20             GMP_DIR=$gmp_package
21             if test ! -d "$GMP_DIR"; then
22                 AC_ERROR(Directory given for GMP Distribution is not a directory)
23             fi
24             CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
25             LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
26         fi
27         poly_cv_gmpfatal="no"
28         AC_CHECK_HEADER(gmp.h,
29                 [AC_CHECK_LIB(gmp,main,
30                     [],
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])
35         fi
38 AC_ARG_WITH(polylib,
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)
59 AC_OUTPUT(Makefile)