1 # UPDATING VERSION NUMBERS FOR RELEASES
3 # The version number is:
4 # <major>.<minor>.<micro><suffix>
8 # If any functions have been added to libpurple, Pidgin, or Finch:
12 # If backwards compatibility has been broken in libpurple, Pidgin, or Finch:
16 # purple_soversion += 1
18 # suffix should be similar to one of the following:
19 # For beta releases: '-beta2'
20 # For code under development: '-devel'
21 # For production releases: ''
23 project('pidgin', 'c',
24 version : '3.0.0-devel',
25 meson_version : '>=0.37.0')
28 parts = meson.project_version().split('-')
30 purple_version_suffix = parts[1]
32 purple_version_suffix = ''
35 parts = parts[0].split('.')
36 purple_major_version = parts[0]
37 purple_minor_version = parts[1]
38 purple_micro_version = parts[2]
40 add_project_arguments('-DHAVE_CONFIG_H=1', language : 'c')
41 conf = configuration_data()
42 man_conf = configuration_data()
43 version_conf = configuration_data()
45 conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
46 conf.set_quoted('PACKAGE', meson.project_name())
47 conf.set_quoted('PACKAGE_NAME', meson.project_name())
48 conf.set_quoted('VERSION', meson.project_version())
50 version_conf.set('PURPLE_MAJOR_VERSION', purple_major_version)
51 version_conf.set('PURPLE_MINOR_VERSION', purple_minor_version)
52 version_conf.set('PURPLE_MICRO_VERSION', purple_micro_version)
53 version_conf.set('PURPLE_VERSION', meson.project_version())
54 version_conf.set('PURPLE_API_VERSION', purple_soversion)
56 PURPLE_LIB_VERSION = '@0@.@1@.@2@'.format(purple_soversion,
60 package_revision = vcs_tag(
61 input : 'package_revision.h.in',
62 output : 'package_revision.h',
63 fallback : meson.project_version())
66 man_conf.set('VERSION', meson.project_version())
67 man_conf.set('prefix', get_option('prefix'))
69 # Used for pkg-config files.
70 pkgconfig = import('pkgconfig')
72 sedpath = find_program('sed')
74 # Storing build arguments
75 if meson.version().version_compare('>=0.42.0')
76 meson.add_postconf_script('mkmesonconf.py')
77 conf.set('HAVE_MESON_CONFIG', true)
80 # Checks for programs.
81 compiler = meson.get_compiler('c')
83 # Check for Sun compiler
84 SUNCC = compiler.compiles('void main() {__SUNPRO_C;};')
87 if host_machine.system() == 'windows'
88 windows = import('windows')
91 ws2_32 = compiler.find_library('ws2_32')
92 dnsapi = compiler.find_library('dnsapi')
93 if build_machine.system() != 'windows'
94 conf.set('IS_WIN32_CROSS_COMPILED', true)
96 conf.set('WIN32_LEAN_AND_MEAN', true)
98 conf.set('LIBPIDGIN_DLL_NAMEW',
99 'L"libpidgin-@0@.dll"'.format(purple_soversion))
106 # Checks for header files.
107 # AC_HEADER_SYS_WAIT:
108 conf.set('HAVE_SYS_WAIT_H', compiler.has_header('sys/wait.h'))
110 foreach h : ['fcntl.h', 'unistd.h', 'stdint.h']
111 if compiler.has_header(h)
112 conf.set('HAVE_' + h.to_upper().underscorify(), true)
114 error(h + ' is required.')
118 # Checks for typedefs, structures, and compiler characteristics.
119 time_t_size = compiler.sizeof('time_t',
124 conf.set('SIZEOF_TIME_T', time_t_size)
126 conf.set('WORDS_BIGENDIAN', host_machine.endian() != 'little')
128 # Check for directories
130 foreach dir : ['bin', 'lib', 'data', 'sysconf', 'locale']
131 path = join_paths(get_option('prefix'), get_option(dir + 'dir'))
132 conf.set_quoted('WIN32_FHS_@0@DIR'.format(dir.to_upper()), path)
135 conf.set('PURPLE_LIBDIR',
136 'wpurple_lib_dir("purple-@0@")'.format(purple_major_version))
137 conf.set('PIDGIN_LIBDIR',
138 'wpurple_lib_dir("pidgin-@0@")'.format(purple_major_version))
139 conf.set('FINCH_LIBDIR',
140 'wpurple_lib_dir("finch-@0@")'.format(purple_major_version))
142 conf.set('PURPLE_DATADIR', 'wpurple_data_dir()')
143 conf.set('PURPLE_SYSCONFDIR', 'wpurple_sysconf_dir()')
144 conf.set('PURPLE_LOCALEDIR', 'wpurple_locale_dir()')
146 foreach dir : ['data', 'sysconf', 'locale']
147 path = join_paths(get_option('prefix'), get_option(dir + 'dir'))
148 conf.set_quoted('PURPLE_@0@DIR'.format(dir.to_upper()), path)
151 common_libdir = join_paths(get_option('prefix'), get_option('libdir'))
152 conf.set_quoted('PURPLE_LIBDIR',
153 join_paths(common_libdir,
154 'purple-@0@'.format(purple_major_version)))
155 conf.set_quoted('PIDGIN_LIBDIR',
156 join_paths(common_libdir,
157 'pidgin-@0@'.format(purple_major_version)))
158 conf.set_quoted('FINCH_LIBDIR',
159 join_paths(common_libdir,
160 'finch-@0@'.format(purple_major_version)))
163 abslibdir = join_paths(get_option('prefix'), get_option('libdir'))
164 PURPLE_PLUGINDIR = join_paths(abslibdir, 'purple-@0@'.format(purple_major_version))
165 conf.set_quoted('PURPLE_PLUGINDIR', PURPLE_PLUGINDIR)
166 PIDGIN_PLUGINDIR = join_paths(abslibdir, 'pidgin-@0@'.format(purple_major_version))
167 conf.set_quoted('PIDGIN_PLUGINDIR', PIDGIN_PLUGINDIR)
168 FINCH_PLUGINDIR = join_paths(abslibdir, 'finch-@0@'.format(purple_major_version))
169 conf.set_quoted('FINCH_PLUGINDIR', FINCH_PLUGINDIR)
171 # Check for inet_aton
173 if not compiler.has_function('inet_aton')
174 if not compiler.has_function('inet_aton', args : '-lresolv')
175 # FIXME: Someone needs to link with -lresolv if needed.
176 error('inet_aton not found')
180 if compiler.has_function('gethostent', args : '-lnsl')
181 conf.set('HAVE_LIBNSL', true)
184 conf.set('HAVE_GETADDRINFO', true)
185 conf.set('HAVE_INET_NTOP', true)
187 if not compiler.has_function('socket')
188 if not compiler.has_function('socket', args : '-lsocket')
189 error('socket not found')
192 # If all goes well, by this point the previous two checks will have
193 # pulled in -lsocket and -lnsl if we need them.
194 if compiler.has_function('getaddrinfo')
195 conf.set('HAVE_GETADDRINFO', true)
197 if compiler.has_function('getaddrinfo', args : '-lsocket -lnsl')
198 conf.set('HAVE_GETADDRINFO', true)
199 # FIXME: LIBS += declare_dependency(link_with : ['socket', 'nsl'])
202 conf.set('HAVE_INET_NTOP',
203 compiler.has_function('inet_ntop'))
205 conf.set('HAVE_GETIFADDRS',
206 compiler.has_function('getifaddrs'))
208 # Check for socklen_t (in Unix98)
210 socket_header = 'ws2tcpip.h'
212 socket_header = 'sys/socket.h'
214 if not compiler.has_header_symbol(socket_header, 'socklen_t')
216 #include <sys/types.h>
218 int accept(int, struct sockaddr *, size_t *);
220 '''.format(socket_header)
221 if compiler.compiles(code, name : 'socklen_t is size_t')
222 conf.set('socklen_t', 'size_t')
224 conf.set('socklen_t', 'int')
228 # Some systems do not have sa_len field for struct sockaddr.
229 conf.set('HAVE_STRUCT_SOCKADDR_SA_LEN',
230 compiler.has_member('struct sockaddr', 'sa_len',
231 prefix : '#include <@0@>'.format(socket_header)))
233 # Check for v6-only sockets
235 header = 'ws2tcpip.h'
237 header = 'netinet/in.h'
239 conf.set('HAVE_IPV6_V6ONLY',
240 compiler.has_header_symbol(header, 'IPV6_V6ONLY'))
242 # Windows and Haiku do not use libm for the math functions, they are part
244 math = compiler.find_library('m')
246 # before gettexting, in case iconv matters
248 if host_machine.system() == 'darwin'
249 if compiler.has_header('CoreFoundation/CoreFoundation.h')
250 if compiler.has_header('IOKit/IOKitLib.h')
251 conf.set('HAVE_IOKIT', true)
252 IOKIT = dependency('appleframeworks',
253 modules : ['IOKit', 'CoreFoundation'])
257 if run_command('test', '-d', '/sw').returncode() == 0
259 #CPPFLAGS="$CPPFLAGS -I/sw/include"
260 #LDFLAGS="$LDFLAGS -L/sw/lib"
264 # #######################################################################
265 # # Disable creation and installation of translation files
266 # #######################################################################
268 INSTALL_I18N = get_option('nls')
271 i18n = import('i18n')
276 # #######################################################################
277 # # Check for GLib 2.44 (required)
278 # #######################################################################
279 glib = dependency('glib-2.0', version : '>= 2.44.0')
280 gio = dependency('gio-2.0')
281 gobject = dependency('gobject-2.0')
282 gthread = dependency('gthread-2.0')
283 gnome = import('gnome')
285 if get_option('extraversion') != ''
286 DISPLAY_VERSION = '@0@-@1@'.format(meson.project_version(),
287 get_option('extraversion'))
289 DISPLAY_VERSION = meson.project_version()
291 conf.set_quoted('DISPLAY_VERSION', DISPLAY_VERSION)
293 force_deps = not get_option('missing-dependencies')
295 # #######################################################################
296 # # Check for GTK+ 2.18 and other things used by the GTK UI
297 # #######################################################################
298 enable_gestures = get_option('gestures')
300 # #######################################################################
301 # Check Pidgin dependencies
302 # #######################################################################
303 if get_option('gtkui')
304 gtk = dependency('gtk+-3.0', version : '>= 3.10.0')
306 webkit = dependency('webkitgtk-3.0', version : '>= 1.3.7')
308 talkatu_dep = dependency('talkatu', version: '>=0.1.0', required : false)
309 if talkatu_dep.found()
310 talkatu_gir = 'Talkatu-0.0'
311 talkatu_include_directories = include_directories(
312 join_paths(talkatu_dep.get_pkgconfig_variable('prefix'),
315 talkatu_proj = subproject('talkatu',
317 'doc=' + get_option('doc').to_string(),
318 'gobject-introspection=' + get_option('introspection').to_string(),
319 'nls=' + get_option('nls').to_string(),
322 talkatu_dep = talkatu_proj.get_variable('talkatu_dep')
323 talkatu_gir = talkatu_proj.get_variable('talkatu_gir')[0]
324 talkatu_include_directories = []
327 #######################################################################
328 # Check if we should compile with enchant support
329 #######################################################################
330 # We need enchant for spell checking dictionary enumeration,
331 # because webkit1 doesn't have this.
332 enable_enchant = get_option('enchant')
334 enchant = dependency('enchant', required : force_deps)
335 enable_enchant = enchant.found()
336 conf.set('USE_ENCHANT', enable_enchant)
341 enable_enchant = false
344 ENABLE_GTK = get_option('gtkui')
347 #######################################################################
348 # Check if we should compile with X support
349 #######################################################################
350 with_x = get_option('x') and not IS_WIN32
353 x11 = dependency('x11')
355 conf.set('HAVE_X11', true)
360 X11 development headers not found.
361 Use -Dx=false if you do not need X11 support.
368 if not get_option('gtkui') or not with_x
369 enable_gestures = false
372 #######################################################################
373 # Check for LibXML2 (required)
374 #######################################################################
375 libxml = dependency('libxml-2.0', version : '>= 2.6.0')
376 if libxml.version().version_compare('<2.6.18')
377 message('Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.')
380 #######################################################################
381 # Check for JSON-GLib (required)
382 #######################################################################
384 json = dependency('json-glib-1.0', version : '>= 0.14.0')
386 #######################################################################
387 # Check for GStreamer
388 #######################################################################
390 enable_gst = get_option('gstreamer')
392 gstreamer = dependency('gstreamer-1.0', required : force_deps)
394 conf.set('USE_GSTREAMER', true)
402 #######################################################################
403 # Check for GStreamer Video
404 #######################################################################
405 enable_gstvideo = enable_gst and get_option('gstreamer-video')
407 gstreamer_video = dependency('gstreamer-video-1.0',
409 if gstreamer_video.found()
410 conf.set('USE_GSTVIDEO', true)
412 enable_gstvideo = false
418 #######################################################################
419 # Check for Farstream
420 #######################################################################
421 if get_option('farstream')
422 farstream = dependency('farstream-0.2', version : '>= 0.2.7',
424 enable_farstream = farstream.found()
427 enable_farstream = false
430 #######################################################################
431 # Check for Voice and Video support
432 #######################################################################
434 if enable_gst and enable_gstvideo and enable_farstream
435 conf.set('USE_VV', true)
440 Dependencies for voice/video were not met.
441 Install the necessary gstreamer and farstream packages first.
442 Or use -Dvv=false if you do not need voice/video support.
451 #######################################################################
452 # Check for Raw data streams support in Farstream
453 #######################################################################
455 gstreamer_app = dependency('gstreamer-app-1.0',
457 if gstreamer_app.found()
458 conf.set('USE_GSTAPP', true)
459 conf.set('HAVE_MEDIA_APPLICATION', true)
465 #######################################################################
466 # Check for Meanwhile headers (for Sametime)
467 #######################################################################
468 if get_option('meanwhile')
469 meanwhile = dependency('meanwhile', version : ['>= 1.0.0', '< 2.0.0'], required : force_deps)
470 gmime = dependency('gmime-3.0', version : '>= 3.0.0', required : force_deps)
471 enable_meanwhile = meanwhile.found() and gmime.found()
473 enable_meanwhile = false
477 #######################################################################
478 # Check for Native Avahi headers (for Bonjour)
479 #######################################################################
481 enable_avahi = get_option('avahi')
483 if enable_avahi and IS_WIN32
486 # Attempt to autodetect Avahi
487 avahi_client = dependency('avahi-client', required : false)
488 avahi_glib = dependency('avahi-glib', required : false)
489 if avahi_client.found() and avahi_glib.found()
490 avahi = [avahi_client, avahi_glib]
495 avahi development package not found.
496 Use -Davahi=false if you do not need avahi (Bonjour) support.
503 #######################################################################
504 # Check for SILC client includes and libraries
505 #######################################################################
507 if get_option('silc')
508 silc = dependency('silcclient', version : '>= 1.1', required : false)
511 # SILC Toolkit >= 1.0.1 has a new MIME API
512 conf.set('HAVE_SILCMIME_H', true)
516 SILC development package not found.
517 Use -Dsilc=false if you do not need SILC support.
523 #######################################################################
524 # Check for Gadu-Gadu protocol library (libgadu)
525 #######################################################################
527 enable_libgadu = get_option('libgadu')
529 libgadu = dependency('libgadu', version : '>= 1.12.0', required : false)
530 have_libgadu = libgadu.found()
533 if not compiler.has_function('gg_is_gpl_compliant', dependencies : libgadu)
536 libgadu is not compatible with the GPL when compiled with OpenSSL support.
538 To link against libgadu, please recompile it using:
539 ./configure --with-openssl=no
540 Then rerun this Meson build
545 if not have_libgadu and force_deps
547 Libgadu development headers not found.
548 Use -Dlibgadu=false if you do not need GG (GaduGadu) support.
556 DEFAULT_PRPLS = ['bonjour', 'facebook', 'gg', 'irc', 'jabber', 'novell',
557 'oscar', 'sametime', 'silc', 'simple', 'zephyr']
558 ALL_PRPLS = DEFAULT_PRPLS + ['null']
560 dynamic_list = get_option('dynamic-prpls').split(',')
561 if dynamic_list == ['all']
562 dynamic_list = DEFAULT_PRPLS
565 foreach prpl : dynamic_list
567 # The list was empty; do nothing.
568 elif prpl == 'sametime' and not enable_meanwhile
570 elif prpl == 'bonjour' and not enable_avahi
572 elif prpl == 'silc' and not have_silc
574 elif prpl == 'gg' and not have_libgadu
576 elif prpl == 'zephyr' and IS_WIN32
579 DYNAMIC_PRPLS += [prpl]
583 DYNAMIC_BONJOUR = DYNAMIC_PRPLS.contains('bonjour')
584 DYNAMIC_FACEBOOK = DYNAMIC_PRPLS.contains('facebook')
585 DYNAMIC_GG = DYNAMIC_PRPLS.contains('gg')
586 DYNAMIC_IRC = DYNAMIC_PRPLS.contains('irc')
587 DYNAMIC_JABBER = DYNAMIC_PRPLS.contains('jabber')
588 DYNAMIC_NOVELL = DYNAMIC_PRPLS.contains('novell')
589 DYNAMIC_NULL = DYNAMIC_PRPLS.contains('null')
590 DYNAMIC_OSCAR = DYNAMIC_PRPLS.contains('oscar') or DYNAMIC_PRPLS.contains('aim') or DYNAMIC_PRPLS.contains('icq')
591 DYNAMIC_SAMETIME = DYNAMIC_PRPLS.contains('sametime')
592 DYNAMIC_SILC = DYNAMIC_PRPLS.contains('silc')
593 DYNAMIC_SIMPLE = DYNAMIC_PRPLS.contains('simple')
594 DYNAMIC_ZEPHYR = DYNAMIC_PRPLS.contains('zephyr')
596 conf.set('HAVE_SYS_UTSNAME_H',
597 compiler.has_header('sys/utsname.h'))
598 conf.set('HAVE_UNAME',
599 compiler.has_function('uname'))
602 add_project_arguments(
603 '-DPURPLE_DISABLE_DEPRECATED',
604 '-DPIDGIN_DISABLE_DEPRECATED',
605 '-DFINCH_DISABLE_DEPRECATED',
606 '-DGNT_DISABLE_DEPRECATED',
608 if get_option('buildtype') != 'plain' and compiler.get_id() == 'gcc'
609 # We enable -Wall later.
610 # If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
611 # This leads to warnings we don't want.
612 # CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
614 # ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
616 # Future Possibilities
618 # Consider adding -Wbad-function-cast.
619 # This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
620 # We'd need an intermediate variable.
623 '-Waggregate-return',
625 '-Wdeclaration-after-statement',
627 '-Werror-implicit-function-declaration',
628 '-Wextra -Wno-unused-parameter',
631 '-Werror=format-security',
633 '-Wmissing-declarations',
634 '-Wmissing-noreturn',
635 '-Wmissing-prototypes',
639 if compiler.has_argument(newflag)
640 add_project_arguments(newflag, language : 'c')
644 if get_option('fortify')
645 # AC_MSG_CHECKING(for FORTIFY_SOURCE support)
646 # AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
647 # #if !(__GNUC_PREREQ (4, 1) \
648 # || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
649 # || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
650 # && __GNUC_MINOR__ == 4 \
651 # && (__GNUC_PATCHLEVEL__ > 2 \
652 # || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
653 # #error No FORTIFY_SOURCE support
658 # DEBUG_CFLAGS='$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2'
664 if get_option('buildtype') != 'plain' and SUNCC
665 add_project_arguments('-features=extensions', language : 'c')
668 pidginpath = find_program('pidgin', required : false)
670 if get_option('glib-errors-trace')
671 if compiler.get_id() == 'clang'
672 error('--enable-glib-errors-trace doesn\'t work with clang')
674 conf.set('ENABLE_GLIBTRACE', true)
675 add_project_arguments('-rdynamic', language : 'c')
678 #######################################################################
679 # Check for Unity and Messaging Menu
680 # Remove when Ubuntu 16.04 is EOL
681 #######################################################################
682 enable_unity = get_option('unity-integration')
685 dependency('unity', version : '>= 6.8'),
686 dependency('messaging-menu', version : '>= 12.10')
688 conf.set('USES_MM_CHAT_SECTION', 'X-MessagingMenu-UsesChatSection=true')
690 conf.set('USES_MM_CHAT_SECTION', '')
693 #######################################################################
694 # Check for Secret Service headers
695 #######################################################################
697 enable_secret_service = get_option('secret-service') and not IS_WIN32
698 if enable_secret_service
699 secretservice = dependency('libsecret-1', required : force_deps)
700 if secretservice.found()
702 enable_secret_service = false
706 #######################################################################
707 # Check for KWallet headers
708 #######################################################################
710 enable_kwallet = get_option('kwallet') and not IS_WIN32
711 enable_kwallet = false
714 # Ensure C++ compiler works
716 cxx_compiler = meson.get_compiler('cpp')
718 qt4 = dependency('qt4', modules : 'Core', required : force_deps)
719 enable_kwallet = qt4.found()
723 # AC_MSG_CHECKING([for metaobject compiler])
724 # MOC=`$PKG_CONFIG --variable=moc_location QtCore`
726 # AC_MSG_RESULT([$MOC])
728 # KWALLET_CXXFLAGS=''
730 # if test -z '$with_kwallet_includes' || test -z '$with_kwallet_libs'; then
731 # AC_CHECK_PROG(KDE4_CONFIG, kde4-config, kde4-config, no)
732 # if test 'x$KDE4_CONFIG' = 'xno'; then
733 # enable_kwallet = false
734 # if test 'x$force_deps' = 'xyes'; then
736 #kde4-config not found. $KDE4_CONFIG
737 #Use -Dkwallet=false if you do not need KWallet support.
745 # if test 'x$KDE4_CONFIG' != 'xno'; then
746 # KWALLET_CXXFLAGS='$QT4_CFLAGS -I`$KDE4_CONFIG --path include`'
748 # CPPFLAGS='$CPPFLAGS $KWALLET_CXXFLAGS'
749 # AC_CHECK_HEADER([kwallet.h], , [
750 # enable_kwallet = false
751 # if test 'x$force_deps' = 'xyes'; then
753 #KWallet development headers not found.
754 #Use -Dkwallet=false if you do not need KWallet support.
761 # AC_MSG_CHECKING([for KWallet libraries])
762 # if test 'x$KDE4_CONFIG' != 'xno'; then
763 # KWALLET_LIBS='-L`$KDE4_CONFIG --install lib`/kde4/devel -lkdeui'
765 # KWALLET_LIBS='-lkdeui'
767 # KWALLET_LIBS='$KWALLET_LIBS'
768 # LIBS='$LIBS $KWALLET_LIBS $QT4_LIBS'
769 # AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <kwallet.h>],
770 # [KWallet::Wallet::LocalWallet();])], [AC_MSG_RESULT([yes])],
773 # enable_kwallet = false
774 # if test 'x$force_deps' = 'xyes'; then
776 #KWallet development libraries not found.
777 #Use -Dkwallet=false if you do not need KWallet support.
783 #######################################################################
784 # Check for GPlugin 0.28.0
785 #######################################################################
786 gplugin_dep = dependency('gplugin', version : '>= 0.28.0', required : false)
787 if gplugin_dep.found()
788 gplugin_gir = 'GPlugin-0.0'
789 gplugin_include_directories = include_directories(
790 join_paths(gplugin_dep.get_pkgconfig_variable('prefix'),
793 gplugin_proj = subproject('gplugin',
795 'doc=' + get_option('doc').to_string(),
796 'gobject-introspection=' + get_option('introspection').to_string(),
797 'nls=' + get_option('nls').to_string(),
800 gplugin_dep = gplugin_proj.get_variable('gplugin_dep')
801 gplugin_gir = gplugin_proj.get_variable('gplugin_gir')[0]
802 gplugin_include_directories = []
805 #######################################################################
806 # Check for GObject Introspection
807 #######################################################################
809 enable_introspection = get_option('introspection')
810 if enable_introspection
811 if dependency('gobject-introspection-1.0', version : '>= 1.30.0',
812 required : force_deps).found()
813 conf.set('ENABLE_INTROSPECTION', true)
815 enable_introspection = false
819 if get_option('plugins')
825 #######################################################################
826 # Check for Nettle (Crypto Library)
827 #######################################################################
829 enable_nettle = get_option('nettle')
832 nettle = dependency('nettle', version : '>= 3.0', required : false)
833 enable_nettle = nettle.found()
834 conf.set('HAVE_NETTLE', enable_nettle)
836 if not enable_nettle and force_deps
838 Nettle development headers not found
839 Use -Dnettle=false if you do not need it.
846 #######################################################################
847 # Check for Cyrus-SASL (for xmpp/irc)
848 #######################################################################
849 foreach func : ['snprintf', 'connect']
850 conf.set('HAVE_' + func.to_upper(),
851 compiler.has_function(func))
853 enable_cyrus_sasl = get_option('cyrus-sasl')
855 sasl = dependency('libsasl2', version : '>= 2.0', required : false)
856 enable_cyrus_sasl = sasl.found()
857 conf.set('HAVE_CYRUS_SASL', enable_cyrus_sasl)
859 if not enable_cyrus_sasl and force_deps
861 Cyrus SASL library not found
862 Use -Dcyrus-sasl=false if you do not need it.
866 enable_cyrus_sasl = false
870 #######################################################################
871 # Check for Kerberos (for Zephyr)
872 #######################################################################
873 conf.set('ZEPHYR_INT32', 'long')
874 #AC_SUBST(KRB4_CFLAGS)
875 #AC_SUBST(KRB4_LDFLAGS)
877 kerberos = get_option('krb4')
880 # KRB4_CFLAGS='-I${kerberos}/include'
881 # if test -d '$kerberos/include/kerberosIV' ; then
882 # KRB4_CFLAGS='$KRB4_CFLAGS -I${kerberos}/include/kerberosIV'
884 # KRB4_LDFLAGS='-L${kerberos}/lib'
885 elif run_command('test', '-d', '/usr/local/include/kerberosIV').returncode() == 0
886 # KRB4_CFLAGS='-I/usr/local/include/kerberosIV'
887 elif run_command('test', '-d', '/usr/include/kerberosIV').returncode() == 0
888 # KRB4_CFLAGS='-I/usr/include/kerberosIV'
890 conf.set('ZEPHYR_USES_KERBEROS', true)
892 # AC_CHECK_LIB(krb4, krb_rd_req,
893 # [KRB4_LIBS='-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err'],
894 # [AC_CHECK_LIB(krb, krb_rd_req,
895 # [KRB4_LIBS='-lkrb -ldes'],
896 # [AC_MSG_ERROR([Kerberos 4 libraries not found])],
898 # -ldes425 -lkrb5 -lk5crypto -lcom_err)
899 # AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
900 # AC_CHECK_FUNCS(krb_get_err_text krb_log)
907 #######################################################################
908 # Check for external libzephyr
909 #######################################################################
910 zephyr = get_option('zephyr')
912 ext_zephyr = dependency('zephyr', required : force_deps)
913 zephyr = ext_zephyr.found()
917 EXTERNAL_LIBZEPHYR = zephyr
918 conf.set('LIBZEPHYR_EXT', EXTERNAL_LIBZEPHYR)
920 #AC_MSG_CHECKING(for me pot o' gold)
922 foreach func : ['gethostid', 'timegm']
923 conf.set('HAVE_' + func.to_upper(),
924 compiler.has_function(func))
926 foreach header : 'paths.h sgtty.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()
927 conf.set('HAVE_' + header.to_upper().underscorify(),
928 compiler.has_header(header))
931 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
932 # sys/sysctl.h on FreeBSD requires sys/types.h
933 have_sys_param_h = compiler.has_header('sys/param.h')
934 conf.set('HAVE_SYS_PARAM_H', have_sys_param_h)
936 #include <sys/types.h>
940 #include <sys/param.h>
943 conf.set('HAVE_SYS_SYSCTL_H',
944 compiler.has_header('sys/sysctl.h', prefix : prefix))
945 conf.set('HAVE_SYS_SOCKET_H',
946 compiler.has_header('sys/socket.h'))
947 #AC_VAR_TIMEZONE_EXTERNALS
949 #######################################################################
950 # Disable pixmap installation
951 #######################################################################
952 INSTALL_PIXMAPS = get_option('pixmaps-install')
955 ENABLE_DOC = get_option('doc')
957 if meson.version().version_compare('<0.41.2')
959 error('Meson 0.41.2 or newer is required to build documentation.')
965 enable_debug = get_option('console-logging')
966 conf.set('DEBUG', enable_debug)
968 # So that config.h may be found.
969 toplevel_inc = include_directories('.')
972 subdir('share/sounds')
977 configure_file(output : 'config.h',
978 configuration : conf)
981 message('pidgin ' + meson.project_version())
984 message('Build GTK+ UI................. : ' + get_option('gtkui').to_string())
985 message('Build console UI.............. : ' + enable_consoleui.to_string())
986 message('Build for X11................. : ' + with_x.to_string())
988 message('Enable Gestures............... : ' + enable_gestures.to_string())
989 message('Protocols to build dynamically : @0@'.format(DYNAMIC_PRPLS))
991 message('Build with GStreamer support.. : ' + enable_gst.to_string())
992 message('Build with voice and video.... : ' + enable_vv.to_string())
993 message('Build with GNU Libidn......... : ' + get_option('idn').to_string())
994 message('Build with Nettle support..... : ' + enable_nettle.to_string())
995 message('Build with Cyrus SASL support. : ' + enable_cyrus_sasl.to_string())
996 message('Use kerberos 4 with zephyr.... : ' + kerberos.to_string())
997 message('Use external libzephyr........ : ' + zephyr.to_string())
998 message('Install pixmaps............... : ' + INSTALL_PIXMAPS.to_string())
999 message('Install translations.......... : ' + INSTALL_I18N.to_string())
1000 message('Has you....................... : yes')
1002 message('Build with Enchant support.... : ' + enable_enchant.to_string())
1003 message('Build Unity integration plugin.: ' + enable_unity.to_string())
1005 message('Build with KWallet............ : ' + enable_kwallet.to_string())
1006 message('Build with Secret Service..... : ' + enable_secret_service.to_string())
1008 message('Build plugins................. : ' + PLUGINS.to_string())
1009 message('Enable Introspection...........: ' + enable_introspection.to_string())
1011 message('Print debugging messages...... : ' + enable_debug.to_string())
1012 message('Generate documentation........ : ' + ENABLE_DOC.to_string())
1014 bindir = join_paths(get_option('prefix'), get_option('bindir'))
1015 message('Pidgin will be installed in @0@.'.format(bindir))
1016 if pidginpath.found()
1017 message('Warning: You have an old copy of Pidgin at @0@.'.format(pidginpath.path()))
1019 if not INSTALL_PIXMAPS
1021 message('Warning: You have disabled the installation of pixmap data, but Pidgin')
1022 message('still requires installed pixmaps. Be sure you know what you are doing.')
1026 message('Warning: You have disabled the building and installation of translation')
1027 message('data. This will prevent building Pidgin desktop files.')
1028 message('Be sure you know what you are doing.')
1031 message('configure complete, now type \'ninja\'')