Subject: sed fails to compile on AIX and MSVC

From: Bruno Haible <[email-masked]>
Date: Fri, 10 May 2024 23:06:58 +0200

Hi,

On AIX 7.3.1, GNU sed fails to compile:

  CC       sed/sed-sed.o
../sed/sed.c:20:10: fatal error: getopt.h: No such file or directory
   20 | #include <getopt.h>
      |          ^~~~~~~~~~
compilation terminated.
make: 1254-004 The error code from the last command is 1.

Likewise on native Windows, with the MSVC compiler:

sed\sed.c(20): fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory
make[2]: *** [Makefile:6034: sed/sed-sed.obj] Error 2

This patch fixes it, by using the Gnulib module 'getopt-gnu', as documented in
https://www.gnu.org/software/gnulib/manual/html_node/getopt_002eh.html

>From 790290cac635e7d0839baba059fb39cc959cdffd Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email-masked]>
Date: Fri, 10 May 2024 22:47:39 +0200
Subject: [PATCH] build: Fix FTBFS on AIX and MSVC.

* bootstrap.conf (gnulib_modules): Add getopt-gnu.
---
 bootstrap.conf | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bootstrap.conf b/bootstrap.conf
index c03ed02..6242398 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -30,6 +30,7 @@ extensions
 fwriting
 getdelim
 gettext-h
+getopt-gnu
 git-version-gen
 gitlog-to-changelog
 idx
-- 
2.34.1