diff --git a/Makefile.am b/Makefile.am
index 88653d8..24ea58b 100644
a
|
b
|
|
1 | 1 | ACLOCAL_AMFLAGS = -I m4 |
2 | 2 | |
3 | | ALLOC=omalloc |
4 | | |
5 | 3 | if ENABLE_FACTORY |
6 | 4 | USE_FACTORY = factory |
7 | 5 | else |
8 | 6 | USE_FACTORY = |
9 | 7 | endif |
10 | | |
11 | | PACKAGES=findexec $(ALLOC) $(USE_FACTORY) libpolys kernel numeric Singular |
| 8 | |
| 9 | PACKAGES=findexec omalloc $(USE_FACTORY) libpolys kernel numeric Singular |
12 | 10 | |
13 | 11 | SUBDIRS=$(PACKAGES) |
14 | 12 | |
diff --git a/configure.ac b/configure.ac
index b532d0f..4d0e975 100644
a
|
b
|
|
1 | 1 | AC_INIT([singular],[3.1.3.sw]) |
2 | 2 | |
| 3 | _AC_SRCDIRS(["$ac_dir"]) |
| 4 | |
3 | 5 | AC_CONFIG_MACRO_DIR([m4]) |
4 | 6 | AC_CONFIG_AUX_DIR([.]) |
5 | 7 | |
… |
… |
AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS]) |
95 | 97 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
96 | 98 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
97 | 99 | |
| 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) |
| 104 | |
| 105 | AC_MSG_CHECKING(whether to use omalloc in factory) |
| 106 | if test "$enable_omalloc" = yes; then |
| 107 | |
| 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) |
| 112 | fi |
| 113 | |
98 | 114 | AC_CONFIG_SUBDIRS(omalloc) |
99 | 115 | |
100 | 116 | if test x$ENABLE_FACTORY = xyes; then |
diff --git a/factory/Makefile.am b/factory/Makefile.am
index 1df4f65..91f36dd 100644
a
|
b
|
SUBDIRS=$(PACKAGES) |
6 | 6 | CXXTEMPLFLAGS= |
7 | 7 | ## -fno-implicit-templates |
8 | 8 | |
9 | | AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include ${GMP_CFLAGS} ${NTL_CFLAGS} |
| 9 | AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS} |
10 | 10 | |
11 | 11 | AM_LDFLAGS = -L${builddir} -L${builddir}/libfac |
12 | 12 | |
diff --git a/factory/configure.ac b/factory/configure.ac
index 301a6bb..fbf3e4e 100644
a
|
b
|
|
| 1 | |
1 | 2 | dnl # emacs edit mode for this file is -*- sh -*- |
2 | 3 | dnl # $Id$ |
3 | 4 | |
… |
… |
AC_ARG_WITH( |
47 | 48 | , |
48 | 49 | [with_Singular=yes]) |
49 | 50 | |
| 51 | AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]), |
| 52 | [if test "x$enableval" = "xyes"; then |
| 53 | enable_omalloc=yes |
| 54 | fi], enable_omalloc=no) |
50 | 55 | |
51 | | AC_ARG_WITH( |
52 | | omalloc, |
53 | | [AS_HELP_STRING([--with-omalloc],[build for use with omalloc])]) |
| 56 | AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]), |
| 57 | [if test "x$enableval" = "xyes"; then |
| 58 | omalloc_trust=yes |
| 59 | fi], omalloc_trust=no) |
54 | 60 | |
| 61 | AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="") |
| 62 | |
| 63 | 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="") |
55 | 64 | |
56 | 65 | AC_ARG_ENABLE( |
57 | 66 | cf-inline, |
… |
… |
if test "x$enable_timing" != xno; then |
227 | 236 | \`configure --disable-timing') ]) |
228 | 237 | fi |
229 | 238 | |
230 | | AC_CHECK_HEADERS(omalloc.h,,) |
231 | | |
232 | 239 | # font-lock-trick: ' |
233 | 240 | |
234 | 241 | # |
… |
… |
fi |
351 | 358 | # AC_DEFINE([HAS_ARITHMETIC_SHIFT],[1],[HAS_ARITHMETIC_SHIFT]) |
352 | 359 | #fi |
353 | 360 | |
| 361 | AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC]) |
354 | 362 | AC_MSG_CHECKING(whether to use omalloc) |
| 363 | if test "$enable_omalloc" = yes; then |
355 | 364 | |
356 | | if test "$with_omalloc" = yes; then |
357 | | if test "$ac_cv_header_omalloc_h" != yes; then |
358 | | if test "$enable_omalloc" = yes; then |
359 | | warn_omalloc=yes |
360 | | else |
361 | | with_omalloc=no |
362 | | fi |
| 365 | AC_MSG_RESULT(yes) |
| 366 | CPPFLAGS_save="$CPPFLAGS" |
| 367 | if test "x$with_omalloc_dir" != "x"; then |
| 368 | OMALLOC_CFLAGS="-I${with_omalloc_dir}" |
363 | 369 | fi |
364 | | else |
365 | | if test "$with_omalloc" != no; then |
366 | | if test "$enable_omalloc" = yes; then |
367 | | if test "$ac_cv_header_omalloc_h" != yes; then |
368 | | warn_omalloc=yes |
369 | | fi |
370 | | with_omalloc=yes |
371 | | else |
372 | | with_omalloc=no |
| 370 | if test "x$with_omalloc_extra_dir" != "x"; then |
| 371 | OMALLOC_CFLAGS="$OMALLOC_CFLAGS -I${with_omalloc_extra_dir}" |
| 372 | 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]) |
373 | 377 | fi |
| 378 | else |
| 379 | AC_MSG_NOTICE(trusting the omalloc locations given) |
| 380 | AC_MSG_RESULT() |
374 | 381 | fi |
375 | | fi |
376 | | |
377 | | AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC]) |
378 | | if test "$with_omalloc" = yes; then |
379 | | AC_DEFINE([HAVE_OMALLOC],[1]) |
380 | | fi |
381 | | AC_MSG_RESULT($with_omalloc) |
382 | | if test "$warn_omalloc" = yes; then |
383 | | AC_MSG_WARN(did not find omalloc.h -- install before compiling) |
| 382 | AC_DEFINE(HAVE_OMALLOC,1, [omalloc support]) |
| 383 | AC_SUBST(OMALLOC_CFLAGS) |
| 384 | else |
| 385 | AC_MSG_RESULT(no) |
384 | 386 | fi |
385 | 387 | |
386 | 388 | |