Commit b20847dd authored by Iñigo Martínez's avatar Iñigo Martínez

build: Remove unused defines

meson generates the config.h file with multiple defines to be used
as guards, in the same way as autotools does. However, some of them
are not used.

This patch removes those unused defines.
parent 58cfb1e8
......@@ -29,49 +29,6 @@ libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
cc = meson.get_compiler('c')
config_h = configuration_data()
# defines
set_defines = [
# package
['PACKAGE', meson.project_name()],
['PACKAGE_API_VERSION', gepub_api_version],
['PACKAGE_BUGREPORT', 'danigm@wadobo.com'],
['PACKAGE_NAME', meson.project_name()],
['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), gepub_version)],
['PACKAGE_TARNAME', meson.project_name()],
['PACKAGE_URL', ''],
['PACKAGE_VERSION', gepub_version],
['VERSION', gepub_version]
]
foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
# headers
check_headers = [
['HAVE_DLFCN_H', 'dlfcn.h'],
['HAVE_INTTYPES_H', 'inttypes.h'],
['HAVE_MEMORY_H', 'memory.h'],
['HAVE_STDINT_H', 'stdint.h'],
['HAVE_STDLIB_H', 'stdlib.h'],
['HAVE_STRINGS_H', 'strings.h'],
['HAVE_STRING_H', 'string.h'],
['HAVE_SYS_STAT_H', 'sys/stat.h'],
['HAVE_SYS_TYPES_H', 'sys/types.h'],
['HAVE_UNISTD_H', 'unistd.h']
]
foreach header: check_headers
config_h.set(header[0], cc.has_header(header[1]))
endforeach
# compiler flags
common_flags = ['-DHAVE_CONFIG_H']
add_project_arguments(common_flags, language: 'c')
gepub_deps = [
dependency('webkit2gtk-4.0'),
dependency('libsoup-2.4'),
......@@ -82,11 +39,6 @@ gepub_deps = [
dependency('libarchive')
]
configure_file(
output: 'config.h',
configuration: config_h
)
gnome = import('gnome')
pkg = import('pkgconfig')
......@@ -94,3 +46,8 @@ top_inc = include_directories('.')
subdir('libgepub')
subdir('tests')
configure_file(
output: 'config.h',
configuration: configuration_data()
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment