1 | AC_INIT([singular], [3.1.3.sw]) |
---|
2 | |
---|
3 | AC_CONFIG_MACRO_DIR([m4]) |
---|
4 | AC_CONFIG_AUX_DIR([.]) |
---|
5 | |
---|
6 | AC_CONFIG_SRCDIR([Singular/tesths.cc]) |
---|
7 | |
---|
8 | AC_CONFIG_HEADER([config.h]) |
---|
9 | |
---|
10 | AM_MAINTAINER_MODE |
---|
11 | AM_INIT_AUTOMAKE([singular], [3.1.3.sw]) |
---|
12 | |
---|
13 | dnl Check if build env is sane |
---|
14 | AM_SANITY_CHECK |
---|
15 | |
---|
16 | # |
---|
17 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
18 | # |
---|
19 | |
---|
20 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
21 | AC_PROG_CC |
---|
22 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
23 | AC_PROG_CXX |
---|
24 | if test "x$GCC" != xyes && test "x$GXX" != xyes; then |
---|
25 | AC_MSG_WARN(you better use gcc to compile Factory) |
---|
26 | else |
---|
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 |
---|
35 | fi |
---|
36 | |
---|
37 | LT_INIT([shared]) |
---|
38 | |
---|
39 | |
---|
40 | AC_PROG_CPP |
---|
41 | AC_PROG_CXXCPP |
---|
42 | AM_PROG_CC_C_O |
---|
43 | AC_PROG_LN_S |
---|
44 | AC_PROG_INSTALL |
---|
45 | # AC_PROG_RANLIB |
---|
46 | |
---|
47 | |
---|
48 | # Checks for libraries. |
---|
49 | LB_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)])) |
---|
50 | LB_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 | AC_FUNC_ERROR_AT_LINE |
---|
53 | AC_FUNC_MALLOC |
---|
54 | |
---|
55 | SING_CHECK_PIPE |
---|
56 | |
---|
57 | # check for cpu properties |
---|
58 | AC_CHECK_SIZEOF(long,4) |
---|
59 | SING_CHECK_CPU |
---|
60 | |
---|
61 | #check for host: |
---|
62 | AC_CANONICAL_HOST |
---|
63 | case $host_os in |
---|
64 | *cygwin* ) LIBPREFIX="-Xlinker -Bdynamic";; |
---|
65 | * ) LIBPREFIX="";; |
---|
66 | esac |
---|
67 | |
---|
68 | |
---|
69 | SING_CHECK_P_PROCS |
---|
70 | SING_CHECK_FACTORY |
---|
71 | SING_CHECK_READLINE |
---|
72 | SING_CHECK_DBM |
---|
73 | |
---|
74 | # CFLAGS |
---|
75 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
76 | CFLAGS="" |
---|
77 | fi |
---|
78 | |
---|
79 | # CXXFLAGS |
---|
80 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
81 | CXXFLAGS="" |
---|
82 | fi |
---|
83 | |
---|
84 | ### the following is needed due to the use of om_sing_opt_show_mem in misc_ip.cc... |
---|
85 | #ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h" |
---|
86 | |
---|
87 | AC_CONFIG_SUBDIRS(omalloc) |
---|
88 | |
---|
89 | if test x$ENABLE_FACTORY = xyes; then |
---|
90 | AC_CONFIG_SUBDIRS(factory) |
---|
91 | fi |
---|
92 | |
---|
93 | AC_CONFIG_SUBDIRS(libpolys) |
---|
94 | |
---|
95 | AC_CONFIG_FILES([Makefile]) |
---|
96 | AC_CONFIG_FILES([kernel/Makefile]) |
---|
97 | AC_CONFIG_FILES([numeric/Makefile]) |
---|
98 | AC_CONFIG_FILES([Singular/Makefile]) |
---|
99 | |
---|
100 | AC_OUTPUT |
---|