kore/misc/python3-config.sh

21 lines
267 B
Bash
Raw Normal View History

2019-10-15 10:16:53 +02:00
#!/bin/sh
if [ $# -ne 1 ]; then
echo "python3-flags.sh [--ldflags|--includes]"
exit 1
fi
2022-12-28 11:08:55 +01:00
if [ ! -z "$PYTHON_CONFIG" ]; then
BIN=$PYTHON_CONFIG
else
BIN=python3-config
fi
$BIN $1 --embed > /dev/null 2>&1
2019-10-15 10:16:53 +02:00
if [ $? -eq 0 ]; then
2022-12-28 11:08:55 +01:00
$BIN $1 --embed
2019-10-15 10:16:53 +02:00
else
2022-12-28 11:08:55 +01:00
$BIN $1
2019-10-15 10:16:53 +02:00
fi