Changeset 41dde6 in git


Ignore:
Timestamp:
Apr 19, 2011, 3:16:16 PM (13 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
72b8801dbb1081f0965bc77daff3ec9da62f800a
Parents:
aa450d0e542b7d92cb13033a49556c48bed0fa0b
git-author:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-04-19 15:16:16+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:31:19+01:00
Message:
- moved the definitions of HAVE_MULT_MOD, HAVE_DIV_MOD, and HAVE_GENERIC_ADD to cpu-check.m4
- generate misc/auxiliary.h in configure script
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    raa450d r41dde6  
    1111.libs
    1212doc/
     13m4/libtool.m4
     14m4/ltoptions.m4
     15m4/ltsugar.m4
     16m4/ltversion.m4
     17m4/lt~obsolete.m4
    1318Singular/Singularg
    1419Singular/mpsr_Tok.xx
  • libpolys/configure.ac

    raa450d r41dde6  
    33AC_CONFIG_AUX_DIR([.])
    44AC_CONFIG_SRCDIR([reporter/reporter.h])
    5 AC_CONFIG_HEADER([config.h])
     5AC_CONFIG_HEADER([config.h misc/auxiliary.h])
    66AM_INIT_AUTOMAKE
    7 
    8 # misc/auxiliary.h
    97
    108# Checks for programs.
  • libpolys/misc/auxiliary.h

    raa450d r41dde6  
     1/* misc/auxiliary.h.  Generated from auxiliary.h.in by configure.  */
    12/*****************************************************************************\
    23 * Computer Algebra System SINGULAR   
     
    1920
    2021// ----------------- which parts/extensions of Singular to build
     22#ifndef HAVE_RINGS
    2123#define HAVE_RINGS
     24#endif
     25
     26#ifndef HAVE_PLURAL
    2227#define HAVE_PLURAL
     28#endif
    2329
    2430// no factory yet...
     31// #ifndef HAVE_FACTORY
    2532// #define HAVE_FACTORY
    26 
     33// #endif
    2734
    2835// ----------------  end of parts/extensions
    2936// -----------------  configure stuff
    3037
    31 /*
    32 // CPU type: i[3456]86:
    33 #undef SI_CPU_I386
    34 // CPU type: sparc:
    35 #undef SI_CPU_SPARC
    36 // CPU type: ppc:
    37 #undef SI_CPU_PPC
    38 // CPU type: IA64:
    39 #undef SI_CPU_IA64
    40 // CPU type: x86_64:
    41 #undef SI_CPU_X86_64
    42 // Define sizeof(long)
    43 #define SIZEOF_LONG 4
    44 */
    45 
    4638// TODO: the following should go to some config.h... no?
    4739
    4840/* Define version as a string */
     41#ifndef S_VERSION1
    4942#define S_VERSION1 "spielwiese"
     43#endif
    5044
    5145/* Absolute pathname of root directory of Singular source */
     46#ifndef S_ROOT_DIR
    5247#define S_ROOT_DIR ""
     48#endif
    5349
    5450// ----------------- end of configure stuff
     
    7167#endif
    7268
    73 #define SIZEOF_LONG (LONG_BIT/CHAR_BIT)
     69#define SIZEOF_LONG 8
    7470// another option for SIZEOF_LONG: use omConfig included in <omalloc/omalloc.h>...
    7571
     
    132128// ---------------- defines which depend on the settings above
    133129
    134 #if defined(SI_CPU_I386) || defined(SI_CPU_X86_64)
    135   // the following settings seems to be better on i386 and x86_64 processors
    136   // define if a*b is with mod instead of tables
    137 #define HAVE_MULT_MOD
    138   // #define HAVE_GENERIC_ADD
    139   // #ifdef HAVE_MULT_MOD
    140   // #define HAVE_DIV_MOD
    141   // #endif
    142 #elif defined(SI_CPU_IA64)
    143   // the following settings seems to be better on itanium processors
    144   // #define HAVE_MULT_MOD
    145 #define HAVE_GENERIC_ADD
    146   // #ifdef HAVE_MULT_MOD
    147   // #define HAVE_DIV_MOD
    148   // #endif
    149 #elif defined(SI_CPU_SPARC)
    150   // #define HAVE_GENERIC_ADD
    151 #define HAVE_MULT_MOD
    152 #ifdef HAVE_MULT_MOD
    153 #define HAVE_DIV_MOD
    154 #endif
    155 #elif defined(SI_CPU_PPC)
    156   // the following settings seems to be better on ppc processors
    157   // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
    158 #define HAVE_MULT_MOD
    159   // #ifdef HAVE_MULT_MOD
    160   // #define HAVE_DIV_MOD
    161   // #endif
    162 #endif
    163 
     130#ifndef HAVE_MULT_MOD
     131#define HAVE_MULT_MOD 1
     132#endif
     133
     134#ifndef HAVE_DIV_MOD
     135/* #undef HAVE_DIV_MOD */
     136#endif
     137
     138#ifndef HAVE_GENERIC_ADD
     139/* #undef HAVE_GENERIC_ADD */
     140#endif
    164141
    165142/*******************************************************************
  • m4/cpu-check.m4

    raa450d r41dde6  
    77AC_DEFUN([SING_CHECK_CPU],
    88[
    9 # Checks for library functions.
     9AC_CANONICAL_HOST
    1010AC_MSG_CHECKING(CPU for singular)
    1111
     
    7575  ac_cv_singuname="unknown"
    7676fi
    77 AC_DEFINE_UNQUOTED(S_UNAME, "$ac_cv_singuname", Singular's own uname\, believe it or not)
     77AC_DEFINE_UNQUOTED(S_UNAME, "$ac_cv_singuname", Singular\'s own uname\, believe it or not)
     78
     79
     80AS_CASE([$host_cpu],
     81dnl the following settings seems to be better on i386 and x86_64 processors
     82  [i*86*|x86_64*], [AC_DEFINE(HAVE_MULT_MOD,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)],
     83dnl the following settings seems to be better on itanium processors
     84dnl AC_DEFINE(HAVE_MULT_MOD,1,)
     85  [ia64*], [AC_DEFINE(HAVE_GENERIC_ADD,1,use branch for addition in Z/p otherwise it uses a generic add)],
     86dnl the following settings seems to be better on sparc processors
     87  [sparc*], [
     88            AC_DEFINE(HAVE_MULT_MOD,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)
     89            AC_DEFINE(HAVE_DIV_MOD,1,division using extend euclidian algorithm otherwise using tables of logartihms)
     90            ],
     91dnl the following settings seems to be better on ppc processors
     92dnl testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
     93  [powerpc*|ppc*], [AC_DEFINE(HAVE_MULT_MOD,1,multiplication is fast on the cpu: a*b is with mod otherwise using tables of logartihms)],
     94  []
     95)
    7896
    7997])
Note: See TracChangeset for help on using the changeset viewer.