From a0d571e13457fcad7d43b480e354df08d49a1c89 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 4 Jan 2021 19:53:23 -0800 Subject: configure: tweak test for inline. It seems that the Brew people are running into a problem. The configure test is detecting that "inline" can be used for declaring inline functions, but then some functions are not inlined, requiring an external definition. On GNU/Linuxes, we detect "static inline", so this doesn't reproduce. This is likely triggered by the recent change to compile as C99 (unless configuring in maintainer mode). * configure: Let's revise the set of possible definitions of INLINE that we try. Firstly, we only try "inline" if we are compiling as C++. If that fails, all the other forms of inline we try include "static". Let's not mess with anything involving "extern". Like a bare "inline", it might work in the test program but cause some sort of failure. --- configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 55fe41eb..9940aa4c 100755 --- a/configure +++ b/configure @@ -1528,9 +1528,8 @@ printf "Checking how to declare inline functions ... " if [ -z "$inline" ] ; then for inline in \ - "inline" "static inline" "extern inline" \ - "__inline__" "static __inline__" "extern __inline__" \ - "static" + "${cplusplus:+inline}" "static inline" \ + "static __inline__" "static" do cat > conftest1.c <