source: git/configure.ac @ 113ed4

spielwiese
Last change on this file since 113ed4 was 113ed4, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
store/display the used compiler setup (CXX/CC/etc) ADD: CXX/CXX/etc are written into config.h by configure CHG: Singular/version.h is a static header (no static CXX/CC!) TODO: add Version ID (git commit id?) to Singular/version.h
  • Property mode set to 100644
File size: 2.8 KB
Line 
1AC_INIT([singular],[3.1.3.sw])
2
3AC_CONFIG_MACRO_DIR([m4])
4AC_CONFIG_AUX_DIR([.])
5
6AC_CONFIG_SRCDIR([Singular/tesths.cc])
7
8AC_CONFIG_HEADER([config.h])
9
10AM_MAINTAINER_MODE
11AM_INIT_AUTOMAKE([-Wall foreign])
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#
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
37
38AC_HEADER_STDC
39AC_CHECK_HEADERS(unistd.h)
40
41AC_CHECK_FUNCS(readlink getcwd getwd)
42
43
44AC_PROG_CPP
45AC_PROG_CXXCPP
46AM_PROG_CC_C_O
47### AM_PROG_LEX
48AC_PROG_LN_S
49AC_PROG_INSTALL
50
51LT_INIT
52   
53# Checks for libraries.
54LB_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)]))
55LB_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)]))
56
57AC_FUNC_ERROR_AT_LINE
58AC_FUNC_MALLOC
59
60SING_CHECK_PIPE
61
62# check for cpu properties
63AC_CHECK_SIZEOF(long,4)
64SING_CHECK_CPU
65
66#check for host:
67AC_CANONICAL_HOST
68case $host_os in
69  *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";;
70  * ) LIBPREFIX="";;
71esac
72
73
74SING_CHECK_P_PROCS
75SING_CHECK_FACTORY
76SING_CHECK_READLINE
77SING_CHECK_DBM
78
79# CFLAGS
80if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then
81  CFLAGS=""
82fi
83
84# CXXFLAGS
85if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then
86  CXXFLAGS=""
87fi
88
89AC_DEFINE_UNQUOTED([CC],"$CC",[CC])
90AC_DEFINE_UNQUOTED([CXX],"$CXX",[CXX])
91AC_DEFINE_UNQUOTED([CFLAGS],"$CFLAGS",[CFLAGS])
92AC_DEFINE_UNQUOTED([CXXFLAGS],"$CXXFLAGS",[CXXFLAGS])
93AC_DEFINE_UNQUOTED([LDFLAGS],"$LDFLAGS",[LDFLAGS])
94
95### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc...
96#ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
97
98AC_CONFIG_SUBDIRS(omalloc)
99
100if test x$ENABLE_FACTORY = xyes; then
101  AC_CONFIG_SUBDIRS(factory)
102fi
103
104AC_CONFIG_SUBDIRS(libpolys)
105AC_CONFIG_FILES([Makefile])
106AC_CONFIG_FILES([findexec/Makefile])
107AC_CONFIG_FILES([kernel/Makefile])
108AC_CONFIG_FILES([numeric/Makefile])
109AC_CONFIG_FILES([Singular/Makefile])
110AC_CONFIG_FILES([libsingular-config])
111
112AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.