Changeset 461f40 in git


Ignore:
Timestamp:
Jan 30, 2012, 6:59:18 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
41d31d33c92e8a93df58457734616fabacdcb346
Parents:
429497fb0084f0e2cc1130d07779709b94af3a27
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-30 18:59:18+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-03 17:53:50+01:00
Message:
fix the enabling of omalloc for factory

CHG: top level configure should enable omalloc by default
FIX: "make check" in factory/ needs omalloc library, thus: LDFLAGS, LDADD
CHG: prettier configure output with AS_HELP_STRING
CHG: further minor improvements to the patch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r429497 r461f40  
    9898#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
    9999
    100 AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc], [use omalloc for the factory]),
    101 [if test "x$enableval"  = "xyes"; then
    102   enable_omalloc=yes
    103 fi], enable_omalloc=no)
     100AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
     101 [if test "x$enableval"  = "xyes"; then
     102   ENABLE_OMALLOC=yes
     103 fi], ENABLE_OMALLOC=add)
    104104
    105 AC_MSG_CHECKING(whether to use omalloc in factory)
    106 if test "$enable_omalloc" = yes; then
     105ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
    107106
    108   AC_MSG_RESULT(yes)
    109   ac_configure_args="$ac_configure_args --with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
    110 else
    111   AC_MSG_RESULT(no)
     107if test "x$ENABLE_OMALLOC" = xadd; then
     108   ENABLE_OMALLOC=yes
     109   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
    112110fi
    113111
    114 AC_CONFIG_SUBDIRS(omalloc)
    115112
    116 if test x$ENABLE_FACTORY = xyes; then
    117   AC_CONFIG_SUBDIRS(factory)
     113
     114
     115if test "x$ENABLE_FACTORY" = xyes; then
     116 AC_MSG_CHECKING(whether to use omalloc in factory)
     117 if test "x$ENABLE_OMALLOC" = xyes; then
     118  AC_MSG_RESULT(yes)
     119  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
     120 else
     121  AC_MSG_RESULT(no)
     122 fi
    118123fi
    119124
    120 AC_CONFIG_SUBDIRS(libpolys)
     125AC_CONFIG_SUBDIRS([omalloc])
     126
     127if test "x$ENABLE_FACTORY" = xyes; then
     128 AC_CONFIG_SUBDIRS([factory])
     129fi
     130
     131AC_CONFIG_SUBDIRS([libpolys])
    121132AC_CONFIG_FILES([Makefile])
    122133AC_CONFIG_FILES([findexec/Makefile])
  • factory/Makefile.am

    r429497 r461f40  
    99AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS}
    1010
    11 AM_LDFLAGS =  -L${builddir} -L${builddir}/libfac
     11AM_LDFLAGS =  -L${builddir} -L${builddir}/libfac ${OMALLOC_LDFLAGS}
    1212
    1313lib_LTLIBRARIES = libfactory.la libfactory_g.la
     
    337337TESTSSOURCES = test.cc
    338338
     339if ENABLE_OMALLOC
     340  OMALLOC_R_LDADD = -lomalloc
     341  OMALLOC_G_LDADD = -lomalloc_g
     342endif
     343
    339344test_s_g_SOURCES = $(TESTSSOURCES)
    340345test_s_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer
    341346#ftmpl_inst.o
    342 test_s_g_LDADD = -L${builddir} -lfactory_g $(GMP_LIBS) $(NTL_LIBS)
     347test_s_g_LDADD = -L${builddir} -lfactory_g $(GMP_LIBS) $(NTL_LIBS) $(OMALLOC_G_LDADD)
    343348
    344349test_s_r_SOURCES = $(TESTSSOURCES)
    345350test_s_r_CFLAGS = -O3 -fomit-frame-pointer
    346351#ftmpl_inst.o
    347 test_s_r_LDADD = -lfactory $(GMP_LIBS) $(NTL_LIBS)
     352test_s_r_LDADD = -lfactory $(GMP_LIBS) $(NTL_LIBS) $(OMALLOC_R_LDADD)
    348353
    349354test_s_r_LDFLAGS = -static ${AM_LDFLAGS}
     
    353358test_d_g_CFLAGS = -g -Wextra -Wall -pedantic -Wno-long-long -fomit-frame-pointer
    354359#ftmpl_inst.o
    355 test_d_g_LDADD = -L${builddir} -lfactory_g $(GMP_LIBS) $(NTL_LIBS)
     360test_d_g_LDADD = -L${builddir} -lfactory_g $(GMP_LIBS) $(NTL_LIBS) $(OMALLOC_G_LDADD)
    356361
    357362test_d_r_SOURCES = $(TESTSSOURCES)
    358363test_d_r_CFLAGS = -O3 -fomit-frame-pointer
    359364#ftmpl_inst.o
    360 test_d_r_LDADD = -L${builddir} -lfactory $(GMP_LIBS) $(NTL_LIBS)
    361 
     365test_d_r_LDADD = -L${builddir} -lfactory $(GMP_LIBS) $(NTL_LIBS) $(OMALLOC_R_LDADD)
     366
     367
  • factory/configure.ac

    r429497 r461f40  
    5151AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]),
    5252[if test "x$enableval" = "xyes"; then
    53   enable_omalloc=yes
    54 fi], enable_omalloc=no)
     53  ENABLE_OMALLOC=yes
     54fi], ENABLE_OMALLOC=no)
    5555
    5656AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]),
     
    6060
    6161AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="")
    62 
    6362AC_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="")
    6463
     
    360359
    361360AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC])
    362 AC_MSG_CHECKING(whether to use omalloc)
    363 if test "$enable_omalloc" = yes; then
    364 
     361AC_MSG_CHECKING([whether to use omalloc/omalloc.h])
     362if test "x$ENABLE_OMALLOC" = xyes; then
    365363  AC_MSG_RESULT(yes)
    366   CPPFLAGS_save="$CPPFLAGS"
     364 
    367365  if test "x$with_omalloc_dir" != "x"; then
    368366    OMALLOC_CFLAGS="-I${with_omalloc_dir}"
     367    OMALLOC_LDFLAGS="-L${with_omalloc_dir}/omalloc"
    369368  fi
    370369  if test "x$with_omalloc_extra_dir" != "x"; then
    371370    OMALLOC_CFLAGS="$OMALLOC_CFLAGS -I${with_omalloc_extra_dir}"
     371    OMALLOC_LDFLAGS="$OMALLOC_LDFLAGS -L${with_omalloc_extra_dir}/omalloc"
    372372  fi
    373   if test $omalloc_trust = no; then
    374     AC_CHECK_HEADERS(omalloc/omalloc.h)
    375     if test "$ac_cv_header_omalloc_omalloc_h" != yes; then
    376       AC_MSG_ERROR([You asked for omalloc, but it was not found])
    377     fi
     373 
     374  CPPFLAGS_save="$CPPFLAGS"
     375  # adding $with_omalloc_dir and $with_omalloc_extra_dir to header search path
     376  CPPFLAGS="$CPPFLAGS ${OMALLOC_CFLAGS}"
     377  if test "x$omalloc_trust" = xno; then
     378    AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_ERROR([You asked for omalloc but it cannot be found with your default header search path]))
    378379  else
    379     AC_MSG_NOTICE(trusting the omalloc locations given)
    380     AC_MSG_RESULT()
     380    AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_WARN([trusting the omalloc locations given: ${OMALLOC_CFLAGS}]))
    381381  fi
    382   AC_DEFINE(HAVE_OMALLOC,1, [omalloc support])
     382  CPPFLAGS="$CPPFLAGS_save"
     383
     384  AC_DEFINE(HAVE_OMALLOC, 1, [omalloc support])
     385 
    383386  AC_SUBST(OMALLOC_CFLAGS)
     387  AC_SUBST(OMALLOC_LDFLAGS)
    384388else
    385389  AC_MSG_RESULT(no)
    386390fi
     391
     392AM_CONDITIONAL([ENABLE_OMALLOC],[test "x$ENABLE_OMALLOC" = xyes])
    387393
    388394
  • m4/options.m4

    r429497 r461f40  
    33AC_MSG_CHECKING(whether arithmetical rings should be enabled)
    44
    5 AC_ARG_ENABLE(arith-rings,
    6 [  --disable-arith-rings Disable arithmetical rings
    7 ],
     5AC_ARG_ENABLE(arith-rings, AS_HELP_STRING([--disable-arith-rings], [Disable arithmetical rings]),
    86[if test $enableval = yes; then
    97     ENABLE_RINGS="yes"
     
    2523AC_MSG_CHECKING(whether factory should be enabled)
    2624
    27 AC_ARG_ENABLE(factory,
    28 [  --disable-factory Disable factory
    29 ],
     25AC_ARG_ENABLE(factory, AS_HELP_STRING([--disable-factory], [Disable factory]),
    3026[if test $enableval = yes; then
    3127     ENABLE_FACTORY="yes"
     
    5551AC_MSG_CHECKING(whether non-commutative subsystem should be enabled)
    5652
    57 AC_ARG_ENABLE(plural,
    58 [  --disable-plural Disable non-commutative subsystem
    59 ],
     53AC_ARG_ENABLE(plural, AS_HELP_STRING([--disable-plural], [Disable non-commutative subsystem]),
    6054[if test $enableval = yes; then
    6155     ENABLE_PLURAL="yes"
Note: See TracChangeset for help on using the changeset viewer.