summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-05-07 12:27:46 +0800
committerTitanSnow <[email protected]>2017-05-07 12:27:46 +0800
commit2a644df51e930ada0dde27ae091ff48bb2049833 (patch)
treed76e4ceedfde3f5981f625ec72e34a34d6014f50
parentc6a0913d218f4a35d0727b5a767b275cde8b160a (diff)
check readline
-rwxr-xr-xscripts/get.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index 4894e8d89..7202cc6e3 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -35,13 +35,14 @@ my_exit(){
}
test_tools()
{
+ prog='#include<readline/readline.h>\nint main(){readline(0);return 0;}'
{
git --version &&
make --version &&
{
- cc --version ||
- gcc --version ||
- clang --version
+ echo -e "$prog" | cc -xc - -o /dev/null -lreadline ||
+ echo -e "$prog" | gcc -xc - -o /dev/null -lreadline ||
+ echo -e "$prog" | clang -xc - -o /dev/null -lreadline
}
} >/dev/null 2>&1
}