radare2/r2-bindings/configure-langs
pancake 55f5dc283e * Initial support for php5 bindings
- Does not link on OSX. maybe in Linux it does..
  - Requires valabind-hg
* Add mp.py to get python module path (magic!)
  - Fixes install-python target in
  - Add purge-python makefile target
* Check for */*cxx to autodetect support
2011-10-26 01:52:05 +02:00

76 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
#
# Script to choose which langs you want to build
# author: pancake // nopcode
# update: 2011-05-20
#
LANGS=""
help () {
echo "Usage: ./configure-langs [options]"
echo " --enable=python,perl,php5"
echo " --disable=java,ruby"
echo " --list"
echo "Filter out supported.langs"
}
ENABLE=""
DISABLE=""
enable() {
if [ -n "${DISABLE}" ]; then
echo "Cannot use --enable and --disable"
exit 1
fi
ENABLE="${1/:/ }"
DISABLE=""
}
disable() {
if [ -n "${ENABLE}" ]; then
echo "Cannot use --enable and --disable"
exit 1
fi
ENABLE=""
DISABLE="${1/:/ }"
}
MODE=""
DONOTHING=0
while : ; do
[ -z "$1" ] && break
k=${1%=*} # key
v=${1#*=} # value
case "$k" in
"--enable") enable "$v" ; ;;
"--disable") disable "$v" ; ;;
"--list") cat supported.langs ; exit 0 ; ;;
"-h"|"--help") help ; exit 0 ; ;;
esac
shift
done
root=`dirname -- $0`
sh $root/check-langs.sh
if [ -n "${ENABLE}" ]; then
mv supported.langs .sl
cat .sl | grep -e `echo ${ENABLE} | sed -e 's/,/ -e/g'` > supported.langs
rm -f .sl
fi
if [ -n "${DISABLE}" ]; then
mv supported.langs .sl
cat .sl | grep -v -e `echo ${DISABLE} | sed -e 's/,/ -e/g'` > supported.langs
rm -f .sl
fi
echo "Supported langs:"
cat supported.langs | sed -e 's,^, - ,'
# check for python
# check for perl
:> langs.cfg
echo "Supported langs: $(cat supported.langs)"
exit 0