-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure.ac
88 lines (76 loc) · 2.6 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
dnl -------------------------------------------------------------------------
dnl Autoconf startup.
dnl -------------------------------------------------------------------------
AC_PREREQ([2.63])
AC_INIT([clob], [0.1.0], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([src/config.h src/clob_type.h])
AC_CONFIG_MACRO_DIR([m4])
dnl -------------------------------------------------------------------------
dnl Local copyright notices.
dnl -------------------------------------------------------------------------
AC_COPYRIGHT([dnl
#### Configuration script for clob
#### Copyright (C) 2010-2022 Sebastian Freundt
### Don't edit this script!
### This script was automatically generated by the `autoconf' program
### from the file `./configure.ac'.
### To rebuild it, execute the command
### autoreconf
])
AM_INIT_AUTOMAKE([foreign parallel-tests dist-xz color-tests])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
## the build chain
AC_PROG_CC([icc cc gcc])
SXE_CHECK_CC([gnu11 gnu99])
SXE_CHECK_CFLAGS
AC_CHECK_TOOLS([AR], [xiar ar], [false])
AC_C_BIGENDIAN
AC_PROG_RANLIB
## check if yuck is globally available
AX_CHECK_YUCK
AX_YUCK_SCMVER([version.mk])
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
## check for decimals
SXE_CHECK_DFP754
if test "${sxe_cv_feat_dfp754_arith_flavour}" != "unknown"; then
have_decimal="yes"
else
have_decimal="no"
fi
## check for price/quantity types
AC_ARG_WITH([decimal], [
AS_HELP_STRING([--without-decimal], [Use _Decimal64 for prices and quantities instead of IEEE-754 _Float64. Default: yes, if dfp754 support is found.])],
[with_decimal="${withval}"], [with_decimal="${have_decimal}"])
if test "${with_decimal}" = "yes"; then
AC_DEFINE([WITH_DECIMAL], [1], [Whether to use dfp754 price/quantity type])
CLOB_TYPE="_Decimal64"
CLOB_NAN="((${CLOB_TYPE})__builtin_nan(\"\"))"
CLOB_ISNAN="isnand64"
else
CLOB_TYPE="double"
CLOB_NAN="(__builtin_nan(\"\"))"
CLOB_ISNAN="isnan"
fi
AC_DEFINE_UNQUOTED([CLOB_TYPE], [${CLOB_TYPE}], [C spelling of price/quantity type])
AC_DEFINE_UNQUOTED([CLOB_NAN], [${CLOB_NAN}], [C spelling of price/quantity nan value])
AC_DEFINE_UNQUOTED([CLOB_ISNAN], [${CLOB_ISNAN}], [C spelling of price/quantity nan predicate])
AC_SUBST([CLOB_TYPE])
AC_SUBST([CLOB_NAN])
AC_SUBST([CLOB_ISNAN])
AM_CONDITIONAL([WITH_DECIMAL], [test "${with_decimal}" = "yes"])
## output
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([build-aux/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_OUTPUT
echo
echo
echo "Build summary"
echo "============="
echo
echo "Everything will be built"
echo
## configure ends here
dnl configure.ac ends here