source: git/configure.ac @ da86b61

spielwiese
Last change on this file since da86b61 was da86b61, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Revert "fix: qsort_r" This reverts commit 50a6c59553a4e9ed5c3b72c3937a614ffbeac4f5.
  • Property mode set to 100644
File size: 7.9 KB
Line 
1AC_INIT([singular], [4.0.0], [singular@mathematik.uni-kl.de])
2AC_DEFINE([VERSION_DATE],["Dec 2013"],[release date])
3
4_AC_SRCDIRS(["$ac_dir"])
5
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_AUX_DIR([.])
8
9AC_CONFIG_SRCDIR([Singular/tesths.cc])
10
11AC_CONFIG_HEADER([_config.h])
12# Add pre'prefixed config
13AX_PREFIX_CONFIG_H([singularconfig.h],[],[_config.h])
14
15dnl Apparently, this is required for using an AC_CHECK_HEADER within AS_IF(...), at least on Cygwin.
16AC_USE_SYSTEM_EXTENSIONS
17
18AM_MAINTAINER_MODE([enable])   
19AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
20
21m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
22
23dnl Check if build env is sane
24AM_SANITY_CHECK
25
26
27SING_RESET_FLAGS()
28SING_CHECK_SET_ARGS()
29
30#!
31# AC_PROG_CC
32# AC_PROG_CXX
33AC_PROG_CPP
34AC_PROG_CXXCPP
35AM_PROG_CC_C_O
36### AM_PROG_LEX
37AC_PROG_LN_S
38AC_PROG_INSTALL
39m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
40
41AC_HEADER_STDC
42AC_CHECK_HEADERS(unistd.h iostream.h sys/time.h sys/times.h asm/sigcontext.h)
43
44AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv)
45
46
47AC_CHECK_PROGS([DOXYGEN], [doxygen])
48if test -z "$DOXYGEN";
49   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
50fi
51AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
52
53LT_INIT
54
55link_all_deplibs=yes
56link_all_deplibs_CXX=yes
57
58# Checks for libraries.
59#AC_CHECK_LIB(pthread,pthread_create)
60AX_PTHREAD([], [
61  AC_MSG_ERROR([Pthread library not found. Please set PTHREAD_CFLAGS and PTHREAD_LIBS correctly for your setup])
62])
63
64AC_MSG_CHECKING([Found Pthread, PTHREAD_CC:])
65AC_MSG_RESULT(${PTHREAD_CC:-unset})
66AC_MSG_CHECKING([               PTHREAD_CFLAGS:])
67AC_MSG_RESULT(${PTHREAD_CFLAGS:-unset})
68AC_MSG_CHECKING([               PTHREAD_LIBS:])
69AC_MSG_RESULT(${PTHREAD_LIBS:-unset})
70
71# Set the correct PTHREAD flags and, if needed, change the compiler to one that is pthread-enabled.
72CC="$PTHREAD_CC"
73PTHREAD_LDFLAGS="$PTHREAD_CFLAGS"
74
75AC_SUBST(PTHREAD_CFLAGS)
76AC_SUBST(PTHREAD_LDFLAGS)
77AC_SUBST(PTHREAD_LIBS)
78AC_SUBST(CC)
79
80
81AC_CHECK_LIB(rt,clock_gettime)
82
83LB_CHECK_GMP(4.0,,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)]))
84LB_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)]))
85LB_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)]))
86
87AC_CONFIG_GOOGLE_PERFTOOLS()
88
89## AX_PYTHON_DEFAULT()
90AX_PYTHON_WITH_VERSION([2.4])
91
92LB_CHECK_MATHICGB
93
94AC_FUNC_ERROR_AT_LINE
95AC_FUNC_MALLOC
96
97# check for cpu properties
98AC_CHECK_SIZEOF(long,4)
99SING_CHECK_CPU
100
101#check for host:
102AC_CANONICAL_HOST
103
104case $host_os in
105  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
106esac
107
108PKG_REQUIRE="$PKG_REQUIRE"
109AC_SUBST(PKG_REQUIRE)
110
111SING_USE_OMALLOC()
112SING_USE_RESOURCES()
113SING_USE_FACTORY()
114
115SING_CHECK_P_PROCS
116SING_CHECK_READLINE
117SING_CHECK_DBM
118
119SING_CHECK_GFANLIB
120SING_CHECK_POLYMAKE
121
122SING_CHECK_PLURAL
123
124SING_BUILTIN_MODULES
125
126### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
127#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
128
129AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
130[if test "x$enableval" = "xyes"; then
131ENABLE_COUNTEDREF_AUTOLOAD=yes
132fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
133
134if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
135  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
136  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
137fi
138
139dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
140dnl AM_COND_IF is new to Automake 1.11.  To use it on new Automake without
141dnl requiring same, a fallback implementation for older Autoconf is provided.
142dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
143dnl is correct only in terms of m4sh generated script.
144m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
145if test -z "$$1_TRUE"; then :
146  m4_n([$2])[]dnl
147m4_ifval([$3],
148[else
149    $3
150])dnl
151fi[]dnl
152])])
153
154
155AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
156AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
157AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
158AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
159AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS])
160AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS])
161AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
162AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS])
163AC_DEFINE_UNQUOTED([AC_CONFIGURE_ARGS],"$ac_configure_args",[ac_configure_args])
164# AC_DEFINE_UNQUOTED([AC_CT_CC], "$ac_ct_CC",[ac_ct_CC])
165
166AC_DEFINE_UNQUOTED([NTL_CFLAGS],"$NTL_CFLAGS",[NTL_CFLAGS])
167AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
168
169AC_DEFINE_UNQUOTED([GMP_CFLAGS],"$GMP_CFLAGS",[GMP_CFLAGS])
170AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
171
172AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
173AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
174
175##### SEE http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
176
177AX_RECURSIVE_EVAL([[$]prefix], [config_prefix])
178AX_NORMALIZE_PATH([config_prefix],['/'])
179AC_DEFINE_UNQUOTED([PREFIX],"$config_prefix",[prefix])
180
181AX_RECURSIVE_EVAL([[$]exec_prefix], [config_exec_prefix])
182AX_NORMALIZE_PATH([config_exec_prefix],['/'])
183AC_DEFINE_UNQUOTED([EXEC_PREFIX],"$config_exec_prefix",[exec_prefix])
184
185AX_RECURSIVE_EVAL([[$]libexecdir], [config_libexecdir])
186AX_NORMALIZE_PATH([config_libexecdir],['/'])
187AC_DEFINE_UNQUOTED([LIBEXEC_DIR],"$config_libexecdir",[libexecdir])
188
189AX_RECURSIVE_EVAL([[$]libdir], [config_libdir])
190AX_NORMALIZE_PATH([config_libdir],['/'])
191AC_DEFINE_UNQUOTED([LIB_DIR],"$config_libdir",[libdir])
192
193AX_RECURSIVE_EVAL([[$]bindir], [config_bindir])
194AX_NORMALIZE_PATH([config_bindir],['/'])
195AC_DEFINE_UNQUOTED([BIN_DIR],"$config_bindir",[bindir])
196
197AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
198AX_NORMALIZE_PATH([config_datadir],['/'])
199AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
200AC_SUBST(DATA_DIR)
201
202AX_RECURSIVE_EVAL([[$]docdir], [config_docdir])
203AX_NORMALIZE_PATH([config_docdir],['/'])
204AC_DEFINE_UNQUOTED([DOC_DIR],"$config_docdir",[docdir])
205AC_SUBST(DOC_DIR)
206
207SING_SHOW_FLAGS([Compiler/linker flags: ])
208
209
210## AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])])
211
212AC_CONFIG_FILES([dox/Makefile])
213
214AC_CONFIG_SUBDIRS([resources])
215AC_CONFIG_SUBDIRS([omalloc])
216
217if test "x$ENABLE_FACTORY" = xyes; then
218 AC_CONFIG_SUBDIRS([factory])
219fi
220
221AC_CONFIG_SUBDIRS([libpolys])
222
223AC_CONFIG_FILES([Makefile])
224AC_CONFIG_FILES([xalloc/Makefile])
225AC_CONFIG_FILES([kernel/Makefile])
226AC_CONFIG_FILES([kernel/numeric/Makefile])
227AC_CONFIG_FILES([kernel/fglm/Makefile])
228AC_CONFIG_FILES([kernel/groebner_walk/Makefile])
229AC_CONFIG_FILES([kernel/combinatorics/Makefile])
230AC_CONFIG_FILES([kernel/spectrum/Makefile])
231AC_CONFIG_FILES([kernel/linear_algebra/Makefile])
232AC_CONFIG_FILES([kernel/maps/Makefile])
233AC_CONFIG_FILES([kernel/GBEngine/Makefile])
234AC_CONFIG_FILES([kernel/oswrapper/Makefile])
235
236AC_CONFIG_SUBDIRS([gfanlib])
237
238AC_CONFIG_FILES([Singular/dyn_modules/Makefile])
239AC_CONFIG_FILES([Singular/dyn_modules/bigintm/Makefile])
240AC_CONFIG_FILES([Singular/dyn_modules/syzextra/Makefile])
241AC_CONFIG_FILES([Singular/dyn_modules/gfanlib/Makefile])
242AC_CONFIG_FILES([Singular/dyn_modules/polymake/Makefile])
243AC_CONFIG_FILES([Singular/dyn_modules/pyobject/Makefile])
244AC_CONFIG_FILES([Singular/dyn_modules/singmathic/Makefile])
245AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile])
246
247AC_CONFIG_FILES([Singular/Makefile])
248
249AC_CONFIG_FILES([IntegerProgramming/Makefile])
250
251AC_CONFIG_FILES([libsingular-config Singular.pc])
252
253AC_CONFIG_FILES([emacs/Makefile])
254
255AC_CONFIG_FILES([debian/Makefile])
256AC_CONFIG_FILES([redhat/Makefile])
257AC_CONFIG_FILES([redhat/singular.spec])
258AC_CONFIG_FILES([desktop/Makefile desktop/Singular.desktop desktop/Singular-manual.desktop])
259
260AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.