source: git/configure.ac @ cca8b3

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