source: git/libpolys/configure.ac @ f86531

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