source: git/libpolys/configure.ac @ 2e984a

spielwiese
Last change on this file since 2e984a was 2e984a, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Use silent-rules if available (in more recent versions of automake)
  • Property mode set to 100644
File size: 4.0 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([config.h misc/auxiliary.h])
7
8AM_MAINTAINER_MODE
9AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
10m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
11
12
13dnl Check if build env is sane
14AM_SANITY_CHECK
15
16#
17# - Check for CC and CXX but be careful about CFLAGS.
18#
19test "${CFLAGS+set}" = set || cflags_expl_set=no
20AC_PROG_CC
21test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no
22AC_PROG_CXX
23if test "x$GCC" != xyes && test "x$GXX" != xyes; then
24  AC_MSG_WARN(you better use gcc to compile Factory)
25else
26  if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
27    AC_MSG_WARN([we use \`' as default for \`CXXFLAGS'
28                    (instead of the configure default \`-g -O')])
29  fi
30  if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
31    AC_MSG_WARN([we use \`' as default for \`CFLAGS'
32                    (instead of the configure default \`-g -O')])
33  fi
34fi
35
36AM_PROG_CC_C_O
37AC_PROG_LN_S
38AC_PROG_INSTALL
39
40# AM_PROG_AR
41# Turn off shared libraries during beta-testing, since they
42# make the build process take too long.
43LT_INIT
44# ([shared])
45# LT_INIT(dlopen disable-static) # doesn't work on PowerPC!
46
47# Checks for libraries.
48LB_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)]))
49LB_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)]))
50
51# Checks for library functions.
52AC_FUNC_ERROR_AT_LINE
53AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
54AC_FUNC_VPRINTF
55AC_FUNC_MALLOC
56AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
57
58# Checks for header files.
59AC_HEADER_STDC
60AC_STDC_HEADERS
61AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h execinfo.h])
62
63# If the compiler supports GCC C++ ABI name demangling (has header
64#   cxxabi.h and abi::__cxa_demangle() function), define
65#   HAVE_GCC_ABI_DEMANGLE
66AX_CXX_GCC_ABI_DEMANGLE
67
68# Checks for typedefs, structures, and compiler characteristics.
69AC_C_CONST
70AC_C_INLINE
71AC_HEADER_STDBOOL
72AC_TYPE_SIZE_T
73
74SING_CHECK_PIPE
75
76# check for cpu properties
77AC_CHECK_SIZEOF(long,4)
78SING_CHECK_CPU
79
80#check for host:
81AC_CANONICAL_HOST
82case $host_os in
83  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
84  * ) LIBPREFIX="";;
85esac
86
87dnl INCLUDES=""
88dnl dnl OS specific flags and options
89dnl case "$host" in
90dnl     *-*-freebsd*)
91dnl         LIBS="$LIBS -L/usr/local/lib -lc"
92dnl     CFLAGS="$CFLAGS -I/usr/local/include"
93dnl     INCLUDES="$INCLUDES -I/usr/local/include"
94dnl     ;;
95dnl esac       
96dnl AC_SUBST(INCLUDES)
97
98SING_CHECK_P_PROCS
99SING_CHECK_ARITH_RINGS
100SING_CHECK_FACTORY
101SING_CHECK_PLURAL
102
103# CFLAGS
104if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
105  CFLAGS=""
106fi
107 
108# CXXFLAGS
109if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
110  CXXFLAGS=""
111fi
112
113#if test "x$prefix" != xNONE; then
114#  PREFIX="$prefix"
115#else
116#  PREFIX="$ac_default_prefix"
117#fi
118
119AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]),
120 [if test "x$enableval"  = "xyes"; then
121   ENABLE_DEBUG=yes
122 fi], ENABLE_DEBUG=no)
123
124AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
125
126# AC_SUBST(PREFIX)
127# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
128
129AC_DEFINE([SINGULAR],[1],[SINGULAR])
130AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
131AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
132
133## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
134
135AC_CONFIG_FILES([Makefile])
136AC_CONFIG_FILES([misc/Makefile])
137AC_CONFIG_FILES([reporter/Makefile])
138AC_CONFIG_FILES([coeffs/Makefile])
139AC_CONFIG_FILES([polys/Makefile])
140AC_CONFIG_FILES([tests/Makefile])
141AC_CONFIG_FILES([libpolys-config])
142AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.