diff --git a/config2.h.in b/config2.h.in index bca65592..05e342ee 100644 --- a/config2.h.in +++ b/config2.h.in @@ -825,6 +825,9 @@ /* Define to 1 if you have the `mkstemps' function. */ #mesondefine HAVE_MKSTEMPS +/* Define to 1 if you have `typeof` */ +#mesondefine HAVE_TYPEOF + /* Define as const if the declaration of iconv() needs const. */ #mesondefine ICONV_CONST diff --git a/meson.build b/meson.build index 03d2e8ca..1886c0da 100644 --- a/meson.build +++ b/meson.build @@ -698,6 +698,10 @@ if compiler.has_function('mkstemps', prefix: '#include ', args: '-D_GN conf_data.set('HAVE_MKSTEMPS', 1) endif +if compiler.compiles('int a; typeof(a) b;') + conf_data.set('HAVE_TYPEOF', 1) +endif + conf_data.set('ICONV_CONST', true) sysconfdir = get_option('prefix') / get_option('sysconfdir')/'elinks'