source: git/configure.ac @ 2e984a

spielwiese
Last change on this file since 2e984a was 2e984a, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Use silent-rules if available (in more recent versions of automake)
  • Property mode set to 100644
File size: 4.7 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])
15
[3aea08]16
17dnl Check if build env is sane
18AM_SANITY_CHECK
19
[f86531]20#
21# - Check for CC and CXX but be careful about CFLAGS.
22#
[3aea08]23
[f86531]24test "${CFLAGS+set}" = set || cflags_expl_set=no
[9634a6]25AC_PROG_CC
[f86531]26test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
[9634a6]27AC_PROG_CXX
[f86531]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
[8fee84]41
42AC_HEADER_STDC
[76f3a18]43AC_CHECK_HEADERS(unistd.h iostream.h)
[8fee84]44
[eb2d25]45AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv)
[8fee84]46
47
[f86531]48AC_PROG_CPP
49AC_PROG_CXXCPP
[897139]50AM_PROG_CC_C_O
[7c7495]51### AM_PROG_LEX
[3aea08]52AC_PROG_LN_S
53AC_PROG_INSTALL
[b9cf41]54
[e078e0]55# AM_PROG_AR
[80c102]56LT_INIT
57   
[897139]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)]))
[286be1f]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)]))
[6b61be]62
[3aea08]63AC_FUNC_ERROR_AT_LINE
64AC_FUNC_MALLOC
65
66SING_CHECK_PIPE
67
68# check for cpu properties
69AC_CHECK_SIZEOF(long,4)
70SING_CHECK_CPU
71
72#check for host:
73AC_CANONICAL_HOST
74case $host_os in
75  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
76  * ) LIBPREFIX="";;
77esac
78
79
80SING_CHECK_P_PROCS
81SING_CHECK_FACTORY
[d56ad87]82SING_CHECK_READLINE
[b7cad8c]83SING_CHECK_DBM
[f86531]84
85# CFLAGS
86if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
87  CFLAGS=""
88fi
89
90# CXXFLAGS
91if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
92  CXXFLAGS=""
93fi
94
[113ed4]95AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
96AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
97AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
98AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
99AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
100
[eeae6e3]101### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
102#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
[715936]103
[461f40]104AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]),
105 [if test "x$enableval"  = "xyes"; then
106   ENABLE_OMALLOC=yes
107 fi], ENABLE_OMALLOC=add)
[429497]108
[461f40]109ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
[429497]110
[461f40]111if test "x$ENABLE_OMALLOC" = xadd; then
112   ENABLE_OMALLOC=yes
113   ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG"
114fi
115
116
117
118
119if test "x$ENABLE_FACTORY" = xyes; then
120 AC_MSG_CHECKING(whether to use omalloc in factory)
121 if test "x$ENABLE_OMALLOC" = xyes; then
[429497]122  AC_MSG_RESULT(yes)
[461f40]123  ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG"
124 else
[429497]125  AC_MSG_RESULT(no)
[461f40]126 fi
[429497]127fi
128
[f284db]129AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]),
[2b43ac]130 [if test "x$enableval"  = "xyes"; then
131   ENABLE_DEBUG=yes
132 fi], ENABLE_DEBUG=no)
133
134AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
135
[d1fbbf]136AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
137[if test "x$enableval" = "xyes"; then
138ENABLE_COUNTEDREF_AUTOLOAD=yes
139fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
140
141if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
142  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
143  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
144fi
145
[b4a676]146AC_CONFIG_SUBDIRS([findexec])
[461f40]147AC_CONFIG_SUBDIRS([omalloc])
[715936]148
[461f40]149if test "x$ENABLE_FACTORY" = xyes; then
150 AC_CONFIG_SUBDIRS([factory])
[6b61be]151fi
[715936]152
[461f40]153AC_CONFIG_SUBDIRS([libpolys])
[715936]154AC_CONFIG_FILES([Makefile])
[3aea08]155AC_CONFIG_FILES([kernel/Makefile])
[b9cf41]156AC_CONFIG_FILES([numeric/Makefile])
[151a06]157AC_CONFIG_FILES([Singular/Makefile])
[76f3a18]158AC_CONFIG_FILES([IntegerProgramming/Makefile])
[1114d2]159AC_CONFIG_FILES([dyn_modules/Makefile])
160AC_CONFIG_FILES([dyn_modules/bigintm/Makefile])
161AC_CONFIG_FILES([dyn_modules/syzextra/Makefile])
[584f6b0]162AC_CONFIG_FILES([libsingular-config])
[b9cf41]163
[9634a6]164AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.