source: git/libpolys/configure.ac @ 8291be

spielwiese
Last change on this file since 8291be was e078e0, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
fixing the build system as suggested by autoreconf & fixing the fix add: AM_PROG_AR&-Wno-extra-portability&-Werror are commented out for now due to problems with incompatible autotools :( add: usefull autotools flags (subdir-objects silent-rules) chg: removed some minor warnings
  • 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([-Wall foreign subdir-objects silent-rules]) # -Wno-extra-portability -Werror
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
34AM_PROG_CC_C_O
35AC_PROG_LN_S
36AC_PROG_INSTALL
37
38# AM_PROG_AR
39# Turn off shared libraries during beta-testing, since they
40# make the build process take too long.
41LT_INIT
42# ([shared])
43# LT_INIT(dlopen disable-static) # doesn't work on PowerPC!
44
45# Checks for libraries.
46LB_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)]))
47LB_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)]))
48
49# Checks for library functions.
50AC_FUNC_ERROR_AT_LINE
51AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
52AC_FUNC_VPRINTF
53AC_FUNC_MALLOC
54AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
55
56# Checks for header files.
57AC_HEADER_STDC
58AC_STDC_HEADERS
59AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h])
60
61# Checks for typedefs, structures, and compiler characteristics.
62AC_C_CONST
63AC_C_INLINE
64AC_HEADER_STDBOOL
65AC_TYPE_SIZE_T
66
67SING_CHECK_PIPE
68
69# check for cpu properties
70AC_CHECK_SIZEOF(long,4)
71SING_CHECK_CPU
72
73#check for host:
74AC_CANONICAL_HOST
75case $host_os in
76  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
77  * ) LIBPREFIX="";;
78esac
79
80dnl INCLUDES=""
81dnl dnl OS specific flags and options
82dnl case "$host" in
83dnl     *-*-freebsd*)
84dnl         LIBS="$LIBS -L/usr/local/lib -lc"
85dnl     CFLAGS="$CFLAGS -I/usr/local/include"
86dnl     INCLUDES="$INCLUDES -I/usr/local/include"
87dnl     ;;
88dnl esac       
89dnl AC_SUBST(INCLUDES)
90
91SING_CHECK_P_PROCS
92SING_CHECK_ARITH_RINGS
93SING_CHECK_FACTORY
94SING_CHECK_PLURAL
95
96# CFLAGS
97if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
98  CFLAGS=""
99fi
100 
101# CXXFLAGS
102if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
103  CXXFLAGS=""
104fi
105
106if test "x$prefix" != xNONE; then
107  PREFIX="$prefix"
108else
109  PREFIX="$ac_default_prefix"
110fi
111
112# AC_SUBST(PREFIX)
113AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
114
115AC_DEFINE([SINGULAR],[1],[SINGULAR])
116AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
117AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
118
119## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
120
121AC_CONFIG_FILES([Makefile])
122AC_CONFIG_FILES([misc/Makefile])
123AC_CONFIG_FILES([reporter/Makefile])
124AC_CONFIG_FILES([coeffs/Makefile])
125AC_CONFIG_FILES([polys/Makefile])
126AC_CONFIG_FILES([tests/Makefile])
127AC_CONFIG_FILES([libpolys-config])
128AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.