Move prefs::kLastPolicyStatisticsUpdate to the policy component.
[chromium-blink-merge.git] / build / linux / system.gyp
blob68e4d36e28a42d63dce74dd860f1215cd1354a71
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'conditions': [
8       ['sysroot!=""', {
9         'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
10       }, {
11         'pkg-config': 'pkg-config'
12       }],
13     ],
15     'linux_link_libgps%': 0,
16     'linux_link_libpci%': 0,
17     'linux_link_libspeechd%': 0,
18     'linux_link_libbrlapi%': 0,
19   },
20   'conditions': [
21     [ 'os_posix==1 and OS!="mac"', {
22       'variables': {
23         # We use our own copy of libssl3, although we still need to link against
24         # the rest of NSS.
25         'use_system_ssl%': 0,
26       },
27     }, {
28       'variables': {
29         'use_system_ssl%': 1,
30       },
31     }],
32     [ 'chromeos==0', {
33       # Hide GTK and related dependencies for Chrome OS, so they won't get
34       # added back to Chrome OS. Don't try to use GTK on Chrome OS.
35       'targets': [
36         {
37           'target_name': 'gtk',
38           'type': 'none',
39           'toolsets': ['host', 'target'],
40           'variables': {
41             # gtk requires gmodule, but it does not list it as a dependency
42             # in some misconfigured systems.
43             'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
44           },
45           'conditions': [
46             ['_toolset=="target"', {
47               'all_dependent_settings': {
48                 'cflags': [
49                   '<!@(<(pkg-config) --cflags <(gtk_packages))',
50                 ],
51               },
52               'link_settings': {
53                 'ldflags': [
54                   '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
55                 ],
56                 'libraries': [
57                   '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
58                 ],
59               },
60             }, {
61               'all_dependent_settings': {
62                 'cflags': [
63                   '<!@(pkg-config --cflags <(gtk_packages))',
64                 ],
65               },
66               'link_settings': {
67                 'ldflags': [
68                   '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
69                 ],
70                 'libraries': [
71                   '<!@(pkg-config --libs-only-l <(gtk_packages))',
72                 ],
73               },
74             }],
75           ],
76         },
77         {
78           'target_name': 'gtkprint',
79           'type': 'none',
80           'conditions': [
81             ['_toolset=="target"', {
82               'direct_dependent_settings': {
83                 'cflags': [
84                   '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
85                 ],
86               },
87               'link_settings': {
88                 'ldflags': [
89                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
90                 ],
91                 'libraries': [
92                   '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
93                 ],
94               },
95             }],
96           ],
97         },
98         {
99           'target_name': 'gdk',
100           'type': 'none',
101           'conditions': [
102             ['_toolset=="target"', {
103               'direct_dependent_settings': {
104                 'cflags': [
105                   '<!@(<(pkg-config) --cflags gdk-2.0)',
106                 ],
107               },
108               'link_settings': {
109                 'ldflags': [
110                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
111                 ],
112                 'libraries': [
113                   '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
114                 ],
115               },
116             }],
117           ],
118         },
119       ],  # targets
120     }],
121     ['linux_use_libgps==1', {
122       'targets': [
123         {
124           'target_name': 'libgps',
125           'type': 'static_library',
126           'all_dependent_settings': {
127             'defines': [
128               'USE_LIBGPS',
129             ],
130             'include_dirs': [
131               '<(SHARED_INTERMEDIATE_DIR)',
132             ],
133             'conditions': [
134               ['linux_link_libgps==1', {
135                 'cflags': [
136                   '<!@(<(pkg-config) --cflags libgps)',
137                 ],
138                 'link_settings': {
139                   'ldflags': [
140                     '<!@(<(pkg-config) --libs-only-L --libs-only-other libgps)',
141                   ],
142                   'libraries': [
143                     '<!@(<(pkg-config) --libs-only-l libgps)',
144                   ],
145                 }
146               }],
147             ],
148           },
149           'include_dirs': [
150             '../..',
151           ],
152           'hard_dependency': 1,
153           'actions': [
154             {
155               'variables': {
156                 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgps.h',
157                 'output_cc': '<(INTERMEDIATE_DIR)/libgps_loader.cc',
158                 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
159               },
160               'action_name': 'generate_libgps_loader',
161               'inputs': [
162                 '<(generator)',
163               ],
164               'outputs': [
165                 '<(output_h)',
166                 '<(output_cc)',
167               ],
168               'action': ['python',
169                          '<(generator)',
170                          '--name', 'LibGpsLoader',
171                          '--output-h', '<(output_h)',
172                          '--output-cc', '<(output_cc)',
173                          '--header', '<gps.h>',
174                          '--bundled-header', '"third_party/gpsd/release-3.1/gps.h"',
175                          '--link-directly=<(linux_link_libgps)',
176                          'gps_open',
177                          'gps_close',
178                          'gps_read',
179                          # We don't use gps_shm_read() directly, just to make
180                          # sure that libgps has the shared memory support.
181                          'gps_shm_read',
182               ],
183               'message': 'Generating libgps library loader.',
184               'process_outputs_as_sources': 1,
185             },
186           ],
187         },
188       ],
189     }],
190   ],  # conditions
191   'targets': [
192     {
193       'target_name': 'ssl',
194       'type': 'none',
195       'conditions': [
196         ['_toolset=="target"', {
197           'conditions': [
198             ['use_openssl==1', {
199               'dependencies': [
200                 '../../third_party/openssl/openssl.gyp:openssl',
201               ],
202             }],
203             ['use_openssl==0 and use_system_ssl==0', {
204               'dependencies': [
205                 '../../net/third_party/nss/ssl.gyp:libssl',
206               ],
207               'direct_dependent_settings': {
208                 'include_dirs+': [
209                   # We need for our local copies of the libssl3 headers to come
210                   # before other includes, as we are shadowing system headers.
211                   '<(DEPTH)/net/third_party/nss/ssl',
212                 ],
213                 'cflags': [
214                   '<!@(<(pkg-config) --cflags nss)',
215                 ],
216               },
217               'link_settings': {
218                 'ldflags': [
219                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
220                 ],
221                 'libraries': [
222                   '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
223                 ],
224               },
225             }],
226             ['use_openssl==0 and use_system_ssl==1', {
227               'direct_dependent_settings': {
228                 'cflags': [
229                   '<!@(<(pkg-config) --cflags nss)',
230                 ],
231                 'defines': [
232                   'USE_SYSTEM_SSL',
233                 ],
234               },
235               'link_settings': {
236                 'ldflags': [
237                   '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
238                 ],
239                 'libraries': [
240                   '<!@(<(pkg-config) --libs-only-l nss)',
241                 ],
242               },
243             }],
244             ['use_openssl==0 and clang==1', {
245               'direct_dependent_settings': {
246                 'cflags': [
247                   # There is a broken header guard in /usr/include/nss/secmod.h:
248                   # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
249                   '-Wno-header-guard',
250                 ],
251               },
252             }],
253           ]
254         }],
255       ],
256     },
257     {
258       'target_name': 'freetype2',
259       'type': 'none',
260       'conditions': [
261         ['_toolset=="target"', {
262           'direct_dependent_settings': {
263             'cflags': [
264               '<!@(<(pkg-config) --cflags freetype2)',
265             ],
266           },
267           'link_settings': {
268             'ldflags': [
269               '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
270             ],
271             'libraries': [
272               '<!@(<(pkg-config) --libs-only-l freetype2)',
273             ],
274           },
275         }],
276       ],
277     },
278     {
279       'target_name': 'fontconfig',
280       'type': 'none',
281       'conditions': [
282         ['_toolset=="target"', {
283           'direct_dependent_settings': {
284             'cflags': [
285               '<!@(<(pkg-config) --cflags fontconfig)',
286             ],
287           },
288           'link_settings': {
289             'ldflags': [
290               '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
291             ],
292             'libraries': [
293               '<!@(<(pkg-config) --libs-only-l fontconfig)',
294             ],
295           },
296         }],
297       ],
298     },
299     {
300       'target_name': 'gconf',
301       'type': 'none',
302       'conditions': [
303         ['use_gconf==1 and _toolset=="target"', {
304           'direct_dependent_settings': {
305             'cflags': [
306               '<!@(<(pkg-config) --cflags gconf-2.0)',
307             ],
308             'defines': [
309               'USE_GCONF',
310             ],
311           },
312           'link_settings': {
313             'ldflags': [
314               '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
315             ],
316             'libraries': [
317               '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
318             ],
319           },
320         }],
321       ],
322     },
323     {
324       'target_name': 'gio',
325       'type': 'static_library',
326       'conditions': [
327         ['use_gio==1 and _toolset=="target"', {
328           'cflags': [
329             '<!@(<(pkg-config) --cflags gio-2.0)',
330           ],
331           'direct_dependent_settings': {
332             'cflags': [
333               '<!@(<(pkg-config) --cflags gio-2.0)',
334             ],
335             'defines': [
336               'USE_GIO',
337             ],
338             'include_dirs': [
339               '<(SHARED_INTERMEDIATE_DIR)',
340             ],
341           },
342           'include_dirs': [
343             '../..',
344           ],
345           'link_settings': {
346             'ldflags': [
347               '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
348             ],
349             'libraries': [
350               '<!@(<(pkg-config) --libs-only-l gio-2.0)',
351             ],
352             'conditions': [
353               ['linux_link_gsettings==0 and OS=="linux"', {
354                 'libraries': [
355                   '-ldl',
356                 ],
357               }],
358             ],
359           },
360           'hard_dependency': 1,
361           'actions': [
362             {
363               'variables': {
364                 'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libgio.h',
365                 'output_cc': '<(INTERMEDIATE_DIR)/libgio_loader.cc',
366                 'generator': '../../tools/generate_library_loader/generate_library_loader.py',
367               },
368               'action_name': 'generate_libgio_loader',
369               'inputs': [
370                 '<(generator)',
371               ],
372               'outputs': [
373                 '<(output_h)',
374                 '<(output_cc)',
375               ],
376               'action': ['python',
377                          '<(generator)',
378                          '--name', 'LibGioLoader',
379                          '--output-h', '<(output_h)',
380                          '--output-cc', '<(output_cc)',
381                          '--header', '<gio/gio.h>',
382                          '--link-directly=<(linux_link_gsettings)',
383                          'g_settings_new',
384                          'g_settings_get_child',
385                          'g_settings_get_string',
386                          'g_settings_get_boolean',
387                          'g_settings_get_int',
388                          'g_settings_get_strv',
389                          'g_settings_list_schemas',
390               ],
391               'message': 'Generating libgio library loader.',
392               'process_outputs_as_sources': 1,
393             },
394           ],
395         }],
396       ],
397     },
398     {
399       'target_name': 'libpci',
400       'type': 'static_library',
401       'cflags': [
402         '<!@(<(pkg-config) --cflags libpci)',
403       ],
404       'direct_dependent_settings': {
405         'include_dirs': [
406           '<(SHARED_INTERMEDIATE_DIR)',
407         ],
408         'conditions': [
409           ['linux_link_libpci==1', {
410             'link_settings': {
411               'ldflags': [
412                 '<!@(<(pkg-config) --libs-only-L --libs-only-other libpci)',
413               ],
414               'libraries': [
415                 '<!@(<(pkg-config) --libs-only-l libpci)',
416               ],
417             }
418           }],
419         ],
420       },
421       'include_dirs': [
422         '../..',
423       ],
424       'hard_dependency': 1,
425       'actions': [
426         {
427           'variables': {
428             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libpci.h',
429             'output_cc': '<(INTERMEDIATE_DIR)/libpci_loader.cc',
430             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
431           },
432           'action_name': 'generate_libpci_loader',
433           'inputs': [
434             '<(generator)',
435           ],
436           'outputs': [
437             '<(output_h)',
438             '<(output_cc)',
439           ],
440           'action': ['python',
441                      '<(generator)',
442                      '--name', 'LibPciLoader',
443                      '--output-h', '<(output_h)',
444                      '--output-cc', '<(output_cc)',
445                      '--header', '<pci/pci.h>',
446                      # TODO(phajdan.jr): Report problem to pciutils project
447                      # and get it fixed so that we don't need --use-extern-c.
448                      '--use-extern-c',
449                      '--link-directly=<(linux_link_libpci)',
450                      'pci_alloc',
451                      'pci_init',
452                      'pci_cleanup',
453                      'pci_scan_bus',
454                      'pci_fill_info',
455                      'pci_lookup_name',
456           ],
457           'message': 'Generating libpci library loader.',
458           'process_outputs_as_sources': 1,
459         },
460       ],
461     },
462     {
463       'target_name': 'libspeechd',
464       'type': 'static_library',
465       'direct_dependent_settings': {
466         'include_dirs': [
467           '<(SHARED_INTERMEDIATE_DIR)',
468         ],
469         'conditions': [
470           ['linux_link_libspeechd==1', {
471             'link_settings': {
472               'libraries': [
473                 '-lspeechd',
474               ],
475             }
476           }],
477         ],
478       },
479       'include_dirs': [
480         '../..',
481       ],
482       'hard_dependency': 1,
483       'actions': [
484         {
485           'variables': {
486             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libspeechd.h',
487             'output_cc': '<(INTERMEDIATE_DIR)/libspeechd_loader.cc',
488             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
490             # speech-dispatcher >= 0.8 installs libspeechd.h into
491             # speech-dispatcher/libspeechd.h, whereas speech-dispatcher < 0.8
492             # puts libspeechd.h in the top-level include directory.
493             # Since we need to support both cases for now, we ship a copy of
494             # libspeechd.h in third_party/speech-dispatcher. If the user
495             # prefers to link against the speech-dispatcher directly, the
496             # `libspeechd_h_prefix' variable can be passed to gyp with a value
497             # such as "speech-dispatcher/" that will be prepended to
498             # "libspeechd.h" in the #include directive.
499             # TODO(phaldan.jr): Once we do not need to support
500             # speech-dispatcher < 0.8 we can get rid of all this (including
501             # third_party/speech-dispatcher) and just include
502             # speech-dispatcher/libspeechd.h unconditionally.
503             'libspeechd_h_prefix%': '',
504           },
505           'action_name': 'generate_libspeechd_loader',
506           'inputs': [
507             '<(generator)',
508           ],
509           'outputs': [
510             '<(output_h)',
511             '<(output_cc)',
512           ],
513           'action': ['python',
514                      '<(generator)',
515                      '--name', 'LibSpeechdLoader',
516                      '--output-h', '<(output_h)',
517                      '--output-cc', '<(output_cc)',
518                      '--header', '<<(libspeechd_h_prefix)libspeechd.h>',
519                      '--bundled-header',
520                      '"third_party/speech-dispatcher/libspeechd.h"',
521                      '--link-directly=<(linux_link_libspeechd)',
522                      'spd_open',
523                      'spd_say',
524                      'spd_stop',
525                      'spd_close',
526                      'spd_pause',
527                      'spd_resume',
528                      'spd_set_notification_on',
529                      'spd_set_voice_rate',
530                      'spd_set_voice_pitch',
531                      'spd_list_synthesis_voices',
532                      'spd_set_synthesis_voice',
533                      'spd_list_modules',
534                      'spd_set_output_module',
535           ],
536           'message': 'Generating libspeechd library loader.',
537           'process_outputs_as_sources': 1,
538         },
539       ],
540     },
541     {
542       'target_name': 'libbrlapi',
543       'type': 'static_library',
544       'dependencies': [
545         '../../base/base.gyp:base',
546       ],
547       'all_dependent_settings': {
548         'include_dirs': [
549           '<(SHARED_INTERMEDIATE_DIR)',
550         ],
551         'defines': [
552           'USE_BRLAPI',
553         ],
554         'conditions': [
555           ['linux_link_libbrlapi==1', {
556             'link_settings': {
557               'libraries': [
558                 '-lbrlapi',
559               ],
560             }
561           }],
562         ],
563       },
564       'hard_dependency': 1,
565       'actions': [
566         {
567           'variables': {
568             'output_h': '<(SHARED_INTERMEDIATE_DIR)/library_loaders/libbrlapi.h',
569             'output_cc': '<(INTERMEDIATE_DIR)/libbrlapi_loader.cc',
570             'generator': '../../tools/generate_library_loader/generate_library_loader.py',
571           },
572           'action_name': 'generate_brlapi_loader',
573           'inputs': [
574             '<(generator)',
575           ],
576           'outputs': [
577             '<(output_h)',
578             '<(output_cc)',
579           ],
580           'action': ['python',
581                      '<(generator)',
582                      '--name', 'LibBrlapiLoader',
583                      '--output-h', '<(output_h)',
584                      '--output-cc', '<(output_cc)',
585                      '--header', '<brlapi.h>',
586                      '--link-directly=<(linux_link_libbrlapi)',
587                      'brlapi_getHandleSize',
588                      'brlapi_error_location',
589                      'brlapi_expandKeyCode',
590                      'brlapi_strerror',
591                      'brlapi__acceptKeys',
592                      'brlapi__openConnection',
593                      'brlapi__closeConnection',
594                      'brlapi__getDisplaySize',
595                      'brlapi__enterTtyModeWithPath',
596                      'brlapi__leaveTtyMode',
597                      'brlapi__writeDots',
598                      'brlapi__readKey',
599           ],
600           'message': 'Generating libbrlapi library loader.',
601           'process_outputs_as_sources': 1,
602         },
603       ],
604     },
605     {
606       'target_name': 'x11',
607       'type': 'none',
608       'toolsets': ['host', 'target'],
609       'conditions': [
610         ['_toolset=="target"', {
611           'direct_dependent_settings': {
612             'cflags': [
613               '<!@(<(pkg-config) --cflags x11)',
614             ],
615           },
616           'link_settings': {
617             'ldflags': [
618               '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
619             ],
620             'libraries': [
621               '<!@(<(pkg-config) --libs-only-l x11 xi)',
622             ],
623           },
624         }, {
625           'direct_dependent_settings': {
626             'cflags': [
627               '<!@(pkg-config --cflags x11)',
628             ],
629           },
630           'link_settings': {
631             'ldflags': [
632               '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
633             ],
634             'libraries': [
635               '<!@(pkg-config --libs-only-l x11 xi)',
636             ],
637           },
638         }],
639       ],
640     },
641     {
642       'target_name': 'xext',
643       'type': 'none',
644       'conditions': [
645         ['_toolset=="target"', {
646           'direct_dependent_settings': {
647             'cflags': [
648               '<!@(<(pkg-config) --cflags xext)',
649             ],
650           },
651           'link_settings': {
652             'ldflags': [
653               '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
654             ],
655             'libraries': [
656               '<!@(<(pkg-config) --libs-only-l xext)',
657             ],
658           },
659         }],
660       ],
661     },
662     {
663       'target_name': 'xfixes',
664       'type': 'none',
665       'conditions': [
666         ['_toolset=="target"', {
667           'direct_dependent_settings': {
668             'cflags': [
669               '<!@(<(pkg-config) --cflags xfixes)',
670             ],
671           },
672           'link_settings': {
673             'ldflags': [
674               '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
675             ],
676             'libraries': [
677               '<!@(<(pkg-config) --libs-only-l xfixes)',
678             ],
679           },
680         }],
681       ],
682     },
683     {
684       'target_name': 'libgcrypt',
685       'type': 'none',
686       'conditions': [
687         ['_toolset=="target" and use_cups==1', {
688           'direct_dependent_settings': {
689             'cflags': [
690               '<!@(libgcrypt-config --cflags)',
691             ],
692           },
693           'link_settings': {
694             'libraries': [
695               '<!@(libgcrypt-config --libs)',
696             ],
697           },
698         }],
699       ],
700     },
701     {
702       'target_name': 'gnome_keyring',
703       'type': 'none',
704       'conditions': [
705         ['use_gnome_keyring==1', {
706           'direct_dependent_settings': {
707             'cflags': [
708               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
709             ],
710             'defines': [
711               'USE_GNOME_KEYRING',
712             ],
713             'conditions': [
714               ['linux_link_gnome_keyring==0', {
715                 'defines': ['DLOPEN_GNOME_KEYRING'],
716               }],
717             ],
718           },
719           'conditions': [
720             ['linux_link_gnome_keyring!=0', {
721               'link_settings': {
722                 'ldflags': [
723                   '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
724                 ],
725                 'libraries': [
726                   '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
727                 ],
728               },
729             }, {
730               'conditions': [
731                 ['OS=="linux"', {
732                  'link_settings': {
733                    'libraries': [
734                      '-ldl',
735                    ],
736                  },
737                 }],
738               ],
739             }],
740           ],
741         }],
742       ],
743     },
744     {
745       # The unit tests use a few convenience functions from the GNOME
746       # Keyring library directly. We ignore linux_link_gnome_keyring and
747       # link directly in this version of the target to allow this.
748       # *** Do not use this target in the main binary! ***
749       'target_name': 'gnome_keyring_direct',
750       'type': 'none',
751       'conditions': [
752         ['use_gnome_keyring==1', {
753           'direct_dependent_settings': {
754             'cflags': [
755               '<!@(<(pkg-config) --cflags gnome-keyring-1)',
756             ],
757             'defines': [
758               'USE_GNOME_KEYRING',
759             ],
760             'conditions': [
761               ['linux_link_gnome_keyring==0', {
762                 'defines': ['DLOPEN_GNOME_KEYRING'],
763               }],
764             ],
765           },
766           'link_settings': {
767             'ldflags': [
768               '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
769             ],
770             'libraries': [
771               '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
772             ],
773           },
774         }],
775       ],
776     },
777     {
778       'target_name': 'dbus',
779       'type': 'none',
780       'direct_dependent_settings': {
781         'cflags': [
782           '<!@(<(pkg-config) --cflags dbus-1)',
783         ],
784       },
785       'link_settings': {
786         'ldflags': [
787           '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
788         ],
789         'libraries': [
790           '<!@(<(pkg-config) --libs-only-l dbus-1)',
791         ],
792       },
793     },
794     {
795       'target_name': 'glib',
796       'type': 'none',
797       'toolsets': ['host', 'target'],
798       'variables': {
799         'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
800       },
801       'conditions': [
802         ['_toolset=="target"', {
803           'direct_dependent_settings': {
804             'cflags': [
805               '<!@(<(pkg-config) --cflags <(glib_packages))',
806             ],
807           },
808           'link_settings': {
809             'ldflags': [
810               '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
811             ],
812             'libraries': [
813               '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
814             ],
815           },
816         }, {
817           'direct_dependent_settings': {
818             'cflags': [
819               '<!@(pkg-config --cflags <(glib_packages))',
820             ],
821           },
822           'link_settings': {
823             'ldflags': [
824               '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
825             ],
826             'libraries': [
827               '<!@(pkg-config --libs-only-l <(glib_packages))',
828             ],
829           },
830         }],
831         ['use_x11==1', {
832           'link_settings': {
833             'libraries': [ '-lXtst' ]
834           }
835         }],
836       ],
837     },
838     {
839       'target_name': 'pangocairo',
840       'type': 'none',
841       'toolsets': ['host', 'target'],
842       'conditions': [
843         ['_toolset=="target"', {
844           'direct_dependent_settings': {
845             'cflags': [
846               '<!@(<(pkg-config) --cflags pangocairo pangoft2)',
847             ],
848           },
849           'link_settings': {
850             'ldflags': [
851               '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo pangoft2)',
852             ],
853             'libraries': [
854               '<!@(<(pkg-config) --libs-only-l pangocairo pangoft2)',
855             ],
856           },
857         }, {
858           'direct_dependent_settings': {
859             'cflags': [
860               '<!@(pkg-config --cflags pangocairo pangoft2)',
861             ],
862           },
863           'link_settings': {
864             'ldflags': [
865               '<!@(pkg-config --libs-only-L --libs-only-other pangocairo pangoft2)',
866             ],
867             'libraries': [
868               '<!@(pkg-config --libs-only-l pangocairo pangoft2)',
869             ],
870           },
871         }],
872       ],
873     },
874     {
875       'target_name': 'libresolv',
876       'type': 'none',
877       'link_settings': {
878         'libraries': [
879           '-lresolv',
880         ],
881       },
882     },
883     {
884       'target_name': 'udev',
885       'type': 'none',
886       'conditions': [
887         # libudev is not available on *BSD
888         ['_toolset=="target" and os_bsd!=1', {
889           'direct_dependent_settings': {
890             'cflags': [
891               '<!@(<(pkg-config) --cflags libudev)'
892             ],
893           },
894           'link_settings': {
895             'ldflags': [
896               '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
897             ],
898             'libraries': [
899               '<!@(<(pkg-config) --libs-only-l libudev)',
900             ],
901           },
902         }],
903       ],
904     },
905   ],