source: git/libpolys/configure.ac @ 4a01eb

fieker-DuValspielwiese
Last change on this file since 4a01eb was a14e9f, checked in by Hans Schoenemann <hannes@…>, 5 years ago
version number: 4.1.2
  • Property mode set to 100644
File size: 4.8 KB
Line 
1AC_INIT([libpolys], [4.1.2])
2
3AC_CONFIG_MACRO_DIR([../m4])
4AC_CONFIG_AUX_DIR([../build-aux])
5AC_CONFIG_SRCDIR([reporter/reporter.h])
6AC_CONFIG_HEADER([_config.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],[],[_config.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([win32-dll])
33# ([shared])
34# LT_INIT([win32-dll])(dlopen disable-static) # doesn't work on PowerPC!
35
36SING_WIN_FLAGS
37
38# Checks for libraries.
39# This test for -lpthread etc has to come before AX_PTHREAD,
40# because libtool tends to ignore -pthread in linking shared C++-libs
41# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
42# (happens with ubuntu 14.04)
43AC_SEARCH_LIBS(sem_wait,[rt pthreads pthread],[],[
44  AC_MSG_ERROR([sem_wait not found in rt,pthreads,pthread])
45])
46
47LB_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)]))
48LB_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)]))
49LB_CHECK_FLINT(2.4,,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)]))
50
51SING_CHECK_JULIA
52
53
54# Checks for library functions.
55AC_FUNC_ERROR_AT_LINE
56AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
57AC_FUNC_VPRINTF
58AC_FUNC_MALLOC
59AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
60
61# Checks for header files.
62AC_HEADER_STDC
63AC_STDC_HEADERS
64AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h execinfo.h])
65
66# If the compiler supports GCC C++ ABI name demangling (has header
67#   cxxabi.h and abi::__cxa_demangle() function), define
68#   HAVE_GCC_ABI_DEMANGLE
69AX_CXX_GCC_ABI_DEMANGLE
70
71# Checks for typedefs, structures, and compiler characteristics.
72AC_C_CONST
73AC_C_INLINE
74AC_HEADER_STDBOOL
75AC_TYPE_SIZE_T
76
77# SING_CHECK_PIPE
78
79# check for cpu properties
80AC_CHECK_SIZEOF(long,4)
81SING_CHECK_CPU
82
83#check for host:
84AC_CANONICAL_HOST
85
86case $host_os in
87  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
88esac
89
90dnl INCLUDES=""
91dnl dnl OS specific flags and options (does work without the following:)
92dnl case "$host" in
93dnl     *-*-freebsd*)
94dnl         LIBS="$LIBS -L/usr/local/lib -lc"
95dnl     CFLAGS="$CFLAGS -I/usr/local/include"
96dnl     INCLUDES="$INCLUDES -I/usr/local/include"
97dnl     ;;
98dnl esac
99dnl AC_SUBST(INCLUDES)
100
101SING_CHECK_OMALLOC()
102
103ENABLE_RESOURCES="yes"
104
105AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libsingular_resources] )
106AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libsingular_resources] )
107
108AC_MSG_CHECKING(whether libsingular_resources should be used)
109
110if test "x$ENABLE_RESOURCES" = xyes;
111then
112  AC_MSG_RESULT(yes)
113
114  AC_MSG_CHECKING([  RESOURCES_INCLUDES?..])
115  AC_MSG_RESULT(${RESOURCES_INCLUDES:-unset})
116
117  AC_MSG_CHECKING([  RESOURCES_LIBS?..])
118  AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
119
120  PKG_REQUIRE="$PKG_REQUIRE singular_resources"
121  AC_SUBST(PKG_REQUIRE)
122else
123  AC_MSG_RESULT(no)
124fi
125
126AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$ENABLE_RESOURCES" = xyes])
127
128SING_CHECK_FACTORY()
129
130SING_CHECK_P_PROCS
131SING_CHECK_ARITH_RINGS
132SING_CHECK_PLURAL
133
134# AC_SUBST(PREFIX)
135# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
136
137AC_DEFINE([SINGULAR],[1],[SINGULAR])
138AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
139AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
140
141# AX_PYTHON_DEFAULT()
142# AX_PYTHON_WITH_VERSION([2.4])
143
144AC_DEFINE_UNQUOTED([NTL_CPPFLAGS],"$NTL_CPPFLAGS",[NTL_CPPFLAGS])
145AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
146
147AC_DEFINE_UNQUOTED([GMP_CPPFLAGS],"$GMP_CPPFLAGS",[GMP_CPPFLAGS])
148AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
149
150# AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
151# AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
152
153## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
154
155AC_CONFIG_FILES([Makefile])
156AC_CONFIG_FILES([misc/Makefile])
157AC_CONFIG_FILES([reporter/Makefile])
158AC_CONFIG_FILES([coeffs/Makefile])
159AC_CONFIG_FILES([polys/Makefile])
160AC_CONFIG_FILES([tests/Makefile])
161AC_CONFIG_FILES([libpolys-config libpolys.pc])
162AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.