[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP

From: Paul Eggert
Subject: [sr #110530] Missing #include <string.h> in AC_FUNC_MEMCMP
Date: Tue, 31 Aug 2021 19:07:19 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Update of sr #110530 (project autoconf):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 
        Operating System:                  Mac OS => None                   


Follow-up Comment #10:

> However, *none* of that should affect AC_FUNC_MEMCMP, because it *doesn't*
use either of those, and string.h is (or should be) automatically included via
AC_INCLUDES_DEFAULT.  Something else must be wrong.
Yes, the thing that's wrong is that the configure.ac in question is busted: it
has an AC_CHECK_HEADER nested inside a shell "if", and AC_CHECK_HEADERS's
prerequisites are thus being skipped which means HAVE_STRING_H isn't set.
Here's a simple fix:

diff --git a/configure.ac b/configure.ac
index 233b7b1..77c1ac0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,8 @@ if test "$disable_libusb_1_0" = "no"; then
-if test "$have_libusb_1_0" = "no"; then
+AS_IF([test "$have_libusb_1_0" = "no"],
   dnl Fallback to the old libusb
   dnl libusb >= 0.1.8 is required, as we need usb_interrupt_read()
   AS_ECHO("using libusb");
@@ -45,7 +46,7 @@ if test "$have_libusb_1_0" = "no"; then
                   AC_CHECK_LIB(usb, usb_interrupt_read,
                                [LIBS="$LIBS -lusb"
 dnl The following logic is useful for distributions.  If they force
 dnl USB support with --enable-libusb=yes then configure will fail

I'd report this to dfu-programmer except I don't see where the project says
how to report bugs and I've spent too much time on this already. There are
lots of other problems with that configure.ac: current Autoconf generates a
blizzard of warnings about it.

Perhaps somebody else has the time to figure out how to report the fix and
further problems to the dfu-programmer developers. In the meantime I'm closing
the Autoconf bug report, as this is not an Autoconf bug.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]