Changeset c6b4e50 in git


Ignore:
Timestamp:
Feb 20, 2020, 12:06:32 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
286859c2190d45687e4046b3c8bbcd22ec9fd860
Parents:
cce62fd4f828ad04b6f9fe5a21640b663ff10d926b44a806d602e8ec6446a900742a49e24adb1277
Message:
Merge branch 'kiwifb-flint_detection' into spielwiese
File:
1 edited

Legend:

Unmodified
Added
Removed
  • m4/flint-check.m4

    rcce62fd rc6b4e50  
    1414AC_DEFUN([LB_CHECK_FLINT],
    1515[
    16 DEFAULT_CHECKING_PATH="/usr /usr/local /sw /opt/local"
     16DEFAULT_CHECKING_PATH="/sw /opt/local"
    1717
    1818AC_ARG_WITH(flint,
     
    3535BACKUP_LIBS=${LIBS}
    3636
    37 if test -n "$FLINT_HOME_PATH"; then
    38 AC_MSG_CHECKING(for FLINT >= $min_flint_version)
     37AC_LANG_PUSH([C])
     38
     39flint_found="no"
     40dnl check for system installed libraries if FLINT_HOME_PATH is the default
     41if test "$FLINT_HOME_PATH" = "$DEFAULT_CHECKING_PATH" ; then
     42        FLINT_CFLAGS=""
     43        FLINT_LIBS="-lflint -lmpfr"
     44
     45        # we suppose that mpfr and mpir to be in the same place or available by default
     46        CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"
     47        LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
     48
     49        AC_CHECK_HEADER([flint/fmpz.h],
     50                [AC_CHECK_LIB(flint,fmpz_init,
     51                        [flint_found="yes"],
     52                        [],
     53                        [])],
     54                [],
     55                [])
    3956fi
    4057
    41 AC_LANG_PUSH([C])
     58dnl if flint was not previously found, search FLINT_HOME_PATH
     59if test "x$flint_found" = "xno" ; then
     60        for FLINT_HOME in ${FLINT_HOME_PATH}
     61        do
     62                if test -r "$FLINT_HOME/include/flint/fmpz.h"; then
    4263
    43 for FLINT_HOME in ${FLINT_HOME_PATH}
    44  do
    45  if test -r "$FLINT_HOME/include/flint/fmpz.h"; then
    46 
    47         FLINT_CFLAGS="-I${FLINT_HOME}/include/"
    48         FLINT_LIBS="-L${FLINT_HOME}/lib -lflint -lmpfr"
     64                FLINT_CFLAGS="-I${FLINT_HOME}/include/"
     65                FLINT_LIBS="-L${FLINT_HOME}/lib -lflint -lmpfr"
    4966
    5067        # we suppose that mpfr and mpir to be in the same place or available by default
    51         CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
    52         LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
     68                CFLAGS="${BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"
     69                LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUPLIBS}"
    5370
    54         AC_CHECK_LIB(flint,fmpz_init,
    55         [flint_found="yes"],
    56         [flint_found="mo"],
    57         []
    58         )
    59 else
    60         flint_found="no"
     71                AC_CHECK_LIB(flint,fmpz_init,
     72                [flint_found="yes"],
     73                [],
     74                []
     75                )
     76                fi
     77        done
    6178fi
    62 done
     79
    6380AC_LANG_POP([C])
    6481
     
    6784#unset LD_LIBRARY_PATH
    6885
     86AC_MSG_CHECKING(for FLINT)
    6987
    7088if test "x$flint_found" = "xyes" ; then
Note: See TracChangeset for help on using the changeset viewer.