Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 417 lines (363 sloc) 11.402 kB
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(Libraries/CICalendar/Source/CICalendarDurationValue.cpp)
3
4 # ---------------------------------------------------------------------------
5 # Checks for compilers and tools
6 # ---------------------------------------------------------------------------
7
8 AC_PROG_CXX
9 AC_PROG_CC
10 AC_PROG_INSTALL
11 AC_PROG_LN_S
12
13 AC_CHECK_PROG(AR, ar, ar)
14 if test -z "$AR"; then
15 AC_MSG_ERROR("ar not found. Make sure it is in the PATH and rerun configure.")
16 fi
17 AC_SUBST(AR)
18
19 AC_CHECK_PROG(STRIP, strip, strip)
20 AC_SUBST(STRIP)
21
22 AC_LANG(C++)
23
24 dnl Checks for header files.
25 AC_HEADER_STDC
26
27 dnl Checks for typedefs, structures, and compiler characteristics.
28 AC_C_CONST
29 AC_TYPE_SIZE_T
30
31 # ---------------------------------------------------------------------------
32 # Checks for platform and compiler features
33 # ---------------------------------------------------------------------------
34
35 AC_CANONICAL_HOST
36 case "$host_os" in
37 *irix*)
38 CXX="$CXX -LANG:std"
39 if test -z "$PRELINK"; then
40 PRELINK="/usr/lib/DCC/edg_prelink"
41 fi
42 if test -z "$CXXWARN"; then
43 CXXWARN=""
44 fi
8245543 md: Moved OS/CPU detection from Libraries/Makefile into configure.in,…
svnusers authored
45 JX_TARGET=""
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
46 ;;
8245543 md: Moved OS/CPU detection from Libraries/Makefile into configure.in,…
svnusers authored
47 gnu*|linux*)
48 case $host_cpu in
49 ppc)
50 JX_TARGET="linuxppc2000"
51 ;;
52 i*86|i*86pc)
53 JX_TARGET="linux_intel"
54 ;;
55 esac
56 ;;
57 bsd4.4*|netbsd*|freebsd*)
58 JX_TARGET="freebsd3_x"
59 ;;
60 SunOS|Solaris|solaris*)
61 JX_TARGET="sunos5.8-g++"
62 AC_WARN(Setting JX target to $JX_TARGET - this may be wrong (check configure.in)
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
63 ;;
64 esac
65 case $CC in
66 gcc*|g++*|c++*|*-g++)
67 CWARN="-Wall -Wcast-align -Wno-multichar -Wno-unused -Wno-unknown-pragmas"
68 CFLAGS="$CFLAGS -std=c99"
69 HAS_MM="yes"
70 ;;
71 esac
72 case $CXX in
73 gcc*|g++*|c++*|*-g++)
74 CXXWARN="-Wall -Wcast-align -Wno-multichar -Wno-unused -Wno-unknown-pragmas -Wno-non-virtual-dtor -Wno-ctor-dtor-privacy"
75 CXXFLAGS="$CXXFLAGS"
c1bab39 md: hopefully more foolproof detection of g++ version
svnusers authored
76 #GVERSION=`$CXX --version | grep "^$CXX " | sed "s/.* //"`
77 GVERSION=`$CXX -dumpversion`
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
78 case $GVERSION in
1204376 Compile fixes for newer g++ (here: 4.6).
Martin Dietze authored
79 4.3*|4.4*|4.5*|4.6*|4.7*|4.8*|4.9*|5.*)
74afdcd md: moved compiler flag `-std=c++0x' from CXXWARN to CXXFLAGS where a…
svnusers authored
80 CXXWARN="$CXXWARN -Wno-deprecated"
20f0e07 @mbert New version of debian package. Small corrections in build files.
authored
81 CXXFLAGS="$CXXFLAGS -fpermissive"
82 #-std=gnu++0x
83 #-std=c++0x
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
84 ;;
85 esac
86 HAS_MM="yes"
87 ;;
88 esac
89 CPPFLAGS=""
90 AC_ARG_WITH(extra-cppflags,
91 [ --with-extra-cppflags Specify additional flags to pass to the C preprocessor.],
92 CPPFLAGS="${CPPFLAGS} $withval")
93
8245543 md: Moved OS/CPU detection from Libraries/Makefile into configure.in,…
svnusers authored
94 if test -z "$JX_TARGET"; then
95 AC_ERROR(Could not determine target system for JX build for OS "$host_os" and CPU "$host_cpu". Please edit configure.in and rerun autoconf / configure)
96 fi
97 AC_SUBST(JX_TARGET)
98
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
99 AC_SUBST(HAS_MM)
100 AC_SUBST(PRELINK)
101 AC_SUBST(CXXWARN)
102 AC_SUBST(CXXLANG)
103 AC_SUBST(CXXFLAGS)
104 AC_SUBST(CPPFLAGS)
105 AC_SUBST(CWARN)
106 AC_SUBST(CLANG)
107 AC_SUBST(CFLAGS)
108 AC_SUBST(CXX)
109 AC_SUBST(CC)
110
111 AC_SUBST(CXXOPT)
112
113 COPT="$CXXOPT"
114 AC_SUBST(COPT)
115
116 # ---------------------------------------------------------------------------
117 # Checks for Misc. stuff
118 # ---------------------------------------------------------------------------
119
120 LINK_STATIC="-Wl,-Bstatic"
121 LINK_DYNAMIC="-Wl,-Bdynamic"
122 AC_ARG_ENABLE(shared,
123 [ --enable-shared Use shared libraries instead of static for some dependencies.],
124 LINK_STATIC=""
125 LINK_DYNAMIC="")
126 AC_SUBST(LINK_STATIC)
127 AC_SUBST(LINK_DYNAMIC)
128
129 DESTDIR=""
130 AC_ARG_VAR(DESTDIR, The directory in which the prefix dir is located)
131
132 MULBERRY_DIR=".mulberry"
133 AC_ARG_WITH(mulberry-dir,
134 [ --with-mulberry-dir Specify location relative to the prefix where mulberry plugins go (default: .mulberry)],
135 MULBERRY_DIR="$withval")
136 AC_SUBST(MULBERRY_DIR)
137
138 HELP_DIR=".mulberry"
139 AC_ARG_WITH(help-dir,
140 [ --with-help-dir Specify location relative to the prefix where mulberry documentation files go (default: .mulberry)],
141 HELP_DIR="$withval")
142 AC_SUBST(HELP_DIR)
143
144 PROGRAM_DIR=""
145 AC_ARG_WITH(program-dir,
146 [ --with-program-dir Specify location relative to the prefix where the mulberry program goes (default: '')],
147 PROGRAM_DIR="$withval")
148 AC_SUBST(PROGRAM_DIR)
149
150 # ---------------------------------------------------------------------------
151 # Checks for libs which we will need (fail if not found)
152 # ---------------------------------------------------------------------------
153
154 AC_CHECK_HEADER([esd.h],
155 ,
156 AC_MSG_ERROR(esd.h not found - mulberry requires esd.)
157 )
158
dce6b06 md: temporarily add CXXFLAGS to CPPFLAGS in configure.in before check…
svnusers authored
159 CPPFLAGS_ORG="$CPPFLAGS"
160 CPPFLAGS="$CXXFLAGS $CPPFLAGS"
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
161 AC_CHECK_HEADER([cstdint],
162 HAS_CSTDINT=1,
163 HAS_CSTDINT=0
164 )
165 if test ${HAS_CSTDINT} = 0; then
166 AC_CHECK_HEADER([boost/cstdint.hpp],
a707413 md: fix to broken setting of CXXFLAGS after detecting cstdint in conf…
svnusers authored
167 CPPFLAGS="$CPPFLAGS_ORG"
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
168 CPPFLAGS="$CPPFLAGS -I`pwd`/Wrapper_Includes/cstdint",
a707413 md: fix to broken setting of CXXFLAGS after detecting cstdint in conf…
svnusers authored
169 CPPFLAGS="$CPPFLAGS_ORG"
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
170 AC_MSG_ERROR(neither cstdint nor boost/cstdint.hpp found - one from them is required for compiling mulberry.)
171 )
ad9befc md: merged Cyrus' changes from June 12 into shared branch
svnusers authored
172 else
173 CPPFLAGS="$CPPFLAGS_ORG"
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
174 fi
175
176
177 # Checks for LDAP
178 AC_ARG_WITH(ldap-include,
179 [ --with-ldap-include Specify location of LDAP headers],
180 LDAPINC="$withval")
181 if test -n "$LDAPINC"; then
182 case $LDAPINC in
183 -I*)
184 ;;
185 /*)
186 LDAPINC=-I$LDAPINC
187 ;;
188 *)
189 LDAPINC=-I`pwd`/$LDAPINC
190 ;;
191 esac
192 fi
193 AC_SUBST(LDAPINC)
194
195 LDAPLIB="-lldap -llber"
a38ae5e Updated Linux build files for latest of Cyrus' changes.
Martin Dietze authored
196 AC_ARG_WITH(ldap-libs,
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
197 [ --with-ldap-libs Specify link args for LDAP],
198 LDAPLIB="$withval")
199 AC_SUBST(LDAPLIB)
200
201 CPPFLAGS_ORG="$CPPFLAGS"
202 CPPFLAGS="$LDAPINC $CPPFLAGS"
203 KERBEROS=""
204 AC_CHECK_HEADER([ldap_cdefs.h],
205 COMMUNICATOR_ADBK_IO="CommunicatorAdbkIO"
206 NETSCAPE_ADBK_IO="NetscapeAdbkIO",
207 AC_MSG_ERROR(ldap_cdefs.h not found - mulberry and CommunicatorAdbkIO and NetscapeAdbkIO plugins require LDAP.)
208 )
209 CPPFLAGS="$CPPFLAGS_ORG"
210 AC_SUBST(COMMUNICATOR_ADBK_IO)
211 AC_SUBST(NETSCAPE_ADBK_IO)
212
213 # Checks for SSL
214
215 AC_ARG_WITH(openssl-include,
216 [ --with-openssl-include Specify location of openssl headers],
217 SSLINC="$withval")
218 if test -n "$SSLINC"; then
219 case $SSLINC in
220 -I*)
221 ;;
222 /*)
223 SSLINC=-I$SSLINC
224 ;;
225 *)
226 SSLINC=-I`pwd`/$SSLINC
227 ;;
228 esac
229 fi
230 AC_SUBST(SSLINC)
231
232 CPPFLAGS_ORG="$CPPFLAGS"
233 CPPFLAGS="$SSLINC $CPPFLAGS"
234 KERBEROS=""
235 AC_CHECK_HEADER([openssl/ssl.h],
236 SSL="SSL"
237 SMIME="SMIME",
238 AC_MSG_ERROR(openssl/ssl.h not found - mulberry and SMIME and SSL plugins require OpenSSL.)
239 )
240 CPPFLAGS="$CPPFLAGS_ORG"
241 AC_SUBST(SMIME)
242 AC_SUBST(SSL)
243
a38ae5e Updated Linux build files for latest of Cyrus' changes.
Martin Dietze authored
244 SSLLIB="-lssl -lcrypto"
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
245 AC_ARG_WITH(openssl-libs,
246 [ --with-openssl-libs Specify link args for openssl],
247 SSLLIB="$withval")
248 AC_SUBST(SSLLIB)
249
250
251 # ---------------------------------------------------------------------------
252 # Checks for libs which may or may not be there
253 # ---------------------------------------------------------------------------
254
255 LDFLAGS=""
256 AC_CHECK_LIB(rt, main, LDFLAGS="$LDFLAGS -lrt")
257 AC_CHECK_LIB(gen, main, LDFLAGS="$LDFLAGS -lgen")
3516746 md: fixes for Linux build
svnusers authored
258 AC_CHECK_LIB(fontconfig, main, LDFLAGS="$LDFLAGS -lfontconfig")
7f74fd8 Initial commit of autoconf-based build in 'v4.1d1' branch of user 'sh…
svnusers authored
259 case $host_os in
260 *solaris*)
261 LDFLAGS="$LDFLAGS -nodefaultlibs -lc -lm -lgcc"
262 SO_LDFLAGS="-nodefaultlibs -lc -lm -lgcc -socket -lresolv"
263 PROC_NAME="`uname -p`"
264 ;;
265 *)
266 SO_LDFLAGS="-lresolv"
267 PROC_NAME="`uname -m`"
268 ;;
269 esac
270 OS_NAME="$host_os"
271 REL_NAME="`uname -r`"
272 AC_SUBST(OS_NAME)
273 AC_SUBST(REL_NAME)
274 AC_SUBST(PROC_NAME)
275 AC_CHECK_LIB(resolv, main, LDFLAGS="$LDFLAGS -lresolv")
276
277 AC_SUBST(LDFLAGS)
278 AC_SUBST(SO_LDFLAGS)
279
280 # ---------------------------------------------------------------------------
281 # Checks for KRB4
282 # ---------------------------------------------------------------------------
283
284 AC_ARG_WITH(krb4-include,
285 [ --with-krb4-include Specify location of kerberos4 headers],
286 KRB4INC="$withval")
287 if test -n "$KRB4INC"; then
288 case $KRB4INC in
289 -I*)
290 ;;
291 /*)
292 KRB4INC=-I$KRB4INC
293 ;;
294 *)
295 KRB4INC=-I`pwd`/$KRB4INC
296 ;;
297 esac
298 fi
299
300 CPPFLAGS_ORG="$CPPFLAGS"
301 CPPFLAGS="$KRB4INC $CPPFLAGS"
302 KERBEROS=""
303 AC_CHECK_HEADER([krb.h],
304 KERBEROS="Kerberos",
305 AC_MSG_WARN(krb.h not found - disabling Kerberos (IV) plugin.)
306 )
307 CPPFLAGS="$CPPFLAGS_ORG"
308
309 KRB4LIB="-lkrb4 -ldes425"
310 AC_ARG_WITH(krb4-libs,
311 [ --with-krb4-libs Specify link args for kerberos4],
312 KRB4LIB="$withval")
313
314 AC_SUBST(KRB4INC)
315 AC_SUBST(KRB4LIB)
316 AC_SUBST(KERBEROS)
317
318 # ---------------------------------------------------------------------------
319 # Checks for KRB5
320 # ---------------------------------------------------------------------------
321
322 KRB5INC="-I/usr/include/gssapi"
323 AC_ARG_WITH(krb5-include,
324 [ --with-krb5-include Specify location of kerberos5 headers],
325 KRB5INC="$withval")
326 if test -n "$KRB5INC"; then
327 case $KRB5INC in
328 -I*)
329 ;;
330 /*)
331 KRB5INC=-I$KRB5INC
332 ;;
333 *)
334 KRB5INC=-I`pwd`/$KRB5INC
335 ;;
336 esac
337 fi
338
339 CPPFLAGS_ORG="$CPPFLAGS"
340 CPPFLAGS="$KRB5INC $CPPFLAGS"
341 GSSAPI=""
342 AC_CHECK_HEADER([gssapi.h],
343 GSSAPI="GSSAPI",
344 AC_MSG_WARN(gssapi.h not found - disabling GSSAPI plugin.)
345 )
346 CPPFLAGS="$CPPFLAGS_ORG"
347
348 KRB5LIB="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
349 AC_ARG_WITH(krb5-libs,
350 [ --with-krb5-libs Specify link args for kerberos5],
351 KRB5LIB="$withval")
352
353 AC_SUBST(KRB5INC)
354 AC_SUBST(KRB5LIB)
355 AC_SUBST(GSSAPI)
356
357 # ---------------------------------------------------------------------------
358 # Checks for ASpell
359 # ---------------------------------------------------------------------------
360
361 ASPELLINC=""
362 AC_ARG_WITH(aspell-include,
363 [ --with-aspell-include Specify location of aspell headers],
364 ASPELLINC="$withval")
365 if test -n "$ASPELLINC"; then
366 case $ASPELLINC in
367 -I*)
368 ;;
369 /*)
370 ASPELLINC=-I$ASPELLINC
371 ;;
372 *)
373 ASPELLINC=-I`pwd`/$ASPELLINC
374 ;;
375 esac
376 fi
377
378 CPPFLAGS_ORG="$CPPFLAGS"
379 CPPFLAGS="$ASPELLINC $CPPFLAGS"
380 ASPELL=""
381 AC_CHECK_HEADER([aspell.h],
382 ASPELL="ASpell",
383 AC_MSG_WARN(aspell.h not found - disabling ASpell plugin.)
384 )
385 CPPFLAGS="$CPPFLAGS_ORG"
386
387 ASPELLLIB="-dynamic -laspell"
388 AC_ARG_WITH(aspell-libs,
389 [ --with-aspell-libs Specify link args for aspell],
390 ASPELLLIB="$withval")
391
392 AC_SUBST(ASPELLINC)
393 AC_SUBST(ASPELLLIB)
394 AC_SUBST(ASPELL)
395
396 # not used right now, see Libraries/XMLLib/Makefile.in
397 #AC_ARG_WITH(libxml-include,
398 # [ --with-libxml-include Specify location of libxml headers],
399 # XMLINC="$withval")
400 #CPPFLAGS="$CPPFLAGS -I$XMLINC"
401 #
402 #AC_CHECK_HEADER(libxml/parser.h,,
403 # AC_MSG_ERROR("libxml/parser.h not found."))
404
405 # ---------------------------------------------------------------------------
406 # Almost there...
407 # ---------------------------------------------------------------------------
408
409 test "$prefix" = "NONE" -o "$prefix" = "" && prefix='~'
410 echo ""
411 echo "Mulberry binary goes to $DESTDIR$prefix/$PROGRAM_DIR"
412 echo "Mulberry resources and plugins go to $DESTDIR$prefix/$MULBERRY_DIR"
413 echo "Mulberry help files go to $DESTDIR$prefix/$HELP_DIR"
414 echo ""
415
416 AC_OUTPUT(Makefile Libraries/Makefile Build/Makefile Sources_Common/Makefile Libraries/CICalendar/Makefile Libraries/vCard/Makefile Libraries/XMLLib/Makefile Linux/Makefile Plug-ins/Makefile Plug-ins/PluginLibrary/Makefile Plug-ins/CRAM-MD5/Makefile Plug-ins/DIGEST-MD5/Makefile Plug-ins/GSSAPI/Makefile Plug-ins/Kerberos/Makefile Plug-ins/CommunicatorAdbkIO/Makefile Plug-ins/Eudora4AdbkIO/Makefile Plug-ins/EudoraAdbkIO/Makefile Plug-ins/NetscapeAdbkIO/Makefile Plug-ins/PineAdbkIO/Makefile Plug-ins/QuickmailAdbkIO/Makefile Plug-ins/vCardAdbkIO/Makefile Plug-ins/ISpell/Makefile Plug-ins/ASpell/Makefile Plug-ins/GPG/Makefile Plug-ins/SMIME/Makefile Plug-ins/SSL/Makefile)
Something went wrong with that request. Please try again.