source: git/configure.ac @ 5179a0

spielwiese
Last change on this file since 5179a0 was 5179a0, checked in by Hans Schoenemann <hannes@…>, 11 years ago
fix: signal handling stuff
  • Property mode set to 100644
File size: 5.4 KB
RevLine 
[444bcf]1AC_INIT([singular],[3.1.3.sw])
[92644b]2AC_DEFINE([VERSION_DATE],["Jun 2013"],[release date])
[715936]3
[429497]4_AC_SRCDIRS(["$ac_dir"])
5
[3aea08]6AC_CONFIG_MACRO_DIR([m4])
[9634a6]7AC_CONFIG_AUX_DIR([.])
[715936]8
[3aea08]9AC_CONFIG_SRCDIR([Singular/tesths.cc])
10
11AC_CONFIG_HEADER([config.h])
12
[ea0001]13AM_MAINTAINER_MODE
[24a77fb]14AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
[2e984a]15
[7d160bb]16m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
[3aea08]17
18dnl Check if build env is sane
19AM_SANITY_CHECK
20
[7d160bb]21SING_RESET_FLAGS()
22SING_CHECK_SET_ARGS()
[3aea08]23
[7d160bb]24#!
[ea5f3f6]25# AC_PROG_CC
26# AC_PROG_CXX
[f86531]27AC_PROG_CPP
28AC_PROG_CXXCPP
[897139]29AM_PROG_CC_C_O
[7c7495]30### AM_PROG_LEX
[3aea08]31AC_PROG_LN_S
32AC_PROG_INSTALL
[7d160bb]33m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
34
35AC_HEADER_STDC
[5179a0]36AC_CHECK_HEADERS(unistd.h iostream.h sys/time.h sys/times.h asm/sigcontext.h)
[7d160bb]37
[5179a0]38AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv pselect)
[7d160bb]39
[b9cf41]40
[380d25]41AC_CHECK_PROGS([DOXYGEN], [doxygen])
42if test -z "$DOXYGEN";
43   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
[47e8b04]44fi
[380d25]45AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
[47e8b04]46
[80c102]47LT_INIT
[81384b]48
[4ff18b]49link_all_deplibs=yes
50link_all_deplibs_CXX=yes
51
[897139]52# Checks for libraries.
[f5127cb]53AC_CHECK_LIB(rt,clock_gettime)
54AC_CHECK_LIB(pthread,pthread_create)
55
[897139]56LB_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)]))
57LB_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)]))
[286be1f]58LB_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)]))
[6b61be]59
[cca8b3]60AX_PYTHON_DEFAULT()
[7b9d49]61AX_PYTHON_WITH_VERSION([2.4])
62
[0c86ae]63AC_CONFIG_GOOGLE_PERFTOOLS()
[b3cd39]64
[3aea08]65AC_FUNC_ERROR_AT_LINE
66AC_FUNC_MALLOC
67
[ea5f3f6]68# SING_CHECK_PIPE
[3aea08]69
70# check for cpu properties
71AC_CHECK_SIZEOF(long,4)
72SING_CHECK_CPU
73
74#check for host:
75AC_CANONICAL_HOST
76case $host_os in
77  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
78  * ) LIBPREFIX="";;
79esac
80
81
82SING_CHECK_P_PROCS
83SING_CHECK_FACTORY
[d56ad87]84SING_CHECK_READLINE
[b7cad8c]85SING_CHECK_DBM
[81384b]86SING_CHECK_GFANLIB
[47e8b04]87SING_CHECK_POLYMAKE
[f86531]88
[eeae6e3]89### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
90#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
[715936]91
[461f40]92AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
93 [if test "x$enableval"  = "xyes"; then
94   ENABLE_OMALLOC=yes
95 fi], ENABLE_OMALLOC=add)
[429497]96
[461f40]97ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
[429497]98
[461f40]99if test "x$ENABLE_OMALLOC" = xadd; then
100   ENABLE_OMALLOC=yes
101   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
102fi
103
104if test "x$ENABLE_FACTORY" = xyes; then
105 AC_MSG_CHECKING(whether to use omalloc in factory)
106 if test "x$ENABLE_OMALLOC" = xyes; then
[429497]107  AC_MSG_RESULT(yes)
[461f40]108  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
109 else
[429497]110  AC_MSG_RESULT(no)
[461f40]111 fi
[429497]112fi
113
[d1fbbf]114AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
115[if test "x$enableval" = "xyes"; then
116ENABLE_COUNTEDREF_AUTOLOAD=yes
117fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
118
119if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
120  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
121  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
122fi
123
[b56249]124dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however
125dnl AM_COND_IF is new to Automake 1.11.  To use it on new Automake without
126dnl requiring same, a fallback implementation for older Autoconf is provided.
127dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code
128dnl is correct only in terms of m4sh generated script.
129m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [
130if test -z "$$1_TRUE"; then :
131  m4_n([$2])[]dnl
132m4_ifval([$3],
133[else
134    $3
135])dnl
136fi[]dnl
137])])
138
[7d160bb]139
140AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
141AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
142AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
143AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
144AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS])
145AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS])
146AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
147AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS])
[47e8b04]148
149
[7d160bb]150SING_SHOW_FLAGS([Compiler/linker flags: ])
151
[47e8b04]152
[380d25]153AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])])
154AC_CONFIG_FILES([dox/Makefile])
155
[2c889f]156AC_CONFIG_SUBDIRS([resources])
[461f40]157AC_CONFIG_SUBDIRS([omalloc])
[715936]158
[461f40]159if test "x$ENABLE_FACTORY" = xyes; then
160 AC_CONFIG_SUBDIRS([factory])
[6b61be]161fi
[715936]162
[461f40]163AC_CONFIG_SUBDIRS([libpolys])
[5417ff]164
[715936]165AC_CONFIG_FILES([Makefile])
[9ba92b]166AC_CONFIG_FILES([xalloc/Makefile])
[3aea08]167AC_CONFIG_FILES([kernel/Makefile])
[b9cf41]168AC_CONFIG_FILES([numeric/Makefile])
[99b54a]169
170AC_CONFIG_SUBDIRS([gfanlib])
171
[1114d2]172AC_CONFIG_FILES([dyn_modules/Makefile])
173AC_CONFIG_FILES([dyn_modules/bigintm/Makefile])
174AC_CONFIG_FILES([dyn_modules/syzextra/Makefile])
[5417ff]175AC_CONFIG_FILES([dyn_modules/callgfanlib/Makefile])
[47e8b04]176AC_CONFIG_FILES([dyn_modules/callpolymake/Makefile])
[05cefc]177
[99b54a]178AC_CONFIG_FILES([Singular/Makefile])
179
180AC_CONFIG_FILES([IntegerProgramming/Makefile])
[b9cf41]181
[9dfcc6e]182AC_CONFIG_FILES([redhat/singular.spec])
[8968e8e]183# AC_CONFIG_FILES([desktop/Singular.desktop])
184# AC_CONFIG_FILES([desktop/Singular-manual.desktop])
185
[99b54a]186AC_CONFIG_FILES([libsingular-config])
187
[8968e8e]188AC_CONFIG_FILES([redhat/Makefile])
189AC_CONFIG_FILES([emacs/Makefile])
190AC_CONFIG_FILES([debian/Makefile])
191AC_CONFIG_FILES([desktop/Makefile])
[2816dca]192
[9634a6]193AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.