build: link nums only when BT is enabled (ref #27)
[mldonkey.git] / configure
blob228dc2c4afc32af74570b5f7bf8d68df4203ba27
1 #!/bin/sh
3 mkdir -p build
4 rm -f icons/big/*.ml_icon
5 rm -f icons/small/*.ml_icon
6 rm -f icons/*.ml_icon
7 rm -f *.cma *.cmxa *.a
8 rm -f mlgnut mlnap mlbt mldonkey mlslsk mldonkey_gui*
9 rm -f build/*.cma build/*.cmxa build/*.a
10 touch .depend
12 case "`uname -s`" in
13 *FreeBSD*)
14 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
15 export CPPFLAGS
16 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
17 export LDFLAGS
21 esac
23 if test ! -d config; then
24 echo "Missing ./config/ directory. Re-download mldonkey"
25 else
26 cd config \
27 && if test ! -f ./configure; then
28 if which autoconf261; then
29 ac="autoconf261"
30 else if which autoconf259; then
31 ac="autoconf259"
32 else if which autoconf-2.59; then
33 ac="autoconf-2.59"
34 else if which autoconf-2.5x; then
35 ac="autoconf-2.5x"
36 else
37 ac="autoconf"
38 fi; fi; fi; fi
39 echo "Running Autoconf ($ac)..."
40 $ac
41 fi \
42 && if test ! -f ../Makefile; then
43 echo "Running m4 to generate Makefile..."
44 m4 Makefile.in > ../Makefile
45 fi \
46 && ./configure --enable-option-checking=fatal "$@"