Changeset 575680 in git


Ignore:
Timestamp:
Jun 6, 1997, 1:11:14 PM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
e8a30d706fbfe3265065f965770b3285a7e817b1
Parents:
4e595a7b47d6ba4b8e2ca07d3de099932b5b9e33
Message:
o configure.in is still not stable so i will not describe
  all the changes.  this release is simply for security


git-svn-id: file:///usr/local/Singular/svn/trunk@372 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/configure.in

    r4e595a7 r575680  
    1 dnl $Id: configure.in,v 1.1 1997-06-02 15:56:04 schmidt Exp $
     1dnl $Id: configure.in,v 1.2 1997-06-06 11:11:14 schmidt Exp $
     2
    23dnl
    34dnl configure.in - process this file with autoconf to produce a configure script.
     
    89#
    910
    10 AC_REVISION($Id: configure.in,v 1.1 1997-06-02 15:56:04 schmidt Exp $)
     11AC_REVISION($Id: configure.in,v 1.2 1997-06-06 11:11:14 schmidt Exp $)
    1112AC_INIT(canonicalform.cc)
    1213AC_CONFIG_HEADER(config.h)
     
    1718#
    1819dnl
    19 dnl - change version here.
     20dnl - change version here, do not believe the comment in the
     21dnl   preceding lines.
    2022dnl
    2123factory_version="1.2c"
     
    2729AC_ARG_WITH(
    2830  Singular,
    29   [  --with-Singular         build for use with computer algebra system Singular.
    30                           Note: all other --with/--enable-options (except
    31                           --enable-assertions) are ignored if --with-Singular
    32                           is specified.],
     31  [  --with-Singular         build for use with computer algebra system Singular.],
    3332  ,
    3433  with_Singular=no)
     
    3635AC_ARG_WITH(
    3736  memman,
    38   [  --with-memman<=memman> specify factory memory manager.
     37  [  --with-memman(=<memman>) specify factory memory manager.
    3938                          <memman> is either 'old' (default), 'new' or
    4039                          'no' which means not to use the memory manager
     
    5049    fi ])
    5150
     51AC_ARG_WITH(
     52  gmp,
     53  [  --with-gmp(=<gmp_inc_path>(,<gmp_lib_path>)) or
     54  --with-builtingmp(=<gmp_inc_path>(,<gmp_lib_path>))],
     55  [ if test "x$with_gmp" = xno; then
     56      AC_MSG_WARN(you cannot build factory without gmp.
     57                    Option --without-gmp ignored)
     58      with_gmp_specified=no
     59    else
     60      with_gmp_specified=yes
     61    fi ],
     62  with_gmp_specified=no)
     63
     64dnl note that the help string is continued from AC_ARG_WITH(gmp, ...) so
     65dnl configure --help looks nice
     66AC_ARG_WITH(
     67  builtingmp,
     68  [                          Specifies which gmp library to use (builtin or
     69                          standard gmp (default)) and where to find it.],
     70  [ if test "x$with_builtingmp" = xno; then
     71      AC_MSG_WARN(you cannot build factory without gmp.
     72                    Option --without-builtingmp ignored)
     73      with_bgmp_specified=no
     74    else
     75      with_bgmp_specified=yes
     76    fi ],
     77  with_bgmp_specified=no)
     78
    5279AC_ARG_ENABLE(
    5380  streamio,
    5481  [  --disable-streamio      build factory whithout streamio],
    55   [ if test "x$with_Singular" = xyes && test "x$enable_streamio" != xno; then
    56       AC_MSG_WARN(option --enable-streamio ignored with Singular)
    57       enable_streamio=no
    58     fi ],
     82  ,
    5983  [ if test "x$with_Singular" = xyes; then
    6084      enable_streamio=no
     
    6892                          with --with-memman=new only.  <level> may be either
    6993                          'no' (default), 'normal', or 'full'.],
    70   [ if test "x$with_memman" = xnew; then
    71       if test "x$enable_memdebug" = xyes; then
    72         enable_memdebug=normal
    73       fi
    74     else
    75       if test "x$enable_memdebug" != xno; then
    76         AC_MSG_WARN(option --enable-memdebug ignored)
    77         enable_memdebug=no
    78       fi
     94  [ if test "x$with_memman" != xnew && test "x$enable_memdebug" != xno; then
     95      AC_MSG_WARN(option --enable-memdebug ignored without new memory manager)
     96      enable_memdebug=no
    7997    fi ],
    8098  enable_memdebug=no)
     
    93111  timing,
    94112  [  --enable-timing         build factory so it will print timing information],
    95   [ if test "x$with_Singular" = xyes && test "x$enable_timing" != xno; then
    96       AC_MSG_WARN(option --enable-timing ignored with Singular);
    97       enable_timing=no
    98     fi ],
     113  ,
    99114  enable_timing=no)
    100115
     
    102117  debugoutput,
    103118  [  --enable-debugoutput    build factory so it will print debugging information],
    104   [ if test "x$with_Singular" = xyes && test "x$enable_debugoutput" != xno; then
    105       AC_MSG_WARN(option --enable-debugoutput ignored with Singular);
    106       enable_debugoutput=no
    107     fi ],
     119  ,
    108120  enable_debugoutput=no)
    109121
    110 #
    111 # - check for CC but be careful about CFLAGS.
     122AC_ARG_ENABLE(
     123  gmp,
     124  [  --enable-gmp            together with --with-Singular means: installation
     125                          in process, be gracefull when there is no gmp.h],
     126  [ if test "x$enable_gmp" != xno; then
     127      gmp_in_installation=yes
     128    fi ])
     129
     130#
     131# check the results of --with-gmp and --with-builtin-gmp
     132#
     133
     134if test "x$with_gmp_specified" = xyes; then
     135  if test "x$with_bgmp_specified" = xyes; then
     136    AC_MSG_WARN(option --with-builtingmp ignored with option --with-gmp)
     137  fi
     138  gmp_builtin=no
     139else
     140  if test "x$with_bgmp_specified" = xyes; then
     141    with_gmp="$with_builtingmp"
     142    gmp_builtin=yes
     143  else
     144    gmp_builtin=no
     145  fi
     146fi
     147# at this moment, gmp_builtin describes which version to use
     148# and with_gmp where to find it
     149if test "x$with_gmp" = xyes \
     150   || test "x$with_gmp" = xno \
     151   || test "x$with_gmp" = x; then
     152  gmp_in_installation=no
     153elif test "x$with_gmp" = 'x$(includedir)' \
     154     || test "x$with_gmp" = 'x${includedir}'; then
     155  gmp_in_installation=yes
     156else
     157  # this is were the real work is done
     158  case "$with_gmp" in
     159    *,*)
     160      saveIFS="$IFS"; IFS="${IFS},"
     161      set dummy $with_gmp
     162      IFS="$saveIFS"
     163      CPPFLAGS="$2 $CPPFLAGS"
     164      LDFLAGS="$3 $LDFLAGS" ;;
     165    *)
     166      CPPFLAGS="$with_gmp $CPPFLAGS"
     167      LDFLAGS="$with_gmp/../lib $LDFLAGS" ;;
     168  esac
     169  gmp_in_installation=no
     170fi
     171
     172#
     173# - check for CC and CXX but be careful about CFLAGS.
    112174#
    113175
    114176test "${CFLAGS+set}" = set || cflags_expl_set=no
    115177AC_PROG_CC
    116 if test "x$GCC" != xyes; then
    117   AC_MSG_WARN(you better use gcc to compile factory)
    118 fi
    119 
    120 #
    121 # - check for CXX but be careful about CXXFLAGS.
    122 #
    123 
    124178test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
    125179AC_PROG_CXX
    126 if test "x$GXX" != xyes; then
     180if test "x$GCC" != xyes && test "x$GXX" != xyes; then
    127181  AC_MSG_WARN(you better use gcc to compile factory)
    128182fi
     
    134188AC_PROG_CXXCPP
    135189AC_PROG_INSTALL
    136 AC_PROG_LN_S
    137190AC_PROG_RANLIB
    138191AC_PROG_MAKE_SET
     
    154207#
    155208
    156 AC_CHECK_LIB(gmp, mpz_init)
     209if test "x$gmp_in_installation" != xyes; then
     210  AC_CHECK_LIB(gmp, mpz_init)
     211fi
    157212AC_CHECK_LIB(m, sqrt)
    158213
     
    163218AC_LANG_CPLUSPLUS
    164219
    165 AC_CHECK_HEADERS(gmp.h)
     220if test "x$gmp_in_installation" != xyes; then
     221  AC_CHECK_HEADERS(gmp.h, ,
     222    [ AC_MSG_ERROR(gmp.h not found.  Use option --with-gmp or --with-builtingmp
     223                  to specify path) ])
     224fi
    166225
    167226AC_CHECK_HEADERS(stdio.h stdlib.h string.h time.h math.h, ,
    168227  [ AC_MSG_ERROR(standard C header files not found) ])
    169228
    170 dnl if test "x$enable_streamio" != xno; then
    171   AC_CHECK_HEADERS(iostream.h strstream.h, , [ AC_MSG_ERROR(C++ header files not found) ])
     229if test "x$enable_streamio" != xno; then
     230  AC_CHECK_HEADERS(iostream.h strstream.h fstream.h, ,
     231    [ AC_MSG_ERROR(C++ header files not found) ])
    172232  AC_CHECK_HEADERS(ctype.h, , [ AC_MSG_ERROR(standard C header files not found) ])
    173 dnl fi
     233fi
    174234
    175235if test "x$enable_timing" != xno; then
     
    183243#
    184244
     245# cross-compiling ?!
    185246AC_C_CROSS
     247if test "x$cross_compiling" = xyes; then
     248  AC_MSG_WARN([you better specify a cache file to get the values for
     249                    cross-compiling right (call configure --cache-file=target.cache)])
     250fi
    186251
    187252AC_C_CONST
    188253AC_C_INLINE
    189 AC_CHECK_SIZEOF(int, 4)
    190 AC_CHECK_SIZEOF(void *, 4)
    191254
    192255# arithmetic shift
     
    215278  gftabledir='${datadir}/Singular/gftables'
    216279  expl_gftabledir="$expl_datadir/Singular/gftables"
    217   tagtemplatedir='${includedir}/templates'
    218280  templatedir="\${includedir}/templates"
    219281else
    220282  gftabledir='${datadir}/factory/gftables'
    221283  expl_gftabledir="$expl_datadir/factory/gftables"
    222   tagtemplatedir="\${includedir}/templates-$factory_version"
    223284  templatedir="\${includedir}/templates"
    224285fi
     
    229290
    230291if test "x$with_Singular" = xyes; then
    231   taglibfactory=libsingcf.a
    232   taglibmem=
    233   tagheaderfactory=factory.h
    234   tagfactoryconf=factoryconf.h
    235 
    236292  libfactory=libsingcf.a
    237293  libmem=libcfmem.a
     
    248304  uninstalltargets=uninstallcf
    249305else
    250   taglibfactory="libcf-$factory_version.a"
    251   taglibmem="libcfmem-$factory_version.a"
    252   tagheaderfactory="factory-$factory_version.h"
    253   tagfactoryconf="factoryconf-$factory_version.h"
    254 
    255306  libfactory=libcf.a
    256307  libmem=libcfmem.a
     
    264315
    265316  alltargets=cf
    266   installtargets=installcflinks
    267   uninstalltargets=uninstallcflinks
     317  installtargets=installcf
     318  uninstalltargets=uninstallcf
    268319fi
    269320
     
    294345fi
    295346
    296 #! gmp.h
    297 if test "x$ac_cv_header_gmp_h" != xyes; then
    298   AC_MSG_WARN([gmp.h not found.  We will assume that you are configuring
    299                     the gmp-package at the moment , so at compile time there will])
    300   CPPFLAGS="-I\$(includedir) $CPPFLAGS"
    301 fi
    302 
    303 # cross-compiling ?!
    304 if test "x$cross_compiling" = xyes; then
    305   AC_MSG_WARN([you better specify a cache file to get the values for
    306                     cross-compiling right (call configure --cache-file=target.cache)])
    307 fi
    308 
    309 # sizeofs
    310 if test "x$ac_cv_sizeof_int" != x4 || \
    311    test "x$ac_cv_sizeof_void_p" != x4; then
    312   AC_MSG_ERROR(we need sizeof(int) == sizeof(void p) == 4)
    313 fi
    314 
    315347# arithmetic shift
    316348if test "x$ac_cv_shift" = xyes; then   
    317349  AC_DEFINE(HAS_ARITHMETIC_SHIFT)
     350fi
     351
     352# gmp-stuff
     353if test "x$gmp_builtin" = xyes; then
     354  AC_DEFINE(HAVE_BUILTIN_GMP)
     355fi
     356if test "x$gmp_in_installation" = xyes; then
     357  CPPFLAGS="-I\$(includedir) $CPPFLAGS"
     358  LDFLAGS="-L\$(libdir) -lgmp $LDFLAGS"
    318359fi
    319360
     
    419460
    420461AC_SUBST(gftabledir)
    421 AC_SUBST(tagtemplatedir)
    422462AC_SUBST(templatedir)
    423463
    424464AC_SUBST(factory_version)
    425 
    426 AC_SUBST(taglibfactory)
    427 AC_SUBST(taglibmem)
    428 AC_SUBST(tagheaderfactory)
    429 AC_SUBST(tagfactoryconf)
    430465
    431466AC_SUBST(libfactory)
Note: See TracChangeset for help on using the changeset viewer.