fieker-DuValspielwiese
Last change
on this file since 2f2b44e was
bbeddf,
checked in by Oleksandr Motsak <motsak@…>, 11 years ago
|
Fixed BS: gfanlib/cddlib checking/building/embedding
fix: cddlib configure checks
add: static building-in
fix: return code for _mod_init functions
|
-
Property mode set to
100644
|
File size:
1.5 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 | |
---|
13 | if test "x$ENABLE_GFANLIB" = xyes; then |
---|
14 | AC_MSG_RESULT(yes) |
---|
15 | |
---|
16 | AC_CHECK_HEADERS([setoper.h cdd/setoper.h cddlib/setoper.h]) |
---|
17 | |
---|
18 | if test "$ac_cv_header_setoper_h" == no -a "$ac_cv_header_cdd_setoper_h" == no -a "$ac_cv_header_cddlib_setoper_h" == no |
---|
19 | then |
---|
20 | AC_MSG_WARN([Error, setoper.h is missing!]) |
---|
21 | fi |
---|
22 | |
---|
23 | AC_MSG_CHECKING([whether libcddgmp is usable]) |
---|
24 | |
---|
25 | BACKUP_LIBS=$LIBS |
---|
26 | |
---|
27 | LIBS="-lcddgmp $GMP_LIBS $LIBS" |
---|
28 | |
---|
29 | AC_LANG_PUSH(C++) |
---|
30 | AC_LINK_IFELSE( |
---|
31 | [ |
---|
32 | AC_LANG_PROGRAM( |
---|
33 | [ |
---|
34 | #ifdef HAVE_SETOPER_H |
---|
35 | # include <setoper.h> |
---|
36 | # include <cdd.h> |
---|
37 | #endif |
---|
38 | #ifdef HAVE_CDD_SETOPER_H |
---|
39 | # include <cdd/setoper.h> |
---|
40 | # include <cdd/cdd.h> |
---|
41 | #endif |
---|
42 | #ifdef HAVE_CDDLIB_SETOPER_H |
---|
43 | # include <cddlib/setoper.h> |
---|
44 | # include <cddlib/cdd.h> |
---|
45 | #endif |
---|
46 | ], [dd_set_global_constants()] ) |
---|
47 | ], |
---|
48 | [PASSED_ALL_TESTS_FOR_GFANLIB="1"] [CDDGMPLDFLAGS="-lcddgmp"], |
---|
49 | [PASSED_ALL_TESTS_FOR_GFANLIB="0"] |
---|
50 | ) |
---|
51 | AC_LANG_POP() |
---|
52 | |
---|
53 | LIBS=$BACKUP_LIBS |
---|
54 | |
---|
55 | AC_MSG_RESULT(no) |
---|
56 | |
---|
57 | AC_SUBST(CDDGMPLDFLAGS) |
---|
58 | else |
---|
59 | AC_MSG_RESULT(no) |
---|
60 | PASSED_ALL_TESTS_FOR_GFANLIB="0" |
---|
61 | fi |
---|
62 | |
---|
63 | |
---|
64 | AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1) |
---|
65 | AC_DEFINE_UNQUOTED(HAVE_GFANLIB, ${PASSED_ALL_TESTS_FOR_GFANLIB}, [whether gfanlib support is enabled]) |
---|
66 | |
---|
67 | ]) |
---|
Note: See
TracBrowser
for help on using the repository browser.