1 | AC_INIT([singular],[3.1.3.sw]) |
---|
2 | |
---|
3 | _AC_SRCDIRS(["$ac_dir"]) |
---|
4 | |
---|
5 | AC_CONFIG_MACRO_DIR([m4]) |
---|
6 | AC_CONFIG_AUX_DIR([.]) |
---|
7 | |
---|
8 | AC_CONFIG_SRCDIR([Singular/tesths.cc]) |
---|
9 | |
---|
10 | AC_CONFIG_HEADER([config.h]) |
---|
11 | |
---|
12 | AM_MAINTAINER_MODE |
---|
13 | AM_INIT_AUTOMAKE([-Wall foreign]) |
---|
14 | |
---|
15 | dnl Check if build env is sane |
---|
16 | AM_SANITY_CHECK |
---|
17 | |
---|
18 | # |
---|
19 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
20 | # |
---|
21 | |
---|
22 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
23 | AC_PROG_CC |
---|
24 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
25 | AC_PROG_CXX |
---|
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 | |
---|
39 | |
---|
40 | AC_HEADER_STDC |
---|
41 | AC_CHECK_HEADERS(unistd.h iostream.h) |
---|
42 | |
---|
43 | AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv) |
---|
44 | |
---|
45 | |
---|
46 | AC_PROG_CPP |
---|
47 | AC_PROG_CXXCPP |
---|
48 | AM_PROG_CC_C_O |
---|
49 | ### AM_PROG_LEX |
---|
50 | AC_PROG_LN_S |
---|
51 | AC_PROG_INSTALL |
---|
52 | |
---|
53 | LT_INIT |
---|
54 | |
---|
55 | # Checks for libraries. |
---|
56 | 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)])) |
---|
57 | 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)])) |
---|
58 | 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)])) |
---|
59 | |
---|
60 | AC_FUNC_ERROR_AT_LINE |
---|
61 | AC_FUNC_MALLOC |
---|
62 | |
---|
63 | SING_CHECK_PIPE |
---|
64 | |
---|
65 | # check for cpu properties |
---|
66 | AC_CHECK_SIZEOF(long,4) |
---|
67 | SING_CHECK_CPU |
---|
68 | |
---|
69 | #check for host: |
---|
70 | AC_CANONICAL_HOST |
---|
71 | case $host_os in |
---|
72 | *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";; |
---|
73 | * ) LIBPREFIX="";; |
---|
74 | esac |
---|
75 | |
---|
76 | |
---|
77 | SING_CHECK_P_PROCS |
---|
78 | SING_CHECK_FACTORY |
---|
79 | SING_CHECK_READLINE |
---|
80 | SING_CHECK_DBM |
---|
81 | |
---|
82 | # CFLAGS |
---|
83 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
84 | CFLAGS="" |
---|
85 | fi |
---|
86 | |
---|
87 | # CXXFLAGS |
---|
88 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
89 | CXXFLAGS="" |
---|
90 | fi |
---|
91 | |
---|
92 | AC_DEFINE_UNQUOTED([CC],"$CC",[CC]) |
---|
93 | AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX]) |
---|
94 | AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS]) |
---|
95 | AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS]) |
---|
96 | AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS]) |
---|
97 | |
---|
98 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
---|
99 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
---|
100 | |
---|
101 | AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]), |
---|
102 | [if test "x$enableval" = "xyes"; then |
---|
103 | ENABLE_OMALLOC=yes |
---|
104 | fi], ENABLE_OMALLOC=add) |
---|
105 | |
---|
106 | ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust" |
---|
107 | |
---|
108 | if test "x$ENABLE_OMALLOC" = xadd; then |
---|
109 | ENABLE_OMALLOC=yes |
---|
110 | ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG" |
---|
111 | fi |
---|
112 | |
---|
113 | |
---|
114 | |
---|
115 | |
---|
116 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
117 | AC_MSG_CHECKING(whether to use omalloc in factory) |
---|
118 | if test "x$ENABLE_OMALLOC" = xyes; then |
---|
119 | AC_MSG_RESULT(yes) |
---|
120 | ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG" |
---|
121 | else |
---|
122 | AC_MSG_RESULT(no) |
---|
123 | fi |
---|
124 | fi |
---|
125 | |
---|
126 | AC_CONFIG_SUBDIRS([findexec]) |
---|
127 | AC_CONFIG_SUBDIRS([omalloc]) |
---|
128 | |
---|
129 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
130 | AC_CONFIG_SUBDIRS([factory]) |
---|
131 | fi |
---|
132 | |
---|
133 | AC_CONFIG_SUBDIRS([libpolys]) |
---|
134 | AC_CONFIG_FILES([Makefile]) |
---|
135 | AC_CONFIG_FILES([kernel/Makefile]) |
---|
136 | AC_CONFIG_FILES([numeric/Makefile]) |
---|
137 | AC_CONFIG_FILES([Singular/Makefile]) |
---|
138 | AC_CONFIG_FILES([IntegerProgramming/Makefile]) |
---|
139 | AC_CONFIG_FILES([dyn_modules/Makefile]) |
---|
140 | AC_CONFIG_FILES([dyn_modules/bigintm/Makefile]) |
---|
141 | AC_CONFIG_FILES([dyn_modules/syzextra/Makefile]) |
---|
142 | AC_CONFIG_FILES([libsingular-config]) |
---|
143 | |
---|
144 | AC_OUTPUT |
---|