source: git/configure.ac @ 05cefc

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