source: git/m4/gfanlib-check.m4 @ 2ea781

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