-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
78 lines (70 loc) · 1.96 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(bonnie++.cpp)
AC_CONFIG_HEADER(conf.h)
AC_SUBST(version)
version="1.04"
AC_SUBST(stripping)
AC_ARG_ENABLE(stripping,
[ --disable-stripping disables stripping of installed binaries],
STRIPPING=$strippingval, STRIPPING=no)
if [[ ! "$STRIPPING" = "no" ]]; then
stripping=""
else
stripping="-s"
fi
echo $DEB_BUILD_OPTIONS | grep -q nostrip
if [[ "$?" = "0" ]]; then
stripping=""
fi
AC_SUBST(debug)
AC_ARG_ENABLE(debug,
[ --with-debug enables debug code generation for binaries],
debug=-g, debug="")
echo $DEB_BUILD_OPTIONS | grep -q debug
if [[ "$?" = "0" ]]; then
debug=-g
fi
dnl Checks for programs.
AC_LANG_CPLUSPLUS
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_SUBST(semun)
AC_TRY_COMPILE(#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
, union semun sem , semun="yes")
if [[ -n "$semun" ]]; then
semun="#define SEMUN_IN_SEM_H"
fi
AC_SUBST(sa_sigaction)
AC_TRY_COMPILE([#include <signal.h>]
, [struct sigaction sa; sa.sa_sigaction = 0]
, sa_sigaction=y)
if [[ "$sa_sigaction" = "y" ]]; then
sa_sigaction="#define USE_SA_SIGACTION"
fi
AC_SUBST(bool)
AC_TRY_COMPILE([], [bool var;] , , bool="typedef bool char;")
AC_SUBST(true_false)
AC_TRY_COMPILE(, [char c = true; char d = false;
] , true_false="0", true_false="1")
AC_SUBST(snprintf)
AC_TRY_LINK([#include <stdio.h>], char buf[[10]]; snprintf(buf, sizeof(buf), "abc");,,snprintf="no");
if [[ -n "$snprintf" ]]; then
snprintf="#define NO_SNPRINTF"
fi
AC_SUBST(exes)
AC_SUBST(man8)
AC_CHECK_HEADERS(vector.h vector)
exes="bonnie++ zcav"
man8="bonnie++.8 zcav.8"
AC_CHECK_HEADERS(algorithm algo.h algo)
AC_SUBST(aix_mem_size)
if [[ -f /etc/objrepos ]]; then
aix_mem_size="#define AIX_MEM_SIZE 1"
fi
AC_OUTPUT(Makefile bonnie.h port.h bonnie++.spec bon_csv2html bon_csv2txt sun/pkginfo)