forked from baedert/corebird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
143 lines (107 loc) · 3.09 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
AC_INIT([corebird],[1.2],[[email protected]])
AC_PREREQ([2.65])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR([configure.ac])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE([enable])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_STDC
AC_PROG_INSTALL
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
VALA_MIN_VERSION=0.28.0
AM_PROG_VALAC([$VALA_MIN_VERSION],
[],
[AC_MSG_ERROR([valac >= $VALA_MIN_VERSION is required])])
GLIB_GSETTINGS
# --enable-debug
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging]),, enable_debug=no)
AM_CONDITIONAL([ENABLE_DEBUG], [ test "$enable_debug" = "yes"])
# --disable-video
AC_ARG_ENABLE(video, AS_HELP_STRING([--disable-video], [Disable video support]),, disable_video=no)
AM_CONDITIONAL([DISABLE_VIDEO], [ test "$disable_video" = "yes"])
# Vala Packages {{{
pkg_modules="gtk+-3.0 >= 3.16
glib-2.0 >= 2.44
rest-0.7 >= 0.7.93
libsoup-2.4
gee-0.8
json-glib-1.0
sqlite3"
if test "$disable_video" = "no"; then
pkg_modules="$pkg_modules gstreamer-video-1.0 >= 1.6"
fi
PKG_CHECK_MODULES(CB, [$pkg_modules])
CB_VALA_FLAGS=" \
--pkg gtk+-3.0 \
--pkg json-glib-1.0 \
--pkg rest-0.7 \
--pkg gee-0.8 \
--pkg sqlite3 \
--pkg libsoup-2.4 \
--pkg glib-2.0 \
--target-glib=2.38"
# }}}
AC_SUBST(CB_CFLAGS)
AC_SUBST(CB_LIBS)
AC_SUBST(CB_VALA_FLAGS)
AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[the glib-compile-resources program])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[])
if test -z "$GLIB_COMPILE_RESOURCES"; then
AC_MSG_ERROR([glib-compile-resources not found])
fi
AC_ARG_VAR([XMLLINT],[the xmllint program])
AC_PATH_PROG([XMLLINT],[xmllint],[])
if test -z "$XMLLINT"; then
AC_MSG_ERROR([xmllint not found])
fi
if test "${CC}" = "clang"; then
CB_CFLAGS="$CB_CFLAGS -Wno-incompatible-pointer-types -Wno-incompatible-pointer-types-discards-qualifiers"
fi
if test "$disable_video" = "no"; then
CB_VALA_FLAGS="$CB_VALA_FLAGS \
-D VIDEO \
--pkg gstreamer-video-1.0"
fi
if test "$enable_debug" = "yes"; then
CB_VALA_FLAGS="$CB_VALA_FLAGS -D DEBUG -g"
fi
# Gettext stuff
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
AC_SUBST(GETTEXT_PACKAGE)
IT_PROG_INTLTOOL([0.40])
AC_CONFIG_FILES([
Makefile
src/Makefile
ui/Makefile
data/Makefile
data/org.baedert.corebird.desktop.in
assets/Makefile
assets/256x256/Makefile
assets/128x128/Makefile
assets/96x96/Makefile
assets/64x64/Makefile
assets/48x48/Makefile
assets/32x32/Makefile
assets/24x24/Makefile
assets/16x16/Makefile
po/Makefile.in
tests/Makefile
])
AC_OUTPUT
VALAC_VERSION=$($VALAC --version)
echo "
Corebird $VERSION
Prefix: ${prefix}
Vala Compiler: ${VALAC}
valac version: ${VALAC_VERSION}
C Compiler: ${CC} ${CFLAGS}
Debugging: $enable_debug
Video disabled: $disable_video
"