forked from 4store/4store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·39 lines (32 loc) · 1.18 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
function pass {
echo "[OK ] $@"
}
function optfail {
echo "[OPT ] $@"
}
function fail {
echo "[FAIL] $@"
exit 1;
}
function libtest {
(gcc /tmp/configure-$$.o -l$1 $2 -o /tmp/configure-$$.exe 2>/dev/null) && pass "$1 installed" || fail "no $1 devel system"
}
cat > /tmp/configure-$$.c <<EOB
int main()
{
return 0;
}
EOB
gcc -c /tmp/configure-$$.c -o /tmp/configure-$$.o
test -e "`which pkg-config`" && pass "pkg-config installed" || fail "no pkg-config"
pkg-config --exists raptor && pass "raptor installed" || fail "no raptor library"
pkg-config --exists rasqal && pass "rasqal installed" || fail "no rasqal library"
pkg-config --exists glib-2.0 && pass "glib2 installed" || fail "no glib2 devel system"
pkg-config --exists libxml-2.0 && pass "libxml2 installed" || fail "no libxml2 devel system"
test -e "`which pcre-config`" && pass "pcre installed" || fail "no pcre devel system installed"
libtest "ncurses"
libtest "readline" "-lncurses"
libtest "z"
pkg-config --exists avahi-glib avahi-client && pass "avahi installed" || ( test -e /usr/include/dns_sd.h && pass "dns_sd installed" || optfail "no mDNS library, will build without cluster support" )
rm -f /tmp/configure-$$.*