1 | AC_INIT([singular], [3.1.3.sw], [singular@mathematik.uni-kl.de]) |
---|
2 | AC_DEFINE([VERSION_DATE],["Jun 2013"],[release date]) |
---|
3 | |
---|
4 | _AC_SRCDIRS(["$ac_dir"]) |
---|
5 | |
---|
6 | AC_CONFIG_MACRO_DIR([m4]) |
---|
7 | AC_CONFIG_AUX_DIR([.]) |
---|
8 | |
---|
9 | AC_CONFIG_SRCDIR([Singular/tesths.cc]) |
---|
10 | |
---|
11 | AC_CONFIG_HEADER([singularconfig.h]) |
---|
12 | |
---|
13 | dnl Apparently, this is required for using an AC_CHECK_HEADER within AS_IF(...), at least on Cygwin. |
---|
14 | AC_USE_SYSTEM_EXTENSIONS |
---|
15 | |
---|
16 | AM_MAINTAINER_MODE |
---|
17 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
18 | |
---|
19 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) |
---|
20 | |
---|
21 | dnl Check if build env is sane |
---|
22 | AM_SANITY_CHECK |
---|
23 | |
---|
24 | # Add pre'prefixed config |
---|
25 | AX_PREFIX_CONFIG_H([singularconfig.h],[],[singularconfig.h]) |
---|
26 | |
---|
27 | SING_RESET_FLAGS() |
---|
28 | SING_CHECK_SET_ARGS() |
---|
29 | |
---|
30 | #! |
---|
31 | # AC_PROG_CC |
---|
32 | # AC_PROG_CXX |
---|
33 | AC_PROG_CPP |
---|
34 | AC_PROG_CXXCPP |
---|
35 | AM_PROG_CC_C_O |
---|
36 | ### AM_PROG_LEX |
---|
37 | AC_PROG_LN_S |
---|
38 | AC_PROG_INSTALL |
---|
39 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
---|
40 | |
---|
41 | AC_HEADER_STDC |
---|
42 | AC_CHECK_HEADERS(unistd.h iostream.h sys/time.h sys/times.h asm/sigcontext.h) |
---|
43 | |
---|
44 | AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv) |
---|
45 | |
---|
46 | |
---|
47 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
---|
48 | if test -z "$DOXYGEN"; |
---|
49 | then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) |
---|
50 | fi |
---|
51 | AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) |
---|
52 | |
---|
53 | LT_INIT |
---|
54 | |
---|
55 | link_all_deplibs=yes |
---|
56 | link_all_deplibs_CXX=yes |
---|
57 | |
---|
58 | # Checks for libraries. |
---|
59 | AC_CHECK_LIB(rt,clock_gettime) |
---|
60 | AC_CHECK_LIB(pthread,pthread_create) |
---|
61 | |
---|
62 | LB_CHECK_GMP(4.3.2,,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)])) |
---|
63 | 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)])) |
---|
64 | 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)])) |
---|
65 | LB_CHECK_MATHICGB |
---|
66 | |
---|
67 | |
---|
68 | AX_PYTHON_DEFAULT() |
---|
69 | AX_PYTHON_WITH_VERSION([2.4]) |
---|
70 | |
---|
71 | AC_CONFIG_GOOGLE_PERFTOOLS() |
---|
72 | |
---|
73 | AC_FUNC_ERROR_AT_LINE |
---|
74 | AC_FUNC_MALLOC |
---|
75 | |
---|
76 | # check for cpu properties |
---|
77 | AC_CHECK_SIZEOF(long,4) |
---|
78 | SING_CHECK_CPU |
---|
79 | |
---|
80 | #check for host: |
---|
81 | AC_CANONICAL_HOST |
---|
82 | |
---|
83 | case $host_os in |
---|
84 | *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);; |
---|
85 | esac |
---|
86 | |
---|
87 | |
---|
88 | SING_CHECK_P_PROCS |
---|
89 | SING_CHECK_FACTORY |
---|
90 | SING_CHECK_READLINE |
---|
91 | SING_CHECK_DBM |
---|
92 | SING_CHECK_GFANLIB |
---|
93 | SING_CHECK_POLYMAKE |
---|
94 | |
---|
95 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
---|
96 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
---|
97 | |
---|
98 | |
---|
99 | AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]), |
---|
100 | [if test "x$enableval" = "xyes"; then |
---|
101 | ENABLE_OMALLOC=yes |
---|
102 | fi], ENABLE_OMALLOC=add) |
---|
103 | |
---|
104 | ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust" |
---|
105 | |
---|
106 | if test "x$ENABLE_OMALLOC" = xadd; then |
---|
107 | ENABLE_OMALLOC=yes |
---|
108 | ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG" |
---|
109 | fi |
---|
110 | |
---|
111 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
112 | AC_MSG_CHECKING(whether to use omalloc in factory) |
---|
113 | if test "x$ENABLE_OMALLOC" = xyes; then |
---|
114 | AC_MSG_RESULT(yes) |
---|
115 | ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG" |
---|
116 | else |
---|
117 | AC_MSG_RESULT(no) |
---|
118 | fi |
---|
119 | fi |
---|
120 | |
---|
121 | AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]), |
---|
122 | [if test "x$enableval" = "xyes"; then |
---|
123 | ENABLE_COUNTEDREF_AUTOLOAD=yes |
---|
124 | fi], ENABLE_COUNTEDREF_AUTOLOAD=no) |
---|
125 | |
---|
126 | if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then |
---|
127 | AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types]) |
---|
128 | AC_SUBST(SI_COUNTEDREF_AUTOLOAD) |
---|
129 | fi |
---|
130 | |
---|
131 | dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however |
---|
132 | dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without |
---|
133 | dnl requiring same, a fallback implementation for older Autoconf is provided. |
---|
134 | dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code |
---|
135 | dnl is correct only in terms of m4sh generated script. |
---|
136 | m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [ |
---|
137 | if test -z "$$1_TRUE"; then : |
---|
138 | m4_n([$2])[]dnl |
---|
139 | m4_ifval([$3], |
---|
140 | [else |
---|
141 | $3 |
---|
142 | ])dnl |
---|
143 | fi[]dnl |
---|
144 | ])]) |
---|
145 | |
---|
146 | |
---|
147 | AC_DEFINE_UNQUOTED([CC],"$CC",[CC]) |
---|
148 | AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX]) |
---|
149 | AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS]) |
---|
150 | AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS]) |
---|
151 | AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS]) |
---|
152 | AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS]) |
---|
153 | AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS]) |
---|
154 | AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS]) |
---|
155 | AC_DEFINE_UNQUOTED([AC_CONFIGURE_ARGS],"$ac_configure_args",[ac_configure_args]) |
---|
156 | # AC_DEFINE_UNQUOTED([AC_CT_CC], "$ac_ct_CC",[ac_ct_CC]) |
---|
157 | |
---|
158 | AC_DEFINE_UNQUOTED([FACTORY_CFLAGS],"$FACTORY_CFLAGS",[FACTORY_CFLAGS]) |
---|
159 | AC_DEFINE_UNQUOTED([FACTORY_LIBS],"$FACTORY_LIBS",[FACTORY_LIBS]) |
---|
160 | |
---|
161 | AC_DEFINE_UNQUOTED([NTL_CFLAGS],"$NTL_CFLAGS",[NTL_CFLAGS]) |
---|
162 | AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS]) |
---|
163 | |
---|
164 | AC_DEFINE_UNQUOTED([GMP_CFLAGS],"$GMP_CFLAGS",[GMP_CFLAGS]) |
---|
165 | AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS]) |
---|
166 | |
---|
167 | AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS]) |
---|
168 | AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS]) |
---|
169 | |
---|
170 | |
---|
171 | SING_SHOW_FLAGS([Compiler/linker flags: ]) |
---|
172 | |
---|
173 | |
---|
174 | AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])]) |
---|
175 | AC_CONFIG_FILES([dox/Makefile]) |
---|
176 | |
---|
177 | AC_CONFIG_SUBDIRS([resources]) |
---|
178 | AC_CONFIG_SUBDIRS([omalloc]) |
---|
179 | |
---|
180 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
181 | AC_CONFIG_SUBDIRS([factory]) |
---|
182 | fi |
---|
183 | |
---|
184 | AC_CONFIG_SUBDIRS([libpolys]) |
---|
185 | |
---|
186 | AC_CONFIG_FILES([Makefile]) |
---|
187 | AC_CONFIG_FILES([xalloc/Makefile]) |
---|
188 | AC_CONFIG_FILES([kernel/Makefile]) |
---|
189 | AC_CONFIG_FILES([numeric/Makefile]) |
---|
190 | |
---|
191 | AC_CONFIG_SUBDIRS([gfanlib]) |
---|
192 | |
---|
193 | AC_CONFIG_FILES([dyn_modules/Makefile]) |
---|
194 | AC_CONFIG_FILES([dyn_modules/bigintm/Makefile]) |
---|
195 | AC_CONFIG_FILES([dyn_modules/syzextra/Makefile]) |
---|
196 | AC_CONFIG_FILES([dyn_modules/callgfanlib/Makefile]) |
---|
197 | AC_CONFIG_FILES([dyn_modules/callpolymake/Makefile]) |
---|
198 | |
---|
199 | AC_CONFIG_FILES([Singular/Makefile]) |
---|
200 | |
---|
201 | AC_CONFIG_FILES([IntegerProgramming/Makefile]) |
---|
202 | |
---|
203 | AC_CONFIG_FILES([redhat/singular.spec]) |
---|
204 | # AC_CONFIG_FILES([desktop/Singular.desktop]) |
---|
205 | # AC_CONFIG_FILES([desktop/Singular-manual.desktop]) |
---|
206 | |
---|
207 | AC_CONFIG_FILES([libsingular-config]) |
---|
208 | |
---|
209 | AC_CONFIG_FILES([redhat/Makefile]) |
---|
210 | AC_CONFIG_FILES([emacs/Makefile]) |
---|
211 | AC_CONFIG_FILES([debian/Makefile]) |
---|
212 | AC_CONFIG_FILES([desktop/Makefile]) |
---|
213 | |
---|
214 | AC_OUTPUT |
---|