forked from jamiepg1/snappy-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
154 lines (127 loc) · 4.08 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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
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],
[1.0],
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.11.1 no-dist-gzip dist-xz dist-bzip2 tar-ustar])
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
dnl instruct libtool machinery that the package supports DLLs
AC_LIBTOOL_WIN32_DLL
AC_CANONICAL_HOST
# keep one single GST_REQ, core/base should be same versions anyway
GST_REQ=1.4.0
CLUTTER_REQS=1.20.0
CLUTTER_GST_REQS=2.99.2
CLUTTER_GTK_REQS=1.6.0
GTK_REQS=3.5.0
GIO_REQ=2.32
PKG_CHECK_MODULES([GST], \
[gstreamer-1.0 >= $GST_REQ
gstreamer-base-1.0 >= $GST_REQ
gstreamer-plugins-base-1.0 >= $GST_REQ
gstreamer-pbutils-1.0 >= $GST_REQ
gstreamer-video-1.0 >= $GST_REQ])
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_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-3.0 >= $CLUTTER_GST_REQS])
AC_SUBST(CLUTTER_GST_CFLAGS)
AC_SUBST(CLUTTER_GST_LIBS)
PKG_CHECK_MODULES([CLUTTER_GTK], [clutter-gtk-1.0 >= $CLUTTER_GTK_REQS])
AC_SUBST(CLUTTER_GTK_CFLAGS)
AC_SUBST(CLUTTER_GTK_LIBS)
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQS])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_MODULES(GIO, gio-2.0 >= $GIO_REQ)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
case "$host" in
*-*-mingw*|*-*-cygwin*)
PKG_CHECK_MODULES(CLUTTER_WIN32, clutter-win32-1.0,
[AC_DEFINE(HAVE_WIN32, 1, [Define if Clutter Win32 is available.])],
[])
;;
*-*-darwin*)
PKG_CHECK_MODULES(CLUTTER_OSX, clutter-osx-1.0,
[AC_DEFINE(HAVE_OSX, 1, [Define if Clutter OSX is available.])],
[
PKG_CHECK_MODULES(CLUTTER_X11, clutter-x11-1.0,
[AC_DEFINE(HAVE_X11, 1, [Define if Clutter X11 is available.])],
[])
])
;;
*)
PKG_CHECK_MODULES(CLUTTER_X11, clutter-x11-1.0,
[AC_DEFINE(HAVE_X11, 1, [Define if Clutter X11 is available.])],
[])
;;
esac
PKG_CHECK_MODULES(XTEST, xtst,
[AC_DEFINE(HAVE_XTEST, 1, [Define if XTest is available.])], [true])
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=yes)]),
[],
[enable_dbus=yes])
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
data/icons/Makefile
data/icons/256x256/Makefile
data/icons/48x48/Makefile
src/Makefile
])
AC_OUTPUT
echo "
Configuration
Version : ${VERSION}
Source code location : ${srcdir}
Prefix : ${prefix}
Compiler : ${CC}
snappy configured. Type 'make' to build.
"