Re: Is it safe to use ax_gcc_builtin to detect __builtin_offsetof?
Peter Hull <[email protected]> Sun, 25 Feb 2024 10:32:18 +0000
| Newsgroups | gmane.comp.sysutils.autoconf.general |
|---|---|
| Message-ID | <CAK9Gx1f8pw=k8CZS4bg9a-xZTgCWh3i4Ux-UqEN184pyR=6kig@mail.gmail.com> |
On Sun, 25 Feb 2024 at 07:29, Jeffrey Walton <[email protected]> wrote: > > Cancel. We can't use AX_GCC_BUILTIN in production. Using > AX_GCC_BUILTIN produces broken configure's: That's weird it didn't work. I tried with this minimal file (autoconf 2.71) and it was fine: # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.71]) AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) AC_CONFIG_SRCDIR([me.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. AX_GCC_BUILTIN([__builtin_bswap16]) AX_GCC_BUILTIN([__builtin_offsetof]) # Checks for library functions. AC_OUTPUT I had to put the ax_gcc_builtin.m4 file in m4/ and run aclocal, did you also do this? Peter