mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Merge branch 'fam' into 'master'
Meson: Build fam module See merge request GNOME/glib!71
This commit is contained in:
commit
b04142a24f
@ -1651,8 +1651,7 @@ FAM_LIBS=
|
||||
if test "x$should_disable_fam" = "xno"; then
|
||||
AC_CHECK_LIB(fam, FAMOpen,
|
||||
[AC_CHECK_HEADERS(fam.h,
|
||||
[AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
|
||||
AC_CHECK_LIB(fam, FAMNoExists,
|
||||
[AC_CHECK_LIB(fam, FAMNoExists,
|
||||
AC_DEFINE(HAVE_FAM_NO_EXISTS, [], [Define if we have FAMNoExists in fam]))
|
||||
FAM_LIBS="-lfam"]
|
||||
fam_support=yes,
|
||||
|
@ -820,6 +820,7 @@ gio-2.0.lib: libgio-2.0.la gio.def
|
||||
$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
|
||||
|
||||
bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
|
||||
EXTRA_DIST += gio-querymodules-wrapper.py
|
||||
|
||||
glib_compile_resources_LDADD = libgio-2.0.la \
|
||||
$(top_builddir)/gobject/libgobject-2.0.la \
|
||||
|
8
gio/fam/gfamfilemonitor.map
Normal file
8
gio/fam/gfamfilemonitor.map
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
global:
|
||||
g_io_module_load;
|
||||
g_io_module_unload;
|
||||
g_io_module_query;
|
||||
local:
|
||||
*;
|
||||
};
|
36
gio/fam/meson.build
Normal file
36
gio/fam/meson.build
Normal file
@ -0,0 +1,36 @@
|
||||
# FIXME: We should use subdir_done() instead of if blocks, but it's broken in
|
||||
# meson 0.46.1. See https://github.com/mesonbuild/meson/issues/3700.
|
||||
if get_option('fam')
|
||||
fam_dep = cc.find_library('fam')
|
||||
fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args
|
||||
if cc.has_function('FAMNoExists', dependencies : fam_dep)
|
||||
fam_c_args += '-DHAVE_FAM_NO_EXISTS=1'
|
||||
endif
|
||||
|
||||
deps = [
|
||||
fam_dep,
|
||||
libglib_dep,
|
||||
libgobject_dep,
|
||||
libgio_dep,
|
||||
]
|
||||
|
||||
symbol_map = join_paths(meson.current_source_dir(), 'gfamfilemonitor.map')
|
||||
fam_ldflags = cc.get_supported_link_arguments([
|
||||
'-Wl,--version-script,' + symbol_map,
|
||||
'-Wl,-no-undefined',
|
||||
])
|
||||
|
||||
module = shared_module('giofam', 'gfamfilemonitor.c',
|
||||
include_directories : [gmoduleinc],
|
||||
dependencies : deps,
|
||||
c_args : fam_c_args,
|
||||
link_args : fam_ldflags,
|
||||
link_depends : symbol_map,
|
||||
install_dir : glib_giomodulesdir,
|
||||
install : true,
|
||||
)
|
||||
|
||||
if not meson.is_cross_build()
|
||||
meson.add_install_script('../gio-querymodules-wrapper.py', gio_querymodules.full_path(), glib_giomodulesdir)
|
||||
endif
|
||||
endif
|
9
gio/gio-querymodules-wrapper.py
Normal file
9
gio/gio-querymodules-wrapper.py
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if not os.environ.get('DESTDIR'):
|
||||
print('GIO module cache creation...')
|
||||
subprocess.call([sys.argv[1], sys.argv[2]])
|
@ -753,11 +753,6 @@ if host_system == 'windows'
|
||||
internal_deps += [ giowin32_lib ]
|
||||
endif
|
||||
|
||||
# FIXME: FAM support
|
||||
#if HAVE_FAM
|
||||
# subdir('fam')
|
||||
#endif
|
||||
|
||||
if have_bash
|
||||
install_data([
|
||||
'completion/gapplication',
|
||||
@ -894,7 +889,7 @@ executable('gresource', 'gresource-tool.c',
|
||||
link_args : noseh_link_args,
|
||||
dependencies : [libelf, libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
|
||||
|
||||
executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
|
||||
gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
|
||||
install : true,
|
||||
c_args : gio_c_args,
|
||||
# intl.lib is not compatible with SAFESEH
|
||||
@ -952,6 +947,8 @@ if enable_systemtap
|
||||
install : true)
|
||||
endif
|
||||
|
||||
subdir('fam')
|
||||
|
||||
if host_system != 'windows'
|
||||
subdir('tests')
|
||||
endif
|
||||
|
@ -73,3 +73,8 @@ option('force_posix_threads',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Also use posix threads in case the platform defaults to another implementation (on Windows for example)')
|
||||
|
||||
option('fam',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Use fam for file system monitoring')
|
||||
|
Loading…
Reference in New Issue
Block a user