From: Bruno Haible Date: Thu, 26 Sep 2024 00:02:56 +0000 (+0200) Subject: relocatable-lib-lgpl: Add support for mingw builds on Cygwin hosts. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d34065436725869d4d3fd7f46c8f51e65c33ae3c;p=gnulib.git relocatable-lib-lgpl: Add support for mingw builds on Cygwin hosts. Reported by Michele Locati in . * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Use gl_BUILD_TO_HOST on the value of INSTALLPREFIX. * modules/relocatable-lib (Files): Add m4/build-to-host.m4. * modules/relocatable-lib-lgpl (Files): Likewise. * modules/relocatable-prog-wrapper (Files): Likewise. --- diff --git a/ChangeLog b/ChangeLog index eb64686dbb..c42d59d189 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2024-09-25 Bruno Haible + + relocatable-lib-lgpl: Add support for mingw builds on Cygwin hosts. + Reported by Michele Locati in + . + * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Use + gl_BUILD_TO_HOST on the value of INSTALLPREFIX. + * modules/relocatable-lib (Files): Add m4/build-to-host.m4. + * modules/relocatable-lib-lgpl (Files): Likewise. + * modules/relocatable-prog-wrapper (Files): Likewise. + 2024-09-25 Bruno Haible build-to-host.m4: Add some convenience macros. diff --git a/m4/relocatable-lib.m4 b/m4/relocatable-lib.m4 index eee1d1f799..7fcf29758f 100644 --- a/m4/relocatable-lib.m4 +++ b/m4/relocatable-lib.m4 @@ -1,5 +1,5 @@ # relocatable-lib.m4 -# serial 7 +# serial 8 dnl Copyright (C) 2003, 2005-2007, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,9 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY], else reloc_final_prefix="$prefix" fi - AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"], + dnl Define reloc_final_prefix_c and reloc_final_prefix_c_make. + gl_BUILD_TO_HOST([reloc_final_prefix]) + AC_DEFINE_UNQUOTED([INSTALLPREFIX], [${reloc_final_prefix_c}], [Define to the value of ${prefix}, as a string.]) if test $RELOCATABLE = yes; then AC_DEFINE([ENABLE_RELOCATABLE], [1], diff --git a/modules/relocatable-lib b/modules/relocatable-lib index 70f11f0f66..7cdca5ce0a 100644 --- a/modules/relocatable-lib +++ b/modules/relocatable-lib @@ -8,6 +8,7 @@ lib/relocatable.h lib/relocatable.c lib/relocatable.valgrind m4/relocatable-lib.m4 +m4/build-to-host.m4 Depends-on: xalloc diff --git a/modules/relocatable-lib-lgpl b/modules/relocatable-lib-lgpl index da6c649156..b8ecb51ef8 100644 --- a/modules/relocatable-lib-lgpl +++ b/modules/relocatable-lib-lgpl @@ -8,6 +8,7 @@ lib/relocatable.h lib/relocatable.c lib/relocatable.valgrind m4/relocatable-lib.m4 +m4/build-to-host.m4 Depends-on: strdup diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper index b2143809ca..4d8e70d3ac 100644 --- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -47,6 +47,7 @@ m4/rawmemchr.m4 m4/readlink.m4 m4/realloc.m4 m4/relocatable-lib.m4 +m4/build-to-host.m4 m4/setenv.m4 Depends-on: