mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-01 10:48:05 +00:00

- 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
76 lines
1.3 KiB
Bash
Executable File
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
|