Changeset d42570 in git
- Timestamp:
- Apr 4, 2021, 5:18:58 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 03514358a007bf6bb923bc7b510ec15fb877158b03e1a6b2f2adb73ea1fb4db1dc3cb7b91c092e242151c5ebd7e3a9fb9ce46ab1567a1e0db68f4e5168efee280d28d45c36fe198205a93c29e0641ea8
- Parents:
- a6066346d52c8c0689e6c1366c1a4d6badfcb3c11e09dec2091147319c529a7dc8c0acdfd137f5d7
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-04-04 17:18:58+02:00
- git-committer:
- GitHub <noreply@github.com>2021-04-04 17:18:58+02:00
- Location:
- m4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
m4/flint-check.m4
ra60663 rd42570 44 44 45 45 # we suppose that mpfr and mpir to be in the same place or available by default 46 CFLAGS=" ${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"46 CFLAGS=" ${GMP_CPPFLAGS} ${BACKUP_CFLAGS}" 47 47 LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" 48 48 49 AC_CHECK_HEADER([flint/fmpz.h], 50 [AC_CHECK_LIB(flint,fmpz_init, 51 [flint_found="yes"], 52 [], 53 [])], 54 [], 55 []) 49 AC_TRY_LINK([#include <flint/fmpz.h> 50 ], 51 [fmpz_t x; fmpz_init(x);], [ 52 flint_found="yes" 53 ]) 56 54 fi 57 55 … … 60 58 for FLINT_HOME in ${FLINT_HOME_PATH} 61 59 do 62 if test -r "$FLINT_HOME/include/flint/fmpz.h"; then63 60 64 61 FLINT_CFLAGS="-I${FLINT_HOME}/include/" … … 66 63 67 64 # we suppose that mpfr and mpir to be in the same place or available by default 68 CFLAGS="${ BACKUP_CFLAGS} ${FLINT_CFLAGS} ${GMP_CPPFLAGS}"65 CFLAGS="${FLINT_CFLAGS} ${GMP_CPPFLAGS} ${BACKUP_CFLAGS}" 69 66 LIBS="${FLINT_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" 70 67 71 AC_CHECK_LIB(flint,fmpz_init, 72 [flint_found="yes"], 73 [], 74 [] 75 ) 76 if test "x$flint_found" = "xyes" ; then 77 break 78 fi 79 fi 68 AC_TRY_LINK([#include <flint/fmpz.h> 69 ], 70 [fmpz_t x; fmpz_init(x);], [ 71 flint_found="yes" 72 break 73 ]) 80 74 done 81 75 fi -
m4/gmp-check.m4
ra60663 rd42570 1 1 AC_DEFUN([SING_CHECK_GMP], [ 2 AC_REQUIRE([SING_DEFAULT_CHECKING_PATH]) 2 3 # Check whether --with-gmp was given. 3 4 AC_ARG_WITH([gmp],[AS_HELP_STRING([--with-gmp=path], 4 [provide a non-standard location of gmp])]) 5 AC_REQUIRE([SING_DEFAULT_CHECKING_PATH]) 6 GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" 5 [provide a non-standard location of gmp])], [ 6 dnl Given 7 7 if test "$with_gmp" = yes ; then 8 8 GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" 9 9 elif test "$with_gmp" != no ; then 10 10 GMP_HOME_PATH="$with_gmp" 11 else 12 AC_MSG_ERROR([Use of GNU MP is required, cannot use --without-gmp]) 11 13 fi 14 ], [ 15 dnl Not given 16 GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}" 17 ]) 12 18 13 19 BACKUP_CFLAGS=${CFLAGS} 14 20 BACKUP_LIBS=${LIBS} 15 21 22 gmp_found=no 16 23 for GMP_HOME in ${GMP_HOME_PATH} 17 24 do 18 if test "x$GMP_HOME" != "x/usr"; then 19 if test -e ${GMP_HOME}/include/gmp.h; then 25 if test "x$GMP_HOME" != "x/usr"; then 20 26 GMP_CPPFLAGS="-I${GMP_HOME}/include" 21 27 GMP_LIBS="-L${GMP_HOME}/lib -Wl,-rpath,${GMP_HOME}/lib -lgmp" 22 break 28 CFLAGS="${GMP_CPPFLAGS} ${BACKUP_CFLAGS}" 29 LIBS=" ${GMP_LIBS} ${BACKUP_LIBS}" 30 else 31 GMP_CPPFLAGS="" 32 GMP_LIBS="-lgmp" 23 33 fi 24 fi 34 AC_TRY_LINK([#include <gmp.h> 35 ], 36 [mpz_t a; mpz_init (a);], [ 37 gmp_found=yes 38 ]) 25 39 done 26 if test -z "${GMP_LIBS}" 27 then 28 GMP_LIBS="-lgmp" 40 if test "$gmp_found" != yes; then 41 AC_MSG_ERROR([GNU MP not found]) 29 42 fi 30 31 CFLAGS="${BACKUP_CFLAGS} ${GMP_CPPFLAGS}"32 LIBS=" ${GMP_LIBS} ${BACKUP_LIBS}"33 43 34 44 AC_SUBST(GMP_CPPFLAGS) 35 45 AC_SUBST(GMP_LIBS) 36 46 37 AC_CHECK_HEADERS([gmp.h], ,[AC_MSG_ERROR([GNU MP not found])])38 AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP not found])])39 40 47 ]) -
m4/ntl-check.m4
ra60663 rd42570 50 50 for NTL_HOME in ${NTL_HOME_PATH} 51 51 do 52 if test -r "$NTL_HOME/include/NTL/ZZ.h"; then53 54 52 if test "x$NTL_HOME" != "x/usr"; then 55 if test -e $NTL_HOME/include/NTL/mat_ZZ.h; then56 53 NTL_CPPFLAGS="-I${NTL_HOME}/include" 57 54 NTL_LIBS="-L${NTL_HOME}/lib -lntl" 58 fi59 55 else 60 56 NTL_CPPFLAGS="" 61 57 NTL_LIBS="-lntl" 62 58 fi 63 ### CFLAGS="${BACKUP_CFLAGS} ${NTL_CPPFLAGS} ${GMP_CPPFLAGS}" 64 CXXFLAGS="${BACKUP_CXXFLAGS} ${NTL_CPPFLAGS} ${GMP_CPPFLAGS}" 59 CXXFLAGS="${NTL_CPPFLAGS} ${GMP_CPPFLAGS} ${BACKUP_CXXFLAGS}" 65 60 LIBS="${NTL_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" 66 61 … … 103 98 NTL_LIBS="-lntl" 104 99 fi 105 ### CFLAGS="${BACKUP_CFLAGS} ${NTL_CPPFLAGS} ${GMP_CPPFLAGS}" 106 CXXFLAGS="${BACKUP_CXXFLAGS} ${NTL_CPPFLAGS} ${GMP_CPPFLAGS}" 107 LIBS="${BACKUP_LIBS} ${NTL_LIBS} ${GMP_LIBS}" 100 CXXFLAGS="${NTL_CPPFLAGS} ${BACKUP_CXXFLAGS} ${GMP_CPPFLAGS}" 101 LIBS="${NTL_LIBS} ${GMP_LIBS} ${BACKUP_LIBS}" 108 102 109 103 AC_TRY_LINK( … … 137 131 unset NTL_LIBS 138 132 ]) 139 else140 ntl_found="no"141 fi142 133 done 143 134
Note: See TracChangeset
for help on using the changeset viewer.