source: git/configure.ac @ 0635d51

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