[429497] | 1 | |
---|
[8e8aca3] | 2 | dnl # emacs edit mode for this file is -*- sh -*- |
---|
[575680] | 3 | |
---|
[a013ed] | 4 | dnl # |
---|
| 5 | dnl # configure.in - process this file with `autoconf' to generate |
---|
| 6 | dnl # a `configure' script. |
---|
| 7 | dnl # |
---|
| 8 | dnl # See the `INSTALL' file for information on how the `configure' |
---|
| 9 | dnl # script works. |
---|
| 10 | dnl # |
---|
[beca7c] | 11 | |
---|
| 12 | # |
---|
| 13 | # - initialisation. |
---|
| 14 | # |
---|
[635774] | 15 | AC_INIT([factory], [3.1.3]) |
---|
[e76d7a6] | 16 | AC_CONFIG_SRCDIR(canonicalform.cc) |
---|
[9af8a63] | 17 | AC_CONFIG_MACRO_DIR([../m4]) |
---|
[e76d7a6] | 18 | AC_CONFIG_AUX_DIR([.]) |
---|
[f3ea6ce] | 19 | AC_CONFIG_HEADER(config.h) |
---|
[ab788d] | 20 | |
---|
[ea0001] | 21 | AM_MAINTAINER_MODE |
---|
[24a77fb] | 22 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
[2e984a] | 23 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) |
---|
[280286e] | 24 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
---|
[2e984a] | 25 | |
---|
[e76d7a6] | 26 | |
---|
[e08559] | 27 | # Add pre'prefixed config |
---|
[3af3ca] | 28 | AX_PREFIX_CONFIG_H([config.h],[],[config.h]) |
---|
[e08559] | 29 | |
---|
[e76d7a6] | 30 | AC_PROG_YACC |
---|
[e078e0] | 31 | # AM_PROG_AR |
---|
[80c102] | 32 | LT_INIT |
---|
| 33 | |
---|
[beca7c] | 34 | # |
---|
[6e304e3] | 35 | # Do not change version here!!! |
---|
[beca7c] | 36 | # |
---|
[a013ed] | 37 | dnl # |
---|
| 38 | dnl # Change version here, do not believe the comment in the |
---|
| 39 | dnl # preceding lines. |
---|
| 40 | dnl # |
---|
[42653b] | 41 | factory_version="3.1.3" |
---|
[a013ed] | 42 | factory_configuration="'$ac_configure_args' in `pwd`" |
---|
[beca7c] | 43 | |
---|
| 44 | # |
---|
| 45 | # - check withs and enables. |
---|
| 46 | # |
---|
[e4fe2b] | 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 | |
---|
[429497] | 53 | AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc],[build for use with omalloc]), |
---|
| 54 | [if test "x$enableval" = "xyes"; then |
---|
[461f40] | 55 | ENABLE_OMALLOC=yes |
---|
| 56 | fi], ENABLE_OMALLOC=no) |
---|
[e4fe2b] | 57 | |
---|
[429497] | 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) |
---|
[575680] | 62 | |
---|
[429497] | 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="") |
---|
[575680] | 65 | |
---|
[1cdedcb] | 66 | AC_ARG_ENABLE( |
---|
| 67 | cf-inline, |
---|
[e4fe2b] | 68 | [AS_HELP_STRING([--enable-cf-inline],[build Factory with \"configurable inline methods\" enabled.])], |
---|
| 69 | [enable_cf_inline=$enableval], |
---|
| 70 | [enable_cf_inline=no]) |
---|
[1cdedcb] | 71 | |
---|
[beca7c] | 72 | AC_ARG_ENABLE( |
---|
| 73 | streamio, |
---|
[e4fe2b] | 74 | [AS_HELP_STRING([--enable-streamio],[build Factory with stream IO])], |
---|
[575680] | 75 | , |
---|
[e4fe2b] | 76 | [enable_streamio=no]) |
---|
[beca7c] | 77 | |
---|
| 78 | AC_ARG_ENABLE( |
---|
| 79 | assertions, |
---|
[ff3a4f] | 80 | [AS_HELP_STRING([--disable-assertions],[build Factory with no assertions])], |
---|
[beca7c] | 81 | , |
---|
[ff3a4f] | 82 | enable_assertions=yes) |
---|
[beca7c] | 83 | |
---|
| 84 | AC_ARG_ENABLE( |
---|
| 85 | timing, |
---|
[e4fe2b] | 86 | [AS_HELP_STRING([--enable-timing],[build Factory so it will print timing information])], |
---|
[575680] | 87 | , |
---|
[beca7c] | 88 | enable_timing=no) |
---|
| 89 | |
---|
| 90 | AC_ARG_ENABLE( |
---|
| 91 | debugoutput, |
---|
[e4fe2b] | 92 | [AS_HELP_STRING([--enable-debugoutput],[build Factory so it will print debugging information])], |
---|
[575680] | 93 | , |
---|
[beca7c] | 94 | enable_debugoutput=no) |
---|
| 95 | |
---|
[f284db] | 96 | AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]), |
---|
[2b43ac] | 97 | [if test "x$enableval" = "xyes"; then |
---|
| 98 | ENABLE_DEBUG=yes |
---|
| 99 | fi], ENABLE_DEBUG=no) |
---|
| 100 | |
---|
| 101 | AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) |
---|
| 102 | |
---|
[beca7c] | 103 | # |
---|
[575680] | 104 | # - check for CC and CXX but be careful about CFLAGS. |
---|
[beca7c] | 105 | # |
---|
[575680] | 106 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
| 107 | AC_PROG_CC |
---|
[beca7c] | 108 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
| 109 | AC_PROG_CXX |
---|
[575680] | 110 | if test "x$GCC" != xyes && test "x$GXX" != xyes; then |
---|
[f13f4b] | 111 | AC_MSG_WARN(you better use gcc to compile Factory) |
---|
[6e304e3] | 112 | else |
---|
| 113 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
[f86531] | 114 | AC_MSG_WARN([we use \`' as default for \`CXXFLAGS' |
---|
[a013ed] | 115 | (instead of the configure default \`-g -O')]) |
---|
[6e304e3] | 116 | fi |
---|
| 117 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
[f86531] | 118 | AC_MSG_WARN([we use \`' as default for \`CFLAGS' |
---|
[a013ed] | 119 | (instead of the configure default \`-g -O')]) |
---|
[6e304e3] | 120 | fi |
---|
[beca7c] | 121 | fi |
---|
| 122 | |
---|
| 123 | # |
---|
| 124 | # - check for some other programs. |
---|
| 125 | # |
---|
[654824] | 126 | AC_PROG_CPP |
---|
[beca7c] | 127 | AC_PROG_CXXCPP |
---|
[9d50d3] | 128 | AC_PROG_LN_S |
---|
[beca7c] | 129 | AC_PROG_INSTALL |
---|
[d2f9df] | 130 | AC_DISABLE_STATIC |
---|
| 131 | LT_INIT |
---|
[beca7c] | 132 | AC_PROG_MAKE_SET |
---|
| 133 | AC_CHECK_PROG(AR, ar, ar, where-is-your-ar) |
---|
[9d50d3] | 134 | AC_CHECK_PROG(M4, m4, m4, where-is-your-m4) |
---|
[beca7c] | 135 | AC_CHECK_PROG(BISON, bison, bison, where-is-your-bison) |
---|
[ae4d9b] | 136 | AC_CHECK_SIZEOF(long,4) |
---|
[d2f9df] | 137 | AC_C_CONST |
---|
| 138 | AC_C_INLINE |
---|
[089d1f] | 139 | |
---|
| 140 | AH_TEMPLATE([INT64], [Defenition for INT64]) |
---|
| 141 | # Always long long int???! |
---|
| 142 | AC_DEFINE([INT64], [long long int]) |
---|
| 143 | |
---|
[a11768] | 144 | DX_INIT_DOXYGEN($PACKAGE_NAME, MYDOXYGENCONFIG) |
---|
[beca7c] | 145 | |
---|
[64f32c7] | 146 | # do not use `MKINSTALLDIRS' and `MAKEHEADER' since there may be |
---|
| 147 | # name clashes with other peoples configure scripts via |
---|
| 148 | # `config.cache'. Furthermore, we do not use cache at all to |
---|
| 149 | # avoid some nasty problems with our own development environment. |
---|
| 150 | unset ac_cv_path_FACTORY_MKINSTALLDIRS |
---|
| 151 | unset ac_cv_path_FACTORY_MAKEHEADER |
---|
[726f4d] | 152 | save_path="$PATH" |
---|
[b70273] | 153 | PATH="$PATH:$srcdir/bin" |
---|
| 154 | AC_PATH_PROG(FACTORY_MKINSTALLDIRS, mkinstalldirs, -mkdir) |
---|
[726f4d] | 155 | PATH="$srcdir/bin:$save_path" |
---|
[b70273] | 156 | AC_PATH_PROG(FACTORY_MAKEHEADER, makeheader) |
---|
[726f4d] | 157 | PATH="$save_path" |
---|
| 158 | |
---|
| 159 | # |
---|
| 160 | # - expand paths. |
---|
| 161 | # |
---|
| 162 | |
---|
| 163 | AC_MSG_CHECKING(and generating explicit install paths) |
---|
[413cbb] | 164 | |
---|
| 165 | # generate Makefile |
---|
[726f4d] | 166 | save_prefix="$prefix" |
---|
| 167 | save_exec_prefix="$exec_prefix" |
---|
| 168 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
| 169 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
---|
| 170 | for dir in prefix exec_prefix bindir sbindir libexecdir \ |
---|
| 171 | datadir sysconfdir sharedstatedir localstatedir libdir \ |
---|
| 172 | includedir oldincludedir infodir mandir; do |
---|
| 173 | eval "dir_value=\$$dir" |
---|
[f95b2f] | 174 | cat >> ./conftest.mk << EXPLPATHEOT |
---|
| 175 | $dir=$dir_value |
---|
| 176 | explicit_$dir: |
---|
| 177 | @ echo \$($dir) |
---|
| 178 | @ if echo \$($dir) | grep '^/'; \\ |
---|
| 179 | then echo \$($dir) > ./conftest.dir; \\ |
---|
| 180 | else echo \`pwd\`/\$($dir) > ./conftest.dir; fi |
---|
| 181 | EXPLPATHEOT |
---|
[726f4d] | 182 | done |
---|
| 183 | prefix="$save_prefix" |
---|
| 184 | exec_prefix="$save_exec_prefix" |
---|
| 185 | |
---|
[413cbb] | 186 | # generate the explicit paths |
---|
[f95b2f] | 187 | make >&5 2>&1 -f ./conftest.mk explicit_datadir |
---|
| 188 | explicit_datadir=`cat ./conftest.dir` |
---|
| 189 | make >&5 2>&1 -f ./conftest.mk explicit_libdir |
---|
| 190 | explicit_libdir=`cat ./conftest.dir` |
---|
| 191 | make >&5 2>&1 -f ./conftest.mk explicit_includedir |
---|
| 192 | explicit_includedir=`cat ./conftest.dir` |
---|
[726f4d] | 193 | |
---|
[413cbb] | 194 | # clean up |
---|
[f95b2f] | 195 | rm -f ./conftest.mk ./conftest.dir |
---|
[726f4d] | 196 | |
---|
[f95b2f] | 197 | AC_MSG_RESULT(done) |
---|
[beca7c] | 198 | |
---|
| 199 | # |
---|
| 200 | # - check for libraries. |
---|
| 201 | # |
---|
[20d724f] | 202 | AC_CHECK_LIB(m, atof, , [ AC_MSG_ERROR(libm.a not found) ]) |
---|
| 203 | |
---|
[9af8a63] | 204 | LB_CHECK_GMP(3.1.1,,AC_MSG_ERROR([Unable to find GMP on your machine: please use --with-gmp=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) |
---|
| 205 | |
---|
| 206 | LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) |
---|
[beca7c] | 207 | |
---|
[3ed6ccf] | 208 | LB_CHECK_FLINT(2.3,,AC_MSG_WARN([Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)])) |
---|
[97a059] | 209 | |
---|
[b46fb9] | 210 | # arithmetic shift |
---|
[1bc850] | 211 | #AC_MSG_CHECKING(whether your compiler does arithmetic shifts) |
---|
| 212 | #AC_CACHE_VAL(ac_cv_shift, |
---|
| 213 | # [ LDFLAGS="-L$explicit_libdir $LDFLAGS" |
---|
| 214 | # AC_TRY_RUN( |
---|
| 215 | # [ int main() { if (-2 >> 1 == -1) return(0); else return(1); } ], |
---|
| 216 | # ac_cv_shift=yes, ac_cv_shift=no, ac_cv_shift=yes) ]) |
---|
| 217 | #if test "x$ac_cv_shift" = xyes; then |
---|
| 218 | # AC_MSG_RESULT(yes) |
---|
| 219 | #else |
---|
| 220 | # AC_MSG_RESULT(no) |
---|
| 221 | #fi |
---|
[b46fb9] | 222 | |
---|
[beca7c] | 223 | # |
---|
| 224 | # - check for header files. |
---|
| 225 | # |
---|
| 226 | AC_LANG_CPLUSPLUS |
---|
| 227 | |
---|
[43b476] | 228 | AC_CHECK_HEADERS(stdio.h stdlib.h string.h time.h math.h, , |
---|
[9d50d3] | 229 | [ AC_MSG_ERROR(C header files not found) ]) |
---|
[958fc4] | 230 | AC_CHECK_HEADERS(cstdio) |
---|
[beca7c] | 231 | |
---|
[575680] | 232 | if test "x$enable_streamio" != xno; then |
---|
[1dc616] | 233 | AC_CHECK_HEADERS(iostream.h strstream.h fstream.h iostream string fstream) |
---|
[beca7c] | 234 | AC_CHECK_HEADERS(ctype.h, , [ AC_MSG_ERROR(standard C header files not found) ]) |
---|
[9d50d3] | 235 | |
---|
| 236 | # since the FTE will compile only with stream IO enabled we will not |
---|
| 237 | # check for the necessary header files if stream IO is disabled |
---|
[dc11d0] | 238 | AC_CHECK_HEADERS(stdarg.h signal.h errno.h unistd.h, , |
---|
[9d50d3] | 239 | [ AC_MSG_WARN(C/C++ header files not found. |
---|
| 240 | You will not be able to build the Factory Test Environment |
---|
| 241 | (though Factory itself should compile)) ]) |
---|
[575680] | 242 | fi |
---|
[beca7c] | 243 | |
---|
| 244 | if test "x$enable_timing" != xno; then |
---|
| 245 | AC_CHECK_HEADERS(sys/param.h sys/times.h, , |
---|
[a013ed] | 246 | [ AC_MSG_ERROR(\`sys/times.h' or \`sys/param.h' not found. Try |
---|
| 247 | \`configure --disable-timing') ]) |
---|
[beca7c] | 248 | fi |
---|
| 249 | |
---|
[a013ed] | 250 | # font-lock-trick: ' |
---|
| 251 | |
---|
[beca7c] | 252 | # |
---|
| 253 | # - check for compiler characteristics. |
---|
| 254 | # |
---|
| 255 | |
---|
[654824] | 256 | # use C to check compiler characteristics instead of C++. On |
---|
| 257 | # nextstep, checking with C++ may fail. |
---|
| 258 | AC_LANG_C |
---|
| 259 | |
---|
[575680] | 260 | # cross-compiling ?! |
---|
[7f7d55f] | 261 | #AC_C_CROSS |
---|
| 262 | #if test "x$cross_compiling" = xyes; then |
---|
| 263 | # AC_MSG_WARN([you better specify a cache file to get the values for |
---|
| 264 | # cross-compiling right (e.g., call \`configure |
---|
| 265 | # --cache-file=yourTarget.cache'). In particular, you |
---|
| 266 | # should make sure that your target machine supports |
---|
| 267 | # arithmetic shift.]) |
---|
| 268 | #fi |
---|
[beca7c] | 269 | |
---|
[a013ed] | 270 | # font-lock-trick: ' |
---|
| 271 | |
---|
[beca7c] | 272 | # |
---|
| 273 | # - paths. |
---|
| 274 | # |
---|
| 275 | |
---|
[726f4d] | 276 | # note that Singular has its own mechanism to search the tables, |
---|
| 277 | # hence we do not need to mind it here |
---|
| 278 | gftabledir='${datadir}/factory/gftables' |
---|
[ea0001] | 279 | explicit_gftabledir="$explicit_datadir/gftables" |
---|
[beca7c] | 280 | |
---|
[726f4d] | 281 | # for installation of the templates |
---|
| 282 | templatedir='${includedir}/templates' |
---|
[beca7c] | 283 | |
---|
| 284 | # |
---|
| 285 | # - the name of the game and the targets to create. |
---|
| 286 | # |
---|
| 287 | if test "x$with_Singular" = xyes; then |
---|
[468b57] | 288 | libfactory=libfactory.a |
---|
[beca7c] | 289 | |
---|
| 290 | factorysrc='$(basefactorysrc) $(singfactorysrc)' |
---|
| 291 | factoryincl='$(basefactoryincl) $(singfactoryincl)' |
---|
| 292 | |
---|
| 293 | alltargets=cf |
---|
| 294 | installtargets=installcf |
---|
| 295 | uninstalltargets=uninstallcf |
---|
| 296 | else |
---|
| 297 | libfactory=libcf.a |
---|
| 298 | |
---|
| 299 | factorysrc='$(basefactorysrc)' |
---|
| 300 | factoryincl='$(basefactoryincl)' |
---|
| 301 | |
---|
| 302 | alltargets=cf |
---|
[575680] | 303 | installtargets=installcf |
---|
| 304 | uninstalltargets=uninstallcf |
---|
[beca7c] | 305 | fi |
---|
| 306 | |
---|
| 307 | # |
---|
[6e304e3] | 308 | # - set defines and variables according to our tests. |
---|
[beca7c] | 309 | # |
---|
| 310 | |
---|
| 311 | # CFLAGS |
---|
| 312 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
[f86531] | 313 | CFLAGS="" |
---|
[beca7c] | 314 | fi |
---|
| 315 | |
---|
| 316 | # CXXFLAGS |
---|
| 317 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
[f86531] | 318 | CXXFLAGS="" |
---|
[fc7220] | 319 | |
---|
| 320 | AC_LANG_SAVE |
---|
| 321 | AC_LANG_CPLUSPLUS |
---|
[8c0b57] | 322 | # check whether CXX accepts -fno-rtti |
---|
| 323 | AC_MSG_CHECKING(whether gcc accepts -fno-rtti) |
---|
[fc7220] | 324 | tmp_flags=${CXXFLAGS} |
---|
[f86531] | 325 | CXXFLAGS="${CXXFLAGS}" |
---|
[fc7220] | 326 | AC_CACHE_VAL(ac_cv_cxx_have_rtti, |
---|
| 327 | AC_TRY_COMPILE(,,ac_cv_cxx_have_rtti=yes,ac_cv_cxx_have_rtti=no) |
---|
| 328 | ) |
---|
| 329 | AC_MSG_RESULT(${ac_cv_cxx_have_rtti}) |
---|
| 330 | CXXFLAGS=$tmp_flags |
---|
| 331 | if test "${ac_cv_cxx_have_rtti}" = yes; then |
---|
[f86531] | 332 | CXXFLAGS="$CXXFLAGS" |
---|
[fc7220] | 333 | fi |
---|
| 334 | |
---|
[8c0b57] | 335 | AC_MSG_CHECKING(whether gcc accepts -fno-exceptions) |
---|
[fc7220] | 336 | tmp_flags=${CXXFLAGS} |
---|
[8c0b57] | 337 | CXXFLAGS="${CXXFLAGS} -fno-exceptions" |
---|
[fc7220] | 338 | AC_CACHE_VAL(ac_cv_cxx_have_exceptions, |
---|
[a550fd5] | 339 | AC_TRY_LINK(,,ac_cv_cxx_have_exceptions=yes,ac_cv_cxx_have_exceptions=no) |
---|
[fc7220] | 340 | ) |
---|
| 341 | AC_MSG_RESULT(${ac_cv_cxx_have_exceptions}) |
---|
| 342 | CXXFLAGS=$tmp_flags |
---|
| 343 | if test "${ac_cv_cxx_have_exceptions}" = yes; then |
---|
[8c0b57] | 344 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
---|
[fc7220] | 345 | fi |
---|
| 346 | AC_LANG_RESTORE |
---|
| 347 | |
---|
[beca7c] | 348 | fi |
---|
| 349 | |
---|
| 350 | # ARFLAGS |
---|
| 351 | test "${ARFLAGS+set}" = set || ARFLAGS=cr |
---|
| 352 | |
---|
[9d50d3] | 353 | # M4FLAGS |
---|
| 354 | test "${M4FLAGS+set}" = set || M4FLAGS= |
---|
| 355 | |
---|
[089d1f] | 356 | AH_TEMPLATE([SINGULAR], [define if linked to Singular]) |
---|
| 357 | AH_TEMPLATE([DISABLE_GMP_CPP],[DISABLE_GMP_CPP]) |
---|
| 358 | AH_TEMPLATE([NOSTREAMIO],[DISABLE_GMP_CPP]) |
---|
| 359 | |
---|
[beca7c] | 360 | # Singular |
---|
| 361 | if test "x$with_Singular" = xyes; then |
---|
[089d1f] | 362 | AC_DEFINE([SINGULAR],[1]) |
---|
| 363 | AC_DEFINE([DISABLE_GMP_CPP],[1]) |
---|
| 364 | AC_DEFINE([NOSTREAMIO],[1]) |
---|
[beca7c] | 365 | fi |
---|
| 366 | |
---|
| 367 | # arithmetic shift |
---|
[1bc850] | 368 | #if test "x$ac_cv_shift" = xyes; then |
---|
[e76d7a6] | 369 | # AC_DEFINE([HAS_ARITHMETIC_SHIFT],[1],[HAS_ARITHMETIC_SHIFT]) |
---|
[1bc850] | 370 | #fi |
---|
[beca7c] | 371 | |
---|
[429497] | 372 | AH_TEMPLATE([HAVE_OMALLOC], [define if build with OMALLOC]) |
---|
[72486f0] | 373 | |
---|
| 374 | if test "x$with_Singular" = xyes; then |
---|
| 375 | |
---|
[461f40] | 376 | AC_MSG_CHECKING([whether to use omalloc/omalloc.h]) |
---|
| 377 | if test "x$ENABLE_OMALLOC" = xyes; then |
---|
[429497] | 378 | AC_MSG_RESULT(yes) |
---|
[461f40] | 379 | |
---|
[429497] | 380 | if test "x$with_omalloc_dir" != "x"; then |
---|
| 381 | OMALLOC_CFLAGS="-I${with_omalloc_dir}" |
---|
[f79b94c] | 382 | fi |
---|
[429497] | 383 | if test "x$with_omalloc_extra_dir" != "x"; then |
---|
| 384 | OMALLOC_CFLAGS="$OMALLOC_CFLAGS -I${with_omalloc_extra_dir}" |
---|
[b4a676] | 385 | OMALLOC_LDFLAGS="$OMALLOC_LDFLAGS -L${with_omalloc_extra_dir}/omalloc -L${with_omalloc_extra_dir}/findexec" |
---|
[429497] | 386 | fi |
---|
[461f40] | 387 | |
---|
| 388 | CPPFLAGS_save="$CPPFLAGS" |
---|
| 389 | # adding $with_omalloc_dir and $with_omalloc_extra_dir to header search path |
---|
| 390 | CPPFLAGS="$CPPFLAGS ${OMALLOC_CFLAGS}" |
---|
| 391 | if test "x$omalloc_trust" = xno; then |
---|
| 392 | AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_ERROR([You asked for omalloc but it cannot be found with your default header search path])) |
---|
[429497] | 393 | else |
---|
[461f40] | 394 | AC_CHECK_HEADERS([omalloc/omalloc.h],,AC_MSG_WARN([trusting the omalloc locations given: ${OMALLOC_CFLAGS}])) |
---|
[f79b94c] | 395 | fi |
---|
[461f40] | 396 | CPPFLAGS="$CPPFLAGS_save" |
---|
| 397 | |
---|
[b4a676] | 398 | OMALLOC_G_LDADD="-lfindexec_g -lomalloc_g" |
---|
| 399 | OMALLOC_R_LDADD="-lfindexec -lomalloc" |
---|
[72486f0] | 400 | |
---|
[461f40] | 401 | AC_DEFINE(HAVE_OMALLOC, 1, [omalloc support]) |
---|
| 402 | |
---|
[429497] | 403 | AC_SUBST(OMALLOC_CFLAGS) |
---|
[461f40] | 404 | AC_SUBST(OMALLOC_LDFLAGS) |
---|
[72486f0] | 405 | |
---|
| 406 | AC_SUBST(OMALLOC_G_LDADD) |
---|
| 407 | AC_SUBST(OMALLOC_R_LDADD) |
---|
[429497] | 408 | else |
---|
| 409 | AC_MSG_RESULT(no) |
---|
[43b476] | 410 | fi |
---|
| 411 | |
---|
[72486f0] | 412 | fi |
---|
| 413 | |
---|
[461f40] | 414 | AM_CONDITIONAL([ENABLE_OMALLOC],[test "x$ENABLE_OMALLOC" = xyes]) |
---|
| 415 | |
---|
[beca7c] | 416 | |
---|
[089d1f] | 417 | AH_TEMPLATE([CF_USE_INLINE], [define to use "configurable inline methods" (see cf_inline.cc)]) |
---|
[1cdedcb] | 418 | # "configurable inline methods" |
---|
| 419 | if test "x$enable_cf_inline" != xno; then |
---|
[089d1f] | 420 | AC_DEFINE([CF_USE_INLINE],[1]) |
---|
[1cdedcb] | 421 | fi |
---|
| 422 | |
---|
[089d1f] | 423 | AH_TEMPLATE([NOSTREAMIO], [define to build factory without stream IO]) |
---|
[beca7c] | 424 | # iostream |
---|
| 425 | if test "x$enable_streamio" = xno; then |
---|
[089d1f] | 426 | AC_DEFINE([NOSTREAMIO],[1]) |
---|
[beca7c] | 427 | else |
---|
| 428 | factorysrc="$factorysrc \$(useiofactorysrc)" |
---|
| 429 | factoryincl="$factoryincl \$(useiofactoryincl)" |
---|
| 430 | fi |
---|
| 431 | |
---|
[089d1f] | 432 | AH_TEMPLATE([NOASSERT], [define if you do not want to activate assertions]) |
---|
[beca7c] | 433 | # assertions |
---|
| 434 | if test "x$enable_assertions" = xno; then |
---|
[089d1f] | 435 | AC_DEFINE([NOASSERT],[1]) |
---|
[beca7c] | 436 | fi |
---|
| 437 | |
---|
[089d1f] | 438 | AH_TEMPLATE([TIMING], [define if you want to activate the timing stuff]) |
---|
[beca7c] | 439 | # timing |
---|
| 440 | if test "x$enable_timing" != xno; then |
---|
[089d1f] | 441 | AC_DEFINE([TIMING],[1]) |
---|
[beca7c] | 442 | fi |
---|
| 443 | |
---|
| 444 | # debugoutput |
---|
[089d1f] | 445 | AH_TEMPLATE([DEBUGOUTPUT], [define if you want to have debugging output]) |
---|
[beca7c] | 446 | if test "x$enable_debugoutput" != xno; then |
---|
[089d1f] | 447 | AC_DEFINE([DEBUGOUTPUT],[1]) |
---|
[beca7c] | 448 | fi |
---|
| 449 | |
---|
| 450 | # |
---|
| 451 | # - complete and substitute variables, defines. |
---|
| 452 | # |
---|
| 453 | AC_SUBST(gftabledir) |
---|
| 454 | AC_SUBST(templatedir) |
---|
| 455 | |
---|
| 456 | AC_SUBST(factory_version) |
---|
| 457 | |
---|
| 458 | AC_SUBST(libfactory) |
---|
| 459 | |
---|
| 460 | AC_SUBST(ARFLAGS) |
---|
[9d50d3] | 461 | AC_SUBST(M4FLAGS) |
---|
[beca7c] | 462 | AC_SUBST(MAKEHEADERFLAGS) |
---|
| 463 | |
---|
| 464 | AC_SUBST(factorysrc) |
---|
| 465 | AC_SUBST(factoryincl) |
---|
| 466 | |
---|
| 467 | AC_SUBST(alltargets) |
---|
| 468 | AC_SUBST(installtargets) |
---|
| 469 | AC_SUBST(uninstalltargets) |
---|
| 470 | |
---|
[d2f9df] | 471 | AH_TEMPLATE([FACTORYVERSION], [factory version]) |
---|
[089d1f] | 472 | AC_DEFINE_UNQUOTED([FACTORYVERSION], "$factory_version") |
---|
| 473 | |
---|
[d92d71] | 474 | AH_TEMPLATE([HAVE_LIBFAC], [have libfac]) |
---|
| 475 | AC_DEFINE_UNQUOTED([HAVE_LIBFAC], 1) |
---|
| 476 | |
---|
[d2f9df] | 477 | AH_TEMPLATE([FACTORYCONFIGURATION], [factory configuration]) |
---|
[089d1f] | 478 | AC_DEFINE_UNQUOTED([FACTORYCONFIGURATION], "$factory_configuration") |
---|
| 479 | |
---|
[d2f9df] | 480 | AH_TEMPLATE([GFTABLEDIR], [where the gftables live]) |
---|
[089d1f] | 481 | AC_DEFINE_UNQUOTED([GFTABLEDIR], "$explicit_gftabledir") |
---|
[beca7c] | 482 | |
---|
[4eb485] | 483 | AM_CONDITIONAL( |
---|
| 484 | [WITH_PARSER_FOR_CANONICAL_FORM], |
---|
| 485 | [test x$with_Singular != xyes && test x$enable_streamio != xno]) |
---|
| 486 | |
---|
[ee668e] | 487 | AC_CONFIG_FILES([Makefile include/factory/Makefile libfac/Makefile]) # ftest/GNUmakefile |
---|
[c2eb2e] | 488 | AC_OUTPUT |
---|
[4eb485] | 489 | |
---|