Changeset 7d160bb in git for factory/configure.ac


Ignore:
Timestamp:
May 24, 2013, 2:39:16 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
55150e5fbf40e9e0fa5d2c2fe5efd309f4ab2e12
Parents:
35564a593038fa54330b221ac4ac3342667c31ea
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-05-24 14:39:16+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-05-24 16:33:55+02:00
Message:
Better compiler flags handling by BS

fix: empty default compiler flags
add: use optimization flags by default (incompatible with debug, see --disable-optimizationflags)
add: check multiple compiler flags (debug/optimization)

NOTE: some optimization flags lead to GCC crashes.
NOTE: no implicit templates cannot be used due to some templated code (tgb*) :(
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/configure.ac

    r35564a5 r7d160bb  
    2424m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    2525
    26 
    2726# Add pre'prefixed config
    2827AX_PREFIX_CONFIG_H([config.h],[],[config.h])
    2928
    30 AC_PROG_YACC
    31 # AM_PROG_AR
    32 LT_INIT
    33 
    34 #
    35 # Do not change version here!!!
    36 #
    3729dnl #
    3830dnl # Change version here, do not believe the comment in the
     
    4335
    4436#
    45 # - check withs and enables.
    46 #
    47 AC_ARG_WITH(
    48   Singular,
    49   [AS_HELP_STRING([--without-Singular],[build NOT for the use with CAS Singular.])],
    50   ,
    51   [with_Singular=yes])
    52 
    53 AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]),
    54 [if test "x$enableval" = "xyes"; then
    55   ENABLE_OMALLOC=yes
    56 fi], ENABLE_OMALLOC=no)
    57 
    58 AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]),
    59 [if test "x$enableval" = "xyes"; then
    60   omalloc_trust=yes
    61 fi], omalloc_trust=no)
    62 
    63 AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="")
    64 AC_ARG_WITH(omalloc_extra_dir,[AS_HELP_STRING([--with-omalloc-extra-dir=PTH],[optional extra location of omalloc])], with_omalloc_extra_dir="$withval", with_omalloc_extra_dir="")
    65 
    66 AC_ARG_ENABLE(
    67   cf-inline,
    68   [AS_HELP_STRING([--enable-cf-inline],[build Factory with \"configurable inline methods\" enabled.])],
    69   [enable_cf_inline=$enableval],
    70   [enable_cf_inline=no])
    71 
    72 AC_ARG_ENABLE(
    73   streamio,
    74   [AS_HELP_STRING([--enable-streamio],[build Factory with stream IO])],
    75   ,
    76   [enable_streamio=no])
    77 
    78 AC_ARG_ENABLE(
    79   assertions,
    80   [AS_HELP_STRING([--disable-assertions],[build Factory with no assertions])],
    81   ,
    82   enable_assertions=yes)
    83 
    84 AC_ARG_ENABLE(
    85   timing,
    86   [AS_HELP_STRING([--enable-timing],[build Factory so it will print timing information])],
    87   ,
    88   enable_timing=no)
    89 
    90 AC_ARG_ENABLE(
    91   debugoutput,
    92   [AS_HELP_STRING([--enable-debugoutput],[build Factory so it will print debugging information])],
    93   ,
    94   enable_debugoutput=no)
    95 
    96 SING_CHECK_DEBUG
    97 
    98 #
    9937# - check for CC and CXX but be careful about CFLAGS.
    10038#
    101 test "${CFLAGS+set}" = set || cflags_expl_set=no
     39SING_RESET_FLAGS()
     40SING_CHECK_SET_ARGS()
     41
    10242AC_PROG_CC
    103 test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
    10443AC_PROG_CXX
    105 if test "x$GCC" != xyes && test "x$GXX" != xyes; then
    106   AC_MSG_WARN(you better use gcc to compile Factory)
    107 else
    108   if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
    109     AC_MSG_WARN([we use \`' as default for \`CXXFLAGS'
    110                     (instead of the configure default \`-g -O')])
    111   fi
    112   if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
    113     AC_MSG_WARN([we use \`' as default for \`CFLAGS'
    114                     (instead of the configure default \`-g -O')])
    115   fi
    116 fi
    117 
    11844#
    11945# - check for some other programs.
     
    12450AC_PROG_INSTALL
    12551AC_DISABLE_STATIC
     52AC_PROG_YACC
    12653LT_INIT
    12754AC_PROG_MAKE_SET
     
    13259AC_C_CONST
    13360AC_C_INLINE
     61
     62
     63#
     64# - check withs and enables.
     65#
     66AC_ARG_WITH(
     67  Singular,
     68  [AS_HELP_STRING([--without-Singular],[build NOT for the use with CAS Singular.])],
     69  ,
     70  [with_Singular=yes])
     71
     72AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]),
     73[if test "x$enableval" = "xyes"; then
     74  ENABLE_OMALLOC=yes
     75fi], ENABLE_OMALLOC=no)
     76
     77AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]),
     78[if test "x$enableval" = "xyes"; then
     79  omalloc_trust=yes
     80fi], omalloc_trust=no)
     81
     82AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="")
     83AC_ARG_WITH(omalloc_extra_dir,[AS_HELP_STRING([--with-omalloc-extra-dir=PTH],[optional extra location of omalloc])], with_omalloc_extra_dir="$withval", with_omalloc_extra_dir="")
     84
     85AC_ARG_ENABLE(
     86  cf-inline,
     87  [AS_HELP_STRING([--enable-cf-inline],[build Factory with \"configurable inline methods\" enabled.])],
     88  [enable_cf_inline=$enableval],
     89  [enable_cf_inline=no])
     90
     91AC_ARG_ENABLE(
     92  streamio,
     93  [AS_HELP_STRING([--enable-streamio],[build Factory with stream IO])],
     94  ,
     95  [enable_streamio=no])
     96
     97AC_ARG_ENABLE(
     98  assertions,
     99  [AS_HELP_STRING([--disable-assertions],[build Factory with no assertions])],
     100  ,
     101  enable_assertions=yes)
     102
     103AC_ARG_ENABLE(
     104  timing,
     105  [AS_HELP_STRING([--enable-timing],[build Factory so it will print timing information])],
     106  ,
     107  enable_timing=no)
     108
     109AC_ARG_ENABLE(
     110  debugoutput,
     111  [AS_HELP_STRING([--enable-debugoutput],[build Factory so it will print debugging information])],
     112  ,
     113  enable_debugoutput=no)
    134114
    135115AH_TEMPLATE([INT64], [Defenition for INT64])
Note: See TracChangeset for help on using the changeset viewer.