forked from gnb/cyrus-imapd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SMakefile
139 lines (124 loc) · 4.38 KB
/
SMakefile
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#
# Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any legal
# details, please contact
# Carnegie Mellon University
# Center for Technology Transfer and Enterprise Creation
# 4615 Forbes Avenue
# Suite 302
# Pittsburgh, PA 15213
# (412) 268-7393, fax: (412) 268-7395
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# $Id: SMakefile,v 1.101 2010/01/06 17:01:26 murch Exp $
NEW_AUTOTOOLS=yes
export NEW_AUTOTOOLS
if test ! -x configure; then
# -nt deeply upsets normal sh.
# -o configure.ac -nt configure
# -o acconfig.h -nt configure -o SMakefile -nt configure; then
echo autoreconf
autoreconf
fi
MAKE=gmake
if [ -r /.hostname ]; then
# probably an andrew machine
VER=`smake -D | sed 's;^.*\/;;'`
else
# anonymous cvs?
VER="anoncvs"
fi
LOCALDEFS="-DEXTRA_IDENT=\\\"$VER\\\""
# PERL CONFIGURATION
if perl -e 'exit ($] != 5.006001)'; then
PERL_MM_OPT="INSTALLPRIVLIB=${DESTDIR}/usr/local/lib/perl5 INSTALLARCHLIB=${DESTDIR}/usr/local/lib/perl5/5.6.1 INSTALLSITELIB=${DESTDIR}/usr/local/lib/perl5/site_perl/5.6.1 INSTALLSITEARCH=${DESTDIR}/usr/local/lib/perl5/site_perl/5.6.1 INSTALLBIN=${DESTDIR}/usr/local/bin INSTALLSCRIPT=${DESTDIR}/usr/local/bin INSTALLMAN1DIR=${DESTDIR}/usr/local/man/man1 INSTALLMAN3DIR=${DESTDIR}/usr/local/man/man3"
else
if perl -e 'exit ($] < 5.008005)'; then
# MakeMaker now supports DESTDIR!
PERL_MM_OPT=""
else
echo "no support for thus perl version in SMakefile"
fi
fi
export PERL_MM_OPT
# end perl configuration
# Let's just assume we are using gcc...
if test "${WASH_CYRUS_INSURE}" = "t"; then
CC="insure"
CFLAGS="-g"
else
CC="gcc"
CFLAGS="${CFLAGS} -g -Wall -W"
fi
if test "${WASH_CYRUS_DEBUG}" = "t"; then
CC="gcc"
CFLAGS="-g"
LDFLAGS="${LDFLAGS}"
DEBUG="--enable-debug"
fi
case `uname` in
Linux)
LDFLAGS="${LDFLAGS}"
LIBS="-lnsl" # for libwrap
;;
SunOS)
LDFLAGS="${LDFLAGS} -L/usr/local/lib -Wl,-R,/usr/local/lib"
LIBS="-lkstat -ldoor"
;;
*)
CC=cc
;;
esac
case `sys` in
i386_fc3)
LIBS="$LIBS -ldes"
OS_CONFIG="--with-krbdes"
;;
sun4x_s10)
LIBS="$LIBS -ldes"
OS_CONFIG="--with-krbdes"
;;
esac
# settings; we have to disable these on some platforms
DEBUG=""
WITHAUTH="--with-auth=pts --with-afs=/usr/local --enable-krb5afspts --without-krbdes"
SSL_CONFIG="--with-openssl=/usr/local/lib"
# the defaults are good enough for us
DB_CONFIG=""
# the following is for staticly linking SASL only
SASL_CONFIG="--with-staticsasl=/usr/local --with-gssapi=/usr/local"
#KRB_CONFIG="--enable-statickrb --with-krb=/usr/local"
KRB_CONFIG="--with-krb=/usr/local"
FEATURE_CONFIG="--enable-murder --enable-cmulocal --enable-nntp --enable-idled --enable-replication"
EXT_PACKAGE_CONFIG="--with-inn=/usr/news --with-ucdsnmp=/usr/local"
MFCOMMAND="./configure $WITHAUTH $KRB_CONFIG $DB_CONFIG --enable-experiment --with-cyrus-group=staff $FEATURE_CONFIG $EXT_PACKAGE_CONFIG $SASL_CONFIG $DEBUG"
export CFLAGS CC VER LNCOMMAND LOCALDEFS LDFLAGS
export LIBS