Commit 973e93d4 authored by Antoine Lucas's avatar Antoine Lucas
Browse files

remove path in configure script

parent 57aac7c0
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/biginteger.cc)
AC_ARG_WITH([gmp-include],
AC_HELP_STRING([--with-gmp-include=INCLUDE_PATH],
[the location of GMP header files]),
[gmp_include_path=$withval])
if test -n "$gmp_include_path" ; then
GMP_CPPFLAGS="-I${gmp_include_path}"
elif test -n "${gmp_INCLUDE}" ; then
GMP_CPPFLAGS="-I${gmp_INCLUDE}"
fi
dnl Ditto for a library path environment variable >> gmp_LDFLAGS <<
AC_ARG_WITH([gmp-lib],
AC_HELP_STRING([--with-gmp-lib=LIB_PATH],
[the location of GMP libraries]),
[gmp_lib_path=$withval])
if test -n "$gmp_lib_path" ; then
GMP_LDFLAGS="-L$gmp_lib_path ${LDFLAGS}"
elif test -n "${gmp_LDFLAGS}" ; then
GMP_LDFLAGS="-L${gmp_LDFLAGS} ${LDFLAGS}"
fi
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
......@@ -12,21 +36,29 @@ AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
dnl People often put stuff in /usr/local.
if test /usr/local != "$exec_prefix" -a /usr/local != "$prefix" ; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
dnl Check for lib gmp
AC_CHECK_LIB(gmp,__gmpz_ui_sub,, [AC_MSG_ERROR([GNU MP not found, or not 4.1.4 or up, see http://gmplib.org])])
dnl use the include and lib
CPPFLAGS="${CPPFLAGS} ${MPFR_CPPFLAGS}"
LDFLAGS="${LDFLAGS} ${MPFR_LDFLAGS}"
PKG_CPPFLAGS=$CPPFLAGS
PKG_CFLAGS=$CFLAGS
PKG_LDFLAGS=$LDFLAGS
PKG_CPPFLAGS="${PKG_CPPFLAGS} -I/usr/local/include/ "
PKG_LIBS="${PKG_LIBS} -L/usr/local/lib/ -lgmp"
dnl Check for lib gmp
AC_CHECK_HEADER([gmp.h], ,
[AC_MSG_ERROR([Header file gmp.h not found; maybe use --with-gmp-include=INCLUDE_PATH])])
AC_CHECK_LIB(gmp,__gmpz_ui_sub,, [AC_MSG_ERROR([GNU MP not found, or not 4.1.4 or up, see http://gmplib.org])])
AC_SUBST(PKG_CPPFLAGS)
AC_SUBST(PKG_LIBS)
AC_SUBST(PKG_CFLAGS)
AC_SUBST(PKG_LDFLAGS)
AC_CONFIG_FILES(src/Makevars)
AC_OUTPUT
AC_OUTPUT(src/Makevars)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment