sync with SAMBA_2_2
[ira/wip.git] / packaging / Caldera / OpenServer / Compile
1 #!/bin/ksh
2 #
3 # invoke with -n as the first argument to get this script to tell
4 # you what it would do without doing anything
5 #
6
7 V=
8 [ "$1" = "-n" ] && V=echo
9
10 CC="gcc -I/usr/local/include -L/usr/local/lib"
11 CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
12 CXX="g++"
13 CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
14 RANLIB=true
15 MAKE=/usr/local/bin/make
16 if [ "$V" = "echo" ]
17 then
18     echo "exporting the following shell variables:"
19     echo "CC=$CC"
20     echo "CXX=$CXX"
21     echo "RANLIB=$RANLIB"
22     echo "MAKE=$MAKE"
23     echo "CFLAGS=$CFLAGS"
24     echo "CXXFLAGS=$CXXFLAGS"
25 else
26     export CC CXX RANLIB MAKE CFLAGS CXXFLAGS
27 fi
28
29 if [ "$V" = "echo" ]
30 then
31     echo "cd ../../../source"
32     echo "rm -f mout-1 mout-2 mout-3 mout-4"
33     echo "make all 2>&1 | tee mout-1"
34     echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2"
35     echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
36     echo "make masktest locktest locktest2 2>&1 | tee mout-3"
37 else
38     cd ../../../source
39     rm -f mout-1 mout-2 mout-3 mout-4
40     make all 2>&1 | tee mout-1
41     make smbfilter smbtorture debug2html 2>&1 | tee mout-2
42     make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
43     make masktest locktest locktest2 2>&1 | tee mout-3
44 fi
45 #
46 # Not building :
47 #     nsswitch - no <nss.h>
48 #     rpctorture - improper use of client_info struct, dunno