From b5cdb0f777b8f961f1214dd6a95ce48540e19aa1 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Fri, 21 Jun 2024 11:51:44 -0700 Subject: [PATCH] Fix config.h contents --- config.h.meson | 98 ++------------------------------------------------ meson.build | 38 ++++++++++++-------- 2 files changed, 27 insertions(+), 109 deletions(-) diff --git a/config.h.meson b/config.h.meson index d8bf316..2f7f7ab 100644 --- a/config.h.meson +++ b/config.h.meson @@ -1,84 +1,13 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - /* Define to 1 if translation of program messages to the user's native language is requested. */ #mesondefine ENABLE_NLS -/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#mesondefine HAVE_CFLOCALECOPYCURRENT - -/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#mesondefine HAVE_CFPREFERENCESCOPYAPPVALUE - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -#mesondefine HAVE_DCGETTEXT - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_DLFCN_H - -/* Define to 1 if the system has the `constructor' function attribute */ -#mesondefine HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR - -/* Define to 1 if the system has the `destructor' function attribute */ -#mesondefine HAVE_FUNC_ATTRIBUTE_DESTRUCTOR - -/* Define to 1 if the system has the `format' function attribute */ -#mesondefine HAVE_FUNC_ATTRIBUTE_FORMAT - /* Define to 1 if the system has the `noreturn' function attribute */ #mesondefine HAVE_FUNC_ATTRIBUTE_NORETURN -/* Define if the GNU gettext() function is already present or preinstalled. */ -#mesondefine HAVE_GETTEXT - -/* Define if you have the iconv() function and it works. */ -#mesondefine HAVE_ICONV - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_INTTYPES_H - -/* Define if you have POSIX threads libraries and header files. */ -#mesondefine HAVE_PTHREAD - -/* Have PTHREAD_PRIO_INHERIT. */ -#mesondefine HAVE_PTHREAD_PRIO_INHERIT - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_STDIO_H - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_STRING_H - /* 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 header file. */ -#mesondefine HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_SYS_TYPES_H - -/* Define to 1 if typeof works with your compiler. */ -#mesondefine HAVE_TYPEOF - -/* Define to 1 if you have the header file. */ -#mesondefine HAVE_UNISTD_H - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#mesondefine LT_OBJDIR - /* Name of package */ #mesondefine PACKAGE @@ -88,33 +17,15 @@ /* 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 to the version of this package. */ +#mesondefine VERSION + /* Define to the directory where locale files are stored */ #mesondefine LOCALEDIR -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#mesondefine PTHREAD_CREATE_JOINABLE - -/* Define to 1 if all of the C90 standard headers exist (not just the ones - required in a freestanding environment). This macro is provided for - backward compatibility; new code need not use it. */ -#mesondefine STDC_HEADERS - -/* Version number of package */ -#mesondefine VERSION - /* Define to the location of the configuration directory */ #mesondefine SYSCONFDIR @@ -126,6 +37,3 @@ /* Define to the location of the run directory */ #define RUNDIR LOCALSTATEDIR "/run" - -/* Define to __typeof__ if your compiler spells it that way. */ -#mesondefine typeof diff --git a/meson.build b/meson.build index 1fa3db9..8661104 100644 --- a/meson.build +++ b/meson.build @@ -9,7 +9,6 @@ if get_option('nls').enabled() add_project_arguments( '-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), language:'C') - add_project_arguments('-DENABLE_NLS=1', language:'C') subdir('po') endif @@ -38,19 +37,6 @@ python = pymod.find_installation('python3') pyversion = python.language_version().split('.') assert(pyversion[1].to_int() >= 5, 'Require Python >= 3.5') -cdata = configuration_data() -cdata.set_quoted('PACKAGE', meson.project_name()) -cdata.set_quoted('LOCALEDIR', get_option('localedir')) -cdata.set_quoted('SYSCONFDIR', get_option('sysconfdir')) -cdata.set_quoted('LOCALSTATEDIR', get_option('localstatedir')) -cdata.set_quoted('VERSION', meson.project_version()) - -config_h = configure_file( - input: 'config.h.meson', - output: 'config.h', - configuration: cdata -) -# ####################################################################### # Version information ####################################################################### @@ -99,6 +85,30 @@ version_info_h = configure_file( configuration: version_data ) +####################################################################### +# config.h +####################################################################### +cdata = configuration_data() +cdata.set_quoted('PACKAGE', meson.project_name()) +cdata.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/nirenjan/libx52/issues') +cdata.set_quoted('PACKAGE_NAME', meson.project_name()) +cdata.set_quoted('LOCALEDIR', get_option('localedir')) +cdata.set_quoted('SYSCONFDIR', get_option('sysconfdir')) +cdata.set_quoted('LOCALSTATEDIR', get_option('localstatedir')) +cdata.set_quoted('PACKAGE_VERSION', meson.project_version()) +cdata.set_quoted('VERSION', meson.project_version()) +cdata.set10('ENABLE_NLS', get_option('nls').enabled()) +cdata.set10('HAVE_FUNC_ATTRIBUTE_NORETURN', compiler.has_function_attribute('noreturn', required: false)) +cdata.set10('HAVE_STRUCT_TM_TM_GMTOFF', + compiler.has_member('struct tm', 'tm_gmtoff', prefix:'#include ', required: false)) + + +config_h = configure_file( + input: 'config.h.meson', + output: 'config.h', + configuration: cdata +) +# ####################################################################### # Internal dependencies #######################################################################