1 m4_define([version_major], [0])
2 m4_define([version_minor], [1])
3 m4_define([version_patch], [5])
4 m4_define([version], [version_major.version_minor.version_patch])
5 AC_INIT([liba], [version], [tqfx@tqfx.org])
6 AC_CONFIG_MACRO_DIR([m4])
7 AC_CONFIG_AUX_DIR([build-aux])
8 AM_INIT_AUTOMAKE([foreign subdir-objects])
9 AM_MAINTAINER_MODE([disable])
10 LT_INIT([pic-only win32-dll])
12 AC_CHECK_SIZEOF([void *])
13 AC_DEFINE([A_VERSION], ["version"], [version string])
14 AC_DEFINE_UNQUOTED([A_VERSION_MAJOR], [version_major], [major version number])
15 AC_DEFINE_UNQUOTED([A_VERSION_MINOR], [version_minor], [minor version number])
16 AC_DEFINE_UNQUOTED([A_VERSION_PATCH], [version_patch], [patch version number])
17 AC_DEFINE_UNQUOTED([A_SIZE_POINTER], [$ac_cv_sizeof_void_p], [The size of `void *`, as computed by sizeof.])
18 AC_C_BIGENDIAN([AC_DEFINE([A_BYTE_ORDER], [4321], [big endian])], [AC_DEFINE([A_BYTE_ORDER], [1234], [little endian])])
19 AC_CHECK_LIB([m], [expm1], [AC_DEFINE([A_HAVE_EXPM1], [1], [Define to 1 if you have `expm1`, as a function or macro.])])
20 AC_CHECK_LIB([m], [log1p], [AC_DEFINE([A_HAVE_LOG1P], [1], [Define to 1 if you have `log1p`, as a function or macro.])])
21 AC_CHECK_LIB([m], [hypot], [AC_DEFINE([A_HAVE_HYPOT], [1], [Define to 1 if you have `hypot`, as a function or macro.])])
22 AC_CHECK_LIB([m], [atan2], [AC_DEFINE([A_HAVE_ATAN2], [1], [Define to 1 if you have `atan2`, as a function or macro.])])
23 AC_CHECK_LIB([m], [csqrt], [AC_DEFINE([A_HAVE_CSQRT], [1], [Define to 1 if you have `csqrt`, as a function or macro.])])
24 AC_CHECK_LIB([m], [cpow], [AC_DEFINE([A_HAVE_CPOW], [1], [Define to 1 if you have `cpow`, as a function or macro.])])
25 AC_CHECK_LIB([m], [cexp], [AC_DEFINE([A_HAVE_CEXP], [1], [Define to 1 if you have `cexp`, as a function or macro.])])
26 AC_CHECK_LIB([m], [clog], [AC_DEFINE([A_HAVE_CLOG], [1], [Define to 1 if you have `clog`, as a function or macro.])])
27 AC_CHECK_LIB([m], [csin], [AC_DEFINE([A_HAVE_CSIN], [1], [Define to 1 if you have `csin`, as a function or macro.])])
28 AC_CHECK_LIB([m], [ccos], [AC_DEFINE([A_HAVE_CCOS], [1], [Define to 1 if you have `ccos`, as a function or macro.])])
29 AC_CHECK_LIB([m], [ctan], [AC_DEFINE([A_HAVE_CTAN], [1], [Define to 1 if you have `ctan`, as a function or macro.])])
30 AC_CHECK_LIB([m], [csinh], [AC_DEFINE([A_HAVE_CSINH], [1], [Define to 1 if you have `csinh`, as a function or macro.])])
31 AC_CHECK_LIB([m], [ccosh], [AC_DEFINE([A_HAVE_CCOSH], [1], [Define to 1 if you have `ccosh`, as a function or macro.])])
32 AC_CHECK_LIB([m], [ctanh], [AC_DEFINE([A_HAVE_CTANH], [1], [Define to 1 if you have `ctanh`, as a function or macro.])])
33 AC_CHECK_LIB([m], [casin], [AC_DEFINE([A_HAVE_CASIN], [1], [Define to 1 if you have `casin`, as a function or macro.])])
34 AC_CHECK_LIB([m], [cacos], [AC_DEFINE([A_HAVE_CACOS], [1], [Define to 1 if you have `cacos`, as a function or macro.])])
35 AC_CHECK_LIB([m], [catan], [AC_DEFINE([A_HAVE_CATAN], [1], [Define to 1 if you have `catan`, as a function or macro.])])
36 AC_CHECK_LIB([m], [casinh], [AC_DEFINE([A_HAVE_CASINH], [1], [Define to 1 if you have `casinh`, as a function or macro.])])
37 AC_CHECK_LIB([m], [cacosh], [AC_DEFINE([A_HAVE_CACOSH], [1], [Define to 1 if you have `cacosh`, as a function or macro.])])
38 AC_CHECK_LIB([m], [catanh], [AC_DEFINE([A_HAVE_CATANH], [1], [Define to 1 if you have `catanh`, as a function or macro.])])
39 AC_CONFIG_HEADERS([config.h], [sed -i 's|HAVE_CONFIG_H|A_EXPORTS -DA_HAVE_H=\\"config.h\\"|g' Makefile])
40 AC_CONFIG_FILES([Makefile])