source: git/libpolys/configure.ac @ ebdaa1

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