Changeset 9af8a63 in git for factory


Ignore:
Timestamp:
May 10, 2011, 12:38:31 PM (13 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
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
Location:
factory
Files:
2 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)
Note: See TracChangeset for help on using the changeset viewer.