[444bcf] | 1 | AC_INIT([singular],[3.1.3.sw]) |
---|
[715936] | 2 | |
---|
[429497] | 3 | _AC_SRCDIRS(["$ac_dir"]) |
---|
| 4 | |
---|
[3aea08] | 5 | AC_CONFIG_MACRO_DIR([m4]) |
---|
[9634a6] | 6 | AC_CONFIG_AUX_DIR([.]) |
---|
[715936] | 7 | |
---|
[3aea08] | 8 | AC_CONFIG_SRCDIR([Singular/tesths.cc]) |
---|
| 9 | |
---|
| 10 | AC_CONFIG_HEADER([config.h]) |
---|
| 11 | |
---|
[ea0001] | 12 | AM_MAINTAINER_MODE |
---|
[24a77fb] | 13 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
[3aea08] | 14 | |
---|
| 15 | dnl Check if build env is sane |
---|
| 16 | AM_SANITY_CHECK |
---|
| 17 | |
---|
[f86531] | 18 | # |
---|
| 19 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
| 20 | # |
---|
[3aea08] | 21 | |
---|
[f86531] | 22 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
[9634a6] | 23 | AC_PROG_CC |
---|
[f86531] | 24 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
[9634a6] | 25 | AC_PROG_CXX |
---|
[f86531] | 26 | if test "x$GCC" != xyes && test "x$GXX" != xyes; then |
---|
| 27 | AC_MSG_WARN(you better use gcc to compile Factory) |
---|
| 28 | else |
---|
| 29 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 30 | AC_MSG_WARN([we use \`' as default for \`CXXFLAGS' |
---|
| 31 | (instead of the configure default \`-g -O')]) |
---|
| 32 | fi |
---|
| 33 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 34 | AC_MSG_WARN([we use \`' as default for \`CFLAGS' |
---|
| 35 | (instead of the configure default \`-g -O')]) |
---|
| 36 | fi |
---|
| 37 | fi |
---|
| 38 | |
---|
[8fee84] | 39 | |
---|
| 40 | AC_HEADER_STDC |
---|
[76f3a18] | 41 | AC_CHECK_HEADERS(unistd.h iostream.h) |
---|
[8fee84] | 42 | |
---|
[eb2d25] | 43 | AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv) |
---|
[8fee84] | 44 | |
---|
| 45 | |
---|
[f86531] | 46 | AC_PROG_CPP |
---|
| 47 | AC_PROG_CXXCPP |
---|
[897139] | 48 | AM_PROG_CC_C_O |
---|
[7c7495] | 49 | ### AM_PROG_LEX |
---|
[3aea08] | 50 | AC_PROG_LN_S |
---|
| 51 | AC_PROG_INSTALL |
---|
[b9cf41] | 52 | |
---|
[e078e0] | 53 | # AM_PROG_AR |
---|
[80c102] | 54 | LT_INIT |
---|
| 55 | |
---|
[897139] | 56 | # Checks for libraries. |
---|
| 57 | 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)])) |
---|
| 58 | 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)])) |
---|
[286be1f] | 59 | 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)])) |
---|
[6b61be] | 60 | |
---|
[3aea08] | 61 | AC_FUNC_ERROR_AT_LINE |
---|
| 62 | AC_FUNC_MALLOC |
---|
| 63 | |
---|
| 64 | SING_CHECK_PIPE |
---|
| 65 | |
---|
| 66 | # check for cpu properties |
---|
| 67 | AC_CHECK_SIZEOF(long,4) |
---|
| 68 | SING_CHECK_CPU |
---|
| 69 | |
---|
| 70 | #check for host: |
---|
| 71 | AC_CANONICAL_HOST |
---|
| 72 | case $host_os in |
---|
| 73 | *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";; |
---|
| 74 | * ) LIBPREFIX="";; |
---|
| 75 | esac |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | SING_CHECK_P_PROCS |
---|
| 79 | SING_CHECK_FACTORY |
---|
[d56ad87] | 80 | SING_CHECK_READLINE |
---|
[b7cad8c] | 81 | SING_CHECK_DBM |
---|
[f86531] | 82 | |
---|
| 83 | # CFLAGS |
---|
| 84 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 85 | CFLAGS="" |
---|
| 86 | fi |
---|
| 87 | |
---|
| 88 | # CXXFLAGS |
---|
| 89 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 90 | CXXFLAGS="" |
---|
| 91 | fi |
---|
| 92 | |
---|
[113ed4] | 93 | AC_DEFINE_UNQUOTED([CC],"$CC",[CC]) |
---|
| 94 | AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX]) |
---|
| 95 | AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS]) |
---|
| 96 | AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS]) |
---|
| 97 | AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS]) |
---|
| 98 | |
---|
[eeae6e3] | 99 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
---|
| 100 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
---|
[715936] | 101 | |
---|
[461f40] | 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) |
---|
[429497] | 106 | |
---|
[461f40] | 107 | ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust" |
---|
[429497] | 108 | |
---|
[461f40] | 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 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
| 118 | AC_MSG_CHECKING(whether to use omalloc in factory) |
---|
| 119 | if test "x$ENABLE_OMALLOC" = xyes; then |
---|
[429497] | 120 | AC_MSG_RESULT(yes) |
---|
[461f40] | 121 | ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG" |
---|
| 122 | else |
---|
[429497] | 123 | AC_MSG_RESULT(no) |
---|
[461f40] | 124 | fi |
---|
[429497] | 125 | fi |
---|
| 126 | |
---|
[f284db] | 127 | AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]), |
---|
[2b43ac] | 128 | [if test "x$enableval" = "xyes"; then |
---|
| 129 | ENABLE_DEBUG=yes |
---|
| 130 | fi], ENABLE_DEBUG=no) |
---|
| 131 | |
---|
| 132 | AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) |
---|
| 133 | |
---|
[d1fbbf] | 134 | AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]), |
---|
| 135 | [if test "x$enableval" = "xyes"; then |
---|
| 136 | ENABLE_COUNTEDREF_AUTOLOAD=yes |
---|
| 137 | fi], ENABLE_COUNTEDREF_AUTOLOAD=no) |
---|
| 138 | |
---|
| 139 | if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then |
---|
| 140 | AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types]) |
---|
| 141 | AC_SUBST(SI_COUNTEDREF_AUTOLOAD) |
---|
| 142 | fi |
---|
| 143 | |
---|
[b4a676] | 144 | AC_CONFIG_SUBDIRS([findexec]) |
---|
[461f40] | 145 | AC_CONFIG_SUBDIRS([omalloc]) |
---|
[715936] | 146 | |
---|
[461f40] | 147 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
| 148 | AC_CONFIG_SUBDIRS([factory]) |
---|
[6b61be] | 149 | fi |
---|
[715936] | 150 | |
---|
[461f40] | 151 | AC_CONFIG_SUBDIRS([libpolys]) |
---|
[715936] | 152 | AC_CONFIG_FILES([Makefile]) |
---|
[3aea08] | 153 | AC_CONFIG_FILES([kernel/Makefile]) |
---|
[b9cf41] | 154 | AC_CONFIG_FILES([numeric/Makefile]) |
---|
[151a06] | 155 | AC_CONFIG_FILES([Singular/Makefile]) |
---|
[76f3a18] | 156 | AC_CONFIG_FILES([IntegerProgramming/Makefile]) |
---|
[1114d2] | 157 | AC_CONFIG_FILES([dyn_modules/Makefile]) |
---|
| 158 | AC_CONFIG_FILES([dyn_modules/bigintm/Makefile]) |
---|
| 159 | AC_CONFIG_FILES([dyn_modules/syzextra/Makefile]) |
---|
[584f6b0] | 160 | AC_CONFIG_FILES([libsingular-config]) |
---|
[b9cf41] | 161 | |
---|
[9634a6] | 162 | AC_OUTPUT |
---|