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
|
AC_PREREQ(2.59)
AC_INIT([xsplash],
[0.2],
[https://bugs.launchpad.net/xsplash])
AC_CONFIG_SRCDIR([src/xsplash.c])
AC_CONFIG_MACRO_DIR([build/autotools])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.9])
GTK_REQUIRED_VERSION=2.14
DBUS_REQUIRED_VERSION=0.76
dnl ===========================================================================
# Checks for programs
AC_PROG_CC
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
# Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures and compiler charecteristics
AC_C_CONST
# Checks for library functions
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION)
PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_REQUIRED_VERSION)
dnl ===========================================================================
if test "x$GCC" = "xyes"; then
GCC_FLAGS="-g -Wall"
fi
AC_SUBST(GCC_FLAGS)
# use strict compiler flags only on development releases
m4_define([maintainer_flags_default], [no])
AC_ARG_ENABLE([maintainer-flags],
[AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
[Use strict compiler flags @<:@default=no@:>@])],
[],
[enable_maintainer_flags=maintainer_flags_default])
MAINTAINER_CFLAGS=""
AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
[
MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self"
]
)
AC_SUBST(MAINTAINER_CFLAGS)
dnl ===========================================================================
AC_ARG_WITH(dbus-sys,
AS_HELP_STRING([--with-dbus-sys=<dir>],
[where D-BUS system.d directory is]))
if ! test -z "$with_dbus_sys" ; then
DBUS_SYS_DIR="$with_dbus_sys"
else
DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
dnl ===========================================================================
SHAVE_INIT([build/autotools], [enable])
AC_CONFIG_FILES([
Makefile
build/Makefile
build/autotools/Makefile
build/autotools/shave-libtool
build/autotools/shave
data/Makefile
images/Makefile
src/Makefile
])
AC_OUTPUT
echo ""
echo " xsplash $VERSION"
echo " ==============================="
echo ""
echo " Prefix : ${prefix}"
echo " dbus sysdir : ${DBUS_SYS_DIR}"
echo ""
|