| 124 |
123 |
| 125 # Check for Win32 |
124 # Check for Win32 |
| 126 if host_machine.system() == 'windows' |
125 if host_machine.system() == 'windows' |
| 127 is_win32 = true |
126 is_win32 = true |
| 128 is_not_win32 = false |
127 is_not_win32 = false |
| 129 LIBS += [declare_dependency(link_with : 'ws2_32')] |
128 # FIXME: Need to add ws2_32 to some target. |
| |
129 ws2_32 = declare_dependency(link_with : 'ws2_32') |
| 130 dnsapi = declare_dependency(link_with : 'dnsapi') |
130 dnsapi = declare_dependency(link_with : 'dnsapi') |
| 131 PLUGIN_LDFLAGS = '-avoid-version -no-undefined' |
|
| 132 WINDRES = generator(find_program('windres'), |
131 WINDRES = generator(find_program('windres'), |
| 133 output : '@BASENAME@.o', |
132 output : '@BASENAME@.o', |
| 134 arguments : ['-i', '@INPUT@', '-o', '@OUTPUT@']) |
133 arguments : ['-i', '@INPUT@', '-o', '@OUTPUT@']) |
| 135 conf.set('IS_WIN32_CROSS_COMPILED', true) |
134 conf.set('IS_WIN32_CROSS_COMPILED', true) |
| 136 conf.set('WIN32_LEAN_AND_MEAN', true) |
135 conf.set('WIN32_LEAN_AND_MEAN', true) |
| 137 else |
136 else |
| 138 is_win32 = false |
137 is_win32 = false |
| 139 is_not_win32 = true |
138 is_not_win32 = true |
| |
139 ws2_32 = declare_dependency() |
| 140 dnsapi = declare_dependency() |
140 dnsapi = declare_dependency() |
| 141 PLUGIN_LDFLAGS = '-avoid-version' |
|
| 142 if not compiler.has_header('signal.h') |
141 if not compiler.has_header('signal.h') |
| 143 error('signal.h is required.') |
142 error('signal.h is required.') |
| 144 endif |
143 endif |
| 145 endif |
144 endif |
| 146 IS_WIN32 = is_win32 |
145 IS_WIN32 = is_win32 |
| 147 #AC_SUBST([PLUGIN_LDFLAGS]) |
|
| 148 |
|
| 149 # Define *_LIBS |
|
| 150 PURPLE_LIBS='\$(top_builddir)/libpurple/libpurple.la \$(GLIB_LIBS)' |
|
| 151 PIDGIN_LIBS='\$(top_builddir)/pidgin/libpidgin.la \$(GTK_LIBS)' |
|
| 152 FINCH_LIBS='\$(top_builddir)/finch/libfinch.la \$(top_builddir)/finch/libgnt/libgnt.la \$(GLIB_LIBS)' |
|
| 153 |
146 |
| 154 # Checks for header files. |
147 # Checks for header files. |
| 155 # AC_HEADER_STDC: |
148 # AC_HEADER_STDC: |
| 156 stdc = true |
149 stdc = true |
| 157 foreach h : ['stdlib.h', 'stdarg.h', 'string.h', 'float.h'] |
150 foreach h : ['stdlib.h', 'stdarg.h', 'string.h', 'float.h'] |
| 190 endif |
183 endif |
| 191 endforeach |
184 endforeach |
| 192 |
185 |
| 193 # Checks for typedefs, structures, and compiler characteristics. |
186 # Checks for typedefs, structures, and compiler characteristics. |
| 194 time_t_size = compiler.sizeof('time_t', |
187 time_t_size = compiler.sizeof('time_t', |
| 195 prefix : ''' |
188 prefix : ''' |
| 196 #include <stdio.h> |
189 #include <stdio.h> |
| 197 #include <time.h> |
190 #include <time.h> |
| 198 ''') |
191 ''') |
| 199 conf.set('SIZEOF_TIME_T', time_t_size) |
192 conf.set('SIZEOF_TIME_T', time_t_size) |
| 200 |
193 |
| 201 #AC_C_BIGENDIAN |
194 conf.set('WORDS_BIGENDIAN', host_machine.endian() != 'little') |
| 202 |
195 |
| 203 conf.set('USE_WIN32_FHS', |
196 conf.set('USE_WIN32_FHS', |
| 204 is_win32 and get_option('win32-dirs') == 'fhs') |
197 is_win32 and get_option('win32-dirs') == 'fhs') |
| 205 |
198 |
| 206 # Check for directories |
199 # Check for directories |
| 207 if is_win32 |
200 if is_win32 |
| 208 if get_option('win32-dirs') == 'fhs' |
201 if get_option('win32-dirs') == 'fhs' |
| 209 conf.set('WIN32_FHS_BINDIR', get_option('bindir')) |
202 foreach dir : ['bin', 'lib', 'data', 'sysconf', 'locale'] |
| 210 conf.set('WIN32_FHS_LIBDIR', get_option('libdir')) |
203 path = get_option(dir + 'dir') |
| 211 conf.set('WIN32_FHS_DATADIR', get_option('datadir')) |
204 if not path.startswith('/') |
| 212 conf.set('WIN32_FHS_SYSCONFDIR', get_option('sysconfdir')) |
205 path = get_option('prefix') + '/' + path |
| 213 conf.set('WIN32_FHS_LOCALEDIR', get_option('localedir')) |
206 endif |
| |
207 conf.set('WIN32_FHS_@0@DIR'.format(dir.to_upper()), path) |
| |
208 endforeach |
| 214 |
209 |
| 215 purple_libdir = 'wpurple_lib_dir("purple-@0@")'.format(purple_major_version) |
210 purple_libdir = 'wpurple_lib_dir("purple-@0@")'.format(purple_major_version) |
| 216 pidgin_libdir = 'wpurple_lib_dir("pidgin-@0@")'.format(purple_major_version) |
211 pidgin_libdir = 'wpurple_lib_dir("pidgin-@0@")'.format(purple_major_version) |
| 217 finch_libdir = 'wpurple_lib_dir("finch-@0@")'.format(purple_major_version) |
212 finch_libdir = 'wpurple_lib_dir("finch-@0@")'.format(purple_major_version) |
| 218 else |
213 else |
| 223 |
218 |
| 224 purple_datadir = 'wpurple_data_dir()' |
219 purple_datadir = 'wpurple_data_dir()' |
| 225 purple_sysconfdir = 'wpurple_sysconf_dir()' |
220 purple_sysconfdir = 'wpurple_sysconf_dir()' |
| 226 purple_localedir = 'wpurple_locale_dir()' |
221 purple_localedir = 'wpurple_locale_dir()' |
| 227 else |
222 else |
| 228 purple_datadir = '"@0@"'.format(get_option('datadir')) |
223 foreach dir : ['data', 'sysconf', 'locale'] |
| 229 purple_sysconfdir = '"@0@"'.format(get_option('sysconfdir')) |
224 path = get_option(dir + 'dir') |
| 230 purple_localedir = '"@0@"'.format(get_option('localedir')) |
225 if not path.startswith('/') |
| |
226 path = get_option('prefix') + '/' + path |
| |
227 endif |
| |
228 set_variable('purple_@0@dir'.format(dir), '"@0@"'.format(path)) |
| |
229 endforeach |
| 231 |
230 |
| 232 common_libdir = get_option('libdir') |
231 common_libdir = get_option('libdir') |
| |
232 if not common_libdir.startswith('/') |
| |
233 common_libdir = get_option('prefix') + '/' + common_libdir |
| |
234 endif |
| 233 purple_libdir = '"@0@/purple-@1@"'.format(common_libdir, purple_major_version) |
235 purple_libdir = '"@0@/purple-@1@"'.format(common_libdir, purple_major_version) |
| 234 pidgin_libdir = '"@0@/pidgin-@1@"'.format(common_libdir, purple_major_version) |
236 pidgin_libdir = '"@0@/pidgin-@1@"'.format(common_libdir, purple_major_version) |
| 235 finch_libdir = '"@0@/finch-@1@"'.format(common_libdir, purple_major_version) |
237 finch_libdir = '"@0@/finch-@1@"'.format(common_libdir, purple_major_version) |
| 236 endif |
238 endif |
| 237 conf.set('PURPLE_DATADIR', purple_datadir) |
239 conf.set('PURPLE_DATADIR', purple_datadir) |
| 239 conf.set('PIDGIN_LIBDIR', pidgin_libdir) |
241 conf.set('PIDGIN_LIBDIR', pidgin_libdir) |
| 240 conf.set('FINCH_LIBDIR', finch_libdir) |
242 conf.set('FINCH_LIBDIR', finch_libdir) |
| 241 conf.set('PURPLE_SYSCONFDIR', purple_sysconfdir) |
243 conf.set('PURPLE_SYSCONFDIR', purple_sysconfdir) |
| 242 conf.set('PURPLE_LOCALEDIR', purple_localedir) |
244 conf.set('PURPLE_LOCALEDIR', purple_localedir) |
| 243 |
245 |
| 244 # FIXME: |
246 abslibdir = get_option('libdir') |
| 245 PURPLE_PLUGINDIR = '@0@/purple-@1@'.format(get_option('libdir'), purple_major_version) |
247 if not abslibdir.startswith('/') |
| |
248 abslibdir = get_option('prefix') + '/' + abslibdir |
| |
249 endif |
| |
250 PURPLE_PLUGINDIR = '@0@/purple-@1@'.format(abslibdir, purple_major_version) |
| 246 conf.set('PURPLE_PLUGINDIR', '"@0@"'.format(PURPLE_PLUGINDIR)) |
251 conf.set('PURPLE_PLUGINDIR', '"@0@"'.format(PURPLE_PLUGINDIR)) |
| 247 PIDGIN_PLUGINDIR = '@0@/pidgin-@1@'.format(get_option('libdir'), purple_major_version) |
252 PIDGIN_PLUGINDIR = '@0@/pidgin-@1@'.format(abslibdir, purple_major_version) |
| 248 conf.set('PIDGIN_PLUGINDIR', '"@0@"'.format(PIDGIN_PLUGINDIR)) |
253 conf.set('PIDGIN_PLUGINDIR', '"@0@"'.format(PIDGIN_PLUGINDIR)) |
| 249 FINCH_PLUGINDIR = '@0@/finch-@1@'.format(get_option('libdir'), purple_major_version) |
254 FINCH_PLUGINDIR = '@0@/finch-@1@'.format(abslibdir, purple_major_version) |
| 250 conf.set('FINCH_PLUGINDIR', '"@0@"'.format(FINCH_PLUGINDIR)) |
255 conf.set('FINCH_PLUGINDIR', '"@0@"'.format(FINCH_PLUGINDIR)) |
| 251 |
256 |
| 252 # Checks for library functions. |
257 # Checks for library functions. |
| 253 foreach func : ['strdup', 'strstr', 'atexit', 'setlocale'] |
258 foreach func : ['strdup', 'strstr', 'atexit', 'setlocale'] |
| 254 conf.set('HAVE_' + func.to_upper(), |
259 conf.set('HAVE_' + func.to_upper(), |
| 255 compiler.has_function(func)) |
260 compiler.has_function(func)) |
| 256 endforeach |
261 endforeach |
| 257 # Checks for getopt in standard library |
262 # Checks for getopt in standard library |
| 258 if compiler.has_function('getopt_long') |
263 if compiler.has_function('getopt_long') |
| 259 getopt_files = [] |
264 getopt_files = [] |
| 260 else |
265 else |
| 292 if compiler.has_function('getaddrinfo', args : '-lsocket -lnsl') |
297 if compiler.has_function('getaddrinfo', args : '-lsocket -lnsl') |
| 293 conf.set('HAVE_GETADDRINFO', true) |
298 conf.set('HAVE_GETADDRINFO', true) |
| 294 # FIXME: LIBS += declare_dependency(link_with : ['socket', 'nsl']) |
299 # FIXME: LIBS += declare_dependency(link_with : ['socket', 'nsl']) |
| 295 endif |
300 endif |
| 296 endif |
301 endif |
| 297 if compiler.has_function('inet_ntop') |
302 conf.set('HAVE_INET_NTOP', |
| 298 conf.set('HAVE_INET_NTOP', true) |
303 compiler.has_function('inet_ntop')) |
| 299 endif |
304 endif |
| 300 endif |
305 conf.set('HAVE_GETIFADDRS', |
| 301 if compiler.has_function('getifaddrs') |
306 compiler.has_function('getifaddrs')) |
| 302 conf.set('HAVE_GETIFADDRS', true) |
307 |
| 303 endif |
|
| 304 # Check for socklen_t (in Unix98) |
308 # Check for socklen_t (in Unix98) |
| 305 code = ''' |
309 if is_win32 |
| 306 #include <sys/types.h> |
310 socket_header = 'ws2tcpip.h' |
| 307 #ifdef _WIN32 |
311 else |
| 308 # include <ws2tcpip.h> |
312 socket_header = 'sys/socket.h' |
| 309 #else |
313 endif |
| 310 # include <sys/socket.h> |
314 if not compiler.has_header_symbol(socket_header, 'socklen_t') |
| 311 #endif |
|
| 312 socklen_t x; |
|
| 313 |
|
| 314 int main() {} |
|
| 315 ''' |
|
| 316 if not compiler.compiles(code, name : 'socklen_t') |
|
| 317 code = ''' |
315 code = ''' |
| 318 #include <sys/types.h> |
316 #include <sys/types.h> |
| 319 #ifdef _WIN32 |
317 #include <@0@> |
| 320 # include <ws2tcpip.h> |
|
| 321 #else |
|
| 322 # include <sys/socket.h> |
|
| 323 #endif |
|
| 324 int accept(int, struct sockaddr *, size_t *); |
318 int accept(int, struct sockaddr *, size_t *); |
| 325 int main() {} |
319 int main() {} |
| 326 ''' |
320 '''.format(socket_header) |
| 327 if compiler.compiles(code, name : 'socklen_t is size_t') |
321 if compiler.compiles(code, name : 'socklen_t is size_t') |
| 328 conf.set('socklen_t', 'size_t') |
322 conf.set('socklen_t', 'size_t') |
| 329 else |
323 else |
| 330 conf.set('socklen_t', 'int') |
324 conf.set('socklen_t', 'int') |
| 331 endif |
325 endif |
| 332 endif |
326 endif |
| 333 |
327 |
| 334 # Some systems do not have sa_len field for struct sockaddr. |
328 # Some systems do not have sa_len field for struct sockaddr. |
| 335 if compiler.has_member('struct sockaddr', 'sa_len', |
329 conf.set('HAVE_STRUCT_SOCKADDR_SA_LEN', |
| 336 prefix : ''' |
330 compiler.has_member('struct sockaddr', 'sa_len', |
| 337 #ifdef _WIN32 |
331 prefix : '#include <@0@>'.format(socket_header))) |
| 338 # include <ws2tcpip.h> |
|
| 339 #else |
|
| 340 # include <sys/socket.h> |
|
| 341 #endif |
|
| 342 ''') |
|
| 343 conf.set('HAVE_STRUCT_SOCKADDR_SA_LEN', true) |
|
| 344 endif |
|
| 345 |
332 |
| 346 # Check for v6-only sockets |
333 # Check for v6-only sockets |
| 347 code = ''' |
334 if is_win32 |
| 348 #ifdef _WIN32 |
335 header = 'ws2tcpip.h' |
| 349 # include <ws2tcpip.h> |
336 else |
| 350 #else |
337 header = 'netinet/in.h' |
| 351 # include <netinet/in.h> |
338 endif |
| 352 #endif |
339 conf.set('HAVE_IPV6_V6ONLY', |
| 353 void main() {IPV6_V6ONLY;}; |
340 compiler.has_header_symbol(header, 'IPV6_V6ONLY')) |
| 354 ''' |
|
| 355 if compiler.compiles(code) |
|
| 356 conf.set('HAVE_IPV6_V6ONLY', true) |
|
| 357 endif |
|
| 358 |
341 |
| 359 # to prevent the g_stat()/g_unlink() crash, |
342 # to prevent the g_stat()/g_unlink() crash, |
| 360 # (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac |
343 # (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac |
| 361 #AC_SYS_LARGEFILE |
344 #AC_SYS_LARGEFILE |
| 362 |
345 |
| 1034 if gg_have_gnutls_csxst |
1013 if gg_have_gnutls_csxst |
| 1035 conf.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', true) |
1014 conf.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', true) |
| 1036 endif |
1015 endif |
| 1037 if gg_gnutls_sts != '' |
1016 if gg_gnutls_sts != '' |
| 1038 conf.set('GG_CONFIG_GNUTLS_SYSTEM_TRUST_STORE', |
1017 conf.set('GG_CONFIG_GNUTLS_SYSTEM_TRUST_STORE', |
| 1039 '"@0@"'.format(gg_gnutls_sts)) |
1018 '"@0@"'.format(gg_gnutls_sts)) |
| 1040 endif |
1019 endif |
| 1041 |
1020 |
| 1042 # redundant - only here to stay compatible with libgadu upstream |
1021 # redundant - only here to stay compatible with libgadu upstream |
| 1043 GNUTLS_2_10 = dependency('gnutls', version : '>= 2.10.0', required : false) |
1022 GNUTLS_2_10 = dependency('gnutls', version : '>= 2.10.0', required : false) |
| 1044 conf.set('HAVE_GNUTLS_2_10', GNUTLS_2_10.found()) |
1023 conf.set('HAVE_GNUTLS_2_10', GNUTLS_2_10.found()) |
| 1045 endif |
1024 endif |
| 1046 |
1025 |
| 1047 #AC_SUBST(LIBGADU_LIBS) |
1026 #AC_SUBST(LIBGADU_LIBS) |
| 1048 #AC_SUBST(LIBGADU_CFLAGS) |
1027 #AC_SUBST(LIBGADU_CFLAGS) |
| 1049 |
1028 |
| |
1029 DEFAULT_PRPLS = ['bonjour', 'facebook', 'gg', 'irc', 'jabber', 'msn', 'mxit', |
| |
1030 'novell', 'oscar', 'sametime', 'silc', 'simple', 'yahoo', |
| |
1031 'zephyr'] |
| |
1032 ALL_PRPLS = DEFAULT_PRPLS + ['null'] |
| 1050 |
1033 |
| 1051 DISTRIB = get_option('distrib') |
1034 DISTRIB = get_option('distrib') |
| 1052 DYNAMIC_PRPLS = ' '.join(get_option('dynamic-prpls').split(',')) |
1035 dynamic_list = get_option('dynamic-prpls').split(',') |
| 1053 STATIC_PRPLS = ' '.join(get_option('static-prpls').split(',')) |
1036 static_list = get_option('static-prpls').split(',') |
| 1054 if STATIC_PRPLS != '' and DYNAMIC_PRPLS == 'all' |
1037 if (static_list != [''] and static_list != []) and dynamic_list == ['all'] |
| 1055 DYNAMIC_PRPLS = '' |
1038 dynamic_list = [] |
| 1056 endif |
1039 endif |
| 1057 |
1040 |
| 1058 if STATIC_PRPLS == 'all' |
1041 if static_list == ['all'] |
| 1059 STATIC_PRPLS = 'bonjour facebook gg irc jabber msn mxit novell oscar sametime silc simple yahoo zephyr' |
1042 static_list = DEFAULT_PRPLS |
| 1060 endif |
1043 endif |
| 1061 #if not have_meanwhile |
1044 STATIC_PRPLS = [] |
| 1062 # STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'` |
1045 foreach prpl : static_list |
| 1063 #fi |
1046 if prpl == '' |
| 1064 if not avahiincludes or not avahilibs |
1047 # The list was empty; do nothing. |
| 1065 # STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` |
1048 elif prpl == 'sametime' and not meanwhile.found() |
| 1066 endif |
1049 # Do nothing |
| 1067 if not silcincludes or not silcclient |
1050 elif prpl == 'bonjour' and (not avahiincludes or not avahilibs) |
| 1068 # STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` |
1051 # Do nothing |
| 1069 endif |
1052 elif prpl == 'silc' and (not silcincludes or not silcclient) |
| 1070 if is_win32 |
1053 # Do nothing |
| 1071 # STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/zephyr//'` |
1054 elif prpl == 'zephyr' and is_win32 |
| 1072 endif |
1055 # Do nothing |
| 1073 #AC_SUBST(STATIC_PRPLS) |
1056 else |
| |
1057 STATIC_PRPLS += [prpl] |
| |
1058 endif |
| |
1059 endforeach |
| 1074 STATIC_LINK_LIBS = [] |
1060 STATIC_LINK_LIBS = [] |
| 1075 extern_load = [] |
1061 extern_load = [] |
| 1076 load_proto = [] |
1062 load_proto = [] |
| 1077 extern_unload = [] |
1063 extern_unload = [] |
| 1078 unload_proto = [] |
1064 unload_proto = [] |
| 1079 foreach i : STATIC_PRPLS.split() |
1065 foreach prpl : STATIC_PRPLS |
| 1080 # Ugly special case for 'libsilcpurple.la': |
1066 # Ugly special case for 'libsilcpurple.la': |
| 1081 if i == 'silc' |
1067 if prpl == 'silc' |
| 1082 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@purple.la'.format(meson.build_root(), i)) |
1068 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@purple.la'.format(meson.build_root(), prpl)) |
| 1083 else |
1069 else |
| 1084 # FIXME: Shouldn't be libtool: |
1070 # FIXME: Shouldn't be libtool: |
| 1085 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@.la'.format(meson.build_root(), i)) |
1071 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@.la'.format(meson.build_root(), prpl)) |
| 1086 endif |
1072 endif |
| 1087 extern_load.append('extern gboolean @0@_plugin_load();'.format(i)) |
1073 extern_load.append('extern gboolean @0@_plugin_load();'.format(prpl)) |
| 1088 load_proto.append('@0@_plugin_load();'.format(i)) |
1074 load_proto.append('@0@_plugin_load();'.format(prpl)) |
| 1089 extern_unload.append('extern gboolean @0@_plugin_unload();'.format(i)) |
1075 extern_unload.append('extern gboolean @0@_plugin_unload();'.format(prpl)) |
| 1090 unload_proto.append('@0@_plugin_unload();'.format(i)) |
1076 unload_proto.append('@0@_plugin_unload();'.format(prpl)) |
| 1091 endforeach |
1077 endforeach |
| 1092 STATIC_BONJOUR = STATIC_PRPLS.contains('bonjour') |
1078 STATIC_BONJOUR = STATIC_PRPLS.contains('bonjour') |
| 1093 STATIC_FACEBOOK = STATIC_PRPLS.contains('facebook') |
1079 STATIC_FACEBOOK = STATIC_PRPLS.contains('facebook') |
| 1094 STATIC_GG = STATIC_PRPLS.contains('gg') |
1080 STATIC_GG = STATIC_PRPLS.contains('gg') |
| 1095 STATIC_IRC = STATIC_PRPLS.contains('irc') |
1081 STATIC_IRC = STATIC_PRPLS.contains('irc') |
| 1096 STATIC_JABBER = STATIC_PRPLS.contains('jabber') |
1082 STATIC_JABBER = STATIC_PRPLS.contains('jabber') |
| 1097 STATIC_MSN = STATIC_PRPLS.contains('msn') |
1083 STATIC_MSN = STATIC_PRPLS.contains('msn') |
| 1098 STATIC_MXIT = STATIC_PRPLS.contains('mxit') |
1084 STATIC_MXIT = STATIC_PRPLS.contains('mxit') |
| 1099 STATIC_NOVELL = STATIC_PRPLS.contains('novell') |
1085 STATIC_NOVELL = STATIC_PRPLS.contains('novell') |
| 1100 STATIC_OSCAR = STATIC_PRPLS.contains('oscar') or STATIC_PRPLS.contains('aim') or STATIC_PRPLS.contains('icq') |
1086 STATIC_OSCAR = STATIC_PRPLS.contains('oscar') or STATIC_PRPLS.contains('aim') or STATIC_PRPLS.contains('icq') |
| 1101 STATIC_SAMETIME = STATIC_PRPLS.contains('sametime') and have_meanwhile |
1087 STATIC_SAMETIME = STATIC_PRPLS.contains('sametime') and meanwhile.found() |
| 1102 STATIC_SILC = STATIC_PRPLS.contains('silc') and have_silc |
1088 STATIC_SILC = STATIC_PRPLS.contains('silc') and have_silc |
| 1103 STATIC_SIMPLE = STATIC_PRPLS.contains('simple') |
1089 STATIC_SIMPLE = STATIC_PRPLS.contains('simple') |
| 1104 STATIC_YAHOO = STATIC_PRPLS.contains('yahoo') |
1090 STATIC_YAHOO = STATIC_PRPLS.contains('yahoo') |
| 1105 STATIC_ZEPHYR = STATIC_PRPLS.contains('zephyr') |
1091 STATIC_ZEPHYR = STATIC_PRPLS.contains('zephyr') |
| 1106 #AC_SUBST(STATIC_LINK_LIBS) |
|
| 1107 conf.set('STATIC_PROTO_LOAD', |
1092 conf.set('STATIC_PROTO_LOAD', |
| 1108 ' '.join(extern_load) + |
1093 ' '.join(extern_load) + |
| 1109 ' static void static_proto_load(void) { ' + ' '.join(load_proto) + ' }') |
1094 ' static void static_proto_load(void) { ' + ' '.join(load_proto) + ' }') |
| 1110 conf.set('STATIC_PROTO_UNLOAD', |
1095 conf.set('STATIC_PROTO_UNLOAD', |
| 1111 ' '.join(extern_unload) + |
1096 ' '.join(extern_unload) + |
| 1112 ' static void static_proto_unload(void) { ' + ' '.join(unload_proto) + ' }') |
1097 ' static void static_proto_unload(void) { ' + ' '.join(unload_proto) + ' }') |
| 1113 |
1098 |
| 1114 if DYNAMIC_PRPLS == 'all' |
1099 if dynamic_list == ['all'] |
| 1115 DYNAMIC_PRPLS = 'bonjour facebook gg irc jabber msn mxit novell oscar sametime silc simple yahoo zephyr' |
1100 dynamic_list = DEFAULT_PRPLS |
| 1116 endif |
1101 endif |
| 1117 #if not have_meanwhile |
1102 DYNAMIC_PRPLS = [] |
| 1118 # DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` |
1103 foreach prpl : dynamic_list |
| 1119 #endif |
1104 if prpl == '' |
| 1120 if not avahiincludes or not avahilibs |
1105 # The list was empty; do nothing. |
| 1121 # DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` |
1106 elif prpl == 'sametime' and not meanwhile.found() |
| 1122 endif |
1107 # Do nothing. |
| 1123 if not silcincludes or not silcclient |
1108 elif prpl == 'bonjour' and (not avahiincludes or not avahilibs) |
| 1124 # DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` |
1109 # Do nothing. |
| 1125 endif |
1110 elif prpl == 'silc' and (not silcincludes or not silcclient) |
| 1126 if is_win32 |
1111 # Do nothing. |
| 1127 # DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/zephyr//'` |
1112 elif prpl == 'zephyr' and is_win32 |
| 1128 endif |
1113 # Do nothing. |
| 1129 #AC_SUBST(DYNAMIC_PRPLS) |
1114 else |
| |
1115 DYNAMIC_PRPLS += [prpl] |
| |
1116 endif |
| |
1117 endforeach |
| 1130 |
1118 |
| 1131 DYNAMIC_BONJOUR = DYNAMIC_PRPLS.contains('bonjour') |
1119 DYNAMIC_BONJOUR = DYNAMIC_PRPLS.contains('bonjour') |
| 1132 DYNAMIC_FACEBOOK = DYNAMIC_PRPLS.contains('facebook') |
1120 DYNAMIC_FACEBOOK = DYNAMIC_PRPLS.contains('facebook') |
| 1133 DYNAMIC_GG = DYNAMIC_PRPLS.contains('gg ') |
1121 DYNAMIC_GG = DYNAMIC_PRPLS.contains('gg ') |
| 1134 DYNAMIC_IRC = DYNAMIC_PRPLS.contains('irc') |
1122 DYNAMIC_IRC = DYNAMIC_PRPLS.contains('irc') |
| 1766 |
1704 |
| 1767 #AC_MSG_CHECKING(for me pot o' gold) |
1705 #AC_MSG_CHECKING(for me pot o' gold) |
| 1768 #AC_MSG_RESULT(no) |
1706 #AC_MSG_RESULT(no) |
| 1769 foreach func : 'gethostid lrand48 timegm memcpy memmove random strchr strerror vprintf'.split() |
1707 foreach func : 'gethostid lrand48 timegm memcpy memmove random strchr strerror vprintf'.split() |
| 1770 conf.set('HAVE_' + func.to_upper(), |
1708 conf.set('HAVE_' + func.to_upper(), |
| 1771 compiler.has_function(func)) |
1709 compiler.has_function(func)) |
| 1772 endforeach |
1710 endforeach |
| 1773 foreach header : 'malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h sys/select.h sys/uio.h sys/utsname.h sys/wait.h termios.h'.split() |
1711 foreach header : 'malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h sys/select.h sys/uio.h sys/utsname.h sys/wait.h termios.h'.split() |
| 1774 conf.set('HAVE_' + header.to_upper().underscorify(), |
1712 conf.set('HAVE_' + header.to_upper().underscorify(), |
| 1775 compiler.has_header(header)) |
1713 compiler.has_header(header)) |
| 1776 endforeach |
1714 endforeach |
| 1777 |
1715 |
| 1778 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h |
1716 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h |
| 1779 # sys/sysctl.h on FreeBSD requires sys/types.h |
1717 # sys/sysctl.h on FreeBSD requires sys/types.h |
| 1780 conf.set('HAVE_SYS_PARAM_H', |
1718 have_sys_param_h = compiler.has_header('sys/param.h') |
| 1781 compiler.has_header('sys/param.h')) |
1719 conf.set('HAVE_SYS_PARAM_H', have_sys_param_h) |
| 1782 #AC_CHECK_HEADERS(sys/sysctl.h, [], [], |
1720 prefix = ''' |
| 1783 # [[ |
1721 #include <sys/types.h> |
| 1784 # #include <sys/types.h> |
1722 ''' |
| 1785 # #ifdef HAVE_PARAM_H |
1723 if have_sys_param_h |
| 1786 # # include <sys/param.h> |
1724 prefix += ''' |
| 1787 # #endif |
1725 #include <sys/param.h> |
| 1788 # ]]) |
1726 ''' |
| 1789 # |
1727 endif |
| |
1728 conf.set('HAVE_SYS_SYSCTL_H', |
| |
1729 compiler.has_header('sys/sysctl.h', prefix : prefix)) |
| 1790 conf.set('HAVE_SYS_SOCKET_H', |
1730 conf.set('HAVE_SYS_SOCKET_H', |
| 1791 compiler.has_header('sys/socket.h')) |
1731 compiler.has_header('sys/socket.h')) |
| 1792 #AC_VAR_TIMEZONE_EXTERNALS |
1732 #AC_VAR_TIMEZONE_EXTERNALS |
| 1793 |
1733 |
| 1794 conf.set('HAVE_TM_GMTOFF', |
1734 conf.set('HAVE_TM_GMTOFF', |
| 1795 compiler.has_member('struct tm', 'tm_gmtoff', |
1735 compiler.has_member('struct tm', 'tm_gmtoff', |
| 1796 prefix : '#include<time.h>')) |
1736 prefix : '#include<time.h>')) |
| 1797 |
1737 |
| 1798 ####################################################################### |
1738 ####################################################################### |
| 1799 # Disable pixmap installation |
1739 # Disable pixmap installation |
| 1800 ####################################################################### |
1740 ####################################################################### |
| 1801 INSTALL_PIXMAPS = get_option('pixmaps-install') |
1741 INSTALL_PIXMAPS = get_option('pixmaps-install') |