-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
98 lines (82 loc) · 3.45 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
89
90
91
92
93
94
95
96
97
98
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# Copyright 2019--2020 University of Nantes, France.
#
# This file is part of the FPNGlib library.
#
# The FPNGlib library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# The FPNGlib library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received copies of the GNU General Public License and the
# GNU Lesser General Public License along with the FPNGlib Library. If not,
# see https://www.gnu.org/licenses/.
AC_PREREQ([2.69])
AC_INIT([fpnglib],m4_esyscmd([tr -d '\n' < VERSION]),[frederic.goualard@univ-nantes.fr])
AX_IS_RELEASE([git-directory])
dnl For Automake
AM_INIT_AUTOMAKE([gnu 1.7 dist-bzip2])
AX_CHECK_ENABLE_DEBUG([yes])
if test x$ax_enable_debug = xinfo; then
AC_DEFINE([FPNGL_ENABLE_INFO],[1],[Define this to 1 if you want info code])
fi
PKG_CHECK_MODULES([CHECK], [check >= 0.11.0])
AC_CONFIG_SRCDIR([src/fpu.h])
AC_CONFIG_HEADERS([config.h src/fpngl_config.h])
AC_CONFIG_FILES([Makefile fpnglib/Makefile src/Makefile tests/Makefile doc/Makefile examples/Makefile doc/snippets/Makefile])
dnl Libtool support
AC_CONFIG_MACRO_DIR([m4])
dnl Libtool revision system (from the Libtool manual)
dnl Here are a set of rules to help you update your library version information:
dnl Start with version information of ‘0:0:0’ for each libtool library.
dnl Update the version information only immediately before a public release of
dnl your software. More frequent updates are unnecessary, and only guarantee that
dnl the current interface number gets larger faster.
dnl If the library source code has changed at all since the last update, then
dnl increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
dnl If any interfaces have been added, removed, or changed since the last update,
dnl increment current, and set revision to 0.
dnl If any interfaces have been added since the last public release, then increment age.
dnl If any interfaces have been removed or changed since the last public release, then set
dnl age to 0.
LT_VERSION_INFO="0:0:0"
AC_SUBST(LT_VERSION_INFO)
LT_INIT
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
if test "${ac_cv_prog_cc_stdc}" = "no"; then
AC_MSG_ERROR([fpnglib must be compiled with a C99-compliant C compiler.])
fi
AC_PROG_LIBTOOL
# Checks for libraries.
AC_CHECK_LIB([m],[cos])
# Check for functions
AC_CHECK_FUNCS(getrusage clock)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fenv.h stdint.h stdbool.h])
AX_GCC_BUILTIN(__builtin_clz)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_UINT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
AC_CHECK_TYPE(__uint128_t,[AC_DEFINE(HAVE_UINT128_T,1,[Define this to 1 if the type __uint128_t is available])])
# Set default CFLAGS to nothing to avoid -O2 optimization in tests
CFLAGS=
# Testing whether the __VA_OPT__ macro is supported.
# Define the conditional HAVE_VA_OPT that can be tested in Makefile.am
VA_OPT_CHECK
AC_HEADER_ASSERT
# Checks for library functions.
AC_OUTPUT