source: git/m4/gfanlib-check.m4 @ 7615a7

spielwiese
Last change on this file since 7615a7 was 7615a7, checked in by Hans Schoenemann <hannes@…>, 3 years ago
libcddgmp: AC_MSG_ERROR ->AC_MSG_WARN
  • Property mode set to 100644
File size: 1.4 KB
Line 
1# gfanlib.m4
2
3AC_DEFUN([SING_CHECK_GFANLIB],
4[
5
6AC_ARG_ENABLE(gfanlib,
7AS_HELP_STRING([--enable-gfanlib], [Enables gfanlib, a package for basic convex geometry]),
8[ENABLE_GFANLIB="$enableval"],
9[ENABLE_GFANLIB=""])
10
11AC_MSG_CHECKING(whether to check for gfanlib)
12PASSED_ALL_TESTS_FOR_GFANLIB="0"
13
14if test "x$ENABLE_GFANLIB" = "xno"; then
15  AC_MSG_RESULT([no])
16else
17  AC_MSG_RESULT([yes])
18
19  AC_CHECK_HEADERS([setoper.h cdd/setoper.h cddlib/setoper.h])
20
21  if test "x$ac_cv_header_setoper_h" = xno -a "x$ac_cv_header_cdd_setoper_h" = xno -a "x$ac_cv_header_cddlib_setoper_h" = xno
22  then
23    if test "x$ENABLE_GFANLIB" = "xyes"; then
24      AC_MSG_ERROR([Error, setoper.h is missing!])
25    fi
26  else
27
28    # Check whether --with-gmp was given.
29    AC_REQUIRE([SING_CHECK_GMP])
30
31    AC_LANG_PUSH(C++)
32    AC_SEARCH_LIBS([dd_free_global_constants],[cddgmp],
33       [PASSED_ALL_TESTS_FOR_GFANLIB="1"
34        CDDGMPLDFLAGS="-lcddgmp $GMP_LIBS"
35        CDDGMPCPPFLAGS="-DGMPRATIONAL"],
36       [if test "x$ENABLE_GFANLIB" = "xyes"; then
37         AC_MSG_WARN("could not determine if libcddgmp is usable")
38        fi
39       ],
40       [$GMP_LIBS])
41    AC_LANG_POP()
42
43    AC_SUBST(CDDGMPCPPFLAGS)
44    AC_SUBST(CDDGMPLDFLAGS)
45  fi
46fi
47
48AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1)
49AC_DEFINE_UNQUOTED(HAVE_GFANLIB, ${PASSED_ALL_TESTS_FOR_GFANLIB}, [whether gfanlib support is enabled])
50
51])
Note: See TracBrowser for help on using the repository browser.