As of python 3.8, output of "python-config --ldflags" no longer includes
the "-lpython" flag without which the python module fails to link due to
undefined symbols. Use "python-config --ldflags --embed" to get it back
and fall back to "python-config --ldflags" for python 3.7 and older.
https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
fi; \
mkdir -p $$ver; \
PCFLAGS=`$$pyconfig --cflags`; \
- PLDFLAGS=`$$pyconfig --ldflags`; \
+ PLDFLAGS=`$$pyconfig --ldflags --embed || $$pyconfig --ldflags`; \
echo $(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PCFLAGS -c -o $$ver/snack.o snack.c; \
$(CC) $(SHCFLAGS) $(CFLAGS) $(CPPFLAGS) $$PCFLAGS -c -o $$ver/snack.o snack.c; \
echo $(CC) --shared $(LDFLAGS) $$PLDFLAGS -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L. -lnewt $(LIBS); \