source: git/libpolys/configure.ac @ ba5e9e

spielwiese
Last change on this file since ba5e9e was ba5e9e, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Changed configure-scripts to generate individual public config files for each package: resources, libpolys, singular (main) fix: sources should include correct corresponding config headers.
  • Property mode set to 100644
File size: 3.1 KB
RevLine 
[ab788d]1AC_INIT([libpolys], [3.1.2.sw])
2
[8184703]3AC_CONFIG_MACRO_DIR([../m4])
4AC_CONFIG_AUX_DIR([.])
[d11524]5AC_CONFIG_SRCDIR([reporter/reporter.h])
[ba5e9e]6AC_CONFIG_HEADER([libpolysconfig.h misc/auxiliary.h])
[ab788d]7
[ea0001]8AM_MAINTAINER_MODE
[24a77fb]9AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
[2e984a]10m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
[280286e]11m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
[2e984a]12
[84c376]13dnl Check if build env is sane
14AM_SANITY_CHECK
15
[ba5e9e]16# Add pre'prefixed config
17AX_PREFIX_CONFIG_H([libpolysconfig.h],[],[libpolysconfig.h])
18
[f86531]19# - Check for CC and CXX but be careful about CFLAGS.
[7d160bb]20SING_RESET_FLAGS()
21SING_CHECK_SET_ARGS()
22
[f86531]23AC_PROG_CC
24AC_PROG_CXX
[e078e0]25AM_PROG_CC_C_O
26AC_PROG_LN_S
27AC_PROG_INSTALL
28
[4c5b46]29# Turn off shared libraries during beta-testing, since they
30# make the build process take too long.
[80c102]31LT_INIT
32# ([shared])
33# LT_INIT(dlopen disable-static) # doesn't work on PowerPC!
[72b880]34
[4aa8610]35# Checks for libraries.
[9af8a63]36LB_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)]))
[643b1eb]37LB_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
[720156]39# Checks for library functions.
40AC_FUNC_ERROR_AT_LINE
[eb2d25]41AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
[ec0d9b]42AC_FUNC_VPRINTF
43AC_FUNC_MALLOC
[84c376]44AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
[720156]45
[d11524]46# Checks for header files.
47AC_HEADER_STDC
[84c376]48AC_STDC_HEADERS
[56bce65]49AC_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
54AX_CXX_GCC_ABI_DEMANGLE
[d11524]55
56# Checks for typedefs, structures, and compiler characteristics.
57AC_C_CONST
58AC_C_INLINE
[720156]59AC_HEADER_STDBOOL
60AC_TYPE_SIZE_T
[d11524]61
[ea5f3f6]62# SING_CHECK_PIPE
[d11524]63
64# check for cpu properties
65AC_CHECK_SIZEOF(long,4)
66SING_CHECK_CPU
67
[720156]68#check for host:
69AC_CANONICAL_HOST
[da7a28]70
[720156]71case $host_os in
[da7a28]72  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
[720156]73esac
74
[84c376]75dnl INCLUDES=""
[da7a28]76dnl dnl OS specific flags and options (does work without the following:)
[84c376]77dnl case "$host" in
78dnl     *-*-freebsd*)
79dnl         LIBS="$LIBS -L/usr/local/lib -lc"
80dnl     CFLAGS="$CFLAGS -I/usr/local/include"
81dnl     INCLUDES="$INCLUDES -I/usr/local/include"
82dnl     ;;
83dnl esac       
84dnl AC_SUBST(INCLUDES)
85
[ec0d9b]86SING_CHECK_P_PROCS
[568cf0]87SING_CHECK_ARITH_RINGS
[45e35b]88SING_CHECK_FACTORY
89SING_CHECK_PLURAL
[bea370]90
[964389]91# AC_SUBST(PREFIX)
[f284db]92# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
[964389]93
[f3ea6ce]94AC_DEFINE([SINGULAR],[1],[SINGULAR])
95AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
96AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
97
[c1e7a6]98AX_PYTHON_DEFAULT()
99AX_PYTHON_WITH_VERSION([2.4])
100
[047597]101## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
102
[014b65]103AC_CONFIG_FILES([Makefile])
[d11524]104AC_CONFIG_FILES([misc/Makefile])
105AC_CONFIG_FILES([reporter/Makefile])
[720156]106AC_CONFIG_FILES([coeffs/Makefile])
[ec0d9b]107AC_CONFIG_FILES([polys/Makefile])
[4aa8610]108AC_CONFIG_FILES([tests/Makefile])
[c5917f1]109AC_CONFIG_FILES([libpolys-config])
[014b65]110AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.