meson.build

changeset 39406
83227c38f6f4
parent 39379
f63983e956f1
parent 39404
dc8c71a301d0
child 39410
88678727cf16
equal deleted inserted replaced
39402:341d90fb856e 39406:83227c38f6f4
533 DEFAULT_PRPLS = ['bonjour', 'facebook', 'gg', 'irc', 'jabber', 'novell', 533 DEFAULT_PRPLS = ['bonjour', 'facebook', 'gg', 'irc', 'jabber', 'novell',
534 'oscar', 'sametime', 'silc', 'simple', 'zephyr'] 534 'oscar', 'sametime', 'silc', 'simple', 'zephyr']
535 ALL_PRPLS = DEFAULT_PRPLS + ['null'] 535 ALL_PRPLS = DEFAULT_PRPLS + ['null']
536 536
537 dynamic_list = get_option('dynamic-prpls').split(',') 537 dynamic_list = get_option('dynamic-prpls').split(',')
538 static_list = get_option('static-prpls').split(',')
539 if (static_list != [''] and static_list != []) and dynamic_list == ['all']
540 dynamic_list = []
541 endif
542
543 if static_list == ['all']
544 static_list = DEFAULT_PRPLS
545 endif
546 STATIC_PRPLS = []
547 foreach prpl : static_list
548 if prpl == ''
549 # The list was empty; do nothing.
550 elif prpl == 'sametime' and not enable_meanwhile
551 # Do nothing
552 elif prpl == 'bonjour' and not enable_avahi
553 # Do nothing
554 elif prpl == 'silc' and not have_silc
555 # Do nothing
556 elif prpl == 'gg' and not have_libgadu
557 # Do nothing
558 elif prpl == 'zephyr' and IS_WIN32
559 # Do nothing
560 else
561 STATIC_PRPLS += [prpl]
562 endif
563 endforeach
564 STATIC_LINK_LIBS = []
565 extern_load = []
566 load_proto = []
567 extern_unload = []
568 unload_proto = []
569 foreach prpl : STATIC_PRPLS
570 # Ugly special case for 'libsilcpurple.la':
571 if prpl == 'silc'
572 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@purple.la'.format(meson.build_root(), prpl))
573 else
574 # FIXME: Shouldn't be libtool:
575 STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@.la'.format(meson.build_root(), prpl))
576 endif
577 extern_load.append('extern gboolean @0@_plugin_load();'.format(prpl))
578 load_proto.append('@0@_plugin_load();'.format(prpl))
579 extern_unload.append('extern gboolean @0@_plugin_unload();'.format(prpl))
580 unload_proto.append('@0@_plugin_unload();'.format(prpl))
581 endforeach
582 STATIC_BONJOUR = STATIC_PRPLS.contains('bonjour')
583 STATIC_FACEBOOK = STATIC_PRPLS.contains('facebook')
584 STATIC_GG = STATIC_PRPLS.contains('gg')
585 STATIC_IRC = STATIC_PRPLS.contains('irc')
586 STATIC_JABBER = STATIC_PRPLS.contains('jabber')
587 STATIC_NOVELL = STATIC_PRPLS.contains('novell')
588 STATIC_OSCAR = STATIC_PRPLS.contains('oscar') or STATIC_PRPLS.contains('aim') or STATIC_PRPLS.contains('icq')
589 STATIC_SAMETIME = STATIC_PRPLS.contains('sametime')
590 STATIC_SILC = STATIC_PRPLS.contains('silc')
591 STATIC_SIMPLE = STATIC_PRPLS.contains('simple')
592 STATIC_ZEPHYR = STATIC_PRPLS.contains('zephyr')
593 conf.set('STATIC_PROTO_LOAD',
594 ' '.join(extern_load) +
595 ' static void static_proto_load(void) { ' + ' '.join(load_proto) + ' }')
596 conf.set('STATIC_PROTO_UNLOAD',
597 ' '.join(extern_unload) +
598 ' static void static_proto_unload(void) { ' + ' '.join(unload_proto) + ' }')
599
600 if dynamic_list == ['all'] 538 if dynamic_list == ['all']
601 dynamic_list = DEFAULT_PRPLS 539 dynamic_list = DEFAULT_PRPLS
602 endif 540 endif
603 DYNAMIC_PRPLS = [] 541 DYNAMIC_PRPLS = []
604 foreach prpl : dynamic_list 542 foreach prpl : dynamic_list
1017 message('Build console UI.............. : ' + enable_consoleui.to_string()) 955 message('Build console UI.............. : ' + enable_consoleui.to_string())
1018 message('Build for X11................. : ' + with_x.to_string()) 956 message('Build for X11................. : ' + with_x.to_string())
1019 message('') 957 message('')
1020 message('Enable Gestures............... : ' + enable_gestures.to_string()) 958 message('Enable Gestures............... : ' + enable_gestures.to_string())
1021 message('Protocols to build dynamically : @0@'.format(DYNAMIC_PRPLS)) 959 message('Protocols to build dynamically : @0@'.format(DYNAMIC_PRPLS))
1022 message('Protocols to link statically.. : @0@'.format(STATIC_PRPLS))
1023 message('') 960 message('')
1024 message('Build with GStreamer support.. : ' + enable_gst.to_string()) 961 message('Build with GStreamer support.. : ' + enable_gst.to_string())
1025 message('Build with voice and video.... : ' + enable_vv.to_string()) 962 message('Build with voice and video.... : ' + enable_vv.to_string())
1026 message('Build with GNU Libidn......... : ' + get_option('idn').to_string()) 963 message('Build with GNU Libidn......... : ' + get_option('idn').to_string())
1027 message('Build with Nettle support..... : ' + enable_nettle.to_string()) 964 message('Build with Nettle support..... : ' + enable_nettle.to_string())

mercurial