Hi, I'm working on a project that uses the Meson build system. I'd like to use the uname module on MinGW-w64, so I consulted a relevant discussion about Gnulib with CMake [1]:
>> But gnulib-tool by design creates a subdirectory, and you can yourself add >> a simple configure.ac to that subdirectory, as outlined in the documentation > When I needed it 10 years ago, I was able to get around this limitation by > using the --create-testdir option of gnulib-tool. It created a directory > with configure script that (after running make) produced a static library. > I am not sure if this approach had any side effects, like turning on debug > build, but I was at least not forced to create configure.ac etc. This got me on the right track. With gnulib-tool --without-tests --conditional-dependencies --create-testdir \ --dir foo uname I can run configure and Make to build gllib/libgnu.a I'm not sure how to use it though. I tried this: $ x86_64-w64-mingw32-gcc bar.c -Ifoo/gllib foo/gllib/libgnu.a In file included from uname.c:9: foo/foo/gllib/sys/utsname.h:33:16: fatal error: sys/utsname.h: No such file or directory 33 | # include_next <sys/utsname.h> Here's what the section of that header looks like to me: #if 1 /* Minix 3.1.8 has a bug: <stddef.h> must be included before <sys/utsname.h>. But avoid namespace pollution on glibc systems. */ # if defined __minix && !defined __GLIBC__ # include <stddef.h> # endif # include_next <sys/utsname.h> #endif Would someone know how I could incorporate Gnulib into a program in this way? I don't know how to interpret this output $ gnulib-tool --extract-recursive-link-directive uname $(GETHOSTNAME_LIB) Thanks, John Scott [1] https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00050.html
signature.asc
Description: This is a digitally signed message part.