source: git/libpolys/configure.ac @ e3c718

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