source: git/configure.ac @ a07784

spielwiese
Last change on this file since a07784 was a07784, checked in by Alexander Dreyer <adreyer@…>, 11 years ago
Merge branch 'spielwiese' of github.com:Singular/Sources into spielwiese-pyobject
  • Property mode set to 100644
File size: 4.8 KB
Line 
1AC_INIT([singular],[3.1.3.sw])
2
3_AC_SRCDIRS(["$ac_dir"])
4
5AC_CONFIG_MACRO_DIR([m4])
6AC_CONFIG_AUX_DIR([.])
7
8AC_CONFIG_SRCDIR([Singular/tesths.cc])
9
10AC_CONFIG_HEADER([config.h])
11
12AM_MAINTAINER_MODE
13AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
14m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
15
16
17dnl Check if build env is sane
18AM_SANITY_CHECK
19
20#
21# - Check for CC and CXX but be careful about CFLAGS.
22#
23
24test "${CFLAGS+set}" = set || cflags_expl_set=no
25AC_PROG_CC
26test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
27AC_PROG_CXX
28if test "x$GCC" != xyes && test "x$GXX" != xyes; then
29  AC_MSG_WARN(you better use gcc to compile Factory)
30else
31  if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
32    AC_MSG_WARN([we use \`' as default for \`CXXFLAGS'
33                    (instead of the configure default \`-g -O')])
34  fi
35  if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
36    AC_MSG_WARN([we use \`' as default for \`CFLAGS'
37                    (instead of the configure default \`-g -O')])
38  fi
39fi
40
41
42AC_HEADER_STDC
43AC_CHECK_HEADERS(unistd.h iostream.h)
44
45AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv)
46
47
48AC_PROG_CPP
49AC_PROG_CXXCPP
50AM_PROG_CC_C_O
51### AM_PROG_LEX
52AC_PROG_LN_S
53AC_PROG_INSTALL
54
55# AM_PROG_AR
56LT_INIT
57   
58# Checks for libraries.
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)]))
62
63AX_PYTHON_WITH()
64AX_PYTHON_VERSION_ENSURE( [2.4] )
65AX_PYTHON_DEVEL([>= 2.4])
66AX_PYTHON_LSPEC()
67AX_PYTHON_CSPEC()
68
69AC_FUNC_ERROR_AT_LINE
70AC_FUNC_MALLOC
71
72SING_CHECK_PIPE
73
74# check for cpu properties
75AC_CHECK_SIZEOF(long,4)
76SING_CHECK_CPU
77
78#check for host:
79AC_CANONICAL_HOST
80case $host_os in
81  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
82  * ) LIBPREFIX="";;
83esac
84
85
86SING_CHECK_P_PROCS
87SING_CHECK_FACTORY
88SING_CHECK_READLINE
89SING_CHECK_DBM
90
91# CFLAGS
92if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
93  CFLAGS=""
94fi
95
96# CXXFLAGS
97if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
98  CXXFLAGS=""
99fi
100
101AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
102AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
103AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
104AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
105AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
106
107### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
108#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
109
110AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
111 [if test "x$enableval"  = "xyes"; then
112   ENABLE_OMALLOC=yes
113 fi], ENABLE_OMALLOC=add)
114
115ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
116
117if test "x$ENABLE_OMALLOC" = xadd; then
118   ENABLE_OMALLOC=yes
119   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
120fi
121
122
123
124
125if test "x$ENABLE_FACTORY" = xyes; then
126 AC_MSG_CHECKING(whether to use omalloc in factory)
127 if test "x$ENABLE_OMALLOC" = xyes; then
128  AC_MSG_RESULT(yes)
129  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
130 else
131  AC_MSG_RESULT(no)
132 fi
133fi
134
135AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]),
136 [if test "x$enableval"  = "xyes"; then
137   ENABLE_DEBUG=yes
138 fi], ENABLE_DEBUG=no)
139
140AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
141
142AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
143[if test "x$enableval" = "xyes"; then
144ENABLE_COUNTEDREF_AUTOLOAD=yes
145fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
146
147if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
148  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
149  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
150fi
151
152AC_CONFIG_SUBDIRS([findexec])
153AC_CONFIG_SUBDIRS([omalloc])
154
155if test "x$ENABLE_FACTORY" = xyes; then
156 AC_CONFIG_SUBDIRS([factory])
157fi
158
159AC_CONFIG_SUBDIRS([libpolys])
160AC_CONFIG_FILES([Makefile])
161AC_CONFIG_FILES([kernel/Makefile])
162AC_CONFIG_FILES([numeric/Makefile])
163AC_CONFIG_FILES([Singular/Makefile])
164AC_CONFIG_FILES([IntegerProgramming/Makefile])
165AC_CONFIG_FILES([dyn_modules/Makefile])
166AC_CONFIG_FILES([dyn_modules/bigintm/Makefile])
167AC_CONFIG_FILES([dyn_modules/syzextra/Makefile])
168AC_CONFIG_FILES([libsingular-config])
169
170AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.