source: git/libpolys/configure.ac @ b3d84d

fieker-DuValspielwiese
Last change on this file since b3d84d was b3d84d, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Enable automake MAINTAINER_MODE
  • Property mode set to 100644
File size: 3.2 KB
Line 
1AC_INIT([libpolys], [3.1.2.sw])
2
3AC_CONFIG_MACRO_DIR([../m4])
4AC_CONFIG_AUX_DIR([.])
5AC_CONFIG_SRCDIR([reporter/reporter.h])
6AC_CONFIG_HEADER([libpolysconfig.h misc/auxiliary.h])
7
8AM_MAINTAINER_MODE([enable])
9
10AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
11m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
13
14dnl Check if build env is sane
15AM_SANITY_CHECK
16
17# Add pre'prefixed config
18AX_PREFIX_CONFIG_H([libpolysconfig.h],[],[libpolysconfig.h])
19
20# - Check for CC and CXX but be careful about CFLAGS.
21SING_RESET_FLAGS()
22SING_CHECK_SET_ARGS()
23
24AC_PROG_CC
25AC_PROG_CXX
26AM_PROG_CC_C_O
27AC_PROG_LN_S
28AC_PROG_INSTALL
29
30# Turn off shared libraries during beta-testing, since they
31# make the build process take too long.
32LT_INIT
33# ([shared])
34# LT_INIT(dlopen disable-static) # doesn't work on PowerPC!
35
36# Checks for libraries.
37LB_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)]))
38LB_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)]))
39
40# Checks for library functions.
41AC_FUNC_ERROR_AT_LINE
42AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
43AC_FUNC_VPRINTF
44AC_FUNC_MALLOC
45AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
46
47# Checks for header files.
48AC_HEADER_STDC
49AC_STDC_HEADERS
50AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h execinfo.h])
51
52# If the compiler supports GCC C++ ABI name demangling (has header
53#   cxxabi.h and abi::__cxa_demangle() function), define
54#   HAVE_GCC_ABI_DEMANGLE
55AX_CXX_GCC_ABI_DEMANGLE
56
57# Checks for typedefs, structures, and compiler characteristics.
58AC_C_CONST
59AC_C_INLINE
60AC_HEADER_STDBOOL
61AC_TYPE_SIZE_T
62
63# SING_CHECK_PIPE
64
65# check for cpu properties
66AC_CHECK_SIZEOF(long,4)
67SING_CHECK_CPU
68
69#check for host:
70AC_CANONICAL_HOST
71
72case $host_os in
73  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
74esac
75
76dnl INCLUDES=""
77dnl dnl OS specific flags and options (does work without the following:)
78dnl case "$host" in
79dnl     *-*-freebsd*)
80dnl         LIBS="$LIBS -L/usr/local/lib -lc"
81dnl     CFLAGS="$CFLAGS -I/usr/local/include"
82dnl     INCLUDES="$INCLUDES -I/usr/local/include"
83dnl     ;;
84dnl esac       
85dnl AC_SUBST(INCLUDES)
86
87SING_CHECK_P_PROCS
88SING_CHECK_ARITH_RINGS
89SING_CHECK_FACTORY
90SING_CHECK_PLURAL
91
92# AC_SUBST(PREFIX)
93# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
94
95AC_DEFINE([SINGULAR],[1],[SINGULAR])
96AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
97AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
98
99AX_PYTHON_DEFAULT()
100AX_PYTHON_WITH_VERSION([2.4])
101
102## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
103
104AC_CONFIG_FILES([Makefile])
105AC_CONFIG_FILES([misc/Makefile])
106AC_CONFIG_FILES([reporter/Makefile])
107AC_CONFIG_FILES([coeffs/Makefile])
108AC_CONFIG_FILES([polys/Makefile])
109AC_CONFIG_FILES([tests/Makefile])
110AC_CONFIG_FILES([libpolys-config])
111AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.