source: git/libpolys/configure.ac

spielwiese
Last change on this file was 0d6bfb1, checked in by Hans Schoenemann <hannes@…>, 5 weeks ago
COPYIMNG for 4.4.0
  • Property mode set to 100644
File size: 4.6 KB
Line 
1AC_INIT([libpolys], [4.4.0])
2
3AC_CONFIG_MACRO_DIR([../m4])
4AC_CONFIG_AUX_DIR([../build-aux])
5AC_CONFIG_SRCDIR([reporter/reporter.h])
6AC_CONFIG_HEADERS([_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
17AX_PROG_CXX_FOR_BUILD
18
19# Add pre'prefixed config
20AX_PREFIX_CONFIG_H([libpolysconfig.h],[],[_config.h])
21
22# - Check for CC and CXX but be careful about CFLAGS.
23SING_RESET_FLAGS()
24SING_CHECK_SET_ARGS()
25
26AC_PROG_CC
27AC_PROG_CXX
28AM_PROG_CC_C_O
29AC_PROG_LN_S
30AC_PROG_INSTALL
31
32# Turn off shared libraries during beta-testing, since they
33# make the build process take too long.
34LT_INIT([win32-dll])
35# ([shared])
36# LT_INIT([win32-dll])(dlopen disable-static) # doesn't work on PowerPC!
37
38SING_WIN_FLAGS
39
40# Checks for libraries.
41# This test for -lpthread etc has to come before AX_PTHREAD,
42# because libtool tends to ignore -pthread in linking shared C++-libs
43# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
44# (happens with ubuntu 14.04)
45AC_SEARCH_LIBS(sem_wait,[rt pthreads pthread],[],[
46  AC_MSG_ERROR([sem_wait not found in rt,pthreads,pthread])
47])
48
49# Check whether --with-gmp was given.
50SING_CHECK_GMP
51
52LB_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)]))
53
54LB_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)]))
55
56SING_CHECK_JULIA
57
58# Checks for library functions.
59AC_FUNC_ERROR_AT_LINE
60AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
61AC_FUNC_VPRINTF
62AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
63
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]);;
88  *) ;;
89esac
90
91dnl INCLUDES=""
92dnl dnl OS specific flags and options (does work without the following:)
93dnl case "$host" in
94dnl     *-*-freebsd*)
95dnl         LIBS="$LIBS -L/usr/local/lib -lc"
96dnl     CFLAGS="$CFLAGS -I/usr/local/include"
97dnl     INCLUDES="$INCLUDES -I/usr/local/include"
98dnl     ;;
99dnl esac
100dnl AC_SUBST(INCLUDES)
101
102SING_CHECK_OMALLOC()
103
104ENABLE_RESOURCES="yes"
105
106AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libsingular_resources] )
107AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libsingular_resources] )
108
109AC_MSG_CHECKING(whether libsingular_resources should be used)
110
111if test "x$ENABLE_RESOURCES" = xyes;
112then
113  AC_MSG_RESULT(yes)
114
115  AC_MSG_CHECKING([  RESOURCES_INCLUDES?..])
116  AC_MSG_RESULT(${RESOURCES_INCLUDES:-unset})
117
118  AC_MSG_CHECKING([  RESOURCES_LIBS?..])
119  AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
120
121  PKG_REQUIRE="$PKG_REQUIRE singular_resources"
122  AC_SUBST(PKG_REQUIRE)
123else
124  AC_MSG_RESULT(no)
125fi
126
127AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$ENABLE_RESOURCES" = xyes])
128
129SING_CHECK_FACTORY()
130
131SING_CHECK_P_PROCS
132SING_CHECK_ARITH_RINGS
133SING_CHECK_PLURAL
134
135# AC_SUBST(PREFIX)
136# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
137
138AC_DEFINE([SINGULAR],[1],[SINGULAR])
139AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
140AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
141
142# AX_PYTHON_DEFAULT()
143# AX_PYTHON_WITH_VERSION([2.4])
144
145AC_DEFINE_UNQUOTED([NTL_CPPFLAGS],"$NTL_CPPFLAGS",[NTL_CPPFLAGS])
146AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
147
148AC_DEFINE_UNQUOTED([GMP_CPPFLAGS],"$GMP_CPPFLAGS",[GMP_CPPFLAGS])
149AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
150
151# AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
152# AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
153
154## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
155
156AC_CONFIG_FILES([Makefile])
157AC_CONFIG_FILES([misc/Makefile])
158AC_CONFIG_FILES([reporter/Makefile])
159AC_CONFIG_FILES([coeffs/Makefile])
160AC_CONFIG_FILES([polys/Makefile])
161AC_CONFIG_FILES([tests/Makefile])
162AC_CONFIG_FILES([libpolys-config], [chmod +x libpolys-config])
163AC_CONFIG_FILES([libpolys.pc])
164AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.