source: git/configure.ac @ b3cd39

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