Changeset 9af8a63 in git


Ignore:
Timestamp:
May 10, 2011, 12:38:31 PM (12 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
7d73857bd54e9bc8480c720d2a0c39dae20a94ed
Parents:
a1176850d8bc3768dff97fab8beb14e098171bf7
git-author:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-05-10 12:38:31+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:40+01:00
Message:
invoke the macros to check for gmp and ntl in factory/configure.in
- do not require a minimum version number in gmp-check.m4 and ntl-check.m4
- require minimum version 3.1.1 in invocation of gmp-check in libpolys
- ntl-check.m4 now checks even without --with-ntl passed to ./configure
- ntl-check.m4 now uses C++ to compile test programs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • factory/GNUmakefile.in

    ra11768 r9af8a63  
    6767#
    6868CFLAGS =        @CFLAGS@
    69 CPPFLAGS =      @CPPFLAGS@
     69CPPFLAGS =      @CPPFLAGS@ @GMP_CFLAGS@ @NTL_CFLAGS@
    7070CXXFLAGS =      @CXXFLAGS@
    7171DEFS =          @DEFS@
    7272LDFLAGS =       @LDFLAGS@
    73 LIBS =          @LIBS@
     73LIBS =          @LIBS@ @GMP_LIBS@ @NTL_LIBS@
    7474
    7575ARFLAGS =       @ARFLAGS@
  • factory/configure.in

    ra11768 r9af8a63  
    1515AC_REVISION($Id$)
    1616AC_INIT(canonicalform.cc)
     17AC_CONFIG_MACRO_DIR([../m4])
    1718AC_CONFIG_HEADER(config.h)
    1819AC_CONFIG_AUX_DIR(bin)
     
    4748  omalloc,
    4849  [  --with-omalloc           build for use with omalloc])
    49 AC_ARG_WITH(
    50   gmp,
    51   [  --with-gmp(=<gmp_path>)
    52                           specify where to find gmp library.])
    5350
    5451AC_ARG_WITH(
     
    5754  ,
    5855  with_Singular=no)
    59 
    60 AC_ARG_WITH(
    61   NTL,
    62   [  --with-NTL              build for use with NTL.],
    63   with_NTL=yes,
    64   )
    65 
    66 AC_ARG_ENABLE(
    67   NTL,
    68   [  --enable-NTL              build for use with NTL.],
    69   with_NTL=yes,
    70   )
    7156
    7257AC_ARG_ENABLE(
     
    11297  ,
    11398  enable_debugoutput=no)
    114 
    115 # a tribute to Singular
    116 AC_ARG_ENABLE(
    117   gmp,
    118   [  --enable-gmp            together with \`--with-Singular' means: installation
    119                           in process, be graceful when there is no \`gmp.h'],
    120   [ if test "x$with_Singular" = xyes && test "x$enable_gmp" != xno; then
    121       with_gmp='$(prefix)'
    122     fi ])
    123 
    124 #
    125 # - check the results of --with-gmp.
    126 #
    127 case "$with_gmp" in
    128   yes|no|"")
    129     gmp_in_installation=no ;;
    130   *)
    131     CPPFLAGS="-I$with_gmp/include $CPPFLAGS"
    132     LDFLAGS="-L$with_gmp/lib $LDFLAGS"
    133     gmp_in_installation=no ;;
    134 esac
    13599
    136100#
     
    226190AC_CHECK_LIB(m, atof, , [ AC_MSG_ERROR(libm.a not found) ])
    227191
    228 if test "x$gmp_in_installation" != xyes; then
    229   AC_CHECK_LIB(gmp, main, ,
    230     [
    231       # check a second time in `$(libdir)'.  This is a bit tricky,
    232       # but I think its worth avoiding long option values.
    233       unset ac_cv_lib_gmp_main
    234       LDFLAGS="-L$explicit_libdir $LDFLAGS"
    235       AC_CHECK_LIB(gmp, main, ,
    236         [ AC_MSG_ERROR(libgmp.a not found.  Use option --with-gmp to specify path) ])
    237       unset ac_cv_lib_gmp_main
    238     ])
    239 fi
     192LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     193
     194LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    240195
    241196# arithmetic shift
     
    256211#
    257212AC_LANG_CPLUSPLUS
    258 
    259 if test "x$gmp_in_installation" != xyes; then
    260   AC_CHECK_HEADERS(gmp.h, ,
    261     [
    262       # check a second time in `$(includedir)'.  This is a bit tricky,
    263       # but I think it's worth avoiding long option values.
    264       unset ac_cv_header_gmp_h
    265       CPPFLAGS="-I$explicit_includedir $CPPFLAGS"
    266       AC_CHECK_HEADERS(gmp.h, ,
    267         [ AC_MSG_ERROR(gmp.h not found.  Use option --with-gmp to specify path) ])
    268       unset ac_cv_header_gmp_h
    269     ])
    270 fi
    271213
    272214AC_CHECK_HEADERS(stdio.h stdlib.h string.h time.h math.h, ,
     
    409351fi
    410352
    411 # NTL
    412 if test "x$with_NTL" = xyes; then
    413   AC_DEFINE(HAVE_NTL)
    414 fi
    415 
    416353# arithmetic shift
    417354#if test "x$ac_cv_shift" = xyes; then   
    418355#  AC_DEFINE(HAS_ARITHMETIC_SHIFT)
    419356#fi
    420 
    421 # gmp-stuff.  we must not set these flags before the tests
    422 # are finished!
    423 if test "x$gmp_in_installation" = xyes; then
    424   CPPFLAGS="-I\$(includedir) $CPPFLAGS"
    425   if test "x$with_Singular" = xyes; then
    426     LDFLAGS="-L\$(libdir) -lgmp $LDFLAGS"
    427   fi
    428 fi
    429357
    430358AC_MSG_CHECKING(whether to use omalloc)
  • libpolys/configure.ac

    ra11768 r9af8a63  
    1919
    2020# Checks for libraries.
    21 LB_CHECK_GMP(,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
     21LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    2222
    2323# Checks for library functions.
  • m4/gmp-check.m4

    ra11768 r9af8a63  
    2525                [GMP_HOME_PATH="${DEFAULT_CHECKING_PATH}"])
    2626
    27 min_gmp_version=ifelse([$1], ,3.1.1,$1)
     27min_gmp_version=ifelse([$1], ,1.0,$1)
    2828
    2929dnl Check for existence
  • m4/ntl-check.m4

    ra11768 r9af8a63  
    1616AC_DEFUN([LB_CHECK_NTL],
    1717[
     18DEFAULT_CHECKING_PATH="/usr /usr/local /sw /opt/local"
    1819
    1920AC_ARG_WITH(ntl,
     
    3031                        NTL_HOME_PATH="$withval"
    3132             fi],
    32              [])
     33             [NTL_HOME_PATH="${DEFAULT_CHECKING_PATH}"])
    3334
    34 min_ntl_version=ifelse([$1], ,5.0,$1)
     35min_ntl_version=ifelse([$1], ,1.0,$1)
    3536
    3637
     
    3839BACKUP_CXXFLAGS=${CXXFLAGS}
    3940BACKUP_LIBS=${LIBS}
     41
     42AC_LANG_PUSH(C++)
    4043
    4144if test -n "$NTL_HOME_PATH"; then
     
    4750if test -r "$NTL_HOME/include/NTL/ZZ.h"; then
    4851
    49         if test "x$NTL_HOME" != "x/usr" -a "x$NTL_HOME" != "x/usr/local"; then
     52        if test "x$NTL_HOME" != "x/usr"; then
    5053                NTL_CFLAGS="-I${NTL_HOME}/include"
    5154                NTL_LIBS="-L${NTL_HOME}/lib -lntl"
     
    107110elif test   "x$ntl_found" = "xno";  then
    108111        AC_MSG_RESULT(not found)
    109         if test "x$NTL_HOME" != "x/usr" -a "x$NTL_HOME" != "x/usr/local" ; then
    110                 AC_MSG_WARN(NTL >= $min_ntl_version was not found. LinBox also requires the NTL namespace to be enabled.  Please make sure NTL is compiled correctly.)
    111         fi
    112112        ifelse([$3], , :, [$3])
    113113fi     
    114114
    115 
     115AC_LANG_POP
    116116
    117117AM_CONDITIONAL(SING_HAVE_NTL, test "x$HAVE_NTL" = "xyes")
Note: See TracChangeset for help on using the changeset viewer.