source: git/configure.ac @ 1a1f34b

spielwiese
Last change on this file since 1a1f34b was 1a1f34b, checked in by Hans Schoenemann <hannes@…>, 8 years ago
removed unsed files, fixed make_tar.sh and make dist
  • Property mode set to 100644
File size: 8.1 KB
Line 
1AC_INIT([singular], [4.0.2], [singular@mathematik.uni-kl.de])
2AC_DEFINE([VERSION_DATE],["Feb 2015"],[release date])
3
4_AC_SRCDIRS(["$ac_dir"])
5
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_AUX_DIR([build-aux])
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 qsort_r)
45
46AC_CHECK_PROGS([DOXYGEN], [doxygen])
47if test -z "$DOXYGEN";
48   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
49fi
50AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
51
52LT_INIT
53
54link_all_deplibs=yes
55link_all_deplibs_CXX=yes
56
57# Checks for libraries.
58
59# This test for -lpthread etc has to come before AX_PTHREAD,
60# because libtool tends to ignore -pthread in linking shared C++-libs
61# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
62# (happens with ubuntu 14.04)
63AC_SEARCH_LIBS(sem_wait,[rt pthreads pthread],[],[
64  AC_MSG_ERROR([sem_wait not found in rt,pthreads,pthread])
65])
66
67AX_PTHREAD([], [
68  AC_MSG_ERROR([Pthread library not found. Please set PTHREAD_CFLAGS and PTHREAD_LIBS correctly for your setup])
69])
70
71AC_MSG_CHECKING([Found Pthread, PTHREAD_CC:])
72AC_MSG_RESULT(${PTHREAD_CC:-unset})
73AC_MSG_CHECKING([               PTHREAD_CFLAGS:])
74AC_MSG_RESULT(${PTHREAD_CFLAGS:-unset})
75AC_MSG_CHECKING([               PTHREAD_LIBS:])
76AC_MSG_RESULT(${PTHREAD_LIBS:-unset})
77
78# Set the correct PTHREAD flags and, if needed, change the compiler to one that is pthread-enabled.
79CC="$PTHREAD_CC"
80CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
81LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
82
83AC_SUBST(PTHREAD_CFLAGS)
84AC_SUBST(PTHREAD_LDFLAGS)
85AC_SUBST(PTHREAD_LIBS)
86AC_SUBST(CC)
87
88
89AC_CHECK_LIB(rt,clock_gettime)
90
91LB_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)]))
92LB_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)]))
93LB_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)]))
94
95AC_CONFIG_GOOGLE_PERFTOOLS()
96
97AX_PYTHON_DEFAULT()
98AX_PYTHON_WITH_VERSION([2.4])
99
100LB_CHECK_MATHICGB
101
102AC_FUNC_ERROR_AT_LINE
103AC_FUNC_MALLOC
104
105# check for cpu properties
106AC_CHECK_SIZEOF(long,4)
107SING_CHECK_CPU
108
109#check for host:
110AC_CANONICAL_HOST
111
112case $host_os in
113  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
114esac
115
116PKG_REQUIRE="$PKG_REQUIRE"
117AC_SUBST(PKG_REQUIRE)
118
119SING_USE_OMALLOC()
120SING_USE_RESOURCES()
121SING_USE_FACTORY()
122
123SING_CHECK_P_PROCS
124SING_CHECK_READLINE
125SING_CHECK_DBM
126
127SING_CHECK_GFANLIB
128SING_CHECK_POLYMAKE
129
130SING_CHECK_PLURAL
131
132SING_BUILTIN_MODULES
133
134AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
135[if test "x$enableval" = "xyes"; then
136ENABLE_COUNTEDREF_AUTOLOAD=yes
137fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
138
139if 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)
142fi
143
144dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
145dnl AM_COND_IF is new to Automake 1.11.  To use it on new Automake without
146dnl requiring same, a fallback implementation for older Autoconf is provided.
147dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
148dnl is correct only in terms of m4sh generated script.
149m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
150if test -z "$$1_TRUE"; then :
151  m4_n([$2])[]dnl
152m4_ifval([$3],
153[else
154    $3
155])dnl
156fi[]dnl
157])])
158
159
160AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
161AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
162AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
163AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
164AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS])
165AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS])
166AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
167AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS])
168AC_DEFINE_UNQUOTED([AC_CONFIGURE_ARGS],"$ac_configure_args",[ac_configure_args])
169# AC_DEFINE_UNQUOTED([AC_CT_CC], "$ac_ct_CC",[ac_ct_CC])
170
171AC_DEFINE_UNQUOTED([NTL_CFLAGS],"$NTL_CFLAGS",[NTL_CFLAGS])
172AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
173
174AC_DEFINE_UNQUOTED([GMP_CFLAGS],"$GMP_CFLAGS",[GMP_CFLAGS])
175AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
176
177AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
178AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
179
180##### SEE http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
181
182AX_RECURSIVE_EVAL([[$]prefix], [config_prefix])
183AX_NORMALIZE_PATH([config_prefix],['/'])
184AC_DEFINE_UNQUOTED([PREFIX],"$config_prefix",[prefix])
185
186AX_RECURSIVE_EVAL([[$]exec_prefix], [config_exec_prefix])
187AX_NORMALIZE_PATH([config_exec_prefix],['/'])
188AC_DEFINE_UNQUOTED([EXEC_PREFIX],"$config_exec_prefix",[exec_prefix])
189
190AX_RECURSIVE_EVAL([[$]libexecdir], [config_libexecdir])
191AX_NORMALIZE_PATH([config_libexecdir],['/'])
192AC_DEFINE_UNQUOTED([LIBEXEC_DIR],"$config_libexecdir",[libexecdir])
193
194AX_RECURSIVE_EVAL([[$]libdir], [config_libdir])
195AX_NORMALIZE_PATH([config_libdir],['/'])
196AC_DEFINE_UNQUOTED([LIB_DIR],"$config_libdir",[libdir])
197
198AX_RECURSIVE_EVAL([[$]bindir], [config_bindir])
199AX_NORMALIZE_PATH([config_bindir],['/'])
200AC_DEFINE_UNQUOTED([BIN_DIR],"$config_bindir",[bindir])
201
202AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
203AX_NORMALIZE_PATH([config_datadir],['/'])
204AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
205AC_SUBST(DATA_DIR)
206
207AX_RECURSIVE_EVAL([[$]docdir], [config_docdir])
208AX_NORMALIZE_PATH([config_docdir],['/'])
209AC_DEFINE_UNQUOTED([DOC_DIR],"$config_docdir",[docdir])
210AC_SUBST(DOC_DIR)
211
212SING_SHOW_FLAGS([Compiler/linker flags: ])
213
214
215## AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])])
216
217AC_CONFIG_FILES([dox/Makefile])
218
219AC_CONFIG_SUBDIRS([resources])
220AC_CONFIG_SUBDIRS([omalloc])
221
222if test "x$ENABLE_FACTORY" = xyes; then
223 AC_CONFIG_SUBDIRS([factory])
224fi
225
226AC_CONFIG_SUBDIRS([libpolys])
227
228AC_CONFIG_FILES([Makefile])
229AC_CONFIG_FILES([xalloc/Makefile])
230AC_CONFIG_FILES([kernel/Makefile])
231AC_CONFIG_FILES([kernel/numeric/Makefile])
232AC_CONFIG_FILES([kernel/fglm/Makefile])
233AC_CONFIG_FILES([kernel/groebner_walk/Makefile])
234AC_CONFIG_FILES([kernel/combinatorics/Makefile])
235AC_CONFIG_FILES([kernel/spectrum/Makefile])
236AC_CONFIG_FILES([kernel/linear_algebra/Makefile])
237AC_CONFIG_FILES([kernel/maps/Makefile])
238AC_CONFIG_FILES([kernel/GBEngine/Makefile])
239AC_CONFIG_FILES([kernel/oswrapper/Makefile])
240
241AC_CONFIG_SUBDIRS([gfanlib])
242
243AC_CONFIG_FILES([Singular/dyn_modules/Makefile])
244AC_CONFIG_FILES([Singular/dyn_modules/bigintm/Makefile])
245AC_CONFIG_FILES([Singular/dyn_modules/Order/Makefile])
246AC_CONFIG_FILES([Singular/dyn_modules/syzextra/Makefile])
247AC_CONFIG_FILES([Singular/dyn_modules/gfanlib/Makefile])
248AC_CONFIG_FILES([Singular/dyn_modules/polymake/Makefile])
249AC_CONFIG_FILES([Singular/dyn_modules/pyobject/Makefile])
250AC_CONFIG_FILES([Singular/dyn_modules/singmathic/Makefile])
251AC_CONFIG_FILES([Singular/dyn_modules/staticdemo/Makefile])
252
253AC_CONFIG_FILES([Singular/Makefile])
254
255AC_CONFIG_FILES([IntegerProgramming/Makefile])
256
257AC_CONFIG_FILES([libsingular-config Singular.pc])
258
259AC_CONFIG_FILES([emacs/Makefile])
260
261AC_CONFIG_FILES([redhat/Makefile])
262AC_CONFIG_FILES([redhat/singular.spec])
263AC_CONFIG_FILES([desktop/Makefile desktop/Singular.desktop desktop/Singular-manual.desktop])
264
265AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.