source: git/configure.ac @ 6c8ba3

spielwiese
Last change on this file since 6c8ba3 was 6c8ba3, checked in by Mathias Schulze <mschulze@…>, 10 years ago
cleaned up debian/redhat files
  • Property mode set to 100644
File size: 7.2 KB
Line 
1AC_INIT([singular], [3.1.3.sw], [singular@mathematik.uni-kl.de])
2AC_DEFINE([VERSION_DATE],["Jun 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([singularconfig.h])
12
13dnl Apparently, this is required for using an AC_CHECK_HEADER within AS_IF(...), at least on Cygwin.
14AC_USE_SYSTEM_EXTENSIONS
15
16AM_MAINTAINER_MODE
17AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
18
19m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
20
21dnl Check if build env is sane
22AM_SANITY_CHECK
23
24# Add pre'prefixed config
25AX_PREFIX_CONFIG_H([singularconfig.h],[],[singularconfig.h])
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.
59AC_CHECK_LIB(pthread,pthread_create)
60AC_CHECK_LIB(rt,clock_gettime)
61
62LB_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)]))
63LB_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)]))
64LB_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
66AC_CONFIG_GOOGLE_PERFTOOLS()
67
68## AX_PYTHON_DEFAULT()
69AX_PYTHON_WITH_VERSION([2.4])
70
71LB_CHECK_MATHICGB
72
73AC_FUNC_ERROR_AT_LINE
74AC_FUNC_MALLOC
75
76# check for cpu properties
77AC_CHECK_SIZEOF(long,4)
78SING_CHECK_CPU
79
80#check for host:
81AC_CANONICAL_HOST
82
83case $host_os in
84  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
85esac
86
87
88SING_CHECK_P_PROCS
89SING_CHECK_FACTORY
90SING_CHECK_READLINE
91SING_CHECK_DBM
92
93SING_CHECK_GFANLIB
94SING_CHECK_POLYMAKE
95
96### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
97#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
98
99
100AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
101 [if test "x$enableval"  = "xyes"; then
102   ENABLE_OMALLOC=yes
103 fi], ENABLE_OMALLOC=add)
104
105ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
106
107if test "x$ENABLE_OMALLOC" = xadd; then
108   ENABLE_OMALLOC=yes
109   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
110fi
111
112if test "x$ENABLE_FACTORY" = xyes; then
113 AC_MSG_CHECKING(whether to use omalloc in factory)
114 if test "x$ENABLE_OMALLOC" = xyes; then
115  AC_MSG_RESULT(yes)
116  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
117 else
118  AC_MSG_RESULT(no)
119 fi
120fi
121
122AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
123[if test "x$enableval" = "xyes"; then
124ENABLE_COUNTEDREF_AUTOLOAD=yes
125fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
126
127if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
128  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
129  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
130fi
131
132dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
133dnl AM_COND_IF is new to Automake 1.11.  To use it on new Automake without
134dnl requiring same, a fallback implementation for older Autoconf is provided.
135dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
136dnl is correct only in terms of m4sh generated script.
137m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
138if test -z "$$1_TRUE"; then :
139  m4_n([$2])[]dnl
140m4_ifval([$3],
141[else
142    $3
143])dnl
144fi[]dnl
145])])
146
147
148AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
149AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
150AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
151AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
152AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS])
153AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS])
154AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
155AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS])
156AC_DEFINE_UNQUOTED([AC_CONFIGURE_ARGS],"$ac_configure_args",[ac_configure_args])
157# AC_DEFINE_UNQUOTED([AC_CT_CC], "$ac_ct_CC",[ac_ct_CC])
158
159AC_DEFINE_UNQUOTED([FACTORY_CFLAGS],"$FACTORY_CFLAGS",[FACTORY_CFLAGS])
160AC_DEFINE_UNQUOTED([FACTORY_LIBS],"$FACTORY_LIBS",[FACTORY_LIBS])
161
162AC_DEFINE_UNQUOTED([NTL_CFLAGS],"$NTL_CFLAGS",[NTL_CFLAGS])
163AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
164
165AC_DEFINE_UNQUOTED([GMP_CFLAGS],"$GMP_CFLAGS",[GMP_CFLAGS])
166AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
167
168AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
169AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
170
171##### SEE http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
172
173AX_RECURSIVE_EVAL([[$]prefix], [config_prefix])
174AX_NORMALIZE_PATH([config_prefix],['/'])
175AC_DEFINE_UNQUOTED([PREFIX],"$config_prefix",[prefix])
176
177AX_RECURSIVE_EVAL([[$]exec_prefix], [config_exec_prefix])
178AX_NORMALIZE_PATH([config_exec_prefix],['/'])
179AC_DEFINE_UNQUOTED([EXEC_PREFIX],"$config_exec_prefix",[exec_prefix])
180
181AX_RECURSIVE_EVAL([[$]libexecdir], [config_libexecdir])
182AX_NORMALIZE_PATH([config_libexecdir],['/'])
183AC_DEFINE_UNQUOTED([LIBEXEC_DIR],"$config_libexecdir",[libexecdir])
184
185AX_RECURSIVE_EVAL([[$]libdir], [config_libdir])
186AX_NORMALIZE_PATH([config_libdir],['/'])
187AC_DEFINE_UNQUOTED([LIB_DIR],"$config_libdir",[libdir])
188
189AX_RECURSIVE_EVAL([[$]bindir], [config_bindir])
190AX_NORMALIZE_PATH([config_bindir],['/'])
191AC_DEFINE_UNQUOTED([BIN_DIR],"$config_bindir",[bindir])
192
193AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
194AX_NORMALIZE_PATH([config_datadir],['/'])
195AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
196
197SING_SHOW_FLAGS([Compiler/linker flags: ])
198
199
200AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])])
201AC_CONFIG_FILES([dox/Makefile])
202
203AC_CONFIG_SUBDIRS([resources])
204AC_CONFIG_SUBDIRS([omalloc])
205
206if test "x$ENABLE_FACTORY" = xyes; then
207 AC_CONFIG_SUBDIRS([factory])
208fi
209
210AC_CONFIG_SUBDIRS([libpolys])
211
212AC_CONFIG_FILES([Makefile])
213AC_CONFIG_FILES([xalloc/Makefile])
214AC_CONFIG_FILES([kernel/Makefile])
215AC_CONFIG_FILES([numeric/Makefile])
216
217AC_CONFIG_SUBDIRS([gfanlib])
218
219AC_CONFIG_FILES([dyn_modules/Makefile])
220AC_CONFIG_FILES([dyn_modules/bigintm/Makefile])
221AC_CONFIG_FILES([dyn_modules/syzextra/Makefile])
222AC_CONFIG_FILES([dyn_modules/callgfanlib/Makefile])
223AC_CONFIG_FILES([dyn_modules/callpolymake/Makefile])
224
225AC_CONFIG_FILES([Singular/Makefile])
226
227AC_CONFIG_FILES([IntegerProgramming/Makefile])
228
229AC_CONFIG_FILES([libsingular-config])
230
231AC_CONFIG_FILES([emacs/Makefile])
232
233AC_CONFIG_FILES([debian/Makefile])
234AC_CONFIG_FILES([redhat/Makefile])
235AC_CONFIG_FILES([redhat/singular.spec])
236AC_CONFIG_FILES([desktop/Makefile])
237
238AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.