|
2 |
|
2 |
|
3 |
def configure(conf): |
3 |
def configure(conf): |
4 |
have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False) |
4 |
have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False) |
5 |
conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk |
5 |
|
6 |
conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", |
6 |
if have_gtk: |
7 |
conf.env['ENABLE_GTK_CONFIG_STORE'], |
7 |
# Check that GTK works on the user's machine. |
8 |
"library 'gtk+-2.0 >= 2.12' not found") |
8 |
fragment = r""" |
|
|
9 |
#include <gtk/gtk.h> |
10 |
int main () |
11 |
{ |
12 |
gtk_init (0, 0); |
13 |
return 0; |
14 |
} |
15 |
""" |
16 |
gtk_works = conf.check(fragment=fragment, msg="Checking that GTK works", |
17 |
okmsg="complete", errmsg='incomplete', |
18 |
mandatory=False, uselib="GTK_CONFIG_STORE") |
19 |
conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", |
20 |
gtk_works, |
21 |
"library 'gtk+-2.0 >= 2.12' found but conf.check failed") |
22 |
conf.env['ENABLE_GTK_CONFIG_STORE'] = gtk_works |
23 |
else: |
24 |
conf.env['ENABLE_GTK_CONFIG_STORE'] = False |
25 |
conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", |
26 |
conf.env['ENABLE_GTK_CONFIG_STORE'], |
27 |
"library 'gtk+-2.0 >= 2.12' not found") |
28 |
|
9 |
have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False) |
29 |
have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False) |
|
|
30 |
|
10 |
if have_libxml2: |
31 |
if have_libxml2: |
11 |
conf.define('HAVE_LIBXML2', 1) |
32 |
conf.define('HAVE_LIBXML2', 1) |
12 |
|
33 |
|
13 |
conf.env['ENABLE_LIBXML2'] = have_libxml2 |
34 |
# Check that LIBXML2 works on the user's machine. |
14 |
conf.report_optional_feature("XmlIo", "XmlIo", |
35 |
fragment = r""" |
15 |
conf.env['ENABLE_LIBXML2'], |
36 |
#include <libxml/xmlunicode.h> |
16 |
"library 'libxml-2.0 >= 2.7' not found") |
37 |
int main () |
|
|
38 |
{ |
39 |
int test = xmlUCSIsArabic (0); |
40 |
test *= 1; |
41 |
return 0; |
42 |
} |
43 |
""" |
44 |
libxml2_works = conf.check(fragment=fragment, msg="Checking that LIBXML2 works", |
45 |
okmsg="complete", errmsg='incomplete', |
46 |
mandatory=False, uselib="LIBXML2") |
47 |
conf.report_optional_feature("XmlIo", "XmlIo", |
48 |
libxml2_works, |
49 |
"library 'libxml-2.0 >= 2.6' found but conf.check failed") |
50 |
conf.env['ENABLE_LIBXML2'] = libxml2_works |
51 |
else: |
52 |
conf.env['ENABLE_LIBXML2'] = False |
53 |
conf.report_optional_feature("XmlIo", "XmlIo", |
54 |
conf.env['ENABLE_LIBXML2'], |
55 |
"library 'libxml-2.0 >= 2.6' not found") |
56 |
|
17 |
conf.write_config_header('ns3/config-store-config.h', top=True) |
57 |
conf.write_config_header('ns3/config-store-config.h', top=True) |
18 |
|
58 |
|
19 |
|
59 |
|