sync with SAMBA_2_2
[kai/samba.git] / packaging / Caldera / UnixWare / Configure
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="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
11 CPP="$CC -E"
12 CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3"
13 LDFLAGS="-L/usr/local/lib"
14 CXX="CC -I/usr/local/include"
15 CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
16 RANLIB=true
17 MAKE=/usr/local/bin/make
18 PREFIX=/usr/local/samba
19 if [ "$V" = "echo" ]
20 then
21     echo "exporting the following shell variables:"
22     echo "CC=$CC"
23     echo "CPP=$CPP"
24     echo "CXX=$CXX"
25     echo "RANLIB=$RANLIB"
26     echo "MAKE=$MAKE"
27     echo "CFLAGS=$CFLAGS"
28     echo "CXXFLAGS=$CXXFLAGS"
29     echo "LDFLAGS=$LDFLAGS"
30     echo "PREFIX=$PREFIX"
31 else
32     export CC CPP CXX RANLIB MAKE CFLAGS CXXFLAGS LDFLAGS PREFIX
33 fi
34
35 cd ../../../source
36 [ -f mout-config ] && {
37     if [ "$V" = "echo" ]
38     then
39         echo "mv mout-config mout-config$$"
40     else
41         mv mout-config mout-config$$
42     fi
43 }
44 if [ "$V" = "echo" ]
45 then
46     echo "./configure \
47         --prefix=${PREFIX} \
48         --with-profile \
49         --with-syslog \
50         --with-utmp \
51         --with-vfs \
52         --with-msdfs \
53         --with-netatalk \
54         --with-sambabook=${PREFIX}/swat/using_samba \
55         2>&1 | tee mout-config"
56 else
57     ./configure \
58         --prefix=${PREFIX} \
59         --with-profile \
60         --with-syslog \
61         --with-utmp \
62         --with-vfs \
63         --with-msdfs \
64         --with-netatalk \
65         --with-sambabook=${PREFIX}/swat/using_samba \
66         2>&1 | tee mout-config
67 fi