diff --git a/gio/meson.build b/gio/meson.build index eae9bada8..325263626 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -693,13 +693,15 @@ endif # subdir('fam') #endif -install_data([ - 'completion/gapplication', - 'completion/gdbus', - 'completion/gsettings', - 'completion/gresource' -], -install_dir: join_paths(get_option('datadir'), 'bash-completion/completions')) +if have_bash + install_data([ + 'completion/gapplication', + 'completion/gdbus', + 'completion/gsettings', + 'completion/gresource' + ], + install_dir: join_paths(get_option('datadir'), 'bash-completion/completions')) +endif if enable_dtrace gio_dtrace_obj = dtrace_obj_gen.process('gio_probes.d') diff --git a/glib/meson.build b/glib/meson.build index a99201a90..1da0bcd3c 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -274,6 +274,7 @@ else endif install_data('gtester-report', install_dir : get_option('bindir')) + install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb')) gdb_conf = configuration_data() @@ -283,7 +284,7 @@ configure_file( output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version), configuration: gdb_conf, install: true, - install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + glib_libdir) + install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir')) ) if enable_systemtap diff --git a/gobject/meson.build b/gobject/meson.build index 0d39f2bbc..aecca57c7 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -102,7 +102,7 @@ configure_file( output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version), configuration: gdb_conf, install: true, - install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + glib_libdir) + install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir')) ) if enable_systemtap diff --git a/meson.build b/meson.build index 0c8507d24..0f3f79178 100644 --- a/meson.build +++ b/meson.build @@ -1499,6 +1499,11 @@ endif python = import('python3').find_python() +# Determine which user environment-dependent files that we want to install +have_bash = find_program('bash', required : false).found() # For completion scripts +have_m4 = find_program('m4', required : false).found() # For m4 macros +have_sh = find_program('sh', required : false).found() # For glib-gettextize + # FIXME: defines in config.h that are not actually used anywhere # (we add them for now to minimise the diff) glib_conf.set('HAVE_DLFCN_H', 1) @@ -1608,19 +1613,27 @@ endforeach # NOTE: We skip glib-zip.in because the filenames it assumes don't match ours -# Install glib-gettextize executable -configure_file(input : 'glib-gettextize.in', - install : true, - install_dir : 'bin', - output : 'glib-gettextize', - configuration : glib_conf) +# Install glib-gettextize executable, if a UNIX-style shell is found +if have_sh + configure_file(input : 'glib-gettextize.in', + install : true, + install_dir : 'bin', + output : 'glib-gettextize', + configuration : glib_conf) +endif -# Install m4 macros that other projects use -install_data('m4macros/glib-2.0.m4', 'm4macros/glib-gettext.m4', 'm4macros/gsettings.m4', - install_dir : join_paths(get_option('datadir'), 'aclocal')) -# Install Valgrind suppression file -install_data('glib.supp', - install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'valgrind')) +if have_m4 + # Install m4 macros that other projects use + install_data('m4macros/glib-2.0.m4', 'm4macros/glib-gettext.m4', 'm4macros/gsettings.m4', + install_dir : join_paths(get_option('datadir'), 'aclocal')) +endif + +if host_system != 'windows' + # Install Valgrind suppression file (except on Windows, + # as Valgrind is currently not supported on Windows) + install_data('glib.supp', + install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'valgrind')) +endif configure_file(input : 'config.h.meson', output : 'config.h',