fieker-DuValspielwiese
Last change
on this file since 69185ce was
69185ce,
checked in by Hans Schoenemann <hannes@…>, 3 years ago
|
update configure stuff
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | AC_DEFUN([SING_CHECK_GMP], [ |
---|
2 | AC_REQUIRE([SING_DEFAULT_CHECKING_PATH]) |
---|
3 | # Check whether --with-gmp was given. |
---|
4 | AC_ARG_WITH([gmp],[AS_HELP_STRING([--with-gmp=path], |
---|
5 | [provide a non-standard location of gmp])], [ |
---|
6 | dnl Given |
---|
7 | if test "$with_gmp" = yes ; then |
---|
8 | GMP_HOME_PATH="DEFAULTS ${DEFAULT_CHECKING_PATH}" |
---|
9 | elif test "$with_gmp" != no ; then |
---|
10 | GMP_HOME_PATH="$with_gmp" |
---|
11 | else |
---|
12 | AC_MSG_ERROR([Use of GNU MP is required, cannot use --without-gmp]) |
---|
13 | fi |
---|
14 | ], [ |
---|
15 | dnl Not given |
---|
16 | GMP_HOME_PATH="DEFAULTS ${DEFAULT_CHECKING_PATH}" |
---|
17 | ]) |
---|
18 | |
---|
19 | BACKUP_CFLAGS=${CFLAGS} |
---|
20 | BACKUP_LIBS=${LIBS} |
---|
21 | |
---|
22 | gmp_found=no |
---|
23 | for GMP_HOME in ${GMP_HOME_PATH} |
---|
24 | do |
---|
25 | if test "$GMP_HOME" != "DEFAULTS"; then |
---|
26 | GMP_CPPFLAGS="-I${GMP_HOME}/include" |
---|
27 | GMP_LIBS="-L${GMP_HOME}/lib -Wl,-rpath,${GMP_HOME}/lib -lgmp" |
---|
28 | else |
---|
29 | GMP_CPPFLAGS="" |
---|
30 | GMP_LIBS="-lgmp" |
---|
31 | fi |
---|
32 | CFLAGS="${GMP_CPPFLAGS} ${BACKUP_CFLAGS}" |
---|
33 | LIBS=" ${GMP_LIBS} ${BACKUP_LIBS}" |
---|
34 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h> |
---|
35 | ]], [[mpz_t a; mpz_init (a);]])],[ |
---|
36 | gmp_found=yes |
---|
37 | break |
---|
38 | ],[]) |
---|
39 | done |
---|
40 | if test "$gmp_found" != yes; then |
---|
41 | AC_MSG_ERROR([GNU MP not found]) |
---|
42 | fi |
---|
43 | |
---|
44 | AC_SUBST(GMP_CPPFLAGS) |
---|
45 | AC_SUBST(GMP_LIBS) |
---|
46 | |
---|
47 | ]) |
---|
Note: See
TracBrowser
for help on using the repository browser.