[libgepub: 2/5] build: Remove unused defines



commit b20847ddba04132ac137f2ef7ac618951a1b96cf
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Mon Nov 13 07:35:54 2017 +0100

    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.

 meson.build |   53 +++++------------------------------------------------
 1 files changed, 5 insertions(+), 48 deletions(-)
---
diff --git a/meson.build b/meson.build
index 7f00901..516618d 100644
--- a/meson.build
+++ b/meson.build
@@ -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()
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]