summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-01-04 19:53:23 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-01-04 19:53:23 -0800
commita0d571e13457fcad7d43b480e354df08d49a1c89 (patch)
tree0ef20620545e8d56e82047e727d9b6bd64198ded /configure
parentdf9904609a72052b1014f48e4de8fa1baa74fc94 (diff)
downloadtxr-a0d571e13457fcad7d43b480e354df08d49a1c89.tar.gz
txr-a0d571e13457fcad7d43b480e354df08d49a1c89.tar.bz2
txr-a0d571e13457fcad7d43b480e354df08d49a1c89.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 2 insertions, 3 deletions
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 <<!
$inline int func(void)