source: git/m4/gfanlib-check.m4 @ aa6c9cc

spielwiese
Last change on this file since aa6c9cc was aa6c9cc, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Fix BS problem of gfanlib handling
  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[81384b]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="yes"],
9[ENABLE_GFANLIB="no"])
10
11AC_MSG_CHECKING(whether to build with gfanlib)
12if test "x$ENABLE_GFANLIB" = xyes; then
13 AC_MSG_RESULT(yes)
[d0e888]14 AC_LANG_PUSH(C++)
15 SAVE_LIBS=$LIBS
[b41713]16 LIBS="-lcddgmp $GMP_LIBS $LIBS"
[d0e888]17AC_LINK_IFELSE(
18  [AC_LANG_PROGRAM([#include <cdd/setoper.h>
19  #include <cdd/cdd.h>],
20    [dd_set_global_constants()])],
[b41713]21  [LIBS="-lcddgmp $SAVE_LIBS"] [CDDGMPLDFLAGS="-lcddgmp"]
[d0e888]22  [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
23  [AC_MSG_WARN([libcddgmp is not installed.])]
24  [PASSED_ALL_TESTS_FOR_GFANLIB="no"
25  ]
26)
27if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then
28AC_LINK_IFELSE(
29  [AC_LANG_PROGRAM([#include <setoper.h>
30  #include "cdd.h"],
31    [dd_set_global_constants()])],
32  [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"]
33  [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
34  [AC_MSG_WARN([libcddgmp is not installed.])]
[24aeb0f]35  [PASSED_ALL_TESTS_FOR_GFANLIB="no"
36  ]
37)
38fi
39if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then
40AC_LINK_IFELSE(
41  [AC_LANG_PROGRAM([#include <cddlib/setoper.h>
42  #include "cddlib/cdd.h"],
43    [dd_set_global_constants()])],
44  [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"]
45  [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
46  [AC_MSG_WARN([libcddgmp is not installed.])]
47  [PASSED_ALL_TESTS_FOR_GFANLIB="no"
48  ]
[d0e888]49)
50fi
51  AC_LANG_POP()
[81384b]52else
53 AC_MSG_RESULT(no)
[47e8b04]54 PASSED_ALL_TESTS_FOR_GFANLIB="no";
[81384b]55fi
56
[aa6c9cc]57LIBS=$SAVE_LIBS
58
[47e8b04]59AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes)
[81384b]60
61])
Note: See TracBrowser for help on using the repository browser.