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

spielwiese
Last change on this file since ba5e9e was d0e888, checked in by Hans Schoenemann <hannes@…>, 11 years ago
fix: libcddgmp may be a c++ library (on ubuntu)
  • Property mode set to 100644
File size: 1.2 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="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)
14 AC_LANG_PUSH(C++)
15 SAVE_LIBS=$LIBS
16 LIBS="$LIBS -lcddgmp"
17AC_LINK_IFELSE(
18  [AC_LANG_PROGRAM([#include <cdd/setoper.h>
19  #include <cdd/cdd.h>],
20    [dd_set_global_constants()])],
21  [LIBS="$SAVE_LIBS -lcddgmp"] [CDDGMPLDFLAGS="-lcddgmp"]
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.])]
35  [PASSED_ALL_TESTS_FOR_GFANLIB="no";
36  exit 1]
37)
38fi
39  AC_LANG_POP()
40else
41 AC_MSG_RESULT(no)
42 PASSED_ALL_TESTS_FOR_GFANLIB="no";
43fi
44
45AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes)
46
47])
Note: See TracBrowser for help on using the repository browser.