mirror of
https://github.com/termux/termux-packages.git
synced 2024-11-23 16:06:16 +00:00
45 lines
616 B
Bash
45 lines
616 B
Bash
#!/bin/bash
|
|
|
|
cfgtest=
|
|
name=
|
|
shared=
|
|
o=
|
|
for f in "$@"; do
|
|
case "${f}" in
|
|
Qsci )
|
|
test "${o}" && name="${f}"
|
|
o=
|
|
;;
|
|
cfgtest_${name}.o )
|
|
test "${name}" && cfgtest=true
|
|
o=
|
|
;;
|
|
-shared )
|
|
shared=true
|
|
o=
|
|
;;
|
|
-o )
|
|
o=true
|
|
;;
|
|
* )
|
|
o=
|
|
;;
|
|
esac
|
|
done
|
|
|
|
cfgtest_Qsci="@CFGTEST_QSCI@"
|
|
|
|
if test "${cfgtest}"; then
|
|
cat <<-EOF > "${name}"
|
|
#!/bin/sh
|
|
test "\$#" -ge 1 || exit 1
|
|
echo $(eval echo \$$(echo cfgtest_${name})) | tr ' ' '\n' > \$1
|
|
EOF
|
|
chmod 0755 "${name}"
|
|
exit 0
|
|
fi
|
|
|
|
libs=
|
|
test "${shared}" && libs="-L@TERMUX_PREFIX@/lib -lpython@PYTHON_VERSION@"
|
|
exec @CXX@ "$@" ${libs}
|