spielwiese
Last change
on this file since d0e888 was
d0e888,
checked in by Hans Schoenemann <hannes@…>, 10 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 | |
---|
3 | AC_DEFUN([SING_CHECK_GFANLIB], |
---|
4 | [ |
---|
5 | |
---|
6 | AC_ARG_ENABLE(gfanlib, |
---|
7 | AS_HELP_STRING([--enable-gfanlib], [Enables gfanlib, a package for basic convex geometry]), |
---|
8 | [ENABLE_GFANLIB="yes"], |
---|
9 | [ENABLE_GFANLIB="no"]) |
---|
10 | |
---|
11 | AC_MSG_CHECKING(whether to build with gfanlib) |
---|
12 | if test "x$ENABLE_GFANLIB" = xyes; then |
---|
13 | AC_MSG_RESULT(yes) |
---|
14 | AC_LANG_PUSH(C++) |
---|
15 | SAVE_LIBS=$LIBS |
---|
16 | LIBS="$LIBS -lcddgmp" |
---|
17 | AC_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 | ) |
---|
27 | if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then |
---|
28 | AC_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 | ) |
---|
38 | fi |
---|
39 | AC_LANG_POP() |
---|
40 | else |
---|
41 | AC_MSG_RESULT(no) |
---|
42 | PASSED_ALL_TESTS_FOR_GFANLIB="no"; |
---|
43 | fi |
---|
44 | |
---|
45 | AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes) |
---|
46 | |
---|
47 | ]) |
---|
Note: See
TracBrowser
for help on using the repository browser.