mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
Merge branch 'wip/lantw/freebsd-meson-builds' into 'master'
Fix meson build files for FreeBSD See merge request GNOME/glib!73
This commit is contained in:
commit
262b153c41
@ -665,6 +665,8 @@ AC_CHECK_HEADERS([sys/mount.h sys/sysctl.h], [], [],
|
|||||||
AC_CHECK_FUNCS(sysctlbyname)
|
AC_CHECK_FUNCS(sysctlbyname)
|
||||||
|
|
||||||
AC_HEADER_MAJOR
|
AC_HEADER_MAJOR
|
||||||
|
AS_IF([test "$ac_cv_header_sys_types_h_makedev" = "yes"],
|
||||||
|
[AC_DEFINE([MAJOR_IN_TYPES], [1], [Define to 1 if `major', `minor', and `makedev' are declared in <sys/types.h>.])])
|
||||||
AC_CHECK_HEADERS([xlocale.h])
|
AC_CHECK_HEADERS([xlocale.h])
|
||||||
|
|
||||||
# check for structure fields
|
# check for structure fields
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
#include <sys/mkdev.h>
|
#include <sys/mkdev.h>
|
||||||
#elif MAJOR_IN_SYSMACROS
|
#elif MAJOR_IN_SYSMACROS
|
||||||
#include <sys/sysmacros.h>
|
#include <sys/sysmacros.h>
|
||||||
|
#elif MAJOR_IN_TYPES
|
||||||
|
#include <sys/types.h>
|
||||||
#else
|
#else
|
||||||
#define MAJOR_MINOR_NOT_FOUND 1
|
#define MAJOR_MINOR_NOT_FOUND 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -108,7 +108,7 @@ _fallback_callback (GFileMonitor *unused,
|
|||||||
* Returns: TRUE if the file should be excluded from the kqueue-powered
|
* Returns: TRUE if the file should be excluded from the kqueue-powered
|
||||||
* monitoring, FALSE otherwise.
|
* monitoring, FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
gboolean
|
static gboolean
|
||||||
_ke_is_excluded (const char *full_path)
|
_ke_is_excluded (const char *full_path)
|
||||||
{
|
{
|
||||||
GFile *f = NULL;
|
GFile *f = NULL;
|
||||||
|
@ -844,9 +844,26 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Dependencies used by executables below
|
# Dependencies used by executables below
|
||||||
|
have_libelf = false
|
||||||
libelf = dependency('libelf', version : '>= 0.8.12', required : false)
|
libelf = dependency('libelf', version : '>= 0.8.12', required : false)
|
||||||
if libelf.found()
|
if libelf.found()
|
||||||
|
have_libelf = true
|
||||||
|
else
|
||||||
|
# This fallback is necessary on *BSD. elfutils isn't the only libelf
|
||||||
|
# implementation, and *BSD usually includes their own libelf as a system
|
||||||
|
# library which doesn't have a corresponding .pc file.
|
||||||
|
libelf = cc.find_library('elf', required : false)
|
||||||
|
have_libelf = libelf.found()
|
||||||
|
have_libelf = have_libelf and cc.has_function('elf_begin', dependencies : libelf)
|
||||||
|
have_libelf = have_libelf and cc.has_function('elf_getshdrstrndx', dependencies : libelf)
|
||||||
|
have_libelf = have_libelf and cc.has_function('elf_getshdrnum', dependencies : libelf)
|
||||||
|
have_libelf = have_libelf and cc.has_header('libelf.h')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if have_libelf
|
||||||
glib_conf.set('HAVE_LIBELF', 1)
|
glib_conf.set('HAVE_LIBELF', 1)
|
||||||
|
else
|
||||||
|
libelf = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gconstructor_as_data_h = custom_target('gconstructor_as_data.h',
|
gconstructor_as_data_h = custom_target('gconstructor_as_data.h',
|
||||||
|
@ -376,7 +376,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
|
|||||||
resource_plugin_platform_link_args = []
|
resource_plugin_platform_link_args = []
|
||||||
endif
|
endif
|
||||||
shared_module ('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
shared_module ('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
||||||
link_args : ['-export-dynamic'] + resource_plugin_platform_link_args,
|
link_args : export_dynamic_ldflags + resource_plugin_platform_link_args,
|
||||||
dependencies : common_gio_tests_deps)
|
dependencies : common_gio_tests_deps)
|
||||||
|
|
||||||
test_gresource = custom_target('test.gresource',
|
test_gresource = custom_target('test.gresource',
|
||||||
|
10
meson.build
10
meson.build
@ -207,7 +207,6 @@ headers = [
|
|||||||
'linux/magic.h',
|
'linux/magic.h',
|
||||||
'locale.h',
|
'locale.h',
|
||||||
'mach/mach_time.h',
|
'mach/mach_time.h',
|
||||||
'malloc.h',
|
|
||||||
'memory.h',
|
'memory.h',
|
||||||
'mntent.h',
|
'mntent.h',
|
||||||
'poll.h',
|
'poll.h',
|
||||||
@ -254,6 +253,13 @@ foreach h : headers
|
|||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
# FIXME: Use cc.check_header from Meson 0.47.
|
||||||
|
# FreeBSD includes a malloc.h which always throw compilation error.
|
||||||
|
if cc.compiles('#include <malloc.h>', name : 'malloc.h')
|
||||||
|
glib_conf.set('HAVE_MALLOC_H', 1)
|
||||||
|
glib_conf_prefix = glib_conf_prefix + '#define HAVE_MALLOC_H 1\n'
|
||||||
|
endif
|
||||||
|
|
||||||
if cc.has_header('linux/netlink.h')
|
if cc.has_header('linux/netlink.h')
|
||||||
glib_conf.set('HAVE_NETLINK', 1)
|
glib_conf.set('HAVE_NETLINK', 1)
|
||||||
endif
|
endif
|
||||||
@ -524,6 +530,8 @@ if cc.has_header_symbol('sys/sysmacros.h', 'major')
|
|||||||
glib_conf.set('MAJOR_IN_SYSMACROS', 1)
|
glib_conf.set('MAJOR_IN_SYSMACROS', 1)
|
||||||
elif cc.has_header_symbol('sys/mkdev.h', 'major')
|
elif cc.has_header_symbol('sys/mkdev.h', 'major')
|
||||||
glib_conf.set('MAJOR_IN_MKDEV', 1)
|
glib_conf.set('MAJOR_IN_MKDEV', 1)
|
||||||
|
elif cc.has_header_symbol('sys/types.h', 'major')
|
||||||
|
glib_conf.set('MAJOR_IN_TYPES', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.has_header_symbol('dlfcn.h', 'RTLD_LAZY')
|
if cc.has_header_symbol('dlfcn.h', 'RTLD_LAZY')
|
||||||
|
Loading…
Reference in New Issue
Block a user