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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
AC_PREREQ(2.60)
dnl initialize autoconf
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AC_INIT([snappy],
[0.1],
NULL,
snappy)
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/snappy.c])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR([build-aux])
dnl initialize automake
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
dnl use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
[AM_DEFAULT_VERBOSITY=1
AC_SUBST(AM_DEFAULT_VERBOSITY)])
m4_define([_LT_AC_TAGCONFIG],[])
dnl find a compiler
AC_PROG_CC
AM_PROG_CC_C_O
AC_STDC_HEADERS
AM_PROG_LIBTOOL
GST_0_10_REQS=0.10.20
GST_PBUTILS=0.10.30
CLUTTER_REQS=1.2.0
CLUTTER_GST_1_0_REQS=1.0.0
CLUTTER_GST_0_10_REQS=0.10.0
GLIB_REQ=2.10.0
GIO_REQUIRED=2.24
PKG_CHECK_MODULES([GSTREAMER_0_10], \
[gstreamer-0.10 >= $GST_0_10_REQS
gstreamer-base-0.10 >= $GST_0_10_REQS
gstreamer-plugins-base-0.10 >= $GST_0_10_REQS])
AC_SUBST(GSTREAMER_0_10_CFLAGS)
AC_SUBST(GSTREAMER_0_10_LIBS)
PKG_CHECK_MODULES([GST_PBUTILS],
[gstreamer-pbutils-0.10 >= $GST_PBUTILS])
AC_SUBST(GST_PBUTILS_CFLAGS)
AC_SUBST(GST_PBUTILS_LIBS)
PKG_CHECK_MODULES([CLUTTER],
[clutter-1.0 >= $CLUTTER_REQS])
AC_SUBST(CLUTTER_CFLAGS)
AC_SUBST(CLUTTER_LIBS)
PKG_CHECK_MODULES([CLUTTER_GST],
[clutter-gst-1.0 >= $CLUTTER_GST_1_0_REQS],
[
HAVE_CLUTTER_GST_1_0="yes"
], HAVE_CLUTTER_GST_1_0="no")
if test "x$HAVE_CLUTTER_GST_1_0" = "xno"; then
dnl If we don't have clutter-gst-1.0, then check for clutter-gst-0.10
PKG_CHECK_MODULES(CLUTTER_GST_0_10,
[clutter-gst-0.10 >= $CLUTTER_GST_0_10_REQS])
CLUTTER_GST_CFLAGS="\$(CLUTTER_GST_0_10_CFLAGS)"
CLUTTER_GST_LIBS="\$(CLUTTER_GST_0_10_LIBS)"
fi
AC_SUBST(CLUTTER_GST_CFLAGS)
AC_SUBST(CLUTTER_GST_LIBS)
AC_SUBST([GLIB_REQ])
PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQUIRED)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
PKG_CHECK_MODULES(CLUTTER_X11, clutter-x11-1.0,
[AC_DEFINE(HAVE_X11, 1, [Define if Clutter X11 is available.])],
[])
PKG_CHECK_MODULES(XTEST, xtst,
[AC_DEFINE(HAVE_XTEST, 1, [Define if XTest is available.])],
[])
AC_SUBST(XTEST_CFLAGS)
AC_SUBST(XTEST_LIBS)
AC_ARG_ENABLE([dbus],
AS_HELP_STRING([--enable-dbus], [enable DBus support to disable the screensaver (default=no)]),
[],
[enable_dbus=no])
if test "x$enable_dbus" = "xyes"; then
PKG_CHECK_MODULES(GIO_2_26, gio-2.0 >= 2.26,
[AC_DEFINE(ENABLE_DBUS, 1, [Define if DBus support is enabled.])],
[AC_MSG_ERROR([GIO >= 2.26 not found, which is required for DBus support])])
fi
dnl our libraries and install dirs use major.minor as a version
GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
dnl we override it here if we need to for the release candidate of new series
GST_MAJORMINOR=0.10
AC_SUBST(GST_MAJORMINOR)
AM_PROG_LIBTOOL
dnl Add parameters for aclocal
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
AC_CONFIG_MACRO_DIR([m4])
ROOT_UNINSTALLED_DIR="`pwd`"
AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_DIR,"`pwd`/$srcdir/data",[path to source data dir])
AC_DEFINE_UNQUOTED(SHARE_UNINSTALLED_BUILDDIR,"`pwd`/data",[path to built source data dir])
AC_SUBST(ROOT_UNINSTALLED_DIR)
dnl set license and copyright notice
GST_LICENSE="LGPL"
AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
AC_SUBST(GST_LICENSE)
dnl keep this alphabetic per directory, please
AC_CONFIG_FILES([
Makefile
data/Makefile
src/Makefile
])
AC_OUTPUT
echo "
Configuration
Version : ${VERSION}
Source code location : ${srcdir}
Prefix : ${prefix}
Compiler : ${CC}
snappy configured. Type 'make' to build.
"
|