Changeset bbeddf in git for m4/gfanlib-check.m4


Ignore:
Timestamp:
Nov 15, 2013, 5:13:23 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
989d6be2dba06d1abec8f5c86bd77f2a001e1e4d
Parents:
1684c331ce908bffa043d3afe97c0a2c4b181d99
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:13:23+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:17:40+01:00
Message:
Fixed BS: gfanlib/cddlib checking/building/embedding

fix: cddlib configure checks
add: static building-in
fix: return code for _mod_init functions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • m4/gfanlib-check.m4

    r1684c3 rbbeddf  
    99[ENABLE_GFANLIB="no"])
    1010
    11 BACKUP_LIBS=$LIBS
     11AC_MSG_CHECKING(whether to build with gfanlib)
    1212
    13 AC_MSG_CHECKING(whether to build with gfanlib)
    1413if test "x$ENABLE_GFANLIB" = xyes; then
    1514 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
    1629 AC_LANG_PUSH(C++)
    17  SAVE_LIBS=$LIBS
    18  LIBS="-lcddgmp $GMP_LIBS $LIBS"
    19 AC_LINK_IFELSE(
    20   [AC_LANG_PROGRAM([#include <cdd/setoper.h>
    21   #include <cdd/cdd.h>],
    22     [dd_set_global_constants()])],
    23   [LIBS="-lcddgmp $SAVE_LIBS"] [CDDGMPLDFLAGS="-lcddgmp"]
    24   [PASSED_ALL_TESTS_FOR_GFANLIB="yes"],
    25   [AC_MSG_WARN([libcddgmp is not installed.])]
    26   [PASSED_ALL_TESTS_FOR_GFANLIB="no"
    27   ]
    28 )
    29 if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then
    30 AC_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.])]
    37   [PASSED_ALL_TESTS_FOR_GFANLIB="no"
    38   ]
    39 )
    40 fi
    41 if test "$PASSED_ALL_TESTS_FOR_GFANLIB" != yes; then
    42 AC_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   ]
    51 )
    52 fi
    53   AC_LANG_POP()
     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)
    5458else
    5559 AC_MSG_RESULT(no)
    56  PASSED_ALL_TESTS_FOR_GFANLIB="no";
     60 PASSED_ALL_TESTS_FOR_GFANLIB="0"
    5761fi
    5862
    59 LIBS=$BACKUP_LIBS
    6063
    61 AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = xyes)
     64AM_CONDITIONAL(HAVE_GFANLIB, test "x$PASSED_ALL_TESTS_FOR_GFANLIB" = x1)
     65AC_DEFINE_UNQUOTED(HAVE_GFANLIB, ${PASSED_ALL_TESTS_FOR_GFANLIB}, [whether gfanlib support is enabled])
    6266
    6367])
Note: See TracChangeset for help on using the changeset viewer.