diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-02-01 09:58:43 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-02-01 09:58:43 +0000 |
commit | 7edadf27b2c3864e5350c7ef98dfd5985034b6ae (patch) | |
tree | f45c664198b80ce841a3310a29fa37507623a534 /configure.in | |
parent | c7d19c7a085d61f608276f249cb4dd44dd7abfec (diff) | |
download | mpfr-7edadf27b2c3864e5350c7ef98dfd5985034b6ae.tar.gz |
Add AC_COPYRIGHT
Clean up AC_ARG_ENABLE handling
Add `--enable-logging` option.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3252 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 104 |
1 files changed, 68 insertions, 36 deletions
diff --git a/configure.in b/configure.in index c72033e18..8f6154b48 100644 --- a/configure.in +++ b/configure.in @@ -1,46 +1,78 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT -mpfr_version=`cat $srcdir/VERSION` -AM_INIT_AUTOMAKE(mpfr, $mpfr_version, [no-define]) +AC_COPYRIGHT([ +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software +Foundation, Inc. -AC_ARG_WITH(gmp_include, [ --with-gmp-include=DIR GMP include directory ], with_gmp_include=$withval) -AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=DIR GMP lib directory ], with_gmp_lib=$withval) -AC_ARG_WITH(gmp_build, [ --with-gmp-build=DIR GMP source directory], with_gmp_include=$withval/ with_gmp_lib=$withval/.libs) -AC_ARG_WITH(gmp, [ --with-gmp=DIR GMP install directory ], with_gmp_include=$withval/include with_gmp_lib=$withval/lib) +This file is part of the MPFR Library. +The MPFR Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation; either version 2.1 of the License, or (at +your option) any later version. -AC_ARG_WITH(irix64, [ --with-irix64=on/off Irix 32/64 bits support ], with_irix64=$withval, with_irix64=off) +The MPFR Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. -AC_ARG_ENABLE(cache, [ --disable-cache Disable the cache of the global const ], , [enable_cache=yes]) +You should have received a copy of the GNU Lesser General Public License +along with the MPFR Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111-1307, USA. +]) -AC_ARG_ENABLE(assert, -AC_HELP_STRING(--enable-assert,enable ASSERT checking [[default=no]]), -[case $enableval in -yes|no|full) ;; -*) AC_MSG_ERROR([bad value $enableval for --enable-assert: yes, no or full]) ;; -esac], -[enable_assert=no]) - -if test "$enable_assert" = "yes"; then - AC_DEFINE([WANT_ASSERT],1) -fi -if test "$enable_assert" = "full"; then - AC_DEFINE([WANT_ASSERT],1) - AC_DEFINE([CHECK_AGAINST_SUB1],1) -fi +AC_INIT -if test "$enable_cache" = "no"; then - AC_DEFINE([MPFR_NO_CACHE],1) -fi +mpfr_version=`cat $srcdir/VERSION` +AM_INIT_AUTOMAKE(mpfr, $mpfr_version, [no-define]) + +dnl Extra arguments to configure +AC_ARG_WITH(gmp_include, + [ --with-gmp-include=DIR GMP include directory ], + with_gmp_include=$withval) +AC_ARG_WITH(gmp_lib, + [ --with-gmp-lib=DIR GMP lib directory ], + with_gmp_lib=$withval) +AC_ARG_WITH(gmp_build, + [ --with-gmp-build=DIR GMP source directory], + with_gmp_include=$withval/ with_gmp_lib=$withval/.libs) +AC_ARG_WITH(gmp, + [ --with-gmp=DIR GMP install directory ], + with_gmp_include=$withval/include with_gmp_lib=$withval/lib) +AC_ARG_WITH(irix64, + [ --with-irix64=on/off Irix 32/64 bits support ], + with_irix64=$withval, with_irix64=off) +AC_ARG_ENABLE(cache, + [ --disable-cache Disable the cache of the global const ], + [ case $enableval in + yes) ;; + no) AC_DEFINE([MPFR_NO_CACHE],1) ;; + *) AC_MSG_ERROR([bad value for --enable-cache: yes or no]) ;; + esac]) +AC_ARG_ENABLE(assert, + [ --enable-assert enable ASSERT checking [[default=no]]], + [ case $enableval in + yes) AC_DEFINE([WANT_ASSERT],1) ;; + no) ;; + full) AC_DEFINE([WANT_ASSERT],1) AC_DEFINE([CHECK_AGAINST_SUB1],1) ;; + *) AC_MSG_ERROR([bad value for --enable-assert: yes, no or full]) ;; + esac]) +AC_ARG_ENABLE(logging, + [ --enable-logging enable MPFR Logging [[default=no]]], + [ case $enableval in + yes) AC_DEFINE([MPFR_USE_LOGGING],1) ;; + no) ;; + *) AC_MSG_ERROR([bad value for --enable-logging: yes or no]) ;; + esac]) + test_CFLAGS=${CFLAGS+set} dnl Same as in gmp acinclude.m4, though currently we're using the normal dnl config.sub, so the additional exact cpu types don't arise. -define(X86_PATTERN, -[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*]]) +dnl define(X86_PATTERN, [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*]]) dnl Checks for programs. AC_PROG_CC @@ -86,7 +118,7 @@ case $OS_TYPE in ;; esac -dnl Tests concerning the include directories. +dnl Update CPPFLAGS. if test -d "$with_gmp_include"; then CPPFLAGS="$CPPFLAGS -I$with_gmp_include" else @@ -145,12 +177,12 @@ default target architecture may be different, hence the error.])], ],[AC_MSG_RESULT(no) AC_FUNC_ALLOCA ]) -# Recent autoconf creates AC_DEFINEs of PACKAGE_VERSION etc, unfortunately -# those -D defines in $DEFS conflict with the same defines in config.h from -# GMP. Unless or until autoconf gives us a better way for two closely -# related packages to cooperate, use this hack to get rid of them from $DEFS -# here. -# +dnl Recent autoconf creates AC_DEFINEs of PACKAGE_VERSION etc, unfortunately +dnl those -D defines in $DEFS conflict with the same defines in config.h from +dnl GMP. Unless or until autoconf gives us a better way for two closely +dnl related packages to cooperate, use this hack to get rid of them from $DEFS +dnl here. +dnl if test -f confdefs.h; then sed '/#define PACKAGE_/d' <confdefs.h >confdefs.tmp mv confdefs.tmp confdefs.h |