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