-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
224 lines (176 loc) · 5.58 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
m4_define([libinfinity_version], [0.2.0])
AC_PREREQ(2.59)
AC_INIT([libinfinity], [libinfinity_version], [[email protected]])
AM_INIT_AUTOMAKE([-Wall dist-bzip2 check-news])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([libinfinity/common/inf-net-object.h])
AC_CONFIG_HEADER([config.h libinfinity/inf-config.h])
LIBINFINITY_VERSION=libinfinity_version
AC_SUBST(LIBINFINITY_VERSION)
AC_CANONICAL_HOST
AC_LANG(C)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
# Seems to be required for building a binary from multiple source files
# automake complains without it in infinoted/.
AM_PROG_CC_C_O
###################################
# Gtk-Doc
###################################
AC_CONFIG_MACRO_DIR(m4)
GTK_DOC_CHECK(1.4)
###################################
# Platform checks
###################################
case "$host_os" in
*mingw*)
platform='win32'
;;
*)
platform='unix'
;;
esac
# Check for MSG_NOSIGNAL
AC_MSG_CHECKING(for MSG_NOSIGNAL)
AC_TRY_COMPILE([#include <sys/socket.h>],
[ int f = MSG_NOSIGNAL; ],
[ AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
[Define this symbol if you have MSG_NOSIGNAL]) ],
[ AC_MSG_RESULT(no)]
)
###################################
# Check for regular dependencies
###################################
infinity_libraries='glib-2.0 >= 2.16 gobject-2.0 >= 2.16 gmodule-2.0 >= 2.16 libxml-2.0 gnutls >= 1.7.2 libgsasl >= 0.2.21'
# We use native Win32 functions for UUIDs, so we don't need the uuid library
# on Windows
if test $platform != 'win32'; then
infinity_libraries="$infinity_libraries uuid"
fi
PKG_CHECK_MODULES([infinity], [$infinity_libraries])
PKG_CHECK_MODULES([inftext], [glib-2.0 >= 2.16 gobject-2.0 >= 2.16 libxml-2.0])
if test $platform = 'win32'; then
infinity_LIBS="$infinity_LIBS -lws2_32 -lrpcrt4"
fi
########################
# libinftextgtk optional package
########################
AC_ARG_WITH([inftextgtk], AS_HELP_STRING([--with-inftextgtk],
[Builds the libinftextgtk library [[default=auto]]]),
[with_inftextgtk=$withval], [with_inftextgtk=auto])
if test "x$with_inftextgtk" = "xauto"
then
PKG_CHECK_MODULES([inftextgtk], [gtk+-2.0 >= 2.12], [with_inftextgtk=yes], [with_inftextgtk=no])
elif test "x$with_inftextgtk" = "xyes"
then
PKG_CHECK_MODULES([inftextgtk], [gtk+-2.0 >= 2.12])
fi
AM_CONDITIONAL([WITH_INFTEXTGTK], test "x$with_inftextgtk" = "xyes")
########################
# libinfgtk optional package
########################
AC_ARG_WITH([infgtk], AS_HELP_STRING([--with-infgtk],
[Builds the libinfgtk library [[default=auto]]]),
[with_infgtk=$withval], [with_infgtk=auto])
if test "x$with_infgtk" = "xauto"
then
PKG_CHECK_MODULES([infgtk], [gtk+-2.0 >= 2.12], [with_infgtk=yes], [with_infgtk=no])
elif test "x$with_infgtk" = "xyes"
then
PKG_CHECK_MODULES([infgtk], [gtk+-2.0 >= 2.12])
fi
AM_CONDITIONAL([WITH_INFGTK], test "x$with_infgtk" = "xyes")
########################
# infinoted optional package
########################
AC_ARG_WITH([infinoted], AS_HELP_STRING([--with-infinoted],
[Build the infinote standalone server [[default=yes]]]),
[with_infinoted=$withval], [with_infinoted=yes])
if test "x$with_infinoted" = "xyes"
then
PKG_CHECK_MODULES([infinoted], [glib-2.0 >= 2.16 gobject-2.0 >= 2.16 gmodule-2.0 >= 2.14 gnutls >= 1.7.2])
fi
AM_CONDITIONAL([WITH_INFINOTED], test "x$with_infinoted" = "xyes")
####################
# Check for avahi
####################
AC_ARG_WITH([avahi], AS_HELP_STRING([--with-avahi],
[Enables avahi support [[default=auto]]]),
[use_avahi=$withval], [use_avahi=auto])
if test "x$use_avahi" = "xauto"
then
PKG_CHECK_MODULES([avahi], [avahi-client],
[use_avahi=yes], [use_avahi=no])
elif test "x$use_avahi" = "xyes"
then
PKG_CHECK_MODULES([avahi], [avahi-client])
fi
if test "x$use_avahi" = "xyes"
then
AC_DEFINE([LIBINFINITY_HAVE_AVAHI], 1, [Whether avahi support is enabled])
fi
AM_CONDITIONAL([LIBINFINITY_HAVE_AVAHI], test "x$use_avahi" = "xyes")
############
# gettext
############
GETTEXT_PACKAGE=libinfinity10
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[The domain name to use with gettext.])
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AM_GLIB_GNU_GETTEXT
AM_GLIB_DEFINE_LOCALEDIR(INF_LOCALEDIR)
###########
# Output
###########
AC_CONFIG_FILES([
Makefile
libinfinity/Makefile
libinfinity/common/Makefile
libinfinity/adopted/Makefile
libinfinity/server/Makefile
libinfinity/client/Makefile
libinfinity/methods/Makefile
libinfinity/methods/local-central/Makefile
libinftext/Makefile
libinfgtk/Makefile
libinftextgtk/Makefile
infinoted/Makefile
infinoted/note-plugins/Makefile
infinoted/note-plugins/text/Makefile
pixmaps/Makefile
pixmaps/16x16/Makefile
pixmaps/22x22/Makefile
pixmaps/scalable/Makefile
test/Makefile
test/util/Makefile
test/session/Makefile
test/cleanup/Makefile
docs/Makefile
docs/reference/version.xml
docs/reference/Makefile
docs/reference/libinfinity/Makefile
docs/reference/libinftext/Makefile
docs/reference/libinfgtk/Makefile
docs/reference/libinftextgtk/Makefile
po/Makefile.in
libinfinity-1.0.pc
libinftext-1.0.pc
libinfgtk-1.0.pc
libinftextgtk-1.0.pc
])
AC_OUTPUT
echo "
Build optional packages:
libinfgtk: $with_infgtk
libinftextgtk: $with_inftextgtk
infinoted: $with_infinoted
Enable support for:
avahi: $use_avahi
"
# vim:set et: