source: git/configure.ac @ 1b2216

spielwiese
Last change on this file since 1b2216 was 380d25, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Add Doxygen support to BS Note: use the following for generating html doxygen documentation: cd dox && make html
  • Property mode set to 100644
File size: 5.2 KB
RevLine 
[444bcf]1AC_INIT([singular],[3.1.3.sw])
[715936]2
[429497]3_AC_SRCDIRS(["$ac_dir"])
4
[3aea08]5AC_CONFIG_MACRO_DIR([m4])
[9634a6]6AC_CONFIG_AUX_DIR([.])
[715936]7
[3aea08]8AC_CONFIG_SRCDIR([Singular/tesths.cc])
9
10AC_CONFIG_HEADER([config.h])
11
[ea0001]12AM_MAINTAINER_MODE
[24a77fb]13AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
[2e984a]14m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
[280286e]15m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
[2e984a]16
[3aea08]17
18dnl Check if build env is sane
19AM_SANITY_CHECK
20
[f86531]21#
22# - Check for CC and CXX but be careful about CFLAGS.
23#
[3aea08]24
[f86531]25test "${CFLAGS+set}" = set || cflags_expl_set=no
[9634a6]26AC_PROG_CC
[f86531]27test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
[9634a6]28AC_PROG_CXX
[f86531]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
[8fee84]42
43AC_HEADER_STDC
[76f3a18]44AC_CHECK_HEADERS(unistd.h iostream.h)
[8fee84]45
[eb2d25]46AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv)
[8fee84]47
48
[f86531]49AC_PROG_CPP
50AC_PROG_CXXCPP
[897139]51AM_PROG_CC_C_O
[7c7495]52### AM_PROG_LEX
[3aea08]53AC_PROG_LN_S
54AC_PROG_INSTALL
[b9cf41]55
[380d25]56AC_CHECK_PROGS([DOXYGEN], [doxygen])
57if test -z "$DOXYGEN";
58   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
59fi
60AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
61                                                                   
[80c102]62LT_INIT
[81384b]63
[897139]64# Checks for libraries.
65LB_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)]))
66LB_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]67LB_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]68
[cca8b3]69AX_PYTHON_DEFAULT()
[7b9d49]70AX_PYTHON_WITH_VERSION([2.4])
71
[b3cd39]72
[3aea08]73AC_FUNC_ERROR_AT_LINE
74AC_FUNC_MALLOC
75
76SING_CHECK_PIPE
77
78# check for cpu properties
79AC_CHECK_SIZEOF(long,4)
80SING_CHECK_CPU
81
82#check for host:
83AC_CANONICAL_HOST
84case $host_os in
85  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
86  * ) LIBPREFIX="";;
87esac
88
89
90SING_CHECK_P_PROCS
91SING_CHECK_FACTORY
[d56ad87]92SING_CHECK_READLINE
[b7cad8c]93SING_CHECK_DBM
[81384b]94SING_CHECK_GFANLIB
[f86531]95
96# CFLAGS
97if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
98  CFLAGS=""
99fi
100
101# CXXFLAGS
102if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
103  CXXFLAGS=""
104fi
105
[113ed4]106AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
107AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
108AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
109AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
110AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
111
[eeae6e3]112### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
113#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
[715936]114
[461f40]115AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
116 [if test "x$enableval"  = "xyes"; then
117   ENABLE_OMALLOC=yes
118 fi], ENABLE_OMALLOC=add)
[429497]119
[461f40]120ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
[429497]121
[461f40]122if test "x$ENABLE_OMALLOC" = xadd; then
123   ENABLE_OMALLOC=yes
124   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
125fi
126
127if test "x$ENABLE_FACTORY" = xyes; then
128 AC_MSG_CHECKING(whether to use omalloc in factory)
129 if test "x$ENABLE_OMALLOC" = xyes; then
[429497]130  AC_MSG_RESULT(yes)
[461f40]131  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
132 else
[429497]133  AC_MSG_RESULT(no)
[461f40]134 fi
[429497]135fi
136
[f284db]137AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]),
[2b43ac]138 [if test "x$enableval"  = "xyes"; then
139   ENABLE_DEBUG=yes
140 fi], ENABLE_DEBUG=no)
141
142AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
143
[d1fbbf]144AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
145[if test "x$enableval" = "xyes"; then
146ENABLE_COUNTEDREF_AUTOLOAD=yes
147fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
148
149if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
150  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
151  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
152fi
153
[380d25]154AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])])
155AC_CONFIG_FILES([dox/Makefile])
156
[81384b]157AC_CONFIG_SUBDIRS([findexec])
[461f40]158AC_CONFIG_SUBDIRS([omalloc])
[715936]159
[461f40]160if test "x$ENABLE_FACTORY" = xyes; then
161 AC_CONFIG_SUBDIRS([factory])
[6b61be]162fi
[715936]163
[461f40]164AC_CONFIG_SUBDIRS([libpolys])
[5417ff]165
[715936]166AC_CONFIG_FILES([Makefile])
[3aea08]167AC_CONFIG_FILES([kernel/Makefile])
[b9cf41]168AC_CONFIG_FILES([numeric/Makefile])
[151a06]169AC_CONFIG_FILES([Singular/Makefile])
[1114d2]170AC_CONFIG_FILES([dyn_modules/Makefile])
171AC_CONFIG_FILES([dyn_modules/bigintm/Makefile])
172AC_CONFIG_FILES([dyn_modules/syzextra/Makefile])
[5417ff]173AC_CONFIG_FILES([dyn_modules/callgfanlib/Makefile])
174AC_CONFIG_FILES([IntegerProgramming/Makefile])
[584f6b0]175AC_CONFIG_FILES([libsingular-config])
[5417ff]176AC_CONFIG_SUBDIRS([gfanlib])
[b9cf41]177
[9634a6]178AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.