1 | AC_INIT([singular],[3.1.3.sw]) |
---|
2 | AC_DEFINE([VERSION_DATE],["Jun 2013"],[release date]) |
---|
3 | |
---|
4 | _AC_SRCDIRS(["$ac_dir"]) |
---|
5 | |
---|
6 | AC_CONFIG_MACRO_DIR([m4]) |
---|
7 | AC_CONFIG_AUX_DIR([.]) |
---|
8 | |
---|
9 | AC_CONFIG_SRCDIR([Singular/tesths.cc]) |
---|
10 | |
---|
11 | AC_CONFIG_HEADER([config.h]) |
---|
12 | |
---|
13 | AM_MAINTAINER_MODE |
---|
14 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
15 | |
---|
16 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) |
---|
17 | |
---|
18 | dnl Check if build env is sane |
---|
19 | AM_SANITY_CHECK |
---|
20 | |
---|
21 | # |
---|
22 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
23 | SING_RESET_FLAGS() |
---|
24 | SING_CHECK_SET_ARGS() |
---|
25 | |
---|
26 | #! |
---|
27 | AC_PROG_CC |
---|
28 | AC_PROG_CXX |
---|
29 | AC_PROG_CPP |
---|
30 | AC_PROG_CXXCPP |
---|
31 | AM_PROG_CC_C_O |
---|
32 | ### AM_PROG_LEX |
---|
33 | AC_PROG_LN_S |
---|
34 | AC_PROG_INSTALL |
---|
35 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) |
---|
36 | |
---|
37 | AC_HEADER_STDC |
---|
38 | AC_CHECK_HEADERS(unistd.h iostream.h) |
---|
39 | |
---|
40 | AC_CHECK_FUNCS(readlink getcwd getwd setenv putenv) |
---|
41 | |
---|
42 | |
---|
43 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
---|
44 | if test -z "$DOXYGEN"; |
---|
45 | then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) |
---|
46 | fi |
---|
47 | AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) |
---|
48 | |
---|
49 | LT_INIT |
---|
50 | |
---|
51 | # Checks for libraries. |
---|
52 | AC_CHECK_LIB(rt,clock_gettime) |
---|
53 | AC_CHECK_LIB(pthread,pthread_create) |
---|
54 | |
---|
55 | LB_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)])) |
---|
56 | LB_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)])) |
---|
57 | LB_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)])) |
---|
58 | |
---|
59 | AX_PYTHON_DEFAULT() |
---|
60 | AX_PYTHON_WITH_VERSION([2.4]) |
---|
61 | |
---|
62 | AC_CONFIG_GOOGLE_PERFTOOLS() |
---|
63 | |
---|
64 | AC_FUNC_ERROR_AT_LINE |
---|
65 | AC_FUNC_MALLOC |
---|
66 | |
---|
67 | SING_CHECK_PIPE |
---|
68 | |
---|
69 | # check for cpu properties |
---|
70 | AC_CHECK_SIZEOF(long,4) |
---|
71 | SING_CHECK_CPU |
---|
72 | |
---|
73 | #check for host: |
---|
74 | AC_CANONICAL_HOST |
---|
75 | case $host_os in |
---|
76 | *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";; |
---|
77 | * ) LIBPREFIX="";; |
---|
78 | esac |
---|
79 | |
---|
80 | |
---|
81 | SING_CHECK_P_PROCS |
---|
82 | SING_CHECK_FACTORY |
---|
83 | SING_CHECK_READLINE |
---|
84 | SING_CHECK_DBM |
---|
85 | SING_CHECK_GFANLIB |
---|
86 | |
---|
87 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
---|
88 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
---|
89 | |
---|
90 | AC_ARG_ENABLE(omalloc, AS_HELP_STRING([--disable-omalloc], [do NOT use omalloc within the factory]), |
---|
91 | [if test "x$enableval" = "xyes"; then |
---|
92 | ENABLE_OMALLOC=yes |
---|
93 | fi], ENABLE_OMALLOC=add) |
---|
94 | |
---|
95 | ENABLE_OMALLOC_ARG="--with-omalloc-dir=$ac_abs_top_srcdir --with-omalloc-extra-dir=$ac_abs_top_builddir --enable-omalloc-trust" |
---|
96 | |
---|
97 | if test "x$ENABLE_OMALLOC" = xadd; then |
---|
98 | ENABLE_OMALLOC=yes |
---|
99 | ENABLE_OMALLOC_ARG="--enable-omalloc $ENABLE_OMALLOC_ARG" |
---|
100 | fi |
---|
101 | |
---|
102 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
103 | AC_MSG_CHECKING(whether to use omalloc in factory) |
---|
104 | if test "x$ENABLE_OMALLOC" = xyes; then |
---|
105 | AC_MSG_RESULT(yes) |
---|
106 | ac_configure_args="$ac_configure_args $ENABLE_OMALLOC_ARG" |
---|
107 | else |
---|
108 | AC_MSG_RESULT(no) |
---|
109 | fi |
---|
110 | fi |
---|
111 | |
---|
112 | AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]), |
---|
113 | [if test "x$enableval" = "xyes"; then |
---|
114 | ENABLE_COUNTEDREF_AUTOLOAD=yes |
---|
115 | fi], ENABLE_COUNTEDREF_AUTOLOAD=no) |
---|
116 | |
---|
117 | if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then |
---|
118 | AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types]) |
---|
119 | AC_SUBST(SI_COUNTEDREF_AUTOLOAD) |
---|
120 | fi |
---|
121 | |
---|
122 | dnl AC_CONFIG_FILES conditionalization requires using AM_COND_IF, however |
---|
123 | dnl AM_COND_IF is new to Automake 1.11. To use it on new Automake without |
---|
124 | dnl requiring same, a fallback implementation for older Autoconf is provided. |
---|
125 | dnl Note that disabling of AC_CONFIG_FILES requires Automake 1.11, this code |
---|
126 | dnl is correct only in terms of m4sh generated script. |
---|
127 | m4_ifndef([AM_COND_IF], [AC_DEFUN([AM_COND_IF], [ |
---|
128 | if test -z "$$1_TRUE"; then : |
---|
129 | m4_n([$2])[]dnl |
---|
130 | m4_ifval([$3], |
---|
131 | [else |
---|
132 | $3 |
---|
133 | ])dnl |
---|
134 | fi[]dnl |
---|
135 | ])]) |
---|
136 | |
---|
137 | |
---|
138 | AC_DEFINE_UNQUOTED([CC],"$CC",[CC]) |
---|
139 | AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX]) |
---|
140 | AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS]) |
---|
141 | AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS]) |
---|
142 | AC_DEFINE_UNQUOTED([DEFS],"$DEFS",[DEFS]) |
---|
143 | AC_DEFINE_UNQUOTED([CPPFLAGS],"$CPPFLAGS",[CPPFLAGS]) |
---|
144 | AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS]) |
---|
145 | AC_DEFINE_UNQUOTED([LIBS],"$LIBS",[LIBS]) |
---|
146 | |
---|
147 | |
---|
148 | SING_SHOW_FLAGS([Compiler/linker flags: ]) |
---|
149 | |
---|
150 | |
---|
151 | AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([dox/Doxyfile])]) |
---|
152 | AC_CONFIG_FILES([dox/Makefile]) |
---|
153 | |
---|
154 | AC_CONFIG_SUBDIRS([resources]) |
---|
155 | AC_CONFIG_SUBDIRS([omalloc]) |
---|
156 | |
---|
157 | if test "x$ENABLE_FACTORY" = xyes; then |
---|
158 | AC_CONFIG_SUBDIRS([factory]) |
---|
159 | fi |
---|
160 | |
---|
161 | AC_CONFIG_SUBDIRS([libpolys]) |
---|
162 | |
---|
163 | AC_CONFIG_FILES([Makefile]) |
---|
164 | AC_CONFIG_FILES([xalloc/Makefile]) |
---|
165 | AC_CONFIG_FILES([kernel/Makefile]) |
---|
166 | AC_CONFIG_FILES([numeric/Makefile]) |
---|
167 | AC_CONFIG_FILES([Singular/Makefile]) |
---|
168 | AC_CONFIG_FILES([dyn_modules/Makefile]) |
---|
169 | AC_CONFIG_FILES([dyn_modules/bigintm/Makefile]) |
---|
170 | AC_CONFIG_FILES([dyn_modules/syzextra/Makefile]) |
---|
171 | AC_CONFIG_FILES([dyn_modules/callgfanlib/Makefile]) |
---|
172 | AC_CONFIG_FILES([IntegerProgramming/Makefile]) |
---|
173 | AC_CONFIG_FILES([libsingular-config]) |
---|
174 | |
---|
175 | AC_CONFIG_SUBDIRS([gfanlib]) |
---|
176 | |
---|
177 | AC_CONFIG_FILES([redhat/singular.spec]) |
---|
178 | |
---|
179 | AC_OUTPUT |
---|