-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
111 lines (93 loc) · 2.76 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
99
100
101
102
103
104
105
106
107
108
109
110
111
AC_PREREQ(2.60)
AC_INIT([libaiff], [6.0], [[email protected]])
# Libtool shared library versioning based on ABI: current[:revision[:age]]
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST([LIBAIFF_LIB_VERSION], [2:0:0])
# Where to find additional m4 macros
AC_CONFIG_MACRO_DIR([m4])
# Where to put autogenerated files
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([libaiff/config.h])
AC_CONFIG_SRCDIR([./libaiff.c])
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CC
AM_PROG_AR
AM_PROG_AS
AC_LANG(C)
AC_C_BIGENDIAN
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/types.h strings.h string.h])
# Checks for library functions.
AC_CHECK_FUNCS([memset bzero abort])
AC_TYPE_SIZE_T
AC_TYPE_INT8_T
AC_TYPE_UINT8_T
AC_TYPE_INT16_T
AC_TYPE_UINT16_T
AC_TYPE_INT32_T
AC_TYPE_UINT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
case "${host_cpu}" in
powerpc*)
OPTIM_FLAGS='-DHAVE_OPTIMIZED_SWAP'
OPTIM_FAMILY='ppc'
;;
i?86)
OPTIM_FLAGS='-DHAVE_INTEL_80x87'
OPTIM_FAMILY='x86'
;;
*)
OPTIM_FLAGS=''
OPTIM_FAMILY='generic'
esac
AC_SUBST([OPTIM_FLAGS])
AM_CONDITIONAL([LIBAIFF_PPC], [test "x${OPTIM_FAMILY}" = 'xppc'])
AM_CONDITIONAL([LIBAIFF_X86], [test "x${OPTIM_FAMILY}" = 'xx86'])
# Based on a small subset of ax_compiler_flags_cflags.m4:
#
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
# flags, otherwise they are always appended to the warn_cflags variable, and
# Clang warns on them for every compilation unit.
# If this is passed to GCC, it will explode, so the flag must be enabled
# conditionally.
AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[
ax_compiler_flags_test="-Werror=unknown-warning-option"
],[
ax_compiler_flags_test=""
])
AX_APPEND_COMPILE_FLAGS([ dnl
-pedantic dnl
-Wall dnl
-Wfloat-equal dnl
-Wshadow dnl
-Wpointer-arith dnl
-Wbad-function-cast dnl
-Wcast-align dnl
-Wwrite-strings dnl
-Wsign-compare dnl
-Waggregate-return dnl
-Wstrict-prototypes dnl
-Wmissing-prototypes dnl
-Wmissing-declarations dnl
-Wredundant-decls dnl
-Wnested-externs dnl
-Wno-unreachable-code dnl
], [WARN_CFLAGS], [$ax_compiler_flags_test])
AC_SUBST([WARN_CFLAGS])
AC_CONFIG_FILES([
Makefile
])
# Libtool is required to build shared libraries
LT_INIT([pic-only disable-static])
# foreign: package does not exactly follow GNU standards
# -Wall: all warnings enabled
# -Werror: report any warning as an error
# tar-ustar: do not use the ancient tar V7 format, nor the latest pax
# (POSIX 2001) format, but the happy medium ustar (POSIX 1988) format.
AM_INIT_AUTOMAKE([foreign -Wall -Werror tar-ustar])
# Do not generate a noisy Makefile; we would rather see compiler warnings!
AM_SILENT_RULES([yes])
AC_OUTPUT