meson: Fix glib, add gobject, gio, gthread, gmodule, etc

Several small fixes to the build files.

Lots of tests have also been added, and glib tests pass now.
This commit is contained in:
Tim-Philipp Müller 2016-03-07 11:13:24 +00:00 committed by Matthias Clasen
parent 98e641424b
commit 213957970e
20 changed files with 3443 additions and 342 deletions

786
config.h.meson Normal file
View File

@ -0,0 +1,786 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#mesondefine AC_APPLE_UNIVERSAL_BUILD
/* The normal alignment of `guint32', in bytes. */
#mesondefine ALIGNOF_GUINT32
/* The normal alignment of `guint64', in bytes. */
#mesondefine ALIGNOF_GUINT64
/* The normal alignment of `unsigned long', in bytes. */
#mesondefine ALIGNOF_UNSIGNED_LONG
/* poll doesn't work on devices */
#mesondefine BROKEN_POLL
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#mesondefine CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#mesondefine C_ALLOCA
/* Whether to disable memory pools */
#mesondefine DISABLE_MEM_POOLS
/* Whether to enable GC friendliness by default */
#mesondefine ENABLE_GC_FRIENDLY_DEFAULT
/* always defined to indicate that i18n is enabled */
#mesondefine ENABLE_NLS
/* Define the gettext package to be used */
#mesondefine GETTEXT_PACKAGE
/* Define to the GLIB binary age */
#mesondefine GLIB_BINARY_AGE
/* Define to the GLIB interface age */
#mesondefine GLIB_INTERFACE_AGE
/* Define the location where the catalogs will be installed */
#mesondefine GLIB_LOCALE_DIR
/* Define to the GLIB major version */
#mesondefine GLIB_MAJOR_VERSION
/* Define to the GLIB micro version */
#mesondefine GLIB_MICRO_VERSION
/* Define to the GLIB minor version */
#mesondefine GLIB_MINOR_VERSION
/* A 'va_copy' style function */
#mesondefine G_VA_COPY
/* 'va_lists' cannot be copies as values */
#mesondefine G_VA_COPY_AS_ARRAY
/* Define to 1 if you have `alloca', as a function or macro. */
#mesondefine HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#mesondefine HAVE_ALLOCA_H
/* Define to 1 if you have the <attr/xattr.h> header file. */
#mesondefine HAVE_ATTR_XATTR_H
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
/* Define if you have a version of the snprintf function with semantics as
specified by the ISO C99 standard. */
#mesondefine HAVE_C99_SNPRINTF
/* Define if you have a version of the vsnprintf function with semantics as
specified by the ISO C99 standard. */
#mesondefine HAVE_C99_VSNPRINTF
/* define to 1 if Carbon is available */
#mesondefine HAVE_CARBON
/* Define to 1 if you have the `clock_gettime' function. */
#mesondefine HAVE_CLOCK_GETTIME
/* define to 1 if Cocoa is available */
#mesondefine HAVE_COCOA
/* Have nl_langinfo (CODESET) */
#mesondefine HAVE_CODESET
/* Define to 1 if you have the <crt_externs.h> header file. */
#mesondefine HAVE_CRT_EXTERNS_H
/* Define if dbus-1 is available */
#mesondefine HAVE_DBUS1
/* Define to 1 if you have the `dcgettext' function. */
#mesondefine HAVE_DCGETTEXT
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#mesondefine HAVE_DLFCN_H
/* Define to 1 if using dtrace probes. */
#mesondefine HAVE_DTRACE
/* Define to 1 if you have the `endmntent' function. */
#mesondefine HAVE_ENDMNTENT
/* Define to 1 if you have the `endservent' function. */
#mesondefine HAVE_ENDSERVENT
/* we have the eventfd(2) system call */
#mesondefine HAVE_EVENTFD
/* Define to 1 if you have the `fallocate' function. */
#mesondefine HAVE_FALLOCATE
/* Define if we have FAM */
#mesondefine HAVE_FAM
/* Define to 1 if you have the <fam.h> header file. */
#mesondefine HAVE_FAM_H
/* Define if we have FAMNoExists in fam */
#mesondefine HAVE_FAM_NO_EXISTS
/* Define to 1 if you have the `fchmod' function. */
#mesondefine HAVE_FCHMOD
/* Define to 1 if you have the `fchown' function. */
#mesondefine HAVE_FCHOWN
/* Define to 1 if you have the `fdwalk' function. */
#mesondefine HAVE_FDWALK
/* Define to 1 if you have the <fstab.h> header file. */
#mesondefine HAVE_FSTAB_H
/* Define to 1 if you have the `fsync' function. */
#mesondefine HAVE_FSYNC
/* we have the futex(2) system call */
#mesondefine HAVE_FUTEX
/* Define to 1 if you have the `getc_unlocked' function. */
#mesondefine HAVE_GETC_UNLOCKED
/* Define to 1 if you have the `getfsstat' function. */
#mesondefine HAVE_GETFSSTAT
/* Define to 1 if you have the `getgrgid_r' function. */
#mesondefine HAVE_GETGRGID_R
/* Define to 1 if you have the `getmntent_r' function. */
#mesondefine HAVE_GETMNTENT_R
/* Define to 1 if you have the `getprotobyname_r' function. */
#mesondefine HAVE_GETPROTOBYNAME_R
/* Define to 1 if you have the `getpwuid_r' function. */
#mesondefine HAVE_GETPWUID_R
/* Define to 1 if you have the `getresuid' function. */
#mesondefine HAVE_GETRESUID
/* Define if the GNU gettext() function is already present or preinstalled. */
#mesondefine HAVE_GETTEXT
/* Define to 1 if you have the `getvfsstat' function. */
#mesondefine HAVE_GETVFSSTAT
/* Define to 1 if you have the `gmtime_r' function. */
#mesondefine HAVE_GMTIME_R
/* define to use system printf */
#mesondefine HAVE_GOOD_PRINTF
/* Define to 1 if you have the `hasmntopt' function. */
#mesondefine HAVE_HASMNTOPT
/* Define to 1 if you have the `if_indextoname' function. */
#mesondefine HAVE_IF_INDEXTONAME
/* Define to 1 if you have the `if_nametoindex' function. */
#mesondefine HAVE_IF_NAMETOINDEX
/* Define to 1 if you have the `inotify_init1' function. */
#mesondefine HAVE_INOTIFY_INIT1
/* define to support printing 64-bit integers with format I64 */
#mesondefine HAVE_INT64_AND_I64
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#mesondefine HAVE_INTMAX_T
/* Define to 1 if you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#mesondefine HAVE_INTTYPES_H_WITH_UINTMAX
/* Define if we have struct ip_mreqn */
#mesondefine HAVE_IP_MREQN
/* Define to 1 if you have the `issetugid' function. */
#mesondefine HAVE_ISSETUGID
/* Define to 1 if you have the `kevent' function. */
#mesondefine HAVE_KEVENT
/* Define to 1 if you have the `kqueue' function. */
#mesondefine HAVE_KQUEUE
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#mesondefine HAVE_LANGINFO_CODESET
/* Have nl_langinfo (_NL_CTYPE_OUTDIGITn_MB) */
#mesondefine HAVE_LANGINFO_OUTDIGIT
/* Have nl_langinfo (PM_STR) */
#mesondefine HAVE_LANGINFO_TIME
/* Define to 1 if you have the `lchmod' function. */
#mesondefine HAVE_LCHMOD
/* Define to 1 if you have the `lchown' function. */
#mesondefine HAVE_LCHOWN
/* Define if your <locale.h> file defines LC_MESSAGES. */
#mesondefine HAVE_LC_MESSAGES
/* Define if you have the __libc_enable_secure variable (GNU libc, eglibc) */
#mesondefine HAVE_LIBC_ENABLE_SECURE
/* Define if libelf is available */
#mesondefine HAVE_LIBELF
/* Define to 1 if you have the <linux/magic.h> header file. */
#mesondefine HAVE_LINUX_MAGIC_H
/* Define to 1 if you have the <locale.h> header file. */
#mesondefine HAVE_LOCALE_H
/* Define to 1 if you have the `localtime_r' function. */
#mesondefine HAVE_LOCALTIME_R
/* Define if you have the 'long double' type. */
#mesondefine HAVE_LONG_DOUBLE
/* Define if you have the 'long long' type. */
#mesondefine HAVE_LONG_LONG
/* define if system printf can print long long */
#mesondefine HAVE_LONG_LONG_FORMAT
/* Define to 1 if you have the `lstat' function. */
#mesondefine HAVE_LSTAT
/* Define to 1 if you have the <mach/mach_time.h> header file. */
#mesondefine HAVE_MACH_MACH_TIME_H
/* Define to 1 if you have the <malloc.h> header file. */
#mesondefine HAVE_MALLOC_H
/* Define to 1 if you have the `mbrtowc' function. */
#mesondefine HAVE_MBRTOWC
/* Define to 1 if you have the `memalign' function. */
#mesondefine HAVE_MEMALIGN
/* Define to 1 if you have the `memmem' function. */
#mesondefine HAVE_MEMMEM
/* Define to 1 if you have the <memory.h> header file. */
#mesondefine HAVE_MEMORY_H
/* Define to 1 if you have the `mmap' function. */
#mesondefine HAVE_MMAP
/* Define to 1 if you have the <mntent.h> header file. */
#mesondefine HAVE_MNTENT_H
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#mesondefine HAVE_NDIR_H
/* We have AF_NETLINK sockets */
#mesondefine HAVE_NETLINK
/* Define to 1 if you have the `newlocale' function. */
#mesondefine HAVE_NEWLOCALE
/* open option O_DIRECTORY */
#mesondefine HAVE_OPEN_O_DIRECTORY
/* Define to 1 if you have the `pipe2' function. */
#mesondefine HAVE_PIPE2
/* Define to 1 if you have the `poll' function. */
#mesondefine HAVE_POLL
/* Define to 1 if you have the `posix_memalign' function. */
#mesondefine HAVE_POSIX_MEMALIGN
/* Define to 1 if you have the `prlimit' function. */
#mesondefine HAVE_PRLIMIT
/* Have function pthread_attr_setstacksize */
#mesondefine HAVE_PTHREAD_ATTR_SETSTACKSIZE
/* Have function pthread_condattr_setclock */
#mesondefine HAVE_PTHREAD_CONDATTR_SETCLOCK
/* Define to 1 if the system has the type `ptrdiff_t'. */
#mesondefine HAVE_PTRDIFF_T
/* Define to 1 if you have the `readlink' function. */
#mesondefine HAVE_READLINK
/* Define to 1 if you have the `recvmmsg' function. */
#mesondefine HAVE_RECVMMSG
/* Define to 1 if you have the 'res_init' function. */
#mesondefine HAVE_RES_INIT
/* Define to 1 if you have the <sched.h> header file. */
#mesondefine HAVE_SCHED_H
/* Define to 1 if libselinux is available */
#mesondefine HAVE_SELINUX
/* Define to 1 if you have the <selinux/selinux.h> header file. */
#mesondefine HAVE_SELINUX_SELINUX_H
/* Define to 1 if you have the `sendmmsg' function. */
#mesondefine HAVE_SENDMMSG
/* Define to 1 if you have the `setenv' function. */
#mesondefine HAVE_SETENV
/* Define to 1 if you have the `setmntent' function. */
#mesondefine HAVE_SETMNTENT
/* Define if you have the 'sig_atomic_t' type. */
#mesondefine HAVE_SIG_ATOMIC_T
/* Define to 1 if you have the `snprintf' function. */
#mesondefine HAVE_SNPRINTF
/* Define to 1 if you have the `splice' function. */
#mesondefine HAVE_SPLICE
/* Define to 1 if you have the `statfs' function. */
#mesondefine HAVE_STATFS
/* Define to 1 if you have the `statvfs' function. */
#mesondefine HAVE_STATVFS
/* Define to 1 if you have the <stddef.h> header file. */
#mesondefine HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#mesondefine HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the <stdlib.h> header file. */
#mesondefine HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */
#mesondefine HAVE_STPCPY
/* Define to 1 if you have the `strcasecmp' function. */
#mesondefine HAVE_STRCASECMP
/* Define to 1 if you have the `strerror_r' function. */
#mesondefine HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
#mesondefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#mesondefine HAVE_STRING_H
/* Have functions strlcpy and strlcat */
#mesondefine HAVE_STRLCPY
/* Define to 1 if you have the `strncasecmp' function. */
#mesondefine HAVE_STRNCASECMP
/* Define to 1 if you have the `strnlen' function. */
#mesondefine HAVE_STRNLEN
/* Define to 1 if you have the `strsignal' function. */
#mesondefine HAVE_STRSIGNAL
/* Define to 1 if you have the `strtod_l' function. */
#mesondefine HAVE_STRTOD_L
/* Define to 1 if you have the `strtoll_l' function. */
#mesondefine HAVE_STRTOLL_L
/* Define to 1 if you have the `strtoull_l' function. */
#mesondefine HAVE_STRTOULL_L
/* Define to 1 if `d_type' is a member of `struct dirent'. */
#mesondefine HAVE_STRUCT_DIRENT_D_TYPE
/* Define to 1 if `f_bavail' is a member of `struct statfs'. */
#mesondefine HAVE_STRUCT_STATFS_F_BAVAIL
/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */
#mesondefine HAVE_STRUCT_STATFS_F_FSTYPENAME
/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */
#mesondefine HAVE_STRUCT_STATVFS_F_BASETYPE
/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */
#mesondefine HAVE_STRUCT_STATVFS_F_FSTYPENAME
/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_ATIMENSEC
/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
/* Define to 1 if `st_birthtim' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BIRTHTIM
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BIRTHTIME
/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BLKSIZE
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if `st_ctimensec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_CTIMENSEC
/* Define to 1 if `st_ctim.tv_nsec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC
/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_MTIMENSEC
/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
#mesondefine HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */
#mesondefine HAVE_STRUCT_TM_TM_GMTOFF
/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */
#mesondefine HAVE_STRUCT_TM___TM_GMTOFF
/* Define to 1 if you have the `symlink' function. */
#mesondefine HAVE_SYMLINK
/* Define to 1 if you have the `sysctlbyname' function. */
#mesondefine HAVE_SYSCTLBYNAME
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/event.h> header file. */
#mesondefine HAVE_SYS_EVENT_H
/* Define to 1 if you have the <sys/filio.h> header file. */
#mesondefine HAVE_SYS_FILIO_H
/* Define to 1 if you have the <sys/inotify.h> header file. */
#mesondefine HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/mkdev.h> header file. */
#mesondefine HAVE_SYS_MKDEV_H
/* Define to 1 if you have the <sys/mntctl.h> header file. */
#mesondefine HAVE_SYS_MNTCTL_H
/* Define to 1 if you have the <sys/mnttab.h> header file. */
#mesondefine HAVE_SYS_MNTTAB_H
/* Define to 1 if you have the <sys/mount.h> header file. */
#mesondefine HAVE_SYS_MOUNT_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#mesondefine HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/param.h> header file. */
#mesondefine HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/poll.h> header file. */
#mesondefine HAVE_SYS_POLL_H
/* Define to 1 if you have the <sys/prctl.h> header file. */
#mesondefine HAVE_SYS_PRCTL_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#mesondefine HAVE_SYS_RESOURCE_H
/* found fd_set in sys/select.h */
#mesondefine HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/statfs.h> header file. */
#mesondefine HAVE_SYS_STATFS_H
/* Define to 1 if you have the <sys/statvfs.h> header file. */
#mesondefine HAVE_SYS_STATVFS_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#mesondefine HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#mesondefine HAVE_SYS_SYSCTL_H
/* Define to 1 if you have the <sys/times.h> header file. */
#mesondefine HAVE_SYS_TIMES_H
/* Define to 1 if you have the <sys/time.h> header file. */
#mesondefine HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#mesondefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/uio.h> header file. */
#mesondefine HAVE_SYS_UIO_H
/* Define to 1 if you have the <sys/vfstab.h> header file. */
#mesondefine HAVE_SYS_VFSTAB_H
/* Define to 1 if you have the <sys/vfs.h> header file. */
#mesondefine HAVE_SYS_VFS_H
/* Define to 1 if you have the <sys/vmount.h> header file. */
#mesondefine HAVE_SYS_VMOUNT_H
/* Define to 1 if you have the <sys/wait.h> header file. */
#mesondefine HAVE_SYS_WAIT_H
/* Define to 1 if you have the <sys/xattr.h> header file. */
#mesondefine HAVE_SYS_XATTR_H
/* Define to 1 if you have the `timegm' function. */
#mesondefine HAVE_TIMEGM
/* Define to 1 if you have the <unistd.h> header file. */
#mesondefine HAVE_UNISTD_H
/* Define if your printf function family supports positional parameters as
specified by Unix98. */
#mesondefine HAVE_UNIX98_PRINTF
/* Define to 1 if you have the `unsetenv' function. */
#mesondefine HAVE_UNSETENV
/* Define to 1 if you have the `uselocale' function. */
#mesondefine HAVE_USELOCALE
/* Define to 1 if you have the `utimes' function. */
#mesondefine HAVE_UTIMES
/* Define to 1 if you have the `valloc' function. */
#mesondefine HAVE_VALLOC
/* Define to 1 if you have the <values.h> header file. */
#mesondefine HAVE_VALUES_H
/* Define to 1 if you have the `vasprintf' function. */
#mesondefine HAVE_VASPRINTF
/* Define to 1 if you have the `vsnprintf' function. */
#mesondefine HAVE_VSNPRINTF
/* Define if you have the 'wchar_t' type. */
#mesondefine HAVE_WCHAR_T
/* Define to 1 if you have the `wcslen' function. */
#mesondefine HAVE_WCSLEN
/* Define if you have the 'wint_t' type. */
#mesondefine HAVE_WINT_T
/* Have a working bcopy */
#mesondefine HAVE_WORKING_BCOPY
/* Define to 1 if xattr is available */
#mesondefine HAVE_XATTR
/* Define to 1 if xattr API uses XATTR_NOFOLLOW */
#mesondefine HAVE_XATTR_NOFOLLOW
/* Define to 1 if you have the <xlocale.h> header file. */
#mesondefine HAVE_XLOCALE_H
/* Define to 1 if you have the `_NSGetEnviron' function. */
#mesondefine HAVE__NSGETENVIRON
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ""
/* Do we cache iconv descriptors */
#mesondefine NEED_ICONV_CACHE
/* didn't find fd_set */
#mesondefine NO_FD_SET
/* Define to the address where bug reports for this package should be sent. */
#mesondefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#mesondefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#mesondefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#mesondefine PACKAGE_TARNAME
/* Define to the home page for this package. */
#mesondefine PACKAGE_URL
/* Define to the version of this package. */
#mesondefine PACKAGE_VERSION
/* define if posix_memalign() can allocate any size */
#mesondefine POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS
/* The size of `char', as computed by sizeof. */
#mesondefine SIZEOF_CHAR
/* The size of `int', as computed by sizeof. */
#mesondefine SIZEOF_INT
/* The size of `long', as computed by sizeof. */
#mesondefine SIZEOF_LONG
/* The size of `long long', as computed by sizeof. */
#mesondefine SIZEOF_LONG_LONG
/* The size of `short', as computed by sizeof. */
#mesondefine SIZEOF_SHORT
/* The size of `size_t', as computed by sizeof. */
#mesondefine SIZEOF_SIZE_T
/* The size of `ssize_t', as computed by sizeof. */
#mesondefine SIZEOF_SSIZE_T
/* The size of `void *', as computed by sizeof. */
#mesondefine SIZEOF_VOID_P
/* The size of `__int64', as computed by sizeof. */
#mesondefine SIZEOF___INT64
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#mesondefine STACK_DIRECTION
/* Number of arguments to statfs() */
#mesondefine STATFS_ARGS
/* Define to 1 if you have the ANSI C header files. */
#mesondefine STDC_HEADERS
/* Use no threads */
/* #undef THREADS_NONE */
/* Use pthreads */
#mesondefine THREADS_POSIX
/* Use w32 threads */
#mesondefine THREADS_WIN32
/* Using GNU libiconv */
#mesondefine USE_LIBICONV_GNU
/* Using a native implementation of iconv in a separate library */
#mesondefine USE_LIBICONV_NATIVE
/* Define to use statfs() */
#mesondefine USE_STATFS
/* Define to use statvfs() */
#mesondefine USE_STATVFS
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
#mesondefine _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
#mesondefine _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
#mesondefine _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
#mesondefine _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
#mesondefine __EXTENSIONS__
#endif
/* using the system-supplied PCRE library */
#mesondefine USE_SYSTEM_PCRE
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#mesondefine _FILE_OFFSET_BITS
/* defines how to decorate public symbols while building */
#mesondefine _GLIB_EXTERN
/* Define for large files, on AIX-style hosts. */
#mesondefine _LARGE_FILES
/* Target the Windows XP API */
#mesondefine _WIN32_WINNT
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
#mesondefine _XOPEN_SOURCE
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
#mesondefine _XOPEN_SOURCE_EXTENDED
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
#mesondefine __EXTENSIONS__
/* compiler supports atomic operations */
#mesondefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
/* Define to empty if `const' does not conform to ANSI C. */
#mesondefine const
/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
#mesondefine intmax_t
/* Define to empty if the C compiler doesn't support this keyword. */
#mesondefine signed
/* Define to `unsigned int' if <sys/types.h> does not define. */
#mesondefine size_t
#mesondefine EXEEXT

23
gio/build_mkenum.py Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env python3
# This is in its own file rather than inside meson.build
# because a) mixing the two is ugly and b) trying to
# make special characters such as \n go through all
# backends is a fool's errand.
import sys, os, shutil, subprocess
ofilename = sys.argv[1]
template_file_dir = sys.argv[2]
template_file_path = template_file_dir + '/' + ofilename + '.template'
headers = sys.argv[3:]
arg_array = ['--template', template_file_path ]
# FIXME: should use $top_builddir/gobject/glib-mkenums
cmd = [shutil.which('perl'), shutil.which('glib-mkenums')]
pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
(stdo, _) = pc.communicate()
if pc.returncode != 0:
sys.exit(pc.returncode)
open(ofilename, 'wb').write(stdo)

13
gio/inotify/meson.build Normal file
View File

@ -0,0 +1,13 @@
inotify_sources = [
'inotify-kernel.c',
'inotify-sub.c',
'inotify-path.c',
'inotify-missing.c',
'inotify-helper.c',
'ginotifyfilemonitor.c',
]
inotify_lib = static_library('inotify',
sources : inotify_sources,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H', '-fPIC', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)

15
gio/kqueue/meson.build Normal file
View File

@ -0,0 +1,15 @@
kqueue_sources = [
'gkqueuefilemonitor.c',
'kqueue-helper.c',
'kqueue-thread.c',
'kqueue-sub.c',
'kqueue-missing.c',
'kqueue-utils.c',
'kqueue-exclusions.c',
'dep-list.c',
]
kqueue_lib = static_library('kqueue',
sources : kqueue_sources,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H', '-fPIC', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)

802
gio/meson.build Normal file
View File

@ -0,0 +1,802 @@
gio_c_args = [
'-DG_LOG_DOMAIN="GLib-GIO"',
'-DGIO_COMPILATION',
'-DGIO_MODULE_DIR="@0@/gio/modules"'.format(get_option('libdir')),
]
# FIXME: subdir('gdbus-2.0/codegen')
gnetworking_h_conf = configuration_data()
gnetworking_h_wspiapi_include = ''
gnetworking_h_nameser_compat_include = ''
if host_machine.system() == 'windows'
# <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
# inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if
# they aren't present at run-time (on Windows 2000).
gnetworking_h_wspiapi_include = '#include <wspiapi.h>'
endif
if host_machine.system().contains('android')
# Android does not have C_IN in public headers, we define it wherever necessary
if not cc.compiles('''#include <sys/types.h>
#include <arpa/nameser.h>
int qclass = C_IN;''',
name : 'C_IN in public headers (no arpa/nameser_compat.h needed)')
if cc.compiles('''#include <sys/types.h>
#include <arpa/nameser.h>
#include <arpa/nameser_compat.h>
int qclass = C_IN;''',
name : 'arpa/nameser_compat.h needed for C_IN')
gnetworking_h_nameser_compat_include = '#include <arpa/nameser_compat.h>'
else
error('Could not find required includes for ARPA C_IN')
endif
endif
endif
network_libs = [ ]
network_args = [ ]
if host_machine.system() != 'windows'
# res_query()
res_query_test = '''#include <resolv.h>
int main (int argc, char ** argv) {
return res_query("test", 0, 0, (void *)0, 0);
}'''
res_query_test_full = '''#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
''' + res_query_test
if not cc.links(res_query_test_full, name : 'res_query()')
if cc.links(res_query_test_full, args : '-lresolv', name : 'res_query() in -lresolv')
network_libs += [ find_library('resolv') ]
network_args += [ '-lresolv' ]
elif cc.links(res_query_test, args : '-lbind', name : 'res_query() in -lbind')
network_libs += [ find_library('bind') ]
network_args += [ '-lbind' ]
else
error('Could not find res_query()')
endif
endif
# socket()
socket_test = '''#include <sys/types.h>
#include <sys/socket.h>
int main (int argc, char ** argv) {
return socket(1, 2, 3);
}'''
if not cc.links(socket_test, name : 'socket()')
if cc.links(socket_test, args : '-lsocket', name : 'socket() in -lsocket')
network_libs += [ find_library('socket') ]
network_args += [ '-lsocket' ]
else
error('Could not find socket()')
endif
endif
# res_init()
if cc.links('''#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int main (int argc, char ** argv) {
return res_init();
}''', args : network_args, name : 'res_init()')
glib_conf.set('HAVE_RES_INIT', 1)
endif
if cc.compiles('''#include <netinet/in.h>
struct ip_mreqn foo;''',
name : 'struct ip_mreqn')
glib_conf.set('HAVE_IP_MREQN', '/**/')
endif
endif
gnetworking_h_conf.set('WSPIAPI_INCLUDE', gnetworking_h_wspiapi_include)
gnetworking_h_conf.set('NAMESER_COMPAT_INCLUDE', gnetworking_h_nameser_compat_include)
gnetworking_h = configure_file(input : 'gnetworking.h.in',
output : 'gnetworking.h',
install_dir : 'include/glib-2.0/gio/',
configuration : gnetworking_h_conf)
gdbus_headers = [
'gdbusauthobserver.h',
'gcredentials.h',
'gdbusutils.h',
'gdbuserror.h',
'gdbusaddress.h',
'gdbusconnection.h',
'gdbusmessage.h',
'gdbusnameowning.h',
'gdbusnamewatching.h',
'gdbusproxy.h',
'gdbusintrospection.h',
'gdbusmethodinvocation.h',
'gdbusserver.h',
'gdbusinterface.h',
'gdbusinterfaceskeleton.h',
'gdbusobject.h',
'gdbusobjectskeleton.h',
'gdbusobjectproxy.h',
'gdbusobjectmanager.h',
'gdbusobjectmanagerclient.h',
'gdbusobjectmanagerserver.h',
'gtestdbus.h',
]
gdbus_sources = [
'gdbusutils.c',
'gdbusaddress.c',
'gdbusauthobserver.c',
'gdbusauth.c',
'gdbusauthmechanism.c',
'gdbusauthmechanismanon.c',
'gdbusauthmechanismexternal.c',
'gdbusauthmechanismsha1.c',
'gdbuserror.c',
'gdbusconnection.c',
'gdbusmessage.c',
'gdbusnameowning.c',
'gdbusnamewatching.c',
'gdbusproxy.c',
'gdbusprivate.c',
'gdbusintrospection.c',
'gdbusmethodinvocation.c',
'gdbusserver.c',
'gdbusinterface.c',
'gdbusinterfaceskeleton.c',
'gdbusobject.c',
'gdbusobjectskeleton.c',
'gdbusobjectproxy.c',
'gdbusobjectmanager.c',
'gdbusobjectmanagerclient.c',
'gdbusobjectmanagerserver.c',
'gtestdbus.c',
]
# FIXME: These are not built into the library yet
#EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
#gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in
# $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) ',
# UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) ',
# $(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in ',
# --interface-prefix org. ',
# --generate-c-code gdbus-daemon-generated ',
# --c-namespace _G ',
# $(srcdir)/dbus-daemon.xml
settings_headers = [
'gsettingsbackend.h',
'gsettingsschema.h',
'gsettings.h',
]
settings_sources = [
'gvdb/gvdb-reader.c',
'gdelayedsettingsbackend.c',
'gkeyfilesettingsbackend.c',
'gmemorysettingsbackend.c',
'gnullsettingsbackend.c',
'gsettingsbackend.c',
'gsettingsschema.c',
'gsettings-mapping.c',
'gsettings.c',
]
if host_machine.system() == 'windows'
settings_sources += [ 'gregistrysettingsbackend.c' ]
endif
# FIXME:
#if OS_COCOA
#settings_sources += [ 'gnextstepsettingsbackend.c' ]
#endif
application_headers = [
'gapplication.h',
'gapplicationcommandline.h',
'gactiongroup.h',
'gactionmap.h',
'gsimpleactiongroup.h',
'gremoteactiongroup.h',
'gactiongroupexporter.h',
'gdbusactiongroup.h',
'gaction.h',
'gpropertyaction.h',
'gsimpleaction.h',
'gmenumodel.h',
'gmenu.h',
'gmenuexporter.h',
'gdbusmenumodel.h',
'gnotification.h',
]
application_sources = [
'gapplication.c',
'gapplicationcommandline.c',
'gapplicationimpl-dbus.c',
'gactiongroup.c',
'gactionmap.c',
'gsimpleactiongroup.c',
'gremoteactiongroup.c',
'gactiongroupexporter.c',
'gdbusactiongroup.c',
'gaction.c',
'gpropertyaction.c',
'gsimpleaction.c',
'gmenumodel.c',
'gmenu.c',
'gmenuexporter.c',
'gdbusmenumodel.c',
'gnotification.c',
'gnotificationbackend.c',
]
local_sources = [
'ghttpproxy.c',
'ghttpproxy.h',
'glocalfile.c',
'glocalfile.h',
'glocalfileenumerator.c',
'glocalfileenumerator.h',
'glocalfileinfo.c',
'glocalfileinfo.h',
'glocalfileinputstream.c',
'glocalfileinputstream.h',
'glocalfilemonitor.c',
'glocalfilemonitor.h',
'glocalfileoutputstream.c',
'glocalfileoutputstream.h',
'glocalfileiostream.c',
'glocalfileiostream.h',
'glocalvfs.c',
'glocalvfs.h',
'gsocks4proxy.c',
'gsocks4proxy.h',
'gsocks4aproxy.c',
'gsocks4aproxy.h',
'gsocks5proxy.c',
'gsocks5proxy.h',
'thumbnail-verify.h',
'thumbnail-verify.c',
]
platform_deps = [ ]
internal_deps = [ ]
appinfo_sources = [ ]
# inotify
if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
subdir('inotify')
internal_deps += [ inotify_lib ]
endif
# kevent
if have_func_kqueue and have_func_kevent
subdir('kqueue')
internal_deps += [ kqueue_lib ]
endif
if host_machine.system() == 'windows'
subdir('win32')
internal_deps += [ giowin32_lib ]
endif
# FIXME: FAM support
#if HAVE_FAM
# subdir('fam')
#endif
unix_sources = [ ]
if host_machine.system() != 'windows'
appinfo_sources += [ 'gdesktopappinfo.c' ]
subdir('xdgmime')
internal_deps += [ xdgmime_lib ]
unix_sources = [
'gfiledescriptorbased.c',
'gunixconnection.c',
'gunixcredentialsmessage.c',
'gunixfdlist.c',
'gunixfdmessage.c',
'gunixmount.c',
'gunixmount.h',
'gunixmounts.c',
'gunixsocketaddress.c',
'gunixvolume.c',
'gunixvolume.h',
'gunixvolumemonitor.c',
'gunixvolumemonitor.h',
'gunixinputstream.c',
'gunixoutputstream.c',
'gcontenttype.c',
'gcontenttypeprivate.h',
'gfdonotificationbackend.c',
'ggtknotificationbackend.c',
]
# FIXME
#if OS_COCOA
#unix_sources += gcocoanotificationbackend.c
#endif
gio_unix_include_headers = [
'gdesktopappinfo.h',
'gfiledescriptorbased.h',
'gunixconnection.h',
'gunixcredentialsmessage.h',
'gunixmounts.h',
'gunixfdlist.h',
'gunixfdmessage.h',
'gunixinputstream.h',
'gunixoutputstream.h',
'gunixsocketaddress.h',
]
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
if glib_conf.has('HAVE_NETLINK')
unix_sources += [
'gnetworkmonitornetlink.c',
'gnetworkmonitornm.c',
]
endif
endif
gdbus_daemon_sources = [
'gdbusdaemon.c',
'gdbus-daemon-generated.c',
]
win32_actual_sources = gdbus_daemon_sources + [
'gwin32registrykey.c',
'gcontenttype-win32.c',
'gwin32mount.c',
'gwin32volumemonitor.c',
'gwin32inputstream.c',
'gwin32outputstream.c',
]
if host_machine.system() == 'windows'
appinfo_sources += [ 'gwin32appinfo.c' ]
platform_deps += [ find_library('shlwapi'),
find_library('ws2_32'),
find_library('dnsapi'),
find_library('iphlpapi') ]
# win32_sources = $(win32_actual_sources)
gio_win32_include_headers = [
'gwin32inputstream.h',
'gwin32outputstream.h',
]
install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
endif
gio_sources = [
'gappinfo.c',
'gasynchelper.c',
'gasyncinitable.c',
'gasyncresult.c',
'gbufferedinputstream.c',
'gbufferedoutputstream.c',
'gbytesicon.c',
'gcancellable.c',
'gcharsetconverter.c',
'gcontextspecificgroup.c',
'gconverter.c',
'gconverterinputstream.c',
'gconverteroutputstream.c',
'gcredentials.c',
'gdatagrambased.c',
'gdatainputstream.c',
'gdataoutputstream.c',
'gdrive.c',
'gdummyfile.c',
'gdummyproxyresolver.c',
'gdummytlsbackend.c',
'gemblem.c',
'gemblemedicon.c',
'gfile.c',
'gfileattribute.c',
'gfileenumerator.c',
'gfileicon.c',
'gfileinfo.c',
'gfileinputstream.c',
'gfilemonitor.c',
'gfilenamecompleter.c',
'gfileoutputstream.c',
'gfileiostream.c',
'gfilterinputstream.c',
'gfilteroutputstream.c',
'gicon.c',
'ginetaddress.c',
'ginetaddressmask.c',
'ginetsocketaddress.c',
'ginitable.c',
'ginputstream.c',
'gioerror.c',
'giomodule.c',
'gioscheduler.c',
'giostream.c',
'gloadableicon.c',
'gmount.c',
'gmemoryinputstream.c',
'gmemoryoutputstream.c',
'gmountoperation.c',
'gnativevolumemonitor.c',
'gnativesocketaddress.c',
'gnetworkaddress.c',
'gnetworking.c',
'gnetworkmonitor.c',
'gnetworkmonitorbase.c',
'gnetworkservice.c',
'goutputstream.c',
'gpermission.c',
'gpollableinputstream.c',
'gpollableoutputstream.c',
'gpollableutils.c',
'gpollfilemonitor.c',
'gproxy.c',
'gproxyaddress.c',
'gproxyaddressenumerator.c',
'gproxyresolver.c',
'gresolver.c',
'gresource.c',
'gresourcefile.c',
'gseekable.c',
'gsimpleasyncresult.c',
'gsimpleiostream.c',
'gsimplepermission.c',
'gsocket.c',
'gsocketaddress.c',
'gsocketaddressenumerator.c',
'gsocketclient.c',
'gsocketconnectable.c',
'gsocketconnection.c',
'gsocketcontrolmessage.c',
'gsocketinputstream.c',
'gsocketlistener.c',
'gsocketoutputstream.c',
'gsubprocesslauncher.c',
'gsubprocess.c',
'gsocketservice.c',
'gsrvtarget.c',
'gsimpleproxyresolver.c',
'gtask.c',
'gtcpconnection.c',
'gtcpwrapperconnection.c',
'gthreadedsocketservice.c',
'gthemedicon.c',
'gthreadedresolver.c',
'gthreadedresolver.h',
'gtlsbackend.c',
'gtlscertificate.c',
'gtlsclientconnection.c',
'gtlsconnection.c',
'gtlsdatabase.c',
'gtlsfiledatabase.c',
'gtlsinteraction.c',
'gtlspassword.c',
'gtlsserverconnection.c',
'gdtlsconnection.c',
'gdtlsclientconnection.c',
'gdtlsserverconnection.c',
'gunionvolumemonitor.c',
'gvfs.c',
'gvolume.c',
'gvolumemonitor.c',
'gzlibcompressor.c',
'gzlibdecompressor.c',
# FIXME 'gioenumtypes.c',
'glistmodel.c',
'gliststore.c',
]
# FIXME
gio_sources += appinfo_sources
gio_sources += unix_sources
#gio_sources += win32_sources
gio_sources += application_sources
gio_sources += settings_sources
gio_sources += gdbus_sources
gio_sources += local_sources
foo = '''
if OS_WIN32_AND_DLL_COMPILATION
gio_win32_res = gio-win32-res.o
gio_win32_res_ldflag = -Wl,$(gio_win32_res)
endif
if OS_COCOA
# This is dumb. The ObjC source file should be properly named .m
libgio_2_0_la_CFLAGS += -xobjective-c
libgio_2_0_la_LDFLAGS += -Wl,-framework,Foundation -Wl,-framework,AppKit
endif
libgio_2_0_la_DEPENDENCIES = $(gio_win32_res) $(gio_def) $(platform_deps)
gio-win32-res.o: gio.rc
'$(WINDRES) gio.rc $@
gioincludedir=$(includedir)/glib-2.0/gio/
gioinclude_HEADERS =',
'$(gio_headers)',
'gioenumtypes.h
# these sources (also mentioned above) are generated.
BUILT_SOURCES +=',
'gconstructor_as_data.h',
'gioenumtypes.h',
'gioenumtypes.c',
'gdbus-daemon-generated.c',
'gdbus-daemon-generated.h',
'gnetworking.h',
'$(NULL)
BUILT_EXTRA_DIST +=',
'gio.rc
# This is read by gobject-introspection/misc/ and gtk-doc
gio-public-headers.txt: Makefile
'$(AM_V_GEN) echo $(gioinclude_HEADERS) $(giowin32include_HEADERS) $(giounixinclude_HEADERS) > $@.tmp && mv $@.tmp $@
all-local: gio-public-headers.txt
gioenumtypes.h: $(gio_headers) gioenumtypes.h.template
'$(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) >',
' gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h
gioenumtypes.c: $(gio_headers) gioenumtypes.c.template
'$(AM_V_GEN) $(top_builddir)/gobject/glib-mkenums --template $(filter %.template,$^) $(filter-out %.template,$^) >',
' gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c
gio.def: libgio-2.0.la
'$(AM_V_GEN) dumpbin.exe -exports .libs/libgio-2.0-0.dll | awk 'BEGIN { print "EXPORTS" } / +[[:digit:]]+ +[[:xdigit:]]+ +[[:xdigit:]]+/{ print $$4 }' > gio.def.tmp && mv gio.def.tmp gio.def
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
glib_compile_resources_LDADD = libgio-2.0.la',
'$(top_builddir)/gobject/libgobject-2.0.la',
'$(top_builddir)/gmodule/libgmodule-2.0.la',
'$(top_builddir)/glib/libglib-2.0.la',
'$(NULL)
glib_compile_resources_SOURCES =',
'gvdb/gvdb-format.h',
'gvdb/gvdb-builder.h',
'gvdb/gvdb-builder.c',
'glib-compile-resources.c
gio_querymodules_SOURCES = gio-querymodules.c
gio_querymodules_LDADD = libgio-2.0.la',
'$(top_builddir)/gobject/libgobject-2.0.la',
'$(top_builddir)/gmodule/libgmodule-2.0.la',
'$(top_builddir)/glib/libglib-2.0.la',
'$(NULL)
gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
'$(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
glib_compile_schemas_SOURCES =',
'gconstructor_as_data.h',
'gvdb/gvdb-format.h',
'gvdb/gvdb-builder.h',
'gvdb/gvdb-builder.c',
'glib-compile-schemas.c
gsettings_LDADD = libgio-2.0.la',
'$(top_builddir)/gobject/libgobject-2.0.la',
'$(top_builddir)/gmodule/libgmodule-2.0.la',
'$(top_builddir)/glib/libglib-2.0.la',
'$(NULL)
gsettings_SOURCES = gsettings-tool.c
schemadir = $(datadir)/glib-2.0/schemas
dist_schema_DATA = gschema.dtd
itsdir = $(datadir)/gettext/its
dist_its_DATA = gschema.loc gschema.its
# ------------------------------------------------------------------------
# gdbus(1) tool
bin_PROGRAMS += gdbus
gdbus_SOURCES = gdbus-tool.c
gdbus_LDADD = libgio-2.0.la',
'$(top_builddir)/gobject/libgobject-2.0.la',
'$(top_builddir)/gmodule/libgmodule-2.0.la',
'$(top_builddir)/glib/libglib-2.0.la',
'$(NULL)
if OS_UNIX
# ------------------------------------------------------------------------
# gapplication(1) tool
bin_PROGRAMS += gapplication
gapplication_SOURCES = gapplication-tool.c
gapplication_LDADD = libgio-2.0.la',
'$(top_builddir)/gobject/libgobject-2.0.la',
'$(top_builddir)/gmodule/libgmodule-2.0.la',
'$(top_builddir)/glib/libglib-2.0.la',
'$(NULL)
endif
completiondir = $(datadir)/bash-completion/completions
completion_DATA =',
'completion/gapplication',
'completion/gdbus',
'completion/gsettings',
'completion/gresource
EXTRA_DIST += $(completion_DATA)
'''
gio_headers = [
'gappinfo.h',
'gasyncinitable.h',
'gasyncresult.h',
'gbufferedinputstream.h',
'gbufferedoutputstream.h',
'gbytesicon.h',
'gcancellable.h',
'gcontenttype.h',
'gcharsetconverter.h',
'gconverter.h',
'gconverterinputstream.h',
'gconverteroutputstream.h',
'gdatagrambased.h',
'gdatainputstream.h',
'gdataoutputstream.h',
'gdrive.h',
'gemblem.h',
'gemblemedicon.h',
'gfile.h',
'gfileattribute.h',
'gfileenumerator.h',
'gfileicon.h',
'gfileinfo.h',
'gfileinputstream.h',
'gfilemonitor.h',
'gfilenamecompleter.h',
'gfileoutputstream.h',
'gfileiostream.h',
'gfilterinputstream.h',
'gfilteroutputstream.h',
'gicon.h',
'ginetaddress.h',
'ginetaddressmask.h',
'ginetsocketaddress.h',
'ginputstream.h',
'ginitable.h',
'gio.h',
'gio-autocleanups.h',
'giotypes.h',
'gioenums.h',
'gioerror.h',
'giomodule.h',
'gioscheduler.h',
'giostream.h',
'gloadableicon.h',
'gmount.h',
'gmemoryinputstream.h',
'gmemoryoutputstream.h',
'gmountoperation.h',
'gnativevolumemonitor.h',
'gnetworkaddress.h',
'gnetworkmonitor.h',
'gnetworkservice.h',
'goutputstream.h',
'gpermission.h',
'gpollableinputstream.h',
'gpollableoutputstream.h',
'gpollableutils.h',
'gproxyaddress.h',
'gproxy.h',
'gproxyaddressenumerator.h',
'gproxyresolver.h',
'gresolver.h',
'gresource.h',
'gseekable.h',
'gsimpleasyncresult.h',
'gsimpleiostream.h',
'gsimplepermission.h',
'gsocket.h',
'gsocketaddress.h',
'gsocketaddressenumerator.h',
'gsocketclient.h',
'gsocketconnectable.h',
'gsocketconnection.h',
'gsocketcontrolmessage.h',
'gsocketlistener.h',
'gsocketservice.h',
'gsrvtarget.h',
'gsimpleproxyresolver.h',
'gtask.h',
'gsubprocess.h',
'gsubprocesslauncher.h',
'gtcpconnection.h',
'gtcpwrapperconnection.h',
'gthreadedsocketservice.h',
'gthemedicon.h',
'gtlsbackend.h',
'gtlscertificate.h',
'gtlsclientconnection.h',
'gtlsconnection.h',
'gtlsdatabase.h',
'gtlsfiledatabase.h',
'gtlsinteraction.h',
'gtlspassword.h',
'gtlsserverconnection.h',
'gdtlsconnection.h',
'gdtlsclientconnection.h',
'gdtlsserverconnection.h',
'gvfs.h',
'gvolume.h',
'gvolumemonitor.h',
'gzlibcompressor.h',
'gzlibdecompressor.h',
'glistmodel.h',
'gliststore.h',
]
# FIXME: 'gnetworking.h', - generated? was in nodist_gioinclude_HEADERS
gio_headers += application_headers
gio_headers += settings_headers
gio_headers += gdbus_headers
install_headers(gio_headers, subdir : 'glib-2.0/gio/')
gio_mkenums = find_program('build_mkenum.py')
gioenumtypes_h = custom_target('gioenumtypes_h',
output : 'gioenumtypes.h',
input : gio_headers,
install : true,
install_dir : 'include/glib-2.0/gio/',
depends : [ ],
command : [ gio_mkenums, '@OUTPUT@', meson.source_root(), '@INPUT@', gnetworking_h ])
gioenumtypes_c = custom_target('gioenumtypes_c',
output : 'gioenumtypes.c',
input : gio_headers,
depends : [ gioenumtypes_h ],
command : [ gio_mkenums, '@OUTPUT@', meson.source_root(), '@INPUT@', gnetworking_h, ])
libgio = shared_library('gio',
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
version : glib_version,
soversion : interface_version,
install : true,
include_directories : inc_dirs,
link_with : [ libglib, libgobject, libgmodule ] + internal_deps,
#libgio_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS)',
# '$(gio_win32_res_ldflag)',
# '-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)',
# '-export-dynamic $(no_undefined)
#$(ZLIB_LIBS)
#$(SELINUX_LIBS)
#$(GLIB_LIBS)
#$(XATTR_LIBS)
#$(NETWORK_LIBS)
dependencies : [ libz_dep, libdl_dep ] + platform_deps + network_libs,
c_args : gio_c_args
)
# gresource tool
libelf = dependency('libelf', version : '>= 0.8.12', required : false)
if libelf.found()
glib_conf.set('HAVE_LIBELF', 1)
endif
executable('gresource', 'gresource-tool.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1' ],
link_with : [ libgio, libgobject, libgmodule, libglib ],
dependencies : libelf,
)
subdir('tests')

219
gio/tests/meson.build Normal file
View File

@ -0,0 +1,219 @@
# Test programs buildable on all platforms
gio_tests = [
'appmonitor',
'async-close-output-stream',
'async-splice-output-stream',
'buffered-input-stream',
'buffered-output-stream',
'cancellable',
'contexts',
'contenttype',
'converter-stream',
'credentials',
'data-input-stream',
'data-output-stream',
#'defaultvalue', # FIXME: needs giotypefuncs.c generated
'fileattributematcher',
'filter-streams',
'giomodule',
'gsubprocess',
'g-file',
'g-file-info',
'g-icon',
'gdbus-addresses',
'gdbus-message',
'inet-address',
'io-stream',
'memory-input-stream',
'memory-output-stream',
'monitor',
'network-address',
'network-monitor',
'permission',
'pollable',
'proxy-test',
'readwrite',
'simple-async-result',
'simple-proxy',
'sleepy-stream',
'socket',
'socket-listener',
'socket-service',
'srvtarget',
'task',
'vfs',
'volumemonitor',
'glistmodel',
'testfilemonitor',
]
gio_tests += [
'thumbnail-verification',
]
# Test programs buildable on UNIX only
if host_machine.system() != 'windows'
gio_tests += [
'file',
'gdbus-peer-object-manager',
'gdbus-unix-addresses',
'live-g-file',
'socket-address',
'stream-rw_all',
'unix-fd',
'unix-streams',
]
endif
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
gio_tests += [ 'autoptr' ]
endif
test_env = [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
]
test_c_args = [
'-DHAVE_CONFIG_H=1',
'-DG_LOG_DOMAIN="GLib-GIO"',
'-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
]
foreach test_name : gio_tests
src_file = '@0@.c'.format(test_name)
# conflicts with glib/tests/autoptr, can't have two targets with same name
if test_name == 'autoptr'
test_name = 'autoptr-gio'
endif
exe = executable(test_name, src_file,
include_directories : inc_dirs,
install : false,
c_args : test_c_args,
link_with : [ libgio, libgmodule, libglib ],
dependencies : deps,
)
if test_name == 'testfilemonitor'
test(test_name, exe, env : test_env, timeout : 45)
else
test(test_name, exe, env : test_env)
endif
endforeach
uninstalled_test_extra_programs = [
'gio-du',
'echo-server',
'filter-cat',
'gapplication-example-actions',
'gapplication-example-cmdline',
'gapplication-example-cmdline2',
'gapplication-example-cmdline3',
'gapplication-example-dbushooks',
'gapplication-example-open',
'gdbus-example-export',
'gdbus-example-own-name',
'gdbus-example-peer',
'gdbus-example-proxy-subclass',
'gdbus-example-server',
'gdbus-example-subtree',
'gdbus-example-watch-name',
'gdbus-example-watch-proxy',
'gsubprocess-testprog',
'httpd',
'proxy',
'resolver',
'send-data',
'socket-server',
]
foreach extra_program : uninstalled_test_extra_programs
exe = executable(extra_program, '@0@.c'.format(extra_program),
include_directories : inc_dirs,
install : false,
c_args : test_c_args,
link_with : [ libgio, libgmodule, libglib ],
dependencies : deps,
)
endforeach
test_extra_programs = [
'gdbus-connection-flush-helper',
'gdbus-testserver',
]
exe = executable('tls-certificate', 'tls-certificate.c', 'gtesttlsbackend.c',
include_directories : inc_dirs,
c_args : test_c_args,
link_with : [ libgio, libgmodule, libglib ],
dependencies : deps,
)
test('tls-certificate', exe, env : test_env)
exe = executable('socket-client', 'socket-client.c', 'gtlsconsoleinteraction.c',
include_directories : inc_dirs,
c_args : test_c_args,
link_with : [ libgio, libgmodule, libglib ],
dependencies : deps,
)
#exe = executable('gdbus-daemon', 'gdbus-daemon.c', '../gdbusdaemon.c',
# #meson.build_root() + '/gio/gdbus-daemon-generated.c', # FIXME
# include_directories : inc_dirs,
# c_args : test_c_args,
# link_with : [ libgio, libgmodule, libglib ],
# dependencies : deps,
#)
#test('gdbus-daemon', exe, env : test_env)
foo = '''
c_args_atomic = [ ]
if cc.get_id() == 'gcc'
c_args_atomic += [ '-Wstrict-aliasing=2' ]
endif
# FIXME: consolidate all of these into the array
exe = executable('overflow-fallback', 'overflow.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-D_GLIB_TEST_OVERFLOW_FALLBACK' ],
link_with : libglib,
dependencies : deps,
)
test('overflow-fallback', exe, env : test_env)
exe = executable('642026-ec', '642026.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_ERRORCHECK_MUTEXES' ],
link_with : libglib,
dependencies : deps,
)
test('642026-ec', exe, env : test_env)
exe = executable('1bit-emufutex', '1bit-mutex.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EMULATED_FUTEX' ],
link_with : libglib,
dependencies : deps,
)
test('1bit-emufutex', exe, env : test_env)
if glib_conf.has('HAVE_EVENTFD')
exe = executable('gwakeup-fallback', 'gwakeuptest.c', '../gwakeup.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EVENTFD_FALLBACK' ],
link_with : libglib,
dependencies : deps,
)
test('gwakeup-fallback', exe, env : test_env)
endif
# test-spawn-echo helper binary required by the spawn tests
executable('test-spawn-echo', 'test-spawn-echo.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"' ],
link_with : libglib,
dependencies : deps,
)
'''
subdir('modules')

View File

@ -0,0 +1,13 @@
libtestmodulea = shared_library('testmodulea', 'test-module-a.c',
install : false,
include_directories : inc_dirs,
link_with : [ libglib, libgobject, libgmodule, libgio ],
c_args : [ ]
)
libtestmoduleb = shared_library('testmoduleb', 'test-module-b.c',
install : false,
include_directories : inc_dirs,
link_with : [ libglib, libgobject, libgmodule, libgio ],
c_args : [ ]
)

13
gio/win32/meson.build Normal file
View File

@ -0,0 +1,13 @@
giowin32_sources = [
'gwin32fsmonitorutils.c',
'gwin32filemonitor.c',
'gwinhttpvfs.c',
'gwinhttpfile.c',
'gwinhttpfileinputstream.c',
'gwinhttpfileoutputstream.c',
]
giowin32_lib = static_library('giowin32',
sources : giowin32_sources,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H', '-fPIC', '-DG_DISABLE_DEPRECATED' ] + gio_c_args)

15
gio/xdgmime/meson.build Normal file
View File

@ -0,0 +1,15 @@
xdgmime_sources = [
'xdgmime.c',
'xdgmimealias.c',
'xdgmimecache.c',
'xdgmimeglob.c',
'xdgmimeicon.c',
'xdgmimeint.c',
'xdgmimemagic.c',
'xdgmimeparent.c',
]
xdgmime_lib = static_library('xdgmime',
sources : xdgmime_sources,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H', '-DXDG_PREFIX=_gio_xdg', '-fPIC' ])

View File

@ -8,12 +8,9 @@
#include <glib/gmacros.h>
@INC_LIMITS_H@
@INC_FLOAT_H@
@INC_VALUES_H@
#include <limits.h>
#include <float.h>
#mesondefine GLIB_HAVE_ALLOCA_H
#mesondefine GLIB_HAVE_SYS_POLL_H
/* Specifies that GLib's g_print*() functions wrap the
* system printf functions. This is useful to know, for example,
@ -23,21 +20,20 @@
G_BEGIN_DECLS
#define G_MINFLOAT @glib_mf@
#define G_MAXFLOAT @glib_Mf@
#define G_MINDOUBLE @glib_md@
#define G_MAXDOUBLE @glib_Md@
#define G_MINSHORT @glib_ms@
#define G_MAXSHORT @glib_Ms@
#define G_MAXUSHORT @glib_Mus@
#define G_MININT @glib_mi@
#define G_MAXINT @glib_Mi@
#define G_MAXUINT @glib_Mui@
#define G_MINLONG @glib_ml@
#define G_MAXLONG @glib_Ml@
#define G_MAXULONG @glib_Mul@
#define G_MINFLOAT FLT_MIN
#define G_MAXFLOAT FLT_MAX
#define G_MINDOUBLE DBL_MIN
#define G_MAXDOUBLE DBL_MAX
#define G_MINSHORT SHRT_MIN
#define G_MAXSHORT SHRT_MAX
#define G_MAXUSHORT USHRT_MAX
#define G_MININT INT_MIN
#define G_MAXINT INT_MAX
#define G_MAXUINT UINT_MAX
#define G_MINLONG LONG_MIN
#define G_MAXLONG LONG_MAX
#define G_MAXULONG ULONG_MAX
/* this should always be true in a modern C/C++ compiler */
typedef signed char gint8;
typedef unsigned char guint8;
@ -73,12 +69,14 @@ typedef unsigned @gint32@ guint32;
#define GLIB_SIZEOF_VOID_P @glib_void_p@
#define GLIB_SIZEOF_LONG @glib_long@
#define GLIB_SIZEOF_SIZE_T @glib_size_t@
#define GLIB_SIZEOF_SSIZE_T @glib_ssize_t@
typedef signed @glib_size_type_define@ gssize;
typedef unsigned @glib_size_type_define@ gsize;
#define G_GSIZE_MODIFIER @gsize_modifier@
#define G_GSSIZE_FORMAT @gssize_format@
#define G_GSSIZE_MODIFIER @gssize_modifier@
#define G_GSIZE_FORMAT @gsize_format@
#define G_GSSIZE_FORMAT @gssize_format@
#define G_MAXSIZE G_MAXU@glib_msize_type@
#define G_MINSSIZE G_MIN@glib_msize_type@
@ -92,6 +90,8 @@ typedef gint64 goffset;
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
#define G_POLLFD_FORMAT @g_pollfd_format@
#define GPOINTER_TO_INT(p) ((gint) @glib_gpi_cast@ (p))
#define GPOINTER_TO_UINT(p) ((guint) @glib_gpui_cast@ (p))
@ -105,33 +105,22 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
#define G_GINTPTR_FORMAT @gintptr_format@
#define G_GUINTPTR_FORMAT @guintptr_format@
@glib_atexit@
@glib_memmove@
@glib_defines@
#ifndef G_DISABLE_DEPRECATED
#define g_ATEXIT(proc) (atexit (proc))
#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
#endif
#define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
#define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
#define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@
@glib_os@
@glib_static_compilation@
@glib_vacopy@
#ifdef __cplusplus
#define G_HAVE_INLINE 1
#else /* !__cplusplus */
@glib_inline@
#endif /* !__cplusplus */
#ifdef __cplusplus
#define G_CAN_INLINE 1
#else /* !__cplusplus */
#mesondefine G_CAN_INLINE
#endif
#ifndef __cplusplus
#mesondefine G_HAVE_ISO_VARARGS
#endif
#ifdef __cplusplus
#mesondefine G_HAVE_ISO_VARARGS
#endif
@g_have_iso_c_varargs@
@g_have_iso_cxx_varargs@
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
* is passed ISO vararg support is turned off, and there is no work
@ -145,13 +134,7 @@ typedef unsigned @glib_intptr_type_define@ guintptr;
#mesondefine G_HAVE_GROWING_STACK
/* On some systems, like SunOS and NetBSD, EILSEQ is not defined.
* The correspondence between this and the corresponding definition
* in libiconv is essential.
*/
#mesondefine EILSEQ
#mesondefine G_HAVE_GNUC_VISIBILITY
#define G_HAVE_GNUC_VISIBILITY 1
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))

View File

@ -1,3 +1,3 @@
charset_lib = shared_library('charset', 'localcharset.c',
charset_lib = static_library('charset', 'localcharset.c',
include_directories : inc_dirs,
c_args : [ '-DLIBDIR="lib"' ])
c_args : [ '-DLIBDIR="lib"', '-fPIC' ])

View File

@ -2,7 +2,101 @@ configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h', configuration
subdir('libcharset')
if host.name() == 'windows'
glib_headers = [
'glib.h',
'glib-unix.h',
'glib-object.h',
]
install_headers(glib_headers, subdir : 'glib-2.0/')
glib_deprecated_headers = [
'deprecated/gallocator.h',
'deprecated/gcache.h',
'deprecated/gcompletion.h',
'deprecated/gmain.h',
'deprecated/grel.h',
'deprecated/gthread.h',
]
install_headers(glib_deprecated_headers, subdir : 'glib-2.0/deprecated/')
glib_sub_headers = [
'glib-autocleanups.h',
'galloca.h',
'garray.h',
'gasyncqueue.h',
'gatomic.h',
'gbacktrace.h',
'gbase64.h',
'gbitlock.h',
'gbookmarkfile.h',
'gbytes.h',
'gcharset.h',
'gchecksum.h',
'gconvert.h',
'gdataset.h',
'gdate.h',
'gdatetime.h',
'gdir.h',
'genviron.h',
'gerror.h',
'gfileutils.h',
'ggettext.h',
'ghash.h',
'ghmac.h',
'ghook.h',
'ghostutils.h',
'gi18n.h',
'gi18n-lib.h',
'giochannel.h',
'gkeyfile.h',
'glist.h',
'gmacros.h',
'gmain.h',
'gmappedfile.h',
'gmarkup.h',
'gmem.h',
'gmessages.h',
'gnode.h',
'goption.h',
'gpattern.h',
'gpoll.h',
'gprimes.h',
'gqsort.h',
'gquark.h',
'gqueue.h',
'grand.h',
'gregex.h',
'gscanner.h',
'gsequence.h',
'gshell.h',
'gslice.h',
'gslist.h',
'gspawn.h',
'gstdio.h',
'gstrfuncs.h',
'gtestutils.h',
'gstring.h',
'gstringchunk.h',
'gthread.h',
'gthreadpool.h',
'gtimer.h',
'gtimezone.h',
'gtrashstack.h',
'gtree.h',
'gtypes.h',
'gunicode.h',
'gurifuncs.h',
'gutils.h',
'gvarianttype.h',
'gvariant.h',
'gversion.h',
'gversionmacros.h',
'gwin32.h',
'gprintf.h',
]
install_headers(glib_sub_headers, subdir : 'glib-2.0/glib/')
if host_machine.system() == 'windows'
thread_src = ['gthread-win32.c']
plat_src = []
else
@ -70,11 +164,13 @@ glib_sources = [
'gstrfuncs.c',
'gstring.c',
'gstringchunk.c',
'gtester.c',
'gtestutils.c',
'gthread.c',
'gthreadpool.c',
'gtimer.c',
'gtimezone.c',
'gtranslit.c',
'gtrashstack.c',
'gtree.c',
'guniprop.c',
@ -96,11 +192,17 @@ glib_sources = [
extra_src = ['gspawn.c', 'giounix.c']
#'gspawn-win32.c', # FIXME
#'gspawn-win32-helper.c', # FIXME
libglib = shared_library('glib',
sources : [deprecated_sources, glib_sources, thread_src, plat_src, extra_src],
version : glib_version,
soversion : interface_version,
include_dirs : inc_dirs,
install : true,
include_directories : inc_dirs,
link_with : charset_lib,
deps : [pcre, thread_lib],
dependencies : [ pcre, thread_dep, libiconv, librt ],
c_args : ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION', '-DPCRE_STATIC'])
subdir('tests')

View File

@ -180,6 +180,7 @@ atomic_CFLAGS += -Wstrict-aliasing=2
endif
overflow_fallback_SOURCES = overflow.c
# FIXME: FLAGS?
overflow_fallback_FALGS = $(AM_CFLAGS) -D_GLIB_TEST_OVERFLOW_FALLBACK
test_programs += 642026-ec

165
glib/tests/meson.build Normal file
View File

@ -0,0 +1,165 @@
glib_tests = [
'array-test',
'asyncqueue',
'base64',
'bitlock',
'bookmarkfile',
'bytes',
'cache',
'checksum',
'collate',
'cond',
'convert',
'dataset',
'date',
'dir',
'environment',
'error',
'fileutils',
'gdatetime',
'gvariant',
'hash',
'hmac',
'hook',
'hostutils',
'keyfile',
'list',
'logging',
'mainloop',
'mappedfile',
'markup',
'markup-parse',
'markup-collect',
'markup-escape',
'markup-subparser',
'mem-overflow',
'mutex',
'node',
'once',
'option-context',
'option-argv0',
'overflow',
'pattern',
'private',
'protocol',
'queue',
'rand',
'rec-mutex',
'regex',
'rwlock',
'scannerapi',
'search-utils',
'sequence',
'shell',
'slice',
'slist',
'sort',
'spawn-multithreaded',
'spawn-singlethread',
'strfuncs',
'string',
'testing',
'test-printf',
'thread',
'timeout',
'timer',
'tree',
'utf8-performance',
'utf8-pointer',
'utf8-validate',
'utf8-misc',
'utils',
'unicode',
'uri',
'1bit-mutex',
'642026',
]
if host_machine.system() != 'windows'
glib_tests += [ 'unix', 'include' ]
endif
if cc.get_id() == 'gcc'
glib_tests += [ 'autoptr' ]
endif
test_env = [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
]
foreach test_name : glib_tests
deps = [ libm, thread_dep ]
if test_name == 'regex'
deps += [ pcre ]
endif
exe = executable(test_name, '@0@.c'.format(test_name),
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"' ],
link_with : libglib,
dependencies : deps,
install : false,
)
test(test_name, exe, env : test_env)
endforeach
c_args_atomic = [ ]
if cc.get_id() == 'gcc'
c_args_atomic += [ '-Wstrict-aliasing=2' ]
endif
exe = executable('atomic', 'atomic.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1' ] + c_args_atomic,
link_with : libglib,
dependencies : deps,
)
test('atomic', exe, env : test_env)
# FIXME: consolidate all of these into the array
exe = executable('overflow-fallback', 'overflow.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-D_GLIB_TEST_OVERFLOW_FALLBACK' ],
link_with : libglib,
dependencies : deps,
install : false,
)
test('overflow-fallback', exe, env : test_env)
exe = executable('642026-ec', '642026.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_ERRORCHECK_MUTEXES' ],
link_with : libglib,
dependencies : deps,
install : false,
)
test('642026-ec', exe, env : test_env)
exe = executable('1bit-emufutex', '1bit-mutex.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EMULATED_FUTEX' ],
link_with : libglib,
dependencies : deps,
install : false,
)
test('1bit-emufutex', exe, env : test_env)
if glib_conf.has('HAVE_EVENTFD')
exe = executable('gwakeup-fallback', 'gwakeuptest.c', '../gwakeup.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EVENTFD_FALLBACK' ],
link_with : libglib,
dependencies : deps,
install : false,
)
test('gwakeup-fallback', exe, env : test_env)
endif
# test-spawn-echo helper binary required by the spawn tests
executable('test-spawn-echo', 'test-spawn-echo.c',
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"' ],
link_with : libglib,
dependencies : deps,
install : false,
)

90
gmodule/meson.build Normal file
View File

@ -0,0 +1,90 @@
gmoduleconf_conf = configuration_data()
g_module_need_uscore = 0
g_module_broken_rtld_global = 0
g_module_have_dlerror = 0
libdl_dep = [ ]
g_module_lib_args = [ ]
g_module_impl = ''
dlopen_dlsym_test_code = '''
#include <dlfcn.h>
int glib_underscore_test (void) { return 42; }
int main (int argc, char ** argv) {
void *f1 = (void*)0, *f2 = (void*)0, *handle;
handle = dlopen ((void*)0, 0);
if (handle) {
f1 = dlsym (handle, "glib_underscore_test");
f2 = dlsym (handle, "_glib_underscore_test");
}
return (!f2 || f1);
}'''
# On Windows force native WIN32 shared lib loader
if host_machine.system() == 'windows'
g_module_impl = 'G_MODULE_IMPL_WIN32'
# Force native AIX library loader
# dlopen() filepath must be of the form /path/libname.a(libname.so)
elif host_machine.system() == 'aix'
g_module_impl = 'G_MODULE_IMPL_AR'
elif cc.links(dlopen_dlsym_test_code, name : 'dlopen() and dlsym() in system libraries')
g_module_impl = 'G_MODULE_IMPL_DL'
# NSLinkModule (dyld) in system libraries (Darwin)
elif cc.has_function('NSLinkModule', prefix : '#include <mach-o/dyld.h>', name : 'NSLinkModule')
g_module_impl = 'G_MODULE_IMPL_DYLD'
g_module_need_uscore = 1
elif cc.links(dlopen_dlsym_test_code, args : '-ldl', name : 'dlopen() and dlsym() in libdl')
g_module_impl = 'G_MODULE_IMPL_DL'
libdl_dep = find_library('dl')
g_module_lib_args = '-ldl'
endif
# additional checks for G_MODULE_IMPL_DL
if g_module_impl == 'G_MODULE_IMPL_DL'
# FIXME: check for OSF1/5.0 RTLD_GLOBAL brokenness (is this still relevant?)
# Check whether we need preceding underscores
if not meson.is_cross_build()
# FIXME: communicate result via stdout instead of return value, so non-0 return is not printed in bold red
rres = cc.run(dlopen_dlsym_test_code,
args : g_module_lib_args,
name : 'dlsym() preceding underscores')
if rres.compiled() and rres.returncode() == 0
g_module_need_uscore = 1
endif
endif
if cc.has_function('dlerror', prefix : '#include <dlfcn.h>', args : g_module_lib_args, name : 'dlerror')
g_module_have_dlerror = 1
endif
endif
# Done, have we got an implementation?
if g_module_impl == ''
g_module_impl = '0'
message('WARNING: No suitable GModule implementation found!')
endif
gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl)
gmoduleconf_conf.set('G_MODULE_SUPPORTED', g_module_impl != '0')
gmoduleconf_conf.set('G_MODULE_HAVE_DLERROR', g_module_have_dlerror)
gmoduleconf_conf.set('G_MODULE_NEED_USCORE', g_module_need_uscore)
gmoduleconf_conf.set('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global)
gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in',
output : 'gmoduleconf.h',
configuration : gmoduleconf_conf)
install_headers([ 'gmodule.h' ], subdir : 'glib-2.0/')
libgmodule = shared_library('gmodule',
sources : [ 'gmodule.c' ],
version : glib_version,
soversion : interface_version,
install : true,
include_directories : inc_dirs,
link_with : libglib,
dependencies : libdl_dep,
c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED' ],
)

65
gobject/meson.build Normal file
View File

@ -0,0 +1,65 @@
#FIXME
#if host_machine.system() == 'windows'
# plat_src = []
#else
# plat_src = []
#endif
gobject_install_headers = [
'gobject-autocleanups.h',
'glib-types.h',
'gbinding.h',
'gboxed.h',
'gclosure.h',
'genums.h',
'gmarshal.h',
'gobject.h',
'gparam.h',
'gparamspecs.h',
'gsignal.h',
'gsourceclosure.h',
'gtype.h',
'gtypemodule.h',
'gtypeplugin.h',
'gvalue.h',
'gvaluearray.h',
'gvaluecollector.h',
'gvaluetypes.h',
'gobjectnotifyqueue.c', # sic
]
install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject/')
gobject_c_sources = [
# 'gobject_probes.d',
'gatomicarray.c',
'gbinding.c',
'gboxed.c',
'gclosure.c',
'genums.c',
'gmarshal.c',
'gobject.c',
'gobject_trace.h',
'gparam.c',
'gparamspecs.c',
'gsignal.c',
'gsourceclosure.c',
'gtype.c',
'gtypemodule.c',
'gtypeplugin.c',
'gvalue.c',
'gvaluearray.c',
'gvaluetransform.c',
'gvaluetypes.c',
]
libgobject = shared_library('gobject',
sources : [ gobject_c_sources ],
version : glib_version,
soversion : interface_version,
install : true,
include_directories : inc_dirs,
link_with : libglib,
dependencies : libffi_dep,
c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION' ])
subdir('tests')

View File

@ -0,0 +1,17 @@
#!/usr/bin/env python3
# FIXME: where does the #include "marshalers.h" go?
import sys, subprocess
assert(len(sys.argv) == 3)
_, listname, outname = sys.argv
if outname.endswith('.h'):
arg = '--header'
else:
arg = '--body'
output = subprocess.check_output(['glib-genmarshal', '--prefix=test', '--valist-marshallers', arg, listname])
open(outname, 'wb').write(output)

69
gobject/tests/meson.build Normal file
View File

@ -0,0 +1,69 @@
gobject_tests = [
'qdata',
'boxed',
'enums',
'param',
'threadtests',
'dynamictests',
'binding',
'properties',
'reference',
'value',
'type',
'private',
'closure',
'object',
'signal-handler',
'ifaceproperties',
]
test_env = [
'G_TEST_SRCDIR=' + meson.current_source_dir(),
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
]
foreach test_name : gobject_tests
deps = [ libm, thread_dep ]
test_src = '@0@.c'.format(test_name)
# private is an existing or reserved target it seems
if test_name == 'private'
test_name = 'gobject-private'
endif
exe = executable(test_name, test_src,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib-GObject"' ],
link_with : [ libglib, libgobject ],
dependencies : deps,
)
test(test_name, exe, env : test_env)
endforeach
# The marshalers test requires running a binary, so we cannot build it when
# cross-compiling
if not meson.is_cross_build()
# FIXME: need to pass this as argument to the genmarshal script
# and somehow we need to specify it as build dep of the custom targets
# lib_genmarshal = meson.build_root() + '/gobject/glib-genmarshal'
genmarshal = find_program('gobject_test_marshal.py')
marshalers_h = custom_target('marshalers_h',
output : 'marshalers.h',
input : 'marshalers.list',
command : [ genmarshal, '@INPUT@', '@OUTPUT@' ],
)
marshalers_c = custom_target('marshalers_c',
output : 'marshalers.c',
input : 'marshalers.list',
command : [ genmarshal, '@INPUT@', '@OUTPUT@' ],
)
exe = executable('signals',
'signals.c', marshalers_h, marshalers_c,
include_directories : inc_dirs,
c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib-GObject"' ],
link_with : [ libglib, libgobject ],
dependencies : deps,
)
test('signals', exe, env : test_env)
endif

11
gthread/meson.build Normal file
View File

@ -0,0 +1,11 @@
# Just a skeleton lib for backwards compatibility since all the functionaliy
# has been moved into glib now
libgthread = shared_library('gthread',
sources : [ 'gthread-impl.c' ],
version : glib_version,
soversion : interface_version,
install : true,
include_directories : inc_dirs,
link_with : libglib,
c_args : ['-DG_LOG_DOMAIN="GThread"' ],
)

File diff suppressed because it is too large Load Diff