source: git/machine_learning/configure.ac @ b03e2f

spielwiese
Last change on this file since b03e2f was b03e2f, checked in by Murray Heymann <heymann.murray@…>, 5 years ago
Include mlpredict in build system
  • Property mode set to 100644
File size: 4.5 KB
Line 
1AC_INIT([machine_learning], [4.1.2])
2
3AC_CONFIG_MACRO_DIR([../m4])
4AC_CONFIG_AUX_DIR([../build-aux])
5AC_CONFIG_HEADER([_config.h])
6
7AM_MAINTAINER_MODE([enable])
8
9AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
10m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
11m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
12
13dnl Check if build env is sane
14AM_SANITY_CHECK
15
16# Add pre'prefixed config
17AX_PREFIX_CONFIG_H([],[_config.h])
18
19# - Check for CC and CXX but be careful about CFLAGS.
20SING_RESET_FLAGS()
21SING_CHECK_SET_ARGS()
22
23AC_PROG_CC
24AC_PROG_CXX
25AM_PROG_CC_C_O
26AC_PROG_LN_S
27AC_PROG_INSTALL
28
29# Turn off shared libraries during beta-testing, since they
30# make the build process take too long.
31LT_INIT([win32-dll])
32# ([shared])
33# LT_INIT([win32-dll])(dlopen disable-static) # doesn't work on PowerPC!
34
35SING_WIN_FLAGS
36
37# Checks for libraries.
38# This test for -lpthread etc has to come before AX_PTHREAD,
39# because libtool tends to ignore -pthread in linking shared C++-libs
40# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
41# (happens with ubuntu 14.04)
42AC_SEARCH_LIBS(sem_wait,[rt pthreads pthread],[],[
43  AC_MSG_ERROR([sem_wait not found in rt,pthreads,pthread])
44])
45
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)]))
48LB_CHECK_FLINT(2.4,,AC_MSG_WARN([Unable to find FLINT (which is strongly recommended) on your machine: please use --with-flint=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
49
50SING_CHECK_JULIA
51
52
53# Checks for library functions.
54AC_FUNC_ERROR_AT_LINE
55AC_CHECK_FUNCS([memmove memset pow sqrt strchr setenv putenv])
56AC_FUNC_VPRINTF
57AC_FUNC_MALLOC
58AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], [Define if vsnprintf exists.])])
59
60# Checks for header files.
61AC_HEADER_STDC
62AC_STDC_HEADERS
63AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h limits.h float.h execinfo.h])
64
65# If the compiler supports GCC C++ ABI name demangling (has header
66#   cxxabi.h and abi::__cxa_demangle() function), define
67#   HAVE_GCC_ABI_DEMANGLE
68AX_CXX_GCC_ABI_DEMANGLE
69
70# Checks for typedefs, structures, and compiler characteristics.
71AC_C_CONST
72AC_C_INLINE
73AC_HEADER_STDBOOL
74AC_TYPE_SIZE_T
75
76# SING_CHECK_PIPE
77
78# check for cpu properties
79AC_CHECK_SIZEOF(long,4)
80SING_CHECK_CPU
81
82#check for host:
83AC_CANONICAL_HOST
84
85case $host_os in
86  *cygwin* ) AX_APPEND_LINK_FLAGS([-Wl,-Bdynamic]);;
87esac
88
89dnl INCLUDES=""
90dnl dnl OS specific flags and options (does work without the following:)
91dnl case "$host" in
92dnl     *-*-freebsd*)
93dnl         LIBS="$LIBS -L/usr/local/lib -lc"
94dnl     CFLAGS="$CFLAGS -I/usr/local/include"
95dnl     INCLUDES="$INCLUDES -I/usr/local/include"
96dnl     ;;
97dnl esac
98dnl AC_SUBST(INCLUDES)
99
100SING_CHECK_OMALLOC()
101
102ENABLE_RESOURCES="yes"
103
104AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libsingular_resources] )
105AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libsingular_resources] )
106
107AC_MSG_CHECKING(whether libsingular_resources should be used)
108
109if test "x$ENABLE_RESOURCES" = xyes;
110then
111  AC_MSG_RESULT(yes)
112
113  AC_MSG_CHECKING([  RESOURCES_INCLUDES?..])
114  AC_MSG_RESULT(${RESOURCES_INCLUDES:-unset})
115
116  AC_MSG_CHECKING([  RESOURCES_LIBS?..])
117  AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
118
119  PKG_REQUIRE="$PKG_REQUIRE singular_resources"
120  AC_SUBST(PKG_REQUIRE)
121else
122  AC_MSG_RESULT(no)
123fi
124
125AM_CONDITIONAL([ENABLE_RESOURCES],[test "x$ENABLE_RESOURCES" = xyes])
126
127SING_CHECK_FACTORY()
128
129SING_CHECK_P_PROCS
130SING_CHECK_ARITH_RINGS
131SING_CHECK_PLURAL
132
133# AC_SUBST(PREFIX)
134# AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix)
135
136AC_DEFINE([SINGULAR],[1],[SINGULAR])
137AC_DEFINE([DISABLE_GMP_CPP],[1],[DISABLE_GMP_CPP])
138AC_DEFINE([NOSTREAMIO],[1],[DISABLE_GMP_CPP])
139
140# AX_PYTHON_DEFAULT()
141# AX_PYTHON_WITH_VERSION([2.4])
142
143AC_DEFINE_UNQUOTED([NTL_CPPFLAGS],"$NTL_CPPFLAGS",[NTL_CPPFLAGS])
144AC_DEFINE_UNQUOTED([NTL_LIBS],"$NTL_LIBS",[NTL_LIBS])
145
146AC_DEFINE_UNQUOTED([GMP_CPPFLAGS],"$GMP_CPPFLAGS",[GMP_CPPFLAGS])
147AC_DEFINE_UNQUOTED([GMP_LIBS],"$GMP_LIBS",[GMP_LIBS])
148
149# AC_DEFINE_UNQUOTED([FLINT_CFLAGS],"$FLINT_CFLAGS",[FLINT_CFLAGS])
150# AC_DEFINE_UNQUOTED([FLINT_LIBS],"$FLINT_LIBS",[FLINT_LIBS])
151
152## AC_DEFINE([HAVE_POLYEXTENSIONS], [1], [Enable the algebraic & transcendental extensions])
153
154AC_CONFIG_FILES([Makefile])
155AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.