Changeset 37e66f in git


Ignore:
Timestamp:
Mar 19, 2014, 8:39:14 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
38750a62e57a4262c5d883873104b2032b609386
Parents:
c0bbad6254e42ef9e4bed7c8d91f31a7c9f7ba50
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-03-19 20:39:14+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-03-19 21:44:53+01:00
Message:
Better approach to configuring multiple packages: omalloc/resources/factory

add: precious configure variables {OMALLOC/RESOURCES/FACTORY}_{LIBS/INCLUDES}
fix: also related minor fixes

NOTE: main changes are in m4/options.m4 and factory/configure.ac (which was the motivator for the whole thing)

NOTE2: the cleanup of "-I${top_srcdir}/.." and "-I${top_srcdir}/../factory/include" (and similar for builddir) in favor of {OMALLOC/RESOURCES/FACTORY}_INCLUDES
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • Singular.pc.in

    rc0bbad r37e66f  
    99URL: https://github.com/Singular/Sources/
    1010
    11 Requires: omalloc resources factory libpolys
    12 # Conflicts:
     11Requires: @PKG_REQUIRE@ libpolys
     12Conflicts:
    1313
    14 Cflags: -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@
    15 Libs: -L${libdir} -lSingular  @USEPPROCSDYNAMICLD@
    16 # Libs.private:
     14Cflags: -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@
     15Libs: -L${libdir} -lSingular @USEPPROCSDYNAMICLD@
     16Libs.private:
    1717
  • Singular/Makefile.am

    rc0bbad r37e66f  
    33GIT_VERSION := $(shell $(top_srcdir)/git-version-gen $(top_srcdir)/.tarball-git-version)
    44
    5 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS)  -DGIT_VERSION='"$(GIT_VERSION)"'
     5AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/kernel -I${top_builddir}/kernel -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(FACTORY_INCLUDES)  $(GMP_CFLAGS) $(NTL_CFLAGS) $(FLINT_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"'
    66
    77if HAVE_GFANLIB
  • configure.ac

    rc0bbad r37e66f  
    8585esac
    8686
     87PKG_REQUIRE="$PKG_REQUIRE"
     88AC_SUBST(PKG_REQUIRE)
     89
     90SING_USE_OMALLOC()
     91SING_USE_RESOURCES()
     92SING_USE_FACTORY()
    8793
    8894SING_CHECK_P_PROCS
    89 SING_CHECK_FACTORY
    9095SING_CHECK_READLINE
    9196SING_CHECK_DBM
     
    98103### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
    99104#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
    100 
    101 
    102 AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
    103  [if test "x$enableval"  = "xyes"; then
    104    ENABLE_OMALLOC=yes
    105  fi], ENABLE_OMALLOC=add)
    106 
    107 ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
    108 
    109 if test "x$ENABLE_OMALLOC" = xadd; then
    110    ENABLE_OMALLOC=yes
    111    ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
    112 fi
    113 
    114 if test "x$ENABLE_FACTORY" = xyes; then
    115  AC_MSG_CHECKING(whether to use omalloc in factory)
    116  if test "x$ENABLE_OMALLOC" = xyes; then
    117   AC_MSG_RESULT(yes)
    118   ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
    119  else
    120   AC_MSG_RESULT(no)
    121  fi
    122 fi
    123105
    124106AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
  • dyn_modules/bigintm/Makefile.am

    rc0bbad r37e66f  
    1111MYINCLUDES =  -I${top_srcdir} -I${top_builddir} -I${srcdir} \
    1212-I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    13 -I${top_srcdir}/factory/include -I${top_builddir}/factory/include \
    14 $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
     13$(FACTORY_INCLUDES) $(RESOURCES_INCLUDES) $(OMALLOC_INCLUDES) \
     14$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
    1515
    1616bigintm_la_SOURCES   = mod_main.cc bigintm.cc bigintm.h
  • dyn_modules/callgfanlib/Makefile.am

    rc0bbad r37e66f  
    55MYINCLUDES =  -I${top_srcdir} -I${top_builddir} -I${srcdir} \
    66-I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    7 -I${top_srcdir}/factory/include -I${top_builddir}/factory/include \
    8 $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
     7${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \
     8${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}
    99
    1010if HAVE_GFANLIB
  • dyn_modules/callpolymake/Makefile.am

    rc0bbad r37e66f  
    2121MYINCLUDES = -I${top_srcdir} -I${top_builddir} -I${srcdir} \
    2222-I${top_srcdir}/libpolys -I${top_builddir}/libpolys  \
    23 -I${top_builddir}/factory/include $(GMP_CFLAGS) $(PM_INC) $(PM_CFLAGS) \
    24 $(POLYMAKE_CXXFLAGS) $(FACTORY_CFLAGS)
     23$(PM_INC) $(PM_CFLAGS) $(POLYMAKE_CXXFLAGS) \
     24$(FACTORY_INCLUDES) $(RESOURCES_INCLUDES) $(OMALLOC_INCLUDES) \
     25$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
    2526
    2627P_PROCS_CPPFLAGS_COMMON = -DDYNAMIC_VERSION
  • dyn_modules/syzextra/Makefile.am

    rc0bbad r37e66f  
    55MYINCLUDES =  -I${top_srcdir} -I${top_builddir} -I${srcdir} \
    66-I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    7 -I${top_srcdir}/factory/include -I${top_builddir}/factory/include \
    8 $(FACTORY_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) $(GOOGLE_PERFTOOLS_CFLAGS)
     7$(FACTORY_INCLUDES) $(RESOURCES_INCLUDES) $(OMALLOC_INCLUDES) \
     8$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS) $(GOOGLE_PERFTOOLS_CFLAGS)
    99
    1010module_LTLIBRARIES=syzextra.la
  • factory/Makefile.am

    rc0bbad r37e66f  
    33SUBDIRS=include/factory libfac
    44
    5 AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include $(FLINT_CFLAGS) $(GMP_CFLAGS) $(NTL_CFLAGS) $(OMALLOC_CFLAGS)
     5AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include \
     6$(OMALLOC_INCLUDES) $(RESOURCES_INCLUDES) \
     7$(FLINT_CFLAGS) $(NTL_CFLAGS) $(GMP_CFLAGS)
    68
    79lib_LTLIBRARIES = libfactory.la
    810
    911libfactory_la_LIBADD     = ${builddir}/libfac/libfac.la \
    10 $(RESOURCES_LDFLAGS) $(OMALLOC_LDFLAGS) $(OMALLOC_R_LDADD) $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS)
     12$(RESOURCES_LIBS) $(OMALLOC_LIBS) \
     13$(FLINT_LIBS) $(NTL_LIBS) $(GMP_LIBS)
    1114
    1215libfactory_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     
    265268        [ -d ${builddir}/gftables ] || ln -s ${srcdir}/gftables ${builddir}
    266269
     270
    267271####################################################
    268272## Test program
    269273##
     274
    270275TESTS = test
    271276
    272277check_PROGRAMS = $(TESTS)
    273278
    274 TESTSSOURCES = test.cc
    275 
    276 # The following ('..') is a hack for a while...
    277 TESTADDLIBDIRS = ${OMALLOC_LDFLAGS}
    278 TESTADDLIB = $(TESTADDLIBDIRS) $(OMALLOC_R_LDADD)
    279 TESTADDLIBDEBUG = $(TESTADDLIBDIRS) $(OMALLOC_G_LDADD)
    280 
    281 test_SOURCES = $(TESTSSOURCES)
    282 test_LDADD = libfactory.la $(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS) $(TESTADDLIB)
    283 
     279test_SOURCES = test.cc
     280test_LDADD   = libfactory.la
     281
     282####################################################
     283## PKG config
     284##
    284285
    285286pkgconfigdir = $(libdir)/pkgconfig
  • factory/configure.ac

    rc0bbad r37e66f  
    5858# - check withs and enables.
    5959#
    60 AC_ARG_WITH(
    61   Singular,
    62   [AS_HELP_STRING([--without-Singular],[build NOT for the use with CAS Singular.])],
    63   ,
    64   [with_Singular=yes])
    65 
    66 AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]),
    67 [if test "x$enableval" = "xyes"; then
    68   ENABLE_OMALLOC=yes
    69 fi], ENABLE_OMALLOC=no)
    70 
    71 AC_ARG_ENABLE(omalloc_trust, AS_HELP_STRING([--enable-omalloc-trust],[do not check the omalloc header]),
    72 [if test "x$enableval" = "xyes"; then
    73   omalloc_trust=yes
    74 fi], omalloc_trust=no)
    75 
    76 AC_ARG_WITH(omalloc_dir,[AS_HELP_STRING([--with-omalloc-dir=PTH],[location of omalloc])], with_omalloc_dir="$withval", with_omalloc_dir="")
    77 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="")
    78 
    7960AC_ARG_ENABLE(
    8061  cf-inline,
     
    8465
    8566AC_ARG_ENABLE(
    86   streamio,
    87   [AS_HELP_STRING([--enable-streamio],[build Factory with stream IO])],
    88   ,
    89   [enable_streamio=no])
    90 
    91 AC_ARG_ENABLE(
    9267  assertions,
    9368  [AS_HELP_STRING([--disable-assertions],[build Factory with no assertions])],
     
    10681  ,
    10782  enable_debugoutput=no)
     83
     84AC_ARG_ENABLE(
     85  streamio,
     86  [AS_HELP_STRING([--enable-streamio],[build Factory with stream IO])],
     87  ,
     88  [enable_streamio=no])
     89
     90AH_TEMPLATE([NOSTREAMIO], [define to build factory without stream IO])
     91
     92AC_ARG_WITH(
     93  Singular,
     94  [AS_HELP_STRING([--without-Singular],[(obsolete) build NOT for the use with CAS Singular.])],
     95  ,
     96  [with_Singular=yes])
     97
     98PKG_REQUIRE="$PKG_REQUIRE"
     99AC_SUBST(PKG_REQUIRE)
     100
     101SING_CHECK_OMALLOC()
     102
     103AH_TEMPLATE([SINGULAR], [define if linked to Singular])
     104AH_TEMPLATE([DISABLE_GMP_CPP],[DISABLE_GMP_CPP])
     105
     106# Singular
     107if test "x$with_Singular" = xyes; then
     108  AC_DEFINE([SINGULAR],[1]) 
     109  AC_DEFINE([DISABLE_GMP_CPP],[1])
     110  AC_DEFINE([NOSTREAMIO],[1])
     111fi
     112
     113# Use no streamio (C++) if SINGULAR or explicitely disabled
     114if test "x$enable_streamio" = xno || test "x$with_Singular" = xyes;  then
     115  AC_DEFINE([NOSTREAMIO],[1])
     116else
     117  AC_CHECK_HEADERS(iostream.h strstream.h fstream.h iostream string fstream)
     118  AC_CHECK_HEADERS(ctype.h, , [ AC_MSG_ERROR(standard C header files not found) ])
     119
     120  # since the FTE will compile only with stream IO enabled we will not
     121  # check for the necessary header files if stream IO is disabled
     122  AC_CHECK_HEADERS(stdarg.h signal.h errno.h unistd.h, ,
     123    [ AC_MSG_WARN(C/C++ header files not found.
     124                    You will not be able to build the Factory Test Environment
     125                    (though Factory itself should compile)) ])
     126fi
     127
     128AM_CONDITIONAL(
     129    [WITH_PARSER_FOR_CANONICAL_FORM],
     130    [test x$with_Singular != xyes && test x$enable_streamio != xno])
     131
     132AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libresources] )
     133AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libresources] )
     134
     135AC_MSG_CHECKING(whether libresources should be used)
     136if test "x$with_Singular" = xyes;
     137then
     138  AC_MSG_RESULT(yes)
     139
     140  AC_MSG_CHECKING([  RESOURCES_INCLUDES?..])
     141  AC_MSG_RESULT(${RESOURCES_INCLUDES:-unset})
     142
     143  AC_MSG_CHECKING([  RESOURCES_LIBS?..])
     144  AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
     145
     146  PKG_REQUIRE="$PKG_REQUIRE resources"
     147  AC_SUBST(PKG_REQUIRE)
     148else
     149  AC_MSG_RESULT(no)
     150fi
     151
     152AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$with_Singular" = xyes])
     153
    108154
    109155AH_TEMPLATE([FACTORY_INT64], [Defenition for FACTORY_INT64])
     
    199245AC_CHECK_HEADERS(cstdio)
    200246
    201 if test "x$enable_streamio" != xno; then
    202   AC_CHECK_HEADERS(iostream.h strstream.h fstream.h iostream string fstream)
    203   AC_CHECK_HEADERS(ctype.h, , [ AC_MSG_ERROR(standard C header files not found) ])
    204 
    205   # since the FTE will compile only with stream IO enabled we will not
    206   # check for the necessary header files if stream IO is disabled
    207   AC_CHECK_HEADERS(stdarg.h signal.h errno.h unistd.h, ,
    208     [ AC_MSG_WARN(C/C++ header files not found.
    209                     You will not be able to build the Factory Test Environment
    210                     (though Factory itself should compile)) ])
    211 fi
    212 
    213247if test "x$enable_timing" != xno; then
    214248  AC_CHECK_HEADERS(sys/param.h sys/times.h, ,
     
    299333#test "${M4FLAGS+set}" = set || M4FLAGS=
    300334
    301 AH_TEMPLATE([SINGULAR], [define if linked to Singular])
    302 AH_TEMPLATE([DISABLE_GMP_CPP],[DISABLE_GMP_CPP])
    303 AH_TEMPLATE([NOSTREAMIO],[DISABLE_GMP_CPP])
    304 
    305 # Singular
    306 if test "x$with_Singular" = xyes; then
    307   AC_DEFINE([SINGULAR],[1]) 
    308   AC_DEFINE([DISABLE_GMP_CPP],[1])
    309   AC_DEFINE([NOSTREAMIO],[1])
    310 fi
    311 
    312335# arithmetic shift
    313336#if test "x$ac_cv_shift" = xyes; then   
    314337#  AC_DEFINE([HAS_ARITHMETIC_SHIFT],[1],[HAS_ARITHMETIC_SHIFT])
    315338#fi
    316 
    317 AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC])
    318 
    319 AC_MSG_CHECKING([whether to use omalloc/omalloc.h])
    320 if test "x$ENABLE_OMALLOC" = xyes; then
    321   AC_MSG_RESULT(yes)
    322  
    323   if test "x$with_omalloc_dir" != "x"; then
    324     OMALLOC_CFLAGS="-I${with_omalloc_dir}"
    325   fi
    326   if test "x$with_omalloc_extra_dir" != "x"; then
    327     OMALLOC_CFLAGS="$OMALLOC_CFLAGS -I${with_omalloc_extra_dir}"
    328     OMALLOC_LDFLAGS="$OMALLOC_LDFLAGS -L${with_omalloc_extra_dir}/omalloc"
    329   fi
    330  
    331   CPPFLAGS_save="$CPPFLAGS"
    332   # adding $with_omalloc_dir and $with_omalloc_extra_dir to header search path
    333   CPPFLAGS="$CPPFLAGS ${OMALLOC_CFLAGS}"
    334   if test "x$omalloc_trust" = xno; then
    335     AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_ERROR([You asked for omalloc but it cannot be found with your default header search path]))
    336   else
    337     AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_WARN([trusting the omalloc locations given: ${OMALLOC_CFLAGS}]))
    338   fi
    339   CPPFLAGS="$CPPFLAGS_save"
    340 
    341 #  OMALLOC_G_LDADD="-lresources_g -lomalloc_g"
    342   OMALLOC_R_LDADD="-lomalloc"
    343 
    344   AC_DEFINE(HAVE_OMALLOC, 1, [omalloc support])
    345  
    346   AC_SUBST(OMALLOC_CFLAGS)
    347   AC_SUBST(OMALLOC_LDFLAGS)
    348 
    349 #  AC_SUBST(OMALLOC_G_LDADD)
    350   AC_SUBST(OMALLOC_R_LDADD)
    351 else
    352   AC_MSG_RESULT(no)
    353 fi
    354 
    355 if test "x$ENABLE_OMALLOC" = xyes && test "x$with_Singular" = xyes; then
    356   RESOURCES_LDFLAGS="$RESOURCES_LDFLAGS -L${with_omalloc_dir}/resources -L${with_omalloc_extra_dir}/resources -lresources "
    357   AC_SUBST(RESOURCES_LDFLAGS)
    358 fi
    359 
    360 AM_CONDITIONAL([ENABLE_OMALLOC],[test "x$ENABLE_OMALLOC" = xyes])
    361 
    362339
    363340AH_TEMPLATE([CF_USE_INLINE], [define to use "configurable inline methods" (see cf_inline.cc)])
     
    367344fi
    368345
    369 AH_TEMPLATE([NOSTREAMIO], [define to build factory without stream IO])
    370 # iostream
    371 if test "x$enable_streamio" = xno; then
    372   AC_DEFINE([NOSTREAMIO],[1])
    373 #else
    374 #  factorysrc="$factorysrc \$(useiofactorysrc)"
    375 #  factoryincl="$factoryincl \$(useiofactoryincl)"
    376 fi
    377 
    378346AH_TEMPLATE([NOASSERT], [define if you do not want to activate assertions])
    379347# assertions
     
    434402
    435403
    436 AM_CONDITIONAL(
    437     [WITH_PARSER_FOR_CANONICAL_FORM],
    438     [test x$with_Singular != xyes && test x$enable_streamio != xno])
    439 
    440404AC_CONFIG_FILES([Makefile include/factory/Makefile libfac/Makefile factory.pc]) #  ftest/GNUmakefile
    441405AC_OUTPUT
  • factory/factory.pc.in

    rc0bbad r37e66f  
    99URL: https://github.com/Singular/Sources/tree/spielwiese/@PACKAGE@
    1010
    11 Requires: omalloc resources
    12 # Conflicts:
     11Requires: @PKG_REQUIRE@
     12Conflicts:
    1313
    1414Cflags: -I${includedir} @SINGULAR_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@
    1515Libs: -L${libdir} -l@PACKAGE@ @FLINT_LIBS@ @NTL_LIBS@ @GMP_LIBS@
    16 # Libs.private:
     16Libs.private:
    1717
  • kernel/Makefile.am

    rc0bbad r37e66f  
    88###### libkerneldir = $(libdir)/singular
    99
    10 AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${top_srcdir}/libpolys -I${top_builddir}/libpolys $(GMP_CFLAGS) -I${top_srcdir}/factory/include -I${top_builddir}/factory/include $(FACTORY_CFLAGS) $(NTL_CFLAGS) 
     10AM_CPPFLAGS = \
     11-I${top_srcdir} -I${top_builddir} -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
     12$(FACTORY_INCLUDES) $(NTL_CFLAGS) $(FLINT_CFLAGS) $(GMP_CFLAGS)
    1113
    1214SOURCES = polys.cc febase.cc feread.cc \
     
    6062libkernel_la_include_HEADERS   = $(KERNELHEADERS)
    6163
    62 if ENABLE_FACTORY
    63   USE_FACTORY = ${top_builddir}/factory/libfactory.la
    64 else
    65   USE_FACTORY =
    66 endif
    67 
    68 libkernel_la_LIBADD   = ${builddir}/sample/libsample.la ${builddir}/numeric/libnumeric.la \
    69 ${top_builddir}/libpolys/polys/libpolys.la $(USE_FACTORY)
    70 ### libkernel_la_LDFLAGS    = -release ${PACKAGE_VERSION}
     64libkernel_la_LIBADD   = \
     65${builddir}/sample/libsample.la ${builddir}/numeric/libnumeric.la \
     66${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD} \
     67${abs_top_builddir}/libpolys/polys/libpolys.la
    7168
    7269### TODO: the following has to be addapted...
     
    7976
    8077test_SOURCES = test.cc
    81 test_LDADD = libkernel.la ${USEPPROCSDYNAMICLDFLAGS} ${USEPPROCSDYNAMICLD}
    82 
     78test_LDADD   = libkernel.la
    8379
    8480# These files are built first
  • kernel/numeric/Makefile.am

    rc0bbad r37e66f  
    22AM_CPPFLAGS=-I${top_srcdir} -I${top_builddir} \
    33-I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    4 -I${top_srcdir}/factory/include -I${top_builddir}/factory/include ${FACTORY_CFLAGS} \
    5 ${GMP_CFLAGS} ${NTL_CFLAGS} $(FLINT_CFLAGS)
     4${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \
     5${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}
    66
    77noinst_LTLIBRARIES=libnumeric.la
  • kernel/sample/Makefile.am

    rc0bbad r37e66f  
    11ACLOCAL_AMFLAGS=-I ../../m4
    2 AM_CPPFLAGS=-I${top_srcdir} -I${top_builddir} \
    3 -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
    4 -I${top_srcdir}/factory/include -I${top_builddir}/factory/include ${FACTORY_CFLAGS} \
    5 ${GMP_CFLAGS} ${NTL_CFLAGS} $(FLINT_CFLAGS)
     2AM_CPPFLAGS=-I${top_srcdir} -I${top_builddir} -I${top_srcdir}/libpolys -I${top_builddir}/libpolys \
     3${FACTORY_INCLUDES} $(OMALLOC_INCLUDES) $(RESOURCES_INCLUDES) \
     4${NTL_CFLAGS} $(FLINT_CFLAGS) ${GMP_CFLAGS}
    65
    76noinst_LTLIBRARIES=libsample.la
  • libpolys/coeffs/Makefile.am

    rc0bbad r37e66f  
    11ACLOCAL_AMFLAGS = -I ../../m4
    22
    3 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. -I${srcdir} -I${top_srcdir}/../factory/include -I${top_builddir}/../factory/include ${FACTORY_CFLAGS} ${GMP_CFLAGS} ${NTL_CFLAGS} 
     3AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${srcdir} \
     4$(FACTORY_INCLUDES) $(OMALLOC_INCLUDES) $(RESOURCES_INCLUDES) \
     5${NTL_CFLAGS} $(FLINT_CFLAGS) ${GMP_CFLAGS}
    46
    57# noinst???
     
    2527  bigintmat.h Enumerator.h AE.h OPAE.h AEp.h OPAEp.h AEQ.h OPAEQ.h
    2628
    27 if ENABLE_FACTORY
    28   USE_FACTORY = ${top_builddir}/../factory/libfactory.la
    29 else
    30   USE_FACTORY =
    31 endif
    32 
    3329libcoeffs_la_LIBADD = ${top_builddir}/reporter/libreporter.la ${top_builddir}/misc/libmisc.la \
    34 ${USE_FACTORY} ${NTL_LIBS} ${GMP_LIBS}
    35 
     30$(FACTORY_LIBS) $(RESOURCES_LIBS) $(OMALLOC_LIBS) \
     31$(FLINT_LIBS) $(GMP_LIBS) $(NTL_LIBS)
    3632
    3733TESTS_ENVIRONMENT = SINGULARPATH='${top_srcdir}/../factory:${top_builddir}/../factory'
  • libpolys/configure.ac

    rc0bbad r37e66f  
    8787dnl AC_SUBST(INCLUDES)
    8888
     89SING_CHECK_OMALLOC()
     90
     91ENABLE_RESOURCES="yes"
     92
     93AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libresources] )
     94AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libresources] )
     95
     96AC_MSG_CHECKING(whether libresources should be used)
     97
     98if test "x$ENABLE_RESOURCES" = xyes;
     99then
     100  AC_MSG_RESULT(yes)
     101
     102  AC_MSG_CHECKING([  RESOURCES_INCLUDES?..])
     103  AC_MSG_RESULT(${RESOURCES_INCLUDES:-unset})
     104
     105  AC_MSG_CHECKING([  RESOURCES_LIBS?..])
     106  AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
     107
     108  PKG_REQUIRE="$PKG_REQUIRE resources"
     109  AC_SUBST(PKG_REQUIRE)
     110else
     111  AC_MSG_RESULT(no)
     112fi
     113
     114AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$ENABLE_RESOURCES" = xyes])
     115
     116SING_CHECK_FACTORY()
     117
    89118SING_CHECK_P_PROCS
    90119SING_CHECK_ARITH_RINGS
    91 SING_CHECK_FACTORY
    92120SING_CHECK_PLURAL
    93121
  • libpolys/libpolys-config.in

    rc0bbad r37e66f  
    8989
    9090    --cflags)
    91         ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
     91        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
    9292        ;;
    9393
  • libpolys/libpolys.pc.in

    rc0bbad r37e66f  
    99URL: https://github.com/Singular/Sources/tree/spielwiese/@PACKAGE@
    1010
    11 Requires: factory omalloc resources
    12 # Conflicts:
     11Requires: @PKG_REQUIRE@
     12Conflicts:
    1313
    14 Cflags: -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@
    15 Libs: -L${libdir} -lpolys @FACTORY_LIBS@ @NTL_LIBS@ @GMP_LIBS@ @USEPPROCSDYNAMICLD@
    16 # Libs.private:
     14Cflags: -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@
     15Libs: -L${libdir} -lpolys -lfactory @FLINT_LIBS@ @NTL_LIBS@ @GMP_LIBS@ @USEPPROCSDYNAMICLD@
     16Libs.private:
    1717
  • libpolys/polys/Makefile.am

    rc0bbad r37e66f  
    11ACLOCAL_AMFLAGS = -I ../../m4
    22
    3 AM_CPPFLAGS     = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. -I${srcdir} -I${top_srcdir}/../factory/include -I${top_builddir}/../factory/include ${GMP_CFLAGS} 
     3AM_CPPFLAGS     = -I${top_srcdir} -I${top_builddir} -I${srcdir} \
     4${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \
     5${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}
    46
    57
  • libpolys/tests/Makefile.am

    rc0bbad r37e66f  
    11ACLOCAL_AMFLAGS = -I ../../m4
    22
    3 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. -I${srcdir} -I${top_srcdir}/../factory/include -I${top_builddir}/../factory/include ${FACTORY_CFLAGS} ${GMP_CFLAGS} ${NTL_CFLAGS}
     3AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} -I${srcdir} \
     4${FACTORY_INCLUDES} ${RESOURCES_INCLUDES} ${OMALLOC_INCLUDES} \
     5${FLINT_CFLAGS} ${NTL_CFLAGS} ${GMP_CFLAGS}
    46
    57TESTS = simple_test \
     
    1618nodist_rings_test_SOURCES = rings_test_runner.cpp
    1719
    18 if ENABLE_FACTORY
    19   USE_FACTORY = -L${top_builddir}/../factory
    20 else
    21   USE_FACTORY =
    22 endif
    23 
    24 AM_LDFLAGS = -L${top_builddir}/polys -L${top_builddir}/coeffs -L${top_builddir}/reporter -L${top_builddir}/misc ${USE_FACTORY} -L${top_builddir}/../omalloc -L${top_builddir}/../resources
    25 
    26 polys_test_LDFLAGS = ${AM_LDFLAGS} ${USEPPROCSDYNAMICLDFLAGS}
    27 rings_test_LDFLAGS = $(polys_test_LDFLAGS)
    28 
    29 coeffs_test_LDADD = -lcoeffs -lreporter -lmisc ${FACTORY_LIBS} -lomalloc -lresources ${NTL_LIBS} ${GMP_LIBS}
    30 polys_test_LDADD = -lpolys ${USEPPROCSDYNAMICLD} $(coeffs_test_LDADD)
     20coeffs_test_LDADD = ${top_builddir}/coeffs/libcoeffs.la
     21polys_test_LDADD = ${top_builddir}/polys/libpolys.la
    3122rings_test_LDADD = $(polys_test_LDADD)
    32 
    3323
    3424BUILT_SOURCES = gftables MOD \
  • libsingular-config.in

    rc0bbad r37e66f  
    8989
    9090    --cflags)
    91         ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_CFLAGS@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
     91        ${ECHOn} " -I${includedir} -I${includedir}/singular @SINGULAR_CFLAGS@ @FACTORY_INCLUDES@ @FLINT_CFLAGS@ @NTL_CFLAGS@ @GMP_CFLAGS@ "
    9292        ;;
    9393
  • m4/options.m4

    rc0bbad r37e66f  
    1717AM_CONDITIONAL([ENABLE_RINGS],[test x$ENABLE_RINGS = xyes])
    1818AC_MSG_RESULT($ENABLE_RINGS)
    19 ])
    20 
    21 AC_DEFUN([SING_CHECK_FACTORY],
    22 [
    23 AC_MSG_CHECKING(whether factory should be enabled)
    24 
    25 AC_ARG_ENABLE(factory, AS_HELP_STRING([--disable-factory], [Disable factory]),
    26 [if test $enableval = yes; then
    27      ENABLE_FACTORY="yes"
    28  else
    29      ENABLE_FACTORY="no"
    30  fi
    31 ],[ENABLE_FACTORY="yes"])
    32 
    33 if test x$ENABLE_FACTORY = xyes; then
    34   FACTORY_CFLAGS=""
    35   FACTORY_LIBS="-lfactory"
    36 
    37   AC_SUBST(FACTORY_CFLAGS)
    38   AC_SUBST(FACTORY_LIBS)
    39  
    40   AC_DEFINE(HAVE_FACTORY,1,Enable factory)
    41 fi
    42 
    43 
    44 
    45 AM_CONDITIONAL([ENABLE_FACTORY],[test x$ENABLE_FACTORY = xyes])
    46 AC_MSG_RESULT($ENABLE_FACTORY)
    4719])
    4820
     
    8254
    8355])
     56
     57
     58AC_DEFUN([SING_CHECK_OMALLOC],
     59[
     60  AC_ARG_ENABLE(omalloc,
     61    [AS_HELP_STRING([--enable-omalloc],[build for use with omalloc])],
     62    [if test "x$enableval" = "xyes"; then
     63      ENABLE_OMALLOC=yes
     64    fi],
     65      ENABLE_OMALLOC=no)
     66
     67  AC_ARG_VAR( [OMALLOC_INCLUDES], [INCLUDES for libomalloc] )
     68  AC_ARG_VAR( [OMALLOC_LIBS], [LIBS for libomalloc] )
     69
     70  AC_MSG_CHECKING([whether to use omalloc])
     71
     72  AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC])
     73
     74  if test "x$ENABLE_OMALLOC" = xyes; then
     75    AC_MSG_RESULT(yes)
     76
     77    AC_MSG_CHECKING([  OMALLOC_INCLUDES?..])
     78    AC_MSG_RESULT(${OMALLOC_INCLUDES:-unset})
     79
     80    AC_MSG_CHECKING([  OMALLOC_LIBS?..])
     81    AC_MSG_RESULT(${OMALLOC_LIBS:-unset})
     82
     83    CPPFLAGS_save="$CPPFLAGS"
     84    CFLAGS_save="$CFLAGS"
     85    LIBS_save="$LIBS"
     86
     87    AC_LANG_PUSH([C])
     88#
     89    CPPFLAGS="$CPPFLAGS ${OMALLOC_INCLUDES}"
     90    CFLAGS="$CFLAGS ${OMALLOC_INCLUDES}"
     91    LIBS="$LIBS ${OMALLOC_LIBS}"
     92
     93    AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_WARN([trusting the omalloc locations given: ${OMALLOC_INCLUDES}]))
     94
     95    CFLAGS="$CFLAGS_save"
     96    CPPFLAGS="$CPPFLAGS_save"
     97    LIBS="$LIBS_save"
     98#
     99    AC_LANG_POP([C])
     100
     101    AC_DEFINE([HAVE_OMALLOC],[1])
     102 
     103    PKG_REQUIRE="$PKG_REQUIRE omalloc"
     104    AC_SUBST(PKG_REQUIRE)
     105  else
     106    AC_MSG_RESULT(no)
     107  fi
     108
     109  AM_CONDITIONAL([ENABLE_OMALLOC],[test "x$ENABLE_OMALLOC" = xyes])
     110])
     111
     112AC_DEFUN([SING_USE_OMALLOC],
     113[
     114 AC_ARG_ENABLE(omalloc,
     115  [AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory])],
     116  [if test "x$enableval"  = "xyes"; then
     117    ENABLE_OMALLOC=yes
     118   fi],
     119    ENABLE_OMALLOC=add)
     120
     121 ENABLE_OMALLOC_ARG=""
     122
     123 if test "x$ENABLE_OMALLOC" = xadd; then
     124   ENABLE_OMALLOC=yes
     125   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
     126 fi
     127
     128 AC_MSG_CHECKING(whether to use omalloc in factory and co.)
     129
     130 if test "x$ENABLE_OMALLOC" = xyes; then
     131  AC_MSG_RESULT(yes)
     132  OMALLOC_INCLUDES="-I$ac_abs_top_srcdir"
     133
     134  if test "x$ac_abs_top_srcdir" != "x$ac_abs_top_builddir"; then
     135    OMALLOC_INCLUDES="$OMALLOC_INCLUDES -I$ac_abs_top_builddir"
     136  fi
     137
     138  OMALLOC_LIBS="$ac_abs_top_builddir/omalloc/libomalloc.la"
     139
     140  AC_SUBST(OMALLOC_INCLUDES)
     141  AC_SUBST(OMALLOC_LIBS)
     142
     143  ENABLE_OMALLOC_ARG="$ENABLE_OMALLOC_ARG OMALLOC_LIBS='$OMALLOC_LIBS' OMALLOC_INCLUDES='$OMALLOC_INCLUDES'"
     144  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
     145
     146  PKG_REQUIRE="$PKG_REQUIRE omalloc"
     147  AC_SUBST(PKG_REQUIRE)
     148 else
     149  AC_MSG_RESULT(no)
     150 fi
     151
     152
     153 AM_CONDITIONAL([ENABLE_OMALLOC],[test "x$ENABLE_OMALLOC" = xyes])
     154])
     155
     156AC_DEFUN([SING_USE_RESOURCES],
     157[
     158 AC_ARG_ENABLE(resources,
     159  [AS_HELP_STRING([--disable-resources], [do NOT use libresources within the factory])],
     160  [if test "x$enableval"  = "xyes"; then
     161    ENABLE_RESOURCES=yes
     162   fi],
     163    ENABLE_RESOURCES=yes)
     164
     165 AC_MSG_CHECKING(whether to use libresources in factory and co.)
     166 if test "x$ENABLE_RESOURCES" = xyes; then
     167  AC_MSG_RESULT(yes)
     168  RESOURCES_INCLUDES="-I$ac_abs_top_srcdir "
     169
     170  RESOURCES_LIBS="$ac_abs_top_builddir/resources/libresources.la"
     171
     172  AC_SUBST(RESOURCES_INCLUDES)
     173  AC_SUBST(RESOURCES_LIBS)
     174
     175  ENABLE_ARG="--with-Singular RESOURCES_LIBS='$RESOURCES_LIBS' RESOURCES_INCLUDES='$RESOURCES_INCLUDES'"
     176
     177  ac_configure_args="$ac_configure_args $ENABLE_ARG"
     178
     179  PKG_REQUIRE="$PKG_REQUIRE resources"
     180  AC_SUBST(PKG_REQUIRE)
     181 else
     182  AC_MSG_RESULT(no)
     183 fi
     184
     185 AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$ENABLE_RESOURCES" = xyes])
     186])
     187
     188
     189AC_DEFUN([SING_USE_FACTORY],
     190[
     191 AC_MSG_CHECKING(whether factory should be enabled)
     192
     193 AC_ARG_ENABLE(factory, AS_HELP_STRING([--disable-factory], [Disable factory]),
     194 [if test $enableval = yes; then
     195     ENABLE_FACTORY="yes"
     196  else
     197     ENABLE_FACTORY="no"
     198  fi],[ENABLE_FACTORY="yes"])
     199
     200 if test x$ENABLE_FACTORY = xyes; then
     201
     202  FACTORY_INCLUDES="-I$ac_abs_top_srcdir -I$ac_abs_top_srcdir/factory/include"
     203  if test "x$ac_abs_top_srcdir" != "x$ac_abs_top_builddir"; then
     204    FACTORY_INCLUDES="$FACTORY_INCLUDES -I$ac_abs_top_builddir -I$ac_abs_top_builddir/factory/include"
     205  fi
     206
     207  FACTORY_LIBS="$ac_abs_top_builddir/factory/libfactory.la"
     208
     209  AC_SUBST(FACTORY_INCLUDES)
     210  AC_SUBST(FACTORY_LIBS)
     211
     212  AC_MSG_CHECKING([  FACTORY_INCLUDES?..])
     213  AC_MSG_RESULT(${FACTORY_INCLUDES:-unset})
     214
     215  AC_MSG_CHECKING([  FACTORY_LIBS?..])
     216  AC_MSG_RESULT(${FACTORY_LIBS:-unset})
     217
     218  AC_DEFINE(HAVE_FACTORY,[1],[Enable factory])
     219
     220  ENABLE_ARG="FACTORY_LIBS='$FACTORY_LIBS' FACTORY_INCLUDES='$FACTORY_INCLUDES'"
     221
     222  ac_configure_args="$ac_configure_args $ENABLE_ARG"
     223
     224  PKG_REQUIRE="$PKG_REQUIRE factory"
     225  AC_SUBST(PKG_REQUIRE)
     226 fi
     227
     228
     229 AM_CONDITIONAL([ENABLE_FACTORY],[test x$ENABLE_FACTORY = xyes])
     230 AC_MSG_RESULT($ENABLE_FACTORY)
     231
     232])
     233
     234AC_DEFUN([SING_CHECK_FACTORY],
     235[
     236AC_ARG_ENABLE(factory, AS_HELP_STRING([--disable-factory], [Disable factory]),
     237[if test $enableval = yes; then
     238     ENABLE_FACTORY="yes"
     239 else
     240     ENABLE_FACTORY="no"
     241 fi
     242],[ENABLE_FACTORY="yes"])
     243
     244  AC_ARG_VAR( [FACTORY_INCLUDES], [INCLUDES for FACTORY] )
     245  AC_ARG_VAR( [FACTORY_LIBS], [LIBS for FACTORY] )
     246
     247  AC_MSG_CHECKING(whether factory should be enabled)
     248  if test "x$ENABLE_FACTORY" = xyes; then
     249    AC_MSG_RESULT(yes)
     250
     251    AC_MSG_CHECKING([  FACTORY_INCLUDES?..])
     252    AC_MSG_RESULT(${FACTORY_INCLUDES:-unset})
     253
     254    AC_MSG_CHECKING([  FACTORY_LIBS?..])
     255    AC_MSG_RESULT(${FACTORY_LIBS:-unset})
     256
     257
     258    CPPFLAGS_save="$CPPFLAGS"
     259    CFLAGS_save="$CFLAGS"
     260    CXXFLAGS_save="$CXXFLAGS"
     261    LIBS_save="$LIBS"
     262
     263    AC_LANG_PUSH([C++])
     264#
     265    CPPFLAGS="$CPPFLAGS ${FACTORY_INCLUDES}"
     266    CFLAGS="$CFLAGS ${FACTORY_INCLUDES}"
     267    CXXFLAGS="$CXXFLAGS ${FACTORY_INCLUDES}"
     268    LIBS="$LIBS ${FACTORY_LIBS}"
     269 
     270    AC_CHECK_HEADERS([factory/factory.h],,AC_MSG_WARN([trusting the factory locations given: ${FACTORY_INCLUDES}]))
     271
     272    CFLAGS="$CFLAGS_save"
     273    CXXFLAGS="$CXXFLAGS_save"
     274    CPPFLAGS="$CPPFLAGS_save"
     275    LIBS="$LIBS_save"
     276#
     277    AC_LANG_POP([C++])
     278
     279    AC_DEFINE(HAVE_FACTORY,[1],[Enable factory])
     280 
     281    PKG_REQUIRE="$PKG_REQUIRE factory"
     282    AC_SUBST(PKG_REQUIRE)
     283  else
     284    AC_MSG_RESULT(no)
     285  fi
     286
     287  AM_CONDITIONAL([ENABLE_FACTORY],[test x$ENABLE_FACTORY = xyes])
     288  AC_MSG_RESULT($ENABLE_FACTORY)
     289
     290])
Note: See TracChangeset for help on using the changeset viewer.