forked from awslabs/pidgin-chime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
145 lines (123 loc) · 4.45 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
AC_INIT(pidgin-chime, 1.0)
PKG_PROG_PKG_CONFIG
AC_LANG_C
AC_CANONICAL_HOST
AC_DISABLE_STATIC
AM_MAINTAINER_MODE([enable])
AM_INIT_AUTOMAKE([foreign tar-ustar subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_INIT
AC_PREREQ([2.62], [], [AC_SUBST([localedir], ['$(datadir)/locale'])])
AS_COMPILER_FLAGS(WFLAGS,
"-Wall
-Wextra
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unused-parameter
-Werror=pointer-to-int-cast
-Wdeclaration-after-statement
-Werror-implicit-function-declaration
-Wformat-nonliteral
-Wformat-security
-Winit-self
-Wmissing-declarations
-Wmissing-include-dirs
-Wnested-externs
-Wpointer-arith
-Wwrite-strings
-Wno-declaration-after-statement")
AC_SUBST(WFLAGS, [$WFLAGS])
AC_ARG_WITH([certsdir],
[AS_HELP_STRING([--with-certsdir],
[install directory for Amazon CA certs])],
[], [with_certsdir='$(pkgdatadir)'])
AC_SUBST([certsdir], [${with_certsdir}])
purple_plugindir=
PKG_CHECK_MODULES(PURPLE, [purple >= 2.8.0], [purple_pkg=purple])
purple_plugindir="$($PKG_CONFIG --variable=plugindir $purple_pkg)"
AC_SUBST(purple_plugindir, $purple_plugindir)
PKG_CHECK_MODULES(PIDGIN, [pidgin], [pidgin_pkg=pidgin])
pidgin_datadir="$($PKG_CONFIG --variable=datadir $pidgin_pkg)"
pidgin_plugindir="$($PKG_CONFIG --variable=plugindir $pidgin_pkg)"
if test "$purple_datadir" = "" ; then
purple_datadir="$datadir"
fi
AC_SUBST(pixmapdir, ${pidgin_datadir}/pixmaps/pidgin/protocols)
AC_SUBST(pidgin_plugindir, $pidgin_plugindir)
DLOPEN_LIBS=""
AC_SEARCH_LIBS([dlopen],[dl dld],
[test "$ac_cv_search_dlopen" == "none required" || DLOPEN_LIBS="$ac_cv_search_dlopen"],
[AC_MSG_ERROR([Unable to find dlopen function])]
)
AC_SUBST([DLOPEN_LIBS])
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.2.0])
PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2])
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0])
PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0])
PKG_CHECK_MODULES(GSTRTP, [gstreamer-rtp-1.0])
PKG_CHECK_MODULES(GSTVIDEO, [gstreamer-video-1.0])
PKG_CHECK_MODULES(OPUS, [opus])
PKG_CHECK_MODULES(PROTOBUF, [libprotobuf-c])
PKG_CHECK_MODULES(JSON, [json-glib-1.0])
PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
PKG_CHECK_MODULES(SOUP, [libsoup-2.4 >= 2.50])
if $PKG_CONFIG --atleast-version 2.59 libsoup-2.4; then
AC_DEFINE(USE_LIBSOUP_WEBSOCKETS, 1, [Use libsoup websockets])
fi
LIBS="$LIBS $PURPLE_LIBS"
AC_CHECK_FUNC(purple_request_screenshare_media, [AC_DEFINE(HAVE_SCREENSHARE, 1, [Have purple_request_screenshare_media()])], [])
LIBS="$oldLIBS"
gstplugindir="$($PKG_CONFIG --variable=pluginsdir gstreamer-1.0)"
AC_SUBST(gstplugindir, ${gstplugindir})
AC_PATH_PROG(MSGFMT, msgfmt)
if test "$MSGFMT" = ""; then
AC_MSG_ERROR([msgfmt could not be found. Try configuring with --disable-nls])
fi
AC_PATH_PROG(PROTOC, protoc-c)
if test "$PROTOC" = ""; then
AC_MSG_ERROR([protoc-c could not be found. Try installing protobuf-c-compiler])
fi
AC_ARG_WITH([evolution],
[AS_HELP_STRING([--without-evolution],
[Disable evolution plugin])],
[with_evolution=no])
AS_IF([test "x$with_evolution" != xno],
[PKG_CHECK_MODULES(EVOLUTION, [evolution-calendar-3.0 evolution-shell-3.0 evolution-data-server-1.2 libebook-1.2 libecal-1.2],
[with_evolution=yes
if $PKG_CONFIG --atleast-version 3.20 evolution-shell-3.0; then
AC_DEFINE(EVO_HAS_E_COMP_EDITOR, 1, [Since 3.20])
fi
evomoddir="$($PKG_CONFIG --variable=moduledir evolution-shell-3.0)"
AC_SUBST(evomoddir, ${evomoddir})],
[:])]
CAMEL_LIBS=""
AC_SEARCH_LIBS(
[camel_address_new],[camel-1.2],
[$ac_cv_search_camel_address_new == 'none required' || CAMEL_LIBS=$ac_cv_search_camel_address_new],
[AC_MSG_ERROR([Couldn't found the library providing camel_address_new()])]
)
AC_SUBST([CAMEL_LIBS])
)
AM_CONDITIONAL(BUILD_EVOPLUGIN, [ test "$with_evolution" = "yes" ])
fsplugindir="$($PKG_CONFIG --variable=pluginsdir farstream-0.2)"
AC_SUBST(fsplugindir, ${fsplugindir})
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
['$(top_srcdir)/po/LINGUAS'])
RAWLINGUAS=`sed -e "/^#/d" -e "s/#.*//" "${srcdir}/po/LINGUAS"`
# Remove newlines
LINGUAS=`echo $RAWLINGUAS`
AC_SUBST(LINGUAS)
AC_CONFIG_FILES([
Makefile
po/Makefile
pixmaps/Makefile
pixmaps/scalable/Makefile
pixmaps/16/Makefile
pixmaps/22/Makefile
pixmaps/48/Makefile
evolution-plugin/Makefile
fs-app-transmitter/Makefile
gst-chime/Makefile
chimeseen/Makefile
])
AC_OUTPUT