11 if [ "x$compilers" = "x" ]; then
12 compilers="gcc cc icc"
15 for compiler in $compilers; do
17 echo "working with compiler $compiler"
18 # arrgh, "which" gives no err code on solaris
19 path=`which $compiler`
20 if [ -x "$path" ]; then
22 # We do not want to build with the same compiler twice
23 # cc is a symlink to gcc on some systems
24 cur_compiler_sum="`sum $path | sed 's/ .*//'`"
25 test x"$cur_compiler_sum" = x"" && {
26 cur_compiler_sum="$path"
28 test x"$last_compiler_sum" = x"$cur_compiler_sum" && {
31 last_compiler_sum="$cur_compiler_sum"
33 if $compiler -v 2>&1 | grep gcc.version > /dev/null; then
35 CFLAGS="$ENVCFLAGS -Wall -g"
38 CFLAGS="$ENVCFLAGS -g"
41 CFLAGS_THIS_COMPILER=`eval CFLAGS_$compiler 2>/dev/null`
43 CFLAGS="$CFLAGS_THIS_COMPILER $CFLAGS"
49 test_tree samba_4_0_test . $compiler
53 if [ $compiler = gcc -o $isgcc = 0 ]; then
55 test_tree lorikeet-heimdal . $compiler
57 # only attempt samba-gtk if we have perl and gtk+-2.0
58 if which perl > /dev/null && which pkg-config > /dev/null && pkg-config --exists gtk+-2.0; then
59 test_tree samba-gtk . $compiler
64 test_tree samba_3_current source3 $compiler
65 test_tree samba_3_next source3 $compiler
66 test_tree samba_3_master source3 $compiler
70 # by default build ppp only on SunOS or Linux systems
71 if [ "$system" = Linux -o "$system" = SunOS ]; then
72 test_tree ppp . $compiler
78 # only attempt pidl if we have perl
79 if which perl > /dev/null; then