-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
83 lines (63 loc) · 1.64 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
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([cbox],
m4_esyscmd([make/git-version-gen .tarball-version]),
AM_INIT_AUTOMAKE([-Wno-portability dist-bzip2 dist-xz])
AC_CONFIG_SRCDIR([make/release.mk])
# Sanitize path
if test "$prefix" = "NONE"; then
prefix="/usr"
if test "$localstatedir" = "\${prefix}/var"; then
localstatedir="/var"
fi
if test "$sysconfdir" = "\${prefix}/etc"; then
sysconfdir="/etc"
fi
if test "$libdir" = "\${exec_prefix}/lib"; then
if test -e /usr/lib64; then
libdir="/usr/lib64"
else
libdir="/usr/lib"
fi
fi
fi
case $exec_prefix in
NONE) exec_prefix=$prefix;;
prefix) exec_prefix=$prefix;;
esac
# Checks for programs.
# check stolen from gnulib/m4/gnu-make.m4
if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
AC_MSG_ERROR([you don't seem to have GNU make; it is required])
fi
AC_PROG_AWK
AC_PROG_SED
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CHECK_PROGS([VIRTINSTALL],[virt-install])
if test -z "$VIRTINSTALL"; then
AC_MSG_ERROR([you don't seem to have virt-install; it is required])
fi
AC_PATH_TOOL([CBOXEMULATOR],[qemu-kvm],,[/usr/bin:/usr/libexec])
if test -z "$CBOXEMULATOR"; then
AC_MSG_ERROR([you don't seem to have qemu-kvm; it is required])
fi
# local options
AC_ARG_ENABLE([debug],
[ --enable-debug enable debug build. ],
[ default="no" ])
## random vars
CBOXLOGDIR=${localstatedir}/log/cbox
CBOXDATADIR=${datadir}/cbox
## do subst
AC_SUBST([CBOXLOGDIR])
AC_SUBST([CBOXDATADIR])
AC_SUBST([CBOXEMULATOR])
AC_CONFIG_FILES([
Makefile
data/Makefile
hooks/Makefile
])
AC_OUTPUT