summaryrefslogtreecommitdiffstats
path: root/packaging/Caldera/OpenServer/Configure
blob: 0c63f7ff5b4dab8a6d0b3c860975394b98eb99ac (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/ksh
#
# invoke with -n as the first argument to get this script to tell
# you what it would do without doing anything
#

V=
[ "$1" = "-n" ] && V=echo

CC="gcc"
CFLAGS="-O3"
CXX="g++"
#CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
CXXFLAGS="-O3"
RANLIB=true
MAKE=/usr/gnu/bin/make
PREFIX=/usr/lib/samba
LIBDIR=/etc/samba.d
PRIVATEDIR=/etc/samba.d
LOCKDIR=/var/locks/samba.d
LOGDIR=/var/log/samba.d
if [ "$V" = "echo" ]
then
    echo "exporting the following shell variables:"
    echo "CC=$CC"
    echo "CXX=$CXX"
    echo "RANLIB=$RANLIB"
    echo "MAKE=$MAKE"
    echo "CFLAGS=$CFLAGS"
    echo "CXXFLAGS=$CXXFLAGS"
    echo "PREFIX=$PREFIX"
else
    export CC CXX RANLIB MAKE CFLAGS CXXFLAGS PREFIX
fi

cd ../../../source
[ -f mout-config ] && {
    if [ "$V" = "echo" ]
    then
        echo "mv mout-config mout-config$$"
    else
        mv mout-config mout-config$$
    fi
}
if [ "$V" = "echo" ]
then
    echo "./configure \
	--prefix=${PREFIX} \
	--libdir=${LIBDIR} \
	--with-privatedir=${PRIVATEDIR} \
        --with-lockdir=${LOCKDIR} \
        --with-logfilebase=${LOGDIR} \
	--with-profile \
	--with-syslog \
	--with-utmp \
	--with-vfs \
	--with-msdfs \
	--with-readline=/usr \
	--with-sambabook=${PREFIX}/swat/using_samba \
        2>&1 | tee mout-config"
else
    ./configure \
	--prefix=${PREFIX} \
	--libdir=${LIBDIR} \
	--with-privatedir=${PRIVATEDIR} \
        --with-lockdir=${LOCKDIR} \
        --with-logfilebase=${LOGDIR} \
	--with-profile \
	--with-syslog \
	--with-utmp \
	--with-vfs \
	--with-msdfs \
	--with-readline=/usr \
	--with-sambabook=${PREFIX}/swat/using_samba \
        2>&1 | tee mout-config
fi

cat >> include/config.h <<EOF
#ifdef HAVE_LONGLONG
#undef HAVE_LONGLONG
#endif
EOF

sed -e "s/nobody/nouser/" include/local.h > /tmp/nouser$$
cp /tmp/nouser$$ include/local.h
rm -f /tmp/nouser$$

cd ../examples/VFS
[ -f mout-config ] && {
    if [ "$V" = "echo" ]
    then
        echo "mv mout-config mout-config$$"
    else
        mv mout-config mout-config$$
    fi
}
if [ "$V" = "echo" ]
then
    echo "./configure 2>&1 | tee mout-config"
else
    ./configure 2>&1 | tee mout-config
fi