source: git/configure.ac @ 429497

spielwiese
Last change on this file since 429497 was 429497, checked in by Julien Puydt <julien.puydt@…>, 12 years ago
Modified the omalloc configuration for factory/ and made toplevel use it The factory/ configure now has four options for omalloc: --enable-omalloc --with-omalloc-dir=<path> (to point to omalloc's main install) --with-omalloc-extra-dir=<path> (in case there needs a second -- think out-of-tree builds) --enable-omalloc-trust (to trust omalloc will be found at build-time but don't check at configure-time) That last is especially useful to build factory/ inside singular, because in that case, omalloc.h includes omTables.h... which will exist only during the build! Finally, the toplevel Makefile.am and configure.ac are modified, so that the correct options are passed to factory/configure.
  • Property mode set to 100644
File size: 3.3 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])
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)
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
53LT_INIT
54   
55# Checks for libraries.
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)]))
58
59AC_FUNC_ERROR_AT_LINE
60AC_FUNC_MALLOC
61
62SING_CHECK_PIPE
63
64# check for cpu properties
65AC_CHECK_SIZEOF(long,4)
66SING_CHECK_CPU
67
68#check for host:
69AC_CANONICAL_HOST
70case $host_os in
71  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
72  * ) LIBPREFIX="";;
73esac
74
75
76SING_CHECK_P_PROCS
77SING_CHECK_FACTORY
78SING_CHECK_READLINE
79SING_CHECK_DBM
80
81# CFLAGS
82if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
83  CFLAGS=""
84fi
85
86# CXXFLAGS
87if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
88  CXXFLAGS=""
89fi
90
91AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
92AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
93AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
94AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
95AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
96
97### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
98#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
99
100AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--enable-omalloc], [use omalloc for the factory]),
101[if test "x$enableval"  = "xyes"; then
102  enable_omalloc=yes
103fi], enable_omalloc=no)
104
105AC_MSG_CHECKING(whether to use omalloc in factory)
106if test "$enable_omalloc" = yes; then
107
108  AC_MSG_RESULT(yes)
109  ac_configure_args="$ac_configure_args --with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust"
110else
111  AC_MSG_RESULT(no)
112fi
113
114AC_CONFIG_SUBDIRS(omalloc)
115
116if test x$ENABLE_FACTORY = xyes; then
117  AC_CONFIG_SUBDIRS(factory)
118fi
119
120AC_CONFIG_SUBDIRS(libpolys)
121AC_CONFIG_FILES([Makefile])
122AC_CONFIG_FILES([findexec/Makefile])
123AC_CONFIG_FILES([kernel/Makefile])
124AC_CONFIG_FILES([numeric/Makefile])
125AC_CONFIG_FILES([Singular/Makefile])
126AC_CONFIG_FILES([IntegerProgramming/Makefile])
127AC_CONFIG_FILES([libsingular-config])
128
129AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.