Skip to content

Commit b1fc417

Browse files
embrayvstinner
authored andcommitted
bpo-21536: Fix configure.ac for LIBPYTHON on Android/Cygwin (GH-13552)
Add also missing AC_MSG_RESULT for AC_MSG_CHECKING(MACHDEP).
1 parent bc66fac commit b1fc417

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

configure

+5-3
Original file line numberDiff line numberDiff line change
@@ -3292,6 +3292,8 @@ then
32923292
'') MACHDEP="unknown";;
32933293
esac
32943294
fi
3295+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5
3296+
$as_echo "\"$MACHDEP\"" >&6; }
32953297

32963298

32973299
if test "$cross_compiling" = yes; then
@@ -15131,10 +15133,10 @@ $as_echo "$LDVERSION" >&6; }
1513115133

1513215134
# On Android and Cygwin the shared libraries must be linked with libpython.
1513315135

15134-
if test -z "$ANDROID_API_LEVEL" -o "$MACHDEP" != "cygwin"; then
15135-
LIBPYTHON=''
15136-
else
15136+
if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
1513715137
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
15138+
else
15139+
LIBPYTHON=''
1513815140
fi
1513915141

1514015142

configure.ac

+4-3
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ then
411411
'') MACHDEP="unknown";;
412412
esac
413413
fi
414+
AC_MSG_RESULT("$MACHDEP")
414415

415416
AC_SUBST(_PYTHON_HOST_PLATFORM)
416417
if test "$cross_compiling" = yes; then
@@ -4622,10 +4623,10 @@ AC_MSG_RESULT($LDVERSION)
46224623

46234624
# On Android and Cygwin the shared libraries must be linked with libpython.
46244625
AC_SUBST(LIBPYTHON)
4625-
if test -z "$ANDROID_API_LEVEL" -o "$MACHDEP" != "cygwin"; then
4626-
LIBPYTHON=''
4627-
else
4626+
if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then
46284627
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
4628+
else
4629+
LIBPYTHON=''
46294630
fi
46304631

46314632
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.

0 commit comments

Comments
 (0)