Deleted Added
full compact
configure.ac (269847) configure.ac (289166)
1dnl Licensed to the Apache Software Foundation (ASF) under one
2dnl or more contributor license agreements. See the NOTICE file
3dnl distributed with this work for additional information
4dnl regarding copyright ownership. The ASF licenses this file
5dnl to you under the Apache License, Version 2.0 (the
6dnl "License"); you may not use this file except in compliance
7dnl with the License. You may obtain a copy of the License at
8dnl
9dnl http://www.apache.org/licenses/LICENSE-2.0
10dnl
11dnl Unless required by applicable law or agreed to in writing,
12dnl software distributed under the License is distributed on an
13dnl "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14dnl KIND, either express or implied. See the License for the
15dnl specific language governing permissions and limitations
16dnl under the License.
17
18dnl configure.ac: Autoconfiscation for Subversion
19dnl Process this file with autoconf to produce a configure script.
20
21AC_PREREQ(2.59)
22
23dnl Get the version of Subversion, using m4's esyscmd() command to do this
24dnl at m4-time, since AC_INIT() requires it then.
25AC_INIT([subversion],
26 [esyscmd(python build/getversion.py SVN subversion/include/svn_version.h)],
27 [http://subversion.apache.org/])
28
29AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
30AC_CONFIG_AUX_DIR([build])
31
32AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION)
33
34AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"])
35AC_SUBST([abs_builddir], ["`pwd`"])
36if test "$abs_srcdir" = "$abs_builddir"; then
37 canonicalized_srcdir=""
38else
39 canonicalized_srcdir="$srcdir/"
40fi
41AC_SUBST([canonicalized_srcdir])
42
43SWIG_LDFLAGS="$LDFLAGS"
44AC_SUBST([SWIG_LDFLAGS])
45
46# Generate config.nice early (before the arguments are munged)
47SVN_CONFIG_NICE(config.nice)
48
49# ==== Check for programs ====================================================
50
51# Look for a C compiler (before anything can set CFLAGS)
52CMAINTAINERFLAGS="$CUSERFLAGS"
53CUSERFLAGS="$CFLAGS"
54AC_PROG_CC
55SVN_CC_MODE_SETUP
56
57# Look for a C++ compiler (before anything can set CXXFLAGS)
58CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
59CXXUSERFLAGS="$CXXFLAGS"
60AC_PROG_CXX
61SVN_CXX_MODE_SETUP
62
63# Look for a C pre-processor
64AC_PROG_CPP
65
66# Look for a good sed
67# AC_PROG_SED was introduced in Autoconf 2.59b
68m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [SED="${SED:-sed}"])
69
70# Grab target_cpu, so we can use it in the Solaris pkginfo file
71AC_CANONICAL_TARGET
72
73# Look for an extended grep
74AC_PROG_EGREP
75
76AC_PROG_LN_S
77
78AC_PROG_INSTALL
79# If $INSTALL is relative path to our fallback install-sh, then convert
80# to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool
81# may try to use it from a changed working directory.
82if test "$INSTALL" = "build/install-sh -c"; then
83 INSTALL="$abs_srcdir/$INSTALL"
84fi
85
86if test -z "$MKDIR"; then
87 MKDIR="$INSTALL -d"
88fi
89AC_SUBST([MKDIR])
90
91# ==== Libraries, for which we may have source to build ======================
92
93dnl verify apr version and set apr flags
94dnl These regular expressions should not contain "\(" and "\)".
95dnl The specific reason we require APR 0.9.7 is:
96dnl It contains fixes to its file writing routines
97dnl now generating errors instead of silently ignoring
98dnl them. Only .7 and later can guarantee repository
99dnl integrity with FSFS.
100
101APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
102
103SVN_LIB_APR($APR_VER_REGEXES)
104
105if test `expr $apr_version : 2` -ne 0; then
106 dnl Bump the library so-version to 2 if using APR-2
107 dnl (Debian uses so-version 1 for APR-1-with-largefile)
108 svn_lib_ver=2
109 dnl APR-2 provides APRUTIL
110 apu_config=$apr_config
111 AC_SUBST(SVN_APRUTIL_INCLUDES)
112 AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
113 AC_SUBST(SVN_APRUTIL_LIBS)
114else
115 svn_lib_ver=0
116 APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
117 SVN_LIB_APRUTIL($APU_VER_REGEXES)
118fi
119SVN_LT_SOVERSION="-version-info $svn_lib_ver"
120AC_SUBST(SVN_LT_SOVERSION)
121AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
122 [Subversion library major verson])
123
124dnl Search for pkg-config
125AC_PATH_PROG(PKG_CONFIG, pkg-config)
126
127dnl Search for serf
128SVN_LIB_SERF(1,2,1)
129
130if test "$svn_lib_serf" = "yes"; then
131 AC_DEFINE([SVN_HAVE_SERF], 1,
132 [Defined if support for Serf is enabled])
133fi
134
135dnl Search for apr_memcache (only affects fs_fs)
136SVN_LIB_APR_MEMCACHE
137
138if test "$svn_lib_apr_memcache" = "yes"; then
139 AC_DEFINE(SVN_HAVE_MEMCACHE, 1,
140 [Defined if apr_memcache (standalone or in apr-util) is present])
141fi
142
143
144dnl Find Apache with a recent-enough magic module number
145SVN_FIND_APACHE(20020903)
146
147dnl Search for SQLite. If you change SQLITE_URL from a .zip to
148dnl something else also update build/ac-macros/sqlite.m4 to reflect
149dnl the correct command to unpack the downloaded file.
150SQLITE_MINIMUM_VER="3.7.12"
151SQLITE_RECOMMENDED_VER="3.7.15.1"
152SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
153
154SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
155 ${SQLITE_URL})
156
157AC_ARG_ENABLE(sqlite-compatibility-version,
158 AS_HELP_STRING([--enable-sqlite-compatibility-version=X.Y.Z],
159 [Allow binary to run against SQLite as old as ARG]),
160 [sqlite_compat_ver=$enableval],[sqlite_compat_ver=no])
161
162if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
163 SVN_SQLITE_VERNUM_PARSE([$sqlite_compat_ver],
164 [sqlite_compat_ver_num])
165 CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS"
166 CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS"
167fi
168
169SVN_CHECK_FOR_ATOMIC_BUILTINS
170
171if test "$svn_cv_atomic_builtins" = "yes"; then
172 AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
173fi
174
175dnl Set up a number of directories ---------------------
176
177dnl Create SVN_BINDIR for proper substitution
178if test "${bindir}" = '${exec_prefix}/bin'; then
179 if test "${exec_prefix}" = "NONE"; then
180 if test "${prefix}" = "NONE"; then
181 SVN_BINDIR="${ac_default_prefix}/bin"
182 else
183 SVN_BINDIR="${prefix}/bin"
184 fi
185 else
186 SVN_BINDIR="${exec_prefix}/bin"
187 fi
188else
189 SVN_BINDIR="${bindir}"
190fi
191
192dnl fully evaluate this value. when we substitute it into our tool scripts,
193dnl they will not have things such as ${bindir} available
194SVN_BINDIR="`eval echo ${SVN_BINDIR}`"
195AC_SUBST(SVN_BINDIR)
196
197dnl provide ${bindir} in svn_private_config.h for use in compiled code
198AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}",
199 [Defined to be the path to the installed binaries])
200
201dnl This purposely does *not* allow for multiple parallel installs.
202dnl However, it is compatible with most gettext usages.
203localedir='${datadir}/locale'
204AC_SUBST(localedir)
205
206dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR.
207if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then
208 exp_localedir='${ac_default_prefix}/share/locale'
209else
210 exp_localedir=$localedir
211fi
212SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}")
213AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}",
214 [Defined to be the path to the installed locale dirs])
215
216dnl Check for libtool -- we'll definitely need it for all our shared libs!
217AC_MSG_NOTICE([configuring libtool now])
218ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
219AC_ARG_ENABLE(experimental-libtool,
220 AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]),
221 [experimental_libtool=$enableval],[experimental_libtool=no])
222
223if test "$experimental_libtool" = "yes"; then
224 echo "using APR's libtool"
225 sh_libtool="`$apr_config --apr-libtool`"
226 LIBTOOL="$sh_libtool"
227 SVN_LIBTOOL="$sh_libtool"
228else
229 sh_libtool="$abs_builddir/libtool"
230 SVN_LIBTOOL="\$(SHELL) $sh_libtool"
231fi
232AC_SUBST(SVN_LIBTOOL)
233
234dnl Determine the libtool version
235changequote(, )dnl
236lt_pversion=`$LIBTOOL --version 2>/dev/null|$SED -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
237lt_version=`echo $lt_pversion|$SED -e 's/\([a-z]*\)$/.\1/'`
238lt_major_version=`echo $lt_version | cut -d'.' -f 1`
239changequote([, ])dnl
240
241dnl set the default parameters
242svn_enable_static=yes
243svn_enable_shared=yes
244
245dnl check for --enable-static option
246AC_ARG_ENABLE(static,
247 AS_HELP_STRING([--enable-static],
248 [Build static libraries]),
249 [svn_enable_static="$enableval"], [svn_enable_static="yes"])
250
251dnl check for --enable-shared option
252AC_ARG_ENABLE(shared,
253 AS_HELP_STRING([--enable-shared],
254 [Build shared libraries]),
255 [svn_enable_shared="$enableval"], [svn_enable_shared="yes"])
256
257if test "$svn_enable_static" = "yes" && test "$svn_enable_shared" = "yes" ; then
258 AC_MSG_NOTICE([building both shared and static libraries])
259elif test "$svn_enable_static" = "yes" ; then
260 AC_MSG_NOTICE([building static libraries only])
261 LT_CFLAGS="-static $LT_CFLAGS"
262 LT_LDFLAGS="-static $LT_LDFLAGS"
263elif test "$svn_enable_shared" = "yes" ; then
264 AC_MSG_NOTICE([building shared libraries only])
265 if test "$lt_major_version" = "1" ; then
266 LT_CFLAGS="-prefer-pic $LT_CFLAGS"
267 elif test "$lt_major_version" = "2" ; then
268 LT_CFLAGS="-shared $LT_CFLAGS"
269 fi
270 LT_LDFLAGS="-shared $LT_LDFLAGS"
271else
272 AC_MSG_ERROR([cannot disable both shared and static libraries])
273fi
274
275dnl Check for --enable-all-static option
276AC_ARG_ENABLE(all-static,
277 AS_HELP_STRING([--enable-all-static],
278 [Build completely static (standalone) binaries.]),
279 [
280 if test "$enableval" = "yes" ; then
281 LT_LDFLAGS="-all-static $LT_LDFLAGS"
282 elif test "$enableval" != "no" ; then
283 AC_MSG_ERROR([--enable-all-static doesn't accept argument])
284 fi
285])
286
287AC_SUBST(LT_CFLAGS)
288AC_SUBST(LT_LDFLAGS)
289
290AC_ARG_ENABLE(local-library-preloading,
291 AS_HELP_STRING([--enable-local-library-preloading],
292 [Enable preloading of locally built libraries in locally
293 built executables. This may be necessary for testing
294 prior to installation on some platforms. It does not
295 work on some platforms (Darwin, OpenBSD, ...).]),
296 [
297 if test "$enableval" != "no"; then
298 if test "$svn_enable_shared" = "yes"; then
299 TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
300 else
301 AC_MSG_ERROR([--enable-local-library-preloading conflicts with --disable-shared])
302 fi
303 else
304 TRANSFORM_LIBTOOL_SCRIPTS=""
305 fi
306 ], [
307 TRANSFORM_LIBTOOL_SCRIPTS=""
308])
309AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS)
310
311dnl Check if -no-undefined is needed for the platform.
312dnl It should always work but with libtool 1.4.3 on OS X it breaks the build.
313dnl So we only turn it on for platforms where we know we really need it.
314AC_MSG_CHECKING([whether libtool needs -no-undefined])
315case $host in
316 *-*-cygwin*)
317 AC_MSG_RESULT([yes])
318 LT_NO_UNDEFINED="-no-undefined"
319 ;;
320 *)
321 AC_MSG_RESULT([no])
322 LT_NO_UNDEFINED=""
323 ;;
324esac
325AC_SUBST(LT_NO_UNDEFINED)
326
327AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
328case $host in
329 *-*-cygwin*)
330 AC_MSG_RESULT([yes])
331 AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
332 [Define if circular linkage is not possible on this platform.])
333 ;;
334 *)
335 AC_MSG_RESULT([no])
336 ;;
337esac
338
339dnl Check for trang.
340trang=yes
341AC_ARG_WITH(trang,
342AS_HELP_STRING([--with-trang=PATH],
343 [Specify the command to run the trang schema converter]),
344[
345 trang="$withval"
346])
347if test "$trang" = "yes"; then
348 AC_PATH_PROG(TRANG, trang, none)
349else
350 TRANG="$trang"
351 AC_SUBST(TRANG)
352fi
353
354dnl Check for doxygen
355doxygen=yes
356AC_ARG_WITH(doxygen,
357AC_HELP_STRING([--with-doxygen=PATH],
358 [Specify the command to run doxygen]),
359[
360 doxygen="$withval"
361])
362if test "$doxygen" = "yes"; then
363 AC_PATH_PROG(DOXYGEN, doxygen, none)
364else
365 DOXYGEN="$doxygen"
366 AC_SUBST(DOXYGEN)
367fi
368
369
370dnl Check for libraries --------------------
371
372dnl Expat -------------------
373
374AC_ARG_WITH(expat,
375 AS_HELP_STRING([--with-expat=INCLUDES:LIB_SEARCH_DIRS:LIBS],
376 [Specify location of Expat]),
377 [svn_lib_expat="$withval"],
378 [svn_lib_expat="::expat"])
379
380# APR-util accepts "builtin" as an argument to this option so if the user
381# passed "builtin" pretend the user didn't specify the --with-expat option
382# at all. Expat will (hopefully) be found in apr-util.
383test "_$svn_lib_expat" = "_builtin" && svn_lib_expat="::expat"
384
385AC_MSG_CHECKING([for Expat])
386if test -n "`echo "$svn_lib_expat" | $EGREP ":.*:"`"; then
387 SVN_XML_INCLUDES=""
388 for i in [`echo "$svn_lib_expat" | $SED -e "s/\([^:]*\):.*/\1/"`]; do
389 SVN_XML_INCLUDES="$SVN_XML_INCLUDES -I$i"
390 done
391 SVN_XML_INCLUDES="${SVN_XML_INCLUDES## }"
392 for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\):.*/\1/"`]; do
393 LDFLAGS="$LDFLAGS -L$l"
394 done
395 for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\)/\1/"`]; do
396 SVN_XML_LIBS="$SVN_XML_LIBS -l$l"
397 done
398 SVN_XML_LIBS="${SVN_XML_LIBS## }"
399 old_CPPFLAGS="$CPPFLAGS"
400 old_LIBS="$LIBS"
401 CPPFLAGS="$CPPFLAGS $SVN_XML_INCLUDES"
402 LIBS="$LIBS $SVN_XML_LIBS"
403 AC_LINK_IFELSE([AC_LANG_SOURCE([[
404#include <expat.h>
405int main()
406{XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no")
407 LIBS="$old_LIBS"
408 if test "$svn_lib_expat" = "yes"; then
409 AC_MSG_RESULT([yes])
410 else
411 SVN_XML_INCLUDES=""
412 SVN_XML_LIBS=""
413 CPPFLAGS="$CPPFLAGS $SVN_APRUTIL_INCLUDES"
414 if test "$enable_all_static" != "yes"; then
415 SVN_APRUTIL_LIBS="$SVN_APRUTIL_LIBS `$apu_config --libs`"
416 fi
417 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
418#include <expat.h>
419int main()
420{XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no")
421 if test "$svn_lib_expat" = "yes"; then
422 AC_MSG_RESULT([yes])
423 AC_MSG_WARN([Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option.])
424 else
425 AC_MSG_RESULT([no])
426 AC_MSG_ERROR([Expat not found])
427 fi
428 fi
429 CPPFLAGS="$old_CPPFLAGS"
430else
431 AC_MSG_RESULT([no])
432 if test "$svn_lib_expat" = "yes"; then
433 AC_MSG_ERROR([--with-expat option requires argument])
434 elif test "$svn_lib_expat" = "no"; then
435 AC_MSG_ERROR([Expat is required])
436 else
437 AC_MSG_ERROR([Invalid syntax of argument of --with-expat option])
438 fi
439fi
440AC_SUBST(SVN_XML_INCLUDES)
441AC_SUBST(SVN_XML_LIBS)
442
443dnl Berkeley DB -------------------
444
445# Berkeley DB on SCO OpenServer needs -lsocket
446AC_CHECK_LIB(socket, socket)
447
448# Build the BDB filesystem library only if we have an appropriate
449# version of Berkeley DB.
450case "$host" in
451powerpc-apple-darwin*)
452 # Berkeley DB 4.0 does not work on OS X.
453 SVN_FS_WANT_DB_MAJOR=4
454 SVN_FS_WANT_DB_MINOR=1
455 SVN_FS_WANT_DB_PATCH=25
456 ;;
457*)
458 SVN_FS_WANT_DB_MAJOR=4
459 SVN_FS_WANT_DB_MINOR=0
460 SVN_FS_WANT_DB_PATCH=14
461 ;;
462esac
463db_alt_version="5.x"
464# Look for libdb4.so first:
465SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
466 $SVN_FS_WANT_DB_PATCH, [db4 db])
467
468AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR,
469 [The desired major version for the Berkeley DB])
470AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR,
471 [The desired minor version for the Berkeley DB])
472AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH,
473 [The desired patch version for the Berkeley DB])
474
475AC_SUBST(SVN_DB_INCLUDES)
476AC_SUBST(SVN_DB_LIBS)
477
478SVN_LIB_SASL
479
480if test "$svn_lib_sasl" = "yes"; then
481 AC_DEFINE(SVN_HAVE_SASL, 1,
482 [Defined if Cyrus SASL v2 is present on the system])
483fi
484
485dnl Mac OS specific features -------------------
486
487SVN_LIB_MACHO_ITERATE
488SVN_LIB_MACOS_PLIST
489SVN_LIB_MACOS_KEYCHAIN
490
491dnl APR_HAS_DSO -------------------
492
493AC_MSG_CHECKING([whether APR has support for DSOs])
494old_CPPFLAGS="$CPPFLAGS"
495CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
496AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
497#include <apr.h>
498#if !APR_HAS_DSO
499#error
500#endif]])],
501 APR_HAS_DSO="yes"
502 AC_MSG_RESULT([yes]),
503 APR_HAS_DSO="no"
504 AC_MSG_RESULT([no]))
505CPPFLAGS="$old_CPPFLAGS"
506
507
508dnl D-Bus (required for support for KWallet) -------------------
509
510if test -n "$PKG_CONFIG"; then
511 AC_MSG_CHECKING([for D-Bus .pc file])
512 if $PKG_CONFIG --exists dbus-1; then
513 AC_MSG_RESULT([yes])
514 old_CPPFLAGS="$CPPFLAGS"
515 old_LIBS="$LIBS"
516 DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`"
517 AC_MSG_CHECKING([D-Bus version])
518 DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`"
519 AC_MSG_RESULT([$DBUS_VERSION])
520 # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE
521 if test -n ["`echo "$DBUS_VERSION" | $EGREP '^0\.[[:digit:]]+'`"]; then
522 DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
523 fi
524 DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`"
525 CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS"
526 LIBS="$LIBS $DBUS_LIBS"
527 AC_MSG_CHECKING([for D-Bus])
528 AC_LINK_IFELSE([AC_LANG_SOURCE([[
529#include <dbus/dbus.h>
530int main()
531{dbus_bus_get(DBUS_BUS_SESSION, NULL);}]])], HAVE_DBUS="yes", HAVE_DBUS="no")
532 if test "$HAVE_DBUS" = "yes"; then
533 AC_MSG_RESULT([yes])
534 else
535 AC_MSG_RESULT([no])
536 fi
537 CPPFLAGS="$old_CPPFLAGS"
538 LIBS="$old_LIBS"
539 else
540 AC_MSG_RESULT([no])
541 fi
542fi
543
544dnl GPG Agent -------------------
545
546AC_ARG_WITH(gpg_agent,
547AS_HELP_STRING([--without-gpg-agent],
548 [Disable support for GPG-Agent]),
549 [], [with_gpg_agent=yes])
550AC_MSG_CHECKING([whether to support GPG-Agent])
551if test "$with_gpg_agent" = "yes"; then
552 AC_MSG_RESULT([yes])
553 AC_DEFINE([SVN_HAVE_GPG_AGENT], [1],
554 [Is GPG Agent support enabled?])
555else
556 AC_MSG_RESULT([no])
557fi
558
559AC_SUBST(SVN_HAVE_GPG_AGENT)
560
561dnl GNOME Keyring -------------------
562
563AC_ARG_WITH(gnome_keyring,
564 AS_HELP_STRING([--with-gnome-keyring],
565 [Enable use of GNOME Keyring for auth credentials (enabled by default if found)]),
566 [with_gnome_keyring="$withval"],
567 [with_gnome_keyring=auto])
568
569found_gnome_keyring=no
570AC_MSG_CHECKING([whether to look for GNOME Keyring])
571if test "$with_gnome_keyring" != "no"; then
572 AC_MSG_RESULT([yes])
573 if test "$svn_enable_shared" = "yes"; then
574 if test "$APR_HAS_DSO" = "yes"; then
575 if test -n "$PKG_CONFIG"; then
576 AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
577 if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
578 AC_MSG_RESULT([yes])
579 old_CPPFLAGS="$CPPFLAGS"
580 SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
581 CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
582 AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
583 AC_MSG_CHECKING([for GNOME Keyring])
584 if test "$found_gnome_keyring" = "yes"; then
585 AC_MSG_RESULT([yes])
586 AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
587 [Is GNOME Keyring support enabled?])
588 CPPFLAGS="$old_CPPFLAGS"
589 SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
590 else
591 AC_MSG_RESULT([no])
592 if test "$with_gnome_keyring" = "yes"; then
593 AC_MSG_ERROR([cannot find GNOME Keyring])
594 fi
595 fi
596 else
597 AC_MSG_RESULT([no])
598 if test "$with_gnome_keyring" = "yes"; then
599 AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
600 else
601 with_gnome_keyring=no
602 fi
603 fi
604 else
605 if test "$with_gnome_keyring" = "yes"; then
606 AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
607 else
608 with_gnome_keyring=no
609 fi
610 fi
611 else
612 if test "$with_gnome_keyring" = "yes"; then
613 AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
614 else
615 with_gnome_keyring=no
616 fi
617 fi
618 else
619 if test "$with_gnome_keyring" = "yes"; then
620 AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
621 else
622 with_gnome_keyring=no
623 fi
624 fi
625else
626 AC_MSG_RESULT([no])
627fi
628AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
629AC_SUBST(SVN_GNOME_KEYRING_LIBS)
630
631
632dnl Ev2 experimental features ----------------------
633dnl Note: The Ev2 implementations will be built unconditionally, but by
634dnl providing this flag, users can choose to use the currently-shimmed Ev2
635dnl editor implementations for various operations. This will probably
636dnl negatively impact performance, but is useful for testing.
637AC_ARG_ENABLE(ev2-impl,
638 AS_HELP_STRING([--enable-ev2-impl],
639 [Use Ev2 implementations, where available [EXPERIMENTAL]]),
640 [enable_ev2_impl=$enableval],[enable_ev2_impl=no])
641if test "$enable_ev2_impl" = "yes"; then
642 AC_DEFINE(ENABLE_EV2_IMPL, 1,
643 [Define to 1 if Ev2 implementations should be used.])
644fi
645
646
647dnl I18n -------------------
648
649AC_ARG_ENABLE(nls,
650 AS_HELP_STRING([--disable-nls],[Disable gettext functionality]),
651 [enable_nls=$enableval],[enable_nls=yes])
652
653USE_NLS="no"
654if test "$enable_nls" = "yes"; then
655 dnl First, check to see if there is a working msgfmt.
656 AC_PATH_PROG(MSGFMT, msgfmt, none)
657 AC_PATH_PROG(MSGMERGE, msgmerge, none)
658 AC_PATH_PROG(XGETTEXT, xgettext, none)
659 if test "$MSGFMT" != "none"; then
660 AC_SEARCH_LIBS(bindtextdomain, [intl], [],
661 [
662 enable_nls="no"
663 ])
664 if test "$enable_nls" = "no"; then
665 # Destroy the cached result so we can test again
666 unset ac_cv_search_bindtextdomain
667 # On some systems, libintl needs libiconv to link properly,
668 # so try again with -liconv.
669 AC_SEARCH_LIBS(bindtextdomain, [intl],
670 [
671 enable_nls="yes"
672 # This is here so that -liconv ends up in LIBS
673 # if it worked with -liconv.
674 AC_CHECK_LIB(iconv, libiconv_open)
675 ],
676 [
677 AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.])
678 enable_nls="no"
679 ], -liconv)
680 fi
681 if test "$enable_nls" = "yes"; then
682 AC_DEFINE(ENABLE_NLS, 1,
683 [Define to 1 if translation of program messages to the user's
684 native language is requested.])
685 USE_NLS="yes"
686 fi
687 fi
688fi
689
690AH_BOTTOM([
691/* Indicate to translators that string X should be translated. Do not look
692 up the translation at run time; just expand to X. This macro is suitable
693 for use where a constant string is required at compile time. */
694#define N_(x) x
695/* Indicate to translators that we have decided the string X should not be
696 translated. Expand to X. */
697#define U_(x) x
698#ifdef ENABLE_NLS
699#include <locale.h>
700#include <libintl.h>
701/* Indicate to translators that string X should be translated. At run time,
702 look up and return the translation of X. */
703#define _(x) dgettext(PACKAGE_NAME, x)
704/* Indicate to translators that strings X1 and X2 are singular and plural
705 forms of the same message, and should be translated. At run time, return
706 an appropriate translation depending on the number N. */
707#define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
708#else
709#define _(x) (x)
710#define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)
711#define gettext(x) (x)
712#define dgettext(domain, x) (x)
713#endif
714])
715
716dnl Used to simulate makefile conditionals.
717GETTEXT_CODESET=\#
718NO_GETTEXT_CODESET=\#
719if test $USE_NLS = "yes"; then
720 AC_CHECK_FUNCS(bind_textdomain_codeset,
721 [ GETTEXT_CODESET="" ],
722 [ NO_GETTEXT_CODESET="" ])
723fi
724AC_SUBST(GETTEXT_CODESET)
725AC_SUBST(NO_GETTEXT_CODESET)
726
727# Check if we are using GNU gettext.
728GNU_GETTEXT=no
729MSGFMTFLAGS=''
730if test $USE_NLS = "yes"; then
731 AC_MSG_CHECKING(if we are using GNU gettext)
732 if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then
733 GNU_GETTEXT=yes
734 MSGFMTFLAGS='-c'
735 fi
736 AC_MSG_RESULT($GNU_GETTEXT)
737fi
738AC_SUBST(MSGFMTFLAGS)
739
740dnl libmagic -------------------
741
742libmagic_found=no
743
744AC_ARG_WITH(libmagic,AS_HELP_STRING([--with-libmagic=PREFIX],
745 [libmagic filetype detection library]),
746[
747 if test "$withval" = "yes" ; then
748 AC_CHECK_HEADER(magic.h, [
749 AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
750 ])
751 libmagic_prefix="the default locations"
752 elif test "$withval" != "no"; then
753 libmagic_prefix=$withval
754 save_cppflags="$CPPFLAGS"
755 CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include"
756 AC_CHECK_HEADERS(magic.h,[
757 save_ldflags="$LDFLAGS"
758 LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS"
759 AC_CHECK_LIB(magic, magic_open, [libmagic_found="yes"])
760 LDFLAGS="$save_ldflags"
761 ])
762 CPPFLAGS="$save_cppflags"
763 fi
764 if test "$withval" != "no" && test "$libmagic_found" = "no"; then
765 AC_MSG_ERROR([[--with-libmagic requested, but libmagic not found at $libmagic_prefix]])
766 fi
767],
768[
769 AC_CHECK_HEADER(magic.h, [
770 AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
771 ])
772])
773
774if test "$libmagic_found" != "no"; then
775 AC_DEFINE([SVN_HAVE_LIBMAGIC], [1], [Defined if libmagic support is enabled])
776 SVN_MAGIC_LIBS="-lmagic"
777fi
778
779if test "$libmagic_found" = "yes"; then
780 SVN_MAGIC_INCLUDES="-I$libmagic_prefix/include"
781 LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$libmagic_prefix/lib)`"
782fi
783
784AC_SUBST(SVN_MAGIC_INCLUDES)
785AC_SUBST(SVN_MAGIC_LIBS)
786
787dnl KWallet -------------------
788SVN_LIB_KWALLET
789
790if test "$svn_lib_kwallet" = "yes"; then
791 AC_DEFINE([SVN_HAVE_KWALLET], 1,
792 [Defined if KWallet support is enabled])
793fi
794
795dnl plaintext passwords -------------------
796AC_ARG_ENABLE(plaintext-password-storage,
797AS_HELP_STRING([--disable-plaintext-password-storage],
798 [Disable on-disk caching of plaintext passwords and passphrases.
799 (Leaving this functionality enabled will not force Subversion
800 to store passwords in plaintext, but does permit users to
801 explicitly allow that behavior via runtime configuration.)]),
802[
803 if test "$enableval" = "no"; then
804 AC_MSG_NOTICE([Disabling plaintext password/passphrase storage])
805 AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1,
806 [Defined if plaintext password/passphrase storage is disabled])
807 fi
808])
809
810dnl Build and install rules -------------------
811
812INSTALL_STATIC_RULES="install-bin install-docs"
813INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static"
814INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE"
815BUILD_RULES="fsmod-lib ramod-lib lib bin test sub-test $BUILD_APACHE_RULE tools"
816
817if test "$svn_lib_berkeley_db" = "yes"; then
818 BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"
819 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
820 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib"
821 BDB_TEST_DEPS="\$(BDB_TEST_DEPS)"
822 BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)"
823fi
824
825if test "$svn_lib_serf" = "yes"; then
826 BUILD_RULES="$BUILD_RULES serf-lib"
827 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
828 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib"
829fi
830
831if test "$svn_lib_kwallet" = "yes"; then
832 BUILD_RULES="$BUILD_RULES kwallet-lib"
833 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`"
834 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
835fi
836
837if test "$found_gnome_keyring" = "yes"; then
838 BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
839 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
840 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
841fi
842
843if test "$USE_NLS" = "yes"; then
844 BUILD_RULES="$BUILD_RULES locale"
845 INSTALL_RULES="$INSTALL_RULES install-locale"
846fi
847
848AC_SUBST(BUILD_RULES)
849AC_SUBST(INSTALL_STATIC_RULES)
850AC_SUBST(INSTALL_RULES)
851AC_SUBST(BDB_TEST_DEPS)
852AC_SUBST(BDB_TEST_PROGRAMS)
853
854dnl Check for header files ----------------
855
856dnl Standard C headers
857AC_HEADER_STDC
858
859dnl Check for typedefs, structures, and compiler characteristics ----------
860
861dnl if compiler doesn't understand `const', then define it empty
862AC_C_CONST
863
864dnl if non-existent, define size_t to be `unsigned'
865AC_TYPE_SIZE_T
866
867
868dnl Check for library functions ----------
869
870AC_FUNC_MEMCMP
871
872dnl svn_error's default warning handler uses vfprintf()
873AC_FUNC_VPRINTF
874
875dnl check for functions needed in special file handling
876AC_CHECK_FUNCS(symlink readlink)
877
878dnl check for uname
879AC_CHECK_HEADERS(sys/utsname.h, [AC_CHECK_FUNCS(uname)], [])
880
881dnl check for termios
882AC_CHECK_HEADER(termios.h,[
883 AC_CHECK_FUNCS(tcgetattr tcsetattr,[
884 AC_DEFINE(HAVE_TERMIOS_H,1,[Defined if we have a usable termios library.])
885 ])
886])
887
888dnl Process some configuration options ----------
889
890AC_ARG_WITH(openssl,
891AS_HELP_STRING([--with-openssl],
892 [This option does NOT affect the Subversion build process in any
893 way. It tells an integrated Serf HTTP client library build
894 process where to locate the OpenSSL library when (and only when)
895 building Serf as an integrated part of the Subversion build
896 process. When linking to a previously installed version of Serf
897 instead, you do not need to use this option.]),
898[])
899
900AC_ARG_ENABLE(debug,
901AS_HELP_STRING([--enable-debug],
902 [Turn on debugging]),
903[
904 if test "$enableval" = "yes" ; then
905 enable_debugging="yes"
906 else
907 enable_debugging="no"
908 fi
909],
910[
911 # Neither --enable-debug nor --disable-debug was passed.
912 enable_debugging="maybe"
913])
914
915AC_ARG_ENABLE(optimize,
916AS_HELP_STRING([--enable-optimize],
917 [Turn on optimizations]),
918[
919 if test "$enableval" = "yes" ; then
920 enable_optimization="yes"
921 else
922 enable_optimization="no"
923 fi
924],
925[
926 # Neither --enable-optimize nor --disable-optimize was passed.
927 enable_optimization="maybe"
928])
929
930dnl Use -Wl,--no-undefined during linking of some libraries
931AC_ARG_ENABLE(disallowing-of-undefined-references,
932 [AS_HELP_STRING([--enable-disallowing-of-undefined-references],
933 [Use -Wl,--no-undefined flag during linking of some libraries to disallow undefined references])])
934if test "$enable_disallowing_of_undefined_references" != "yes" && test "`uname`" != "Linux"; then
935 enable_disallowing_of_undefined_references="no"
936fi
937if test "$enable_disallowing_of_undefined_references" != "no"; then
938 AC_MSG_CHECKING([for -Wl,--no-undefined])
939 old_LDFLAGS="$LDFLAGS"
940 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
941 AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){;}]])], [svn_wl_no_undefined="yes"], [svn_wl_no_undefined="no"])
942 LDFLAGS="$old_LDFLAGS"
943 if test "$svn_wl_no_undefined" = "yes"; then
944 AC_MSG_RESULT([yes])
945 for library_dir in "$abs_srcdir/subversion/libsvn_"*; do
946 eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined"
947 done
948 else
949 AC_MSG_RESULT([no])
950 if test "$enable_disallowing_of_undefined_references" = "yes"; then
951 AC_MSG_ERROR([--enable-disallowing-of-undefined-references explicitly requested, but -Wl,--no-undefined not supported])
952 fi
953 fi
954fi
955AC_SUBST([libsvn_auth_gnome_keyring_LDFLAGS])
956AC_SUBST([libsvn_auth_kwallet_LDFLAGS])
957AC_SUBST([libsvn_client_LDFLAGS])
958AC_SUBST([libsvn_delta_LDFLAGS])
959AC_SUBST([libsvn_diff_LDFLAGS])
960AC_SUBST([libsvn_fs_LDFLAGS])
961AC_SUBST([libsvn_fs_base_LDFLAGS])
962AC_SUBST([libsvn_fs_fs_LDFLAGS])
963AC_SUBST([libsvn_fs_util_LDFLAGS])
964AC_SUBST([libsvn_ra_LDFLAGS])
965AC_SUBST([libsvn_ra_local_LDFLAGS])
966AC_SUBST([libsvn_ra_serf_LDFLAGS])
967AC_SUBST([libsvn_ra_svn_LDFLAGS])
968AC_SUBST([libsvn_repos_LDFLAGS])
969AC_SUBST([libsvn_subr_LDFLAGS])
970AC_SUBST([libsvn_wc_LDFLAGS])
971
972
973AC_ARG_ENABLE(maintainer-mode,
974AS_HELP_STRING([--enable-maintainer-mode],
975 [Turn on debugging and very strict compile-time warnings]),
976[
977 if test "$enableval" = "yes" ; then
978 if test "$enable_debugging" = "no" ; then
979 AC_MSG_ERROR([Can't have --disable-debug and --enable-maintainer-mode])
980 fi
981 enable_debugging=yes
982
983 dnl Enable some extra warnings. Put these before the user's flags
984 dnl so the user can specify flags that override these.
985 if test "$GCC" = "yes"; then
986 AC_MSG_NOTICE([maintainer-mode: adding GCC warning flags])
987
988 dnl some additional flags that can be handy for an occasional review,
989 dnl but throw too many warnings in svn code, of too little importance,
990 dnl to keep these enabled. Remove the "dnl" to do a run with these
991 dnl switches enabled.
992 dnl ./configure CUSERFLAGS="-Wswitch-enum -Wswitch-default"
993
994 dnl Add each of the following flags only if the C compiler accepts it.
995 CFLAGS_KEEP="$CFLAGS"
996 CFLAGS=""
997
998 SVN_CFLAGS_ADD_IFELSE([-Werror=implicit-function-declaration])
999 SVN_CFLAGS_ADD_IFELSE([-Werror=declaration-after-statement])
1000 SVN_CFLAGS_ADD_IFELSE([-Wextra-tokens])
1001 SVN_CFLAGS_ADD_IFELSE([-Wnewline-eof])
1002 SVN_CFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
1003 SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
1004 SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
1005 SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
1006
1007 CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
1008 CFLAGS="$CFLAGS_KEEP"
1009
1010 dnl Add flags that all versions of GCC (should) support
1011 CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long $CMAINTAINERFLAGS"
1012 fi
1013 if test "$GXX" = "yes"; then
1014 AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
1015
1016 dnl Add each of the following flags only if the C++ compiler accepts it.
1017 CXXFLAGS_KEEP="$CXXFLAGS"
1018 CXXFLAGS=""
1019
1020 SVN_CXXFLAGS_ADD_IFELSE([-Wextra-tokens])
1021 SVN_CXXFLAGS_ADD_IFELSE([-Wnewline-eof])
1022 SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
1023 SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers])
1024
1025 CXXMAINTAINERFLAGS="$CXXFLAGS $CXXMAINTAINERFLAGS"
1026 CXXFLAGS="$CXXFLAGS_KEEP"
1027
1028 dnl Add flags that all versions of G++ (should) support
1029 CXXMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wunused -Wunreachable-code $CXXMAINTAINERFLAGS"
1030 fi
1031 fi
1032])
1033
1034if test "$enable_debugging" = "yes" ; then
1035 dnl At the moment, we don't want optimization, because we're
1036 dnl debugging. Unless optiization was explicitly enabled.
1037 if test "$enable_optimization" != "yes"; then
1038 AC_MSG_NOTICE([Disabling optimizations for debugging])
1039 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1040 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1041 fi
1042 dnl Add debugging flags, unless they were set by the user
1043 if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then
1044 AC_MSG_NOTICE([Enabling debugging for C])
1045 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1046 SVN_CFLAGS_ADD_IFELSE([-fno-inline])
1047 SVN_CFLAGS_ADD_IFELSE([-fno-omit-frame-pointer])
1048 SVN_CFLAGS_ADD_IFELSE([-g3],[],[
1049 SVN_CFLAGS_ADD_IFELSE([-g2],[],[
1050 SVN_CFLAGS_ADD_IFELSE([-g])])])
1051 fi
1052 if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then
1053 AC_MSG_NOTICE([Enabling debugging for C++])
1054 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1055 SVN_CXXFLAGS_ADD_IFELSE([-fno-inline])
1056 SVN_CXXFLAGS_ADD_IFELSE([-fno-omit-frame-pointer])
1057 SVN_CXXFLAGS_ADD_IFELSE([-g3],[],[
1058 SVN_CXXFLAGS_ADD_IFELSE([-g2],[],[
1059 SVN_CXXFLAGS_ADD_IFELSE([-g])])])
1060 fi
1061 dnl SVN_DEBUG enables specific features for developer builds
1062 dnl AP_DEBUG enables specific (Apache) features for developer builds
1063 CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
1064 CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
1065elif test "$enable_debugging" = "no" ; then
1066 AC_MSG_NOTICE([Disabling debugging])
1067 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1068 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1069 dnl Compile with NDEBUG to get rid of assertions
1070 CFLAGS="$CFLAGS -DNDEBUG"
1071 CXXFLAGS="$CXXFLAGS -DNDEBUG"
1072# elif test "$enable_debugging" = "maybe" ; then
1073# # do nothing
1074fi
1075
1076if test "$enable_optimization" = "yes"; then
1077 dnl Add optimization flags, unless they were set by the user
1078 if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then
1079 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1080 if test "$enable_debugging" = "yes"; then
1081 AC_MSG_NOTICE([Enabling optimizations for C (with debugging enabled)])
1082 SVN_CFLAGS_ADD_IFELSE([-O1],[],[
1083 SVN_CFLAGS_ADD_IFELSE([-O])])
1084 else
1085 AC_MSG_NOTICE([Enabling optimizations for C])
1086 SVN_CFLAGS_ADD_IFELSE([-O3],[],[
1087 SVN_CFLAGS_ADD_IFELSE([-O2],[],[
1088 SVN_CFLAGS_ADD_IFELSE([-O1],[],[
1089 SVN_CFLAGS_ADD_IFELSE([-O])])])])
1090 SVN_CFLAGS_ADD_IFELSE([-Wno-clobbered])
1091 SVN_CFLAGS_ADD_IFELSE([-flto])
1092 fi
1093 fi
1094 if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then
1095 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1096 if test "$enable_debugging" = "yes"; then
1097 AC_MSG_NOTICE([Enabling optimizations for C++ (with debugging enabled)])
1098 SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[
1099 SVN_CXXFLAGS_ADD_IFELSE([-O])])
1100 else
1101 AC_MSG_NOTICE([Enabling optimizations for C++])
1102 SVN_CXXFLAGS_ADD_IFELSE([-O3],[],[
1103 SVN_CXXFLAGS_ADD_IFELSE([-O2],[],[
1104 SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[
1105 SVN_CXXFLAGS_ADD_IFELSE([-O])])])])
1106 SVN_CXXFLAGS_ADD_IFELSE([-Wno-clobbered])
1107 SVN_CXXFLAGS_ADD_IFELSE([-flto])
1108 fi
1109 fi
1110elif test "$enable_optimization" = "no"; then
1111 dnl Remove all optimization flags
1112 AC_MSG_NOTICE([Disabling optimizations])
1113 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1114 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1115# elif test "$enable_optimization" = "maybe" ; then
1116# # do nothing
1117fi
1118
1119dnl Dump the current compiler options
1120AC_MSG_NOTICE([C compiler flags: $CFLAGS])
1121AC_MSG_NOTICE([ user-defined: $CUSERFLAGS])
1122AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS])
1123AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS])
1124AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS])
1125AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS])
1126
1127AC_ARG_ENABLE(full-version-match,
1128AS_HELP_STRING([--disable-full-version-match],
1129 [Disable the full version match rules when checking
1130 Subversion library compatibility.]),
1131[
1132 if test "$enableval" = "no" ; then
1133 AC_MSG_NOTICE([Disabling svn full version matching])
1134 AC_DEFINE(SVN_DISABLE_FULL_VERSION_MATCH, 1,
1135 [Defined if the full version matching rules are disabled])
1136 fi
1137])
1138
1139AC_ARG_WITH(editor,
1140AS_HELP_STRING([--with-editor=PATH],
1141 [Specify a default editor for the subversion client.]),
1142[
1143
1144 if test "$withval" = "yes" ; then
1145 AC_MSG_ERROR([--with-editor requires an argument.])
1146 else
1147 SVN_CLIENT_EDITOR=$withval
1148 AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR",
1149 [The path of a default editor for the client.])
1150
1151 fi
1152
1153])
1154
1155SVN_LIB_Z
1156
1157MOD_ACTIVATION=""
1158AC_ARG_ENABLE(mod-activation,
1159AS_HELP_STRING([--enable-mod-activation],
1160 [Enable mod_dav_svn in httpd.conf]),
1161[
1162 if test "$enableval" = "yes" ; then
1163 MOD_ACTIVATION="-a"
1164 AC_MSG_NOTICE([Enabling apache module activation])
1165 else
1166 AC_MSG_NOTICE([Disabling apache module activation])
1167 fi
1168])
1169AC_SUBST(MOD_ACTIVATION)
1170
1171
1172
1173AC_ARG_ENABLE(gcov,
1174AC_HELP_STRING([--enable-gcov],
1175 [Turn on gcov coverage testing (GCC only).]),
1176[
1177 if test "$enableval" = "yes" ; then
1178 dnl Probably other compilers support something similar;
1179 dnl feel free to extend this to include them.
1180 if test "$GCC" = "yes"; then
1181 if test "$svn_enable_shared" = "yes" ; then
1182 AC_MSG_ERROR([Can't have --enable-gcov without --disable-shared (we
1183 recommend also using --enable-all-static).])
1184 fi
1185 if test ! "$enable_all_static" = "yes" ; then
1186 AC_MSG_WARN(We recommend --enable-all-static with --enable-gcov.)
1187 fi
1188 AC_MSG_NOTICE([Enabling gcov coverage testing.])
1189 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
1190 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
1191 else
1192 AC_MSG_ERROR([We only support --enable-gcov with GCC right now.])
1193 fi
1194 fi
1195])
1196
1197AC_ARG_ENABLE(gprof,
1198AS_HELP_STRING([--enable-gprof],
1199 [Produce gprof profiling data in 'gmon.out' (GCC only).]),
1200[
1201 if test "$enableval" = "yes" ; then
1202 dnl Probably other compilers support -pg or something similar;
1203 dnl feel free to extend this to include them.
1204 if test "$GCC" = "yes"; then
1205 if test "$svn_enable_shared" = "yes" ; then
1206 AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we
1207 recommend also using --enable-all-static).])
1208 fi
1209 if test ! "$enable_all_static" = "yes" ; then
1210 AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.)
1211 fi
1212 AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).])
1213 CFLAGS="$CFLAGS -pg"
1214 CXXFLAGS="$CXXFLAGS -pg"
1215 LT_LDFLAGS="$LT_LDFLAGS -pg"
1216 else
1217 AC_MSG_ERROR([We only support --enable-gprof with GCC right now.])
1218 fi
1219 fi
1220])
1221
1222
1223# Scripting and Bindings languages
1224
1225# Python: Used for testsuite, and bindings
1226
1227
1228PYTHON="`$abs_srcdir/build/find_python.sh`"
1229if test -z "$PYTHON"; then
1230 AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
1231 AC_MSG_WARN([or to use the Subversion Python bindings])
1232 AC_MSG_WARN([])
1233 AC_MSG_WARN([If you have a suitable Python installed, but not on the])
1234 AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
1235 AC_MSG_WARN([to the Python executable, and re-run configure])
1236fi
1237AC_PATH_PROGS(PYTHON, "$PYTHON", none)
1238
1239# The minimum version for the JVM runtime for our Java bytecode.
1240JAVA_OLDEST_WORKING_VER='1.5'
1241# SVN_CHECK_JDK sets $JAVA_CLASSPATH
1242SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
1243
1244AC_PATH_PROG(PERL, perl, none)
1245
1246if test -n "$RUBY"; then
1247 AC_PATH_PROG(RUBY, "$RUBY", none)
1248else
1dnl Licensed to the Apache Software Foundation (ASF) under one
2dnl or more contributor license agreements. See the NOTICE file
3dnl distributed with this work for additional information
4dnl regarding copyright ownership. The ASF licenses this file
5dnl to you under the Apache License, Version 2.0 (the
6dnl "License"); you may not use this file except in compliance
7dnl with the License. You may obtain a copy of the License at
8dnl
9dnl http://www.apache.org/licenses/LICENSE-2.0
10dnl
11dnl Unless required by applicable law or agreed to in writing,
12dnl software distributed under the License is distributed on an
13dnl "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14dnl KIND, either express or implied. See the License for the
15dnl specific language governing permissions and limitations
16dnl under the License.
17
18dnl configure.ac: Autoconfiscation for Subversion
19dnl Process this file with autoconf to produce a configure script.
20
21AC_PREREQ(2.59)
22
23dnl Get the version of Subversion, using m4's esyscmd() command to do this
24dnl at m4-time, since AC_INIT() requires it then.
25AC_INIT([subversion],
26 [esyscmd(python build/getversion.py SVN subversion/include/svn_version.h)],
27 [http://subversion.apache.org/])
28
29AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
30AC_CONFIG_AUX_DIR([build])
31
32AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION)
33
34AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"])
35AC_SUBST([abs_builddir], ["`pwd`"])
36if test "$abs_srcdir" = "$abs_builddir"; then
37 canonicalized_srcdir=""
38else
39 canonicalized_srcdir="$srcdir/"
40fi
41AC_SUBST([canonicalized_srcdir])
42
43SWIG_LDFLAGS="$LDFLAGS"
44AC_SUBST([SWIG_LDFLAGS])
45
46# Generate config.nice early (before the arguments are munged)
47SVN_CONFIG_NICE(config.nice)
48
49# ==== Check for programs ====================================================
50
51# Look for a C compiler (before anything can set CFLAGS)
52CMAINTAINERFLAGS="$CUSERFLAGS"
53CUSERFLAGS="$CFLAGS"
54AC_PROG_CC
55SVN_CC_MODE_SETUP
56
57# Look for a C++ compiler (before anything can set CXXFLAGS)
58CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
59CXXUSERFLAGS="$CXXFLAGS"
60AC_PROG_CXX
61SVN_CXX_MODE_SETUP
62
63# Look for a C pre-processor
64AC_PROG_CPP
65
66# Look for a good sed
67# AC_PROG_SED was introduced in Autoconf 2.59b
68m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [SED="${SED:-sed}"])
69
70# Grab target_cpu, so we can use it in the Solaris pkginfo file
71AC_CANONICAL_TARGET
72
73# Look for an extended grep
74AC_PROG_EGREP
75
76AC_PROG_LN_S
77
78AC_PROG_INSTALL
79# If $INSTALL is relative path to our fallback install-sh, then convert
80# to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool
81# may try to use it from a changed working directory.
82if test "$INSTALL" = "build/install-sh -c"; then
83 INSTALL="$abs_srcdir/$INSTALL"
84fi
85
86if test -z "$MKDIR"; then
87 MKDIR="$INSTALL -d"
88fi
89AC_SUBST([MKDIR])
90
91# ==== Libraries, for which we may have source to build ======================
92
93dnl verify apr version and set apr flags
94dnl These regular expressions should not contain "\(" and "\)".
95dnl The specific reason we require APR 0.9.7 is:
96dnl It contains fixes to its file writing routines
97dnl now generating errors instead of silently ignoring
98dnl them. Only .7 and later can guarantee repository
99dnl integrity with FSFS.
100
101APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
102
103SVN_LIB_APR($APR_VER_REGEXES)
104
105if test `expr $apr_version : 2` -ne 0; then
106 dnl Bump the library so-version to 2 if using APR-2
107 dnl (Debian uses so-version 1 for APR-1-with-largefile)
108 svn_lib_ver=2
109 dnl APR-2 provides APRUTIL
110 apu_config=$apr_config
111 AC_SUBST(SVN_APRUTIL_INCLUDES)
112 AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
113 AC_SUBST(SVN_APRUTIL_LIBS)
114else
115 svn_lib_ver=0
116 APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
117 SVN_LIB_APRUTIL($APU_VER_REGEXES)
118fi
119SVN_LT_SOVERSION="-version-info $svn_lib_ver"
120AC_SUBST(SVN_LT_SOVERSION)
121AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
122 [Subversion library major verson])
123
124dnl Search for pkg-config
125AC_PATH_PROG(PKG_CONFIG, pkg-config)
126
127dnl Search for serf
128SVN_LIB_SERF(1,2,1)
129
130if test "$svn_lib_serf" = "yes"; then
131 AC_DEFINE([SVN_HAVE_SERF], 1,
132 [Defined if support for Serf is enabled])
133fi
134
135dnl Search for apr_memcache (only affects fs_fs)
136SVN_LIB_APR_MEMCACHE
137
138if test "$svn_lib_apr_memcache" = "yes"; then
139 AC_DEFINE(SVN_HAVE_MEMCACHE, 1,
140 [Defined if apr_memcache (standalone or in apr-util) is present])
141fi
142
143
144dnl Find Apache with a recent-enough magic module number
145SVN_FIND_APACHE(20020903)
146
147dnl Search for SQLite. If you change SQLITE_URL from a .zip to
148dnl something else also update build/ac-macros/sqlite.m4 to reflect
149dnl the correct command to unpack the downloaded file.
150SQLITE_MINIMUM_VER="3.7.12"
151SQLITE_RECOMMENDED_VER="3.7.15.1"
152SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip"
153
154SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER},
155 ${SQLITE_URL})
156
157AC_ARG_ENABLE(sqlite-compatibility-version,
158 AS_HELP_STRING([--enable-sqlite-compatibility-version=X.Y.Z],
159 [Allow binary to run against SQLite as old as ARG]),
160 [sqlite_compat_ver=$enableval],[sqlite_compat_ver=no])
161
162if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
163 SVN_SQLITE_VERNUM_PARSE([$sqlite_compat_ver],
164 [sqlite_compat_ver_num])
165 CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS"
166 CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS"
167fi
168
169SVN_CHECK_FOR_ATOMIC_BUILTINS
170
171if test "$svn_cv_atomic_builtins" = "yes"; then
172 AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
173fi
174
175dnl Set up a number of directories ---------------------
176
177dnl Create SVN_BINDIR for proper substitution
178if test "${bindir}" = '${exec_prefix}/bin'; then
179 if test "${exec_prefix}" = "NONE"; then
180 if test "${prefix}" = "NONE"; then
181 SVN_BINDIR="${ac_default_prefix}/bin"
182 else
183 SVN_BINDIR="${prefix}/bin"
184 fi
185 else
186 SVN_BINDIR="${exec_prefix}/bin"
187 fi
188else
189 SVN_BINDIR="${bindir}"
190fi
191
192dnl fully evaluate this value. when we substitute it into our tool scripts,
193dnl they will not have things such as ${bindir} available
194SVN_BINDIR="`eval echo ${SVN_BINDIR}`"
195AC_SUBST(SVN_BINDIR)
196
197dnl provide ${bindir} in svn_private_config.h for use in compiled code
198AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}",
199 [Defined to be the path to the installed binaries])
200
201dnl This purposely does *not* allow for multiple parallel installs.
202dnl However, it is compatible with most gettext usages.
203localedir='${datadir}/locale'
204AC_SUBST(localedir)
205
206dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR.
207if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then
208 exp_localedir='${ac_default_prefix}/share/locale'
209else
210 exp_localedir=$localedir
211fi
212SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}")
213AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}",
214 [Defined to be the path to the installed locale dirs])
215
216dnl Check for libtool -- we'll definitely need it for all our shared libs!
217AC_MSG_NOTICE([configuring libtool now])
218ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
219AC_ARG_ENABLE(experimental-libtool,
220 AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]),
221 [experimental_libtool=$enableval],[experimental_libtool=no])
222
223if test "$experimental_libtool" = "yes"; then
224 echo "using APR's libtool"
225 sh_libtool="`$apr_config --apr-libtool`"
226 LIBTOOL="$sh_libtool"
227 SVN_LIBTOOL="$sh_libtool"
228else
229 sh_libtool="$abs_builddir/libtool"
230 SVN_LIBTOOL="\$(SHELL) $sh_libtool"
231fi
232AC_SUBST(SVN_LIBTOOL)
233
234dnl Determine the libtool version
235changequote(, )dnl
236lt_pversion=`$LIBTOOL --version 2>/dev/null|$SED -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
237lt_version=`echo $lt_pversion|$SED -e 's/\([a-z]*\)$/.\1/'`
238lt_major_version=`echo $lt_version | cut -d'.' -f 1`
239changequote([, ])dnl
240
241dnl set the default parameters
242svn_enable_static=yes
243svn_enable_shared=yes
244
245dnl check for --enable-static option
246AC_ARG_ENABLE(static,
247 AS_HELP_STRING([--enable-static],
248 [Build static libraries]),
249 [svn_enable_static="$enableval"], [svn_enable_static="yes"])
250
251dnl check for --enable-shared option
252AC_ARG_ENABLE(shared,
253 AS_HELP_STRING([--enable-shared],
254 [Build shared libraries]),
255 [svn_enable_shared="$enableval"], [svn_enable_shared="yes"])
256
257if test "$svn_enable_static" = "yes" && test "$svn_enable_shared" = "yes" ; then
258 AC_MSG_NOTICE([building both shared and static libraries])
259elif test "$svn_enable_static" = "yes" ; then
260 AC_MSG_NOTICE([building static libraries only])
261 LT_CFLAGS="-static $LT_CFLAGS"
262 LT_LDFLAGS="-static $LT_LDFLAGS"
263elif test "$svn_enable_shared" = "yes" ; then
264 AC_MSG_NOTICE([building shared libraries only])
265 if test "$lt_major_version" = "1" ; then
266 LT_CFLAGS="-prefer-pic $LT_CFLAGS"
267 elif test "$lt_major_version" = "2" ; then
268 LT_CFLAGS="-shared $LT_CFLAGS"
269 fi
270 LT_LDFLAGS="-shared $LT_LDFLAGS"
271else
272 AC_MSG_ERROR([cannot disable both shared and static libraries])
273fi
274
275dnl Check for --enable-all-static option
276AC_ARG_ENABLE(all-static,
277 AS_HELP_STRING([--enable-all-static],
278 [Build completely static (standalone) binaries.]),
279 [
280 if test "$enableval" = "yes" ; then
281 LT_LDFLAGS="-all-static $LT_LDFLAGS"
282 elif test "$enableval" != "no" ; then
283 AC_MSG_ERROR([--enable-all-static doesn't accept argument])
284 fi
285])
286
287AC_SUBST(LT_CFLAGS)
288AC_SUBST(LT_LDFLAGS)
289
290AC_ARG_ENABLE(local-library-preloading,
291 AS_HELP_STRING([--enable-local-library-preloading],
292 [Enable preloading of locally built libraries in locally
293 built executables. This may be necessary for testing
294 prior to installation on some platforms. It does not
295 work on some platforms (Darwin, OpenBSD, ...).]),
296 [
297 if test "$enableval" != "no"; then
298 if test "$svn_enable_shared" = "yes"; then
299 TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
300 else
301 AC_MSG_ERROR([--enable-local-library-preloading conflicts with --disable-shared])
302 fi
303 else
304 TRANSFORM_LIBTOOL_SCRIPTS=""
305 fi
306 ], [
307 TRANSFORM_LIBTOOL_SCRIPTS=""
308])
309AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS)
310
311dnl Check if -no-undefined is needed for the platform.
312dnl It should always work but with libtool 1.4.3 on OS X it breaks the build.
313dnl So we only turn it on for platforms where we know we really need it.
314AC_MSG_CHECKING([whether libtool needs -no-undefined])
315case $host in
316 *-*-cygwin*)
317 AC_MSG_RESULT([yes])
318 LT_NO_UNDEFINED="-no-undefined"
319 ;;
320 *)
321 AC_MSG_RESULT([no])
322 LT_NO_UNDEFINED=""
323 ;;
324esac
325AC_SUBST(LT_NO_UNDEFINED)
326
327AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
328case $host in
329 *-*-cygwin*)
330 AC_MSG_RESULT([yes])
331 AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
332 [Define if circular linkage is not possible on this platform.])
333 ;;
334 *)
335 AC_MSG_RESULT([no])
336 ;;
337esac
338
339dnl Check for trang.
340trang=yes
341AC_ARG_WITH(trang,
342AS_HELP_STRING([--with-trang=PATH],
343 [Specify the command to run the trang schema converter]),
344[
345 trang="$withval"
346])
347if test "$trang" = "yes"; then
348 AC_PATH_PROG(TRANG, trang, none)
349else
350 TRANG="$trang"
351 AC_SUBST(TRANG)
352fi
353
354dnl Check for doxygen
355doxygen=yes
356AC_ARG_WITH(doxygen,
357AC_HELP_STRING([--with-doxygen=PATH],
358 [Specify the command to run doxygen]),
359[
360 doxygen="$withval"
361])
362if test "$doxygen" = "yes"; then
363 AC_PATH_PROG(DOXYGEN, doxygen, none)
364else
365 DOXYGEN="$doxygen"
366 AC_SUBST(DOXYGEN)
367fi
368
369
370dnl Check for libraries --------------------
371
372dnl Expat -------------------
373
374AC_ARG_WITH(expat,
375 AS_HELP_STRING([--with-expat=INCLUDES:LIB_SEARCH_DIRS:LIBS],
376 [Specify location of Expat]),
377 [svn_lib_expat="$withval"],
378 [svn_lib_expat="::expat"])
379
380# APR-util accepts "builtin" as an argument to this option so if the user
381# passed "builtin" pretend the user didn't specify the --with-expat option
382# at all. Expat will (hopefully) be found in apr-util.
383test "_$svn_lib_expat" = "_builtin" && svn_lib_expat="::expat"
384
385AC_MSG_CHECKING([for Expat])
386if test -n "`echo "$svn_lib_expat" | $EGREP ":.*:"`"; then
387 SVN_XML_INCLUDES=""
388 for i in [`echo "$svn_lib_expat" | $SED -e "s/\([^:]*\):.*/\1/"`]; do
389 SVN_XML_INCLUDES="$SVN_XML_INCLUDES -I$i"
390 done
391 SVN_XML_INCLUDES="${SVN_XML_INCLUDES## }"
392 for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\):.*/\1/"`]; do
393 LDFLAGS="$LDFLAGS -L$l"
394 done
395 for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\)/\1/"`]; do
396 SVN_XML_LIBS="$SVN_XML_LIBS -l$l"
397 done
398 SVN_XML_LIBS="${SVN_XML_LIBS## }"
399 old_CPPFLAGS="$CPPFLAGS"
400 old_LIBS="$LIBS"
401 CPPFLAGS="$CPPFLAGS $SVN_XML_INCLUDES"
402 LIBS="$LIBS $SVN_XML_LIBS"
403 AC_LINK_IFELSE([AC_LANG_SOURCE([[
404#include <expat.h>
405int main()
406{XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no")
407 LIBS="$old_LIBS"
408 if test "$svn_lib_expat" = "yes"; then
409 AC_MSG_RESULT([yes])
410 else
411 SVN_XML_INCLUDES=""
412 SVN_XML_LIBS=""
413 CPPFLAGS="$CPPFLAGS $SVN_APRUTIL_INCLUDES"
414 if test "$enable_all_static" != "yes"; then
415 SVN_APRUTIL_LIBS="$SVN_APRUTIL_LIBS `$apu_config --libs`"
416 fi
417 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
418#include <expat.h>
419int main()
420{XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no")
421 if test "$svn_lib_expat" = "yes"; then
422 AC_MSG_RESULT([yes])
423 AC_MSG_WARN([Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option.])
424 else
425 AC_MSG_RESULT([no])
426 AC_MSG_ERROR([Expat not found])
427 fi
428 fi
429 CPPFLAGS="$old_CPPFLAGS"
430else
431 AC_MSG_RESULT([no])
432 if test "$svn_lib_expat" = "yes"; then
433 AC_MSG_ERROR([--with-expat option requires argument])
434 elif test "$svn_lib_expat" = "no"; then
435 AC_MSG_ERROR([Expat is required])
436 else
437 AC_MSG_ERROR([Invalid syntax of argument of --with-expat option])
438 fi
439fi
440AC_SUBST(SVN_XML_INCLUDES)
441AC_SUBST(SVN_XML_LIBS)
442
443dnl Berkeley DB -------------------
444
445# Berkeley DB on SCO OpenServer needs -lsocket
446AC_CHECK_LIB(socket, socket)
447
448# Build the BDB filesystem library only if we have an appropriate
449# version of Berkeley DB.
450case "$host" in
451powerpc-apple-darwin*)
452 # Berkeley DB 4.0 does not work on OS X.
453 SVN_FS_WANT_DB_MAJOR=4
454 SVN_FS_WANT_DB_MINOR=1
455 SVN_FS_WANT_DB_PATCH=25
456 ;;
457*)
458 SVN_FS_WANT_DB_MAJOR=4
459 SVN_FS_WANT_DB_MINOR=0
460 SVN_FS_WANT_DB_PATCH=14
461 ;;
462esac
463db_alt_version="5.x"
464# Look for libdb4.so first:
465SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
466 $SVN_FS_WANT_DB_PATCH, [db4 db])
467
468AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR,
469 [The desired major version for the Berkeley DB])
470AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR,
471 [The desired minor version for the Berkeley DB])
472AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH,
473 [The desired patch version for the Berkeley DB])
474
475AC_SUBST(SVN_DB_INCLUDES)
476AC_SUBST(SVN_DB_LIBS)
477
478SVN_LIB_SASL
479
480if test "$svn_lib_sasl" = "yes"; then
481 AC_DEFINE(SVN_HAVE_SASL, 1,
482 [Defined if Cyrus SASL v2 is present on the system])
483fi
484
485dnl Mac OS specific features -------------------
486
487SVN_LIB_MACHO_ITERATE
488SVN_LIB_MACOS_PLIST
489SVN_LIB_MACOS_KEYCHAIN
490
491dnl APR_HAS_DSO -------------------
492
493AC_MSG_CHECKING([whether APR has support for DSOs])
494old_CPPFLAGS="$CPPFLAGS"
495CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES"
496AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
497#include <apr.h>
498#if !APR_HAS_DSO
499#error
500#endif]])],
501 APR_HAS_DSO="yes"
502 AC_MSG_RESULT([yes]),
503 APR_HAS_DSO="no"
504 AC_MSG_RESULT([no]))
505CPPFLAGS="$old_CPPFLAGS"
506
507
508dnl D-Bus (required for support for KWallet) -------------------
509
510if test -n "$PKG_CONFIG"; then
511 AC_MSG_CHECKING([for D-Bus .pc file])
512 if $PKG_CONFIG --exists dbus-1; then
513 AC_MSG_RESULT([yes])
514 old_CPPFLAGS="$CPPFLAGS"
515 old_LIBS="$LIBS"
516 DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`"
517 AC_MSG_CHECKING([D-Bus version])
518 DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`"
519 AC_MSG_RESULT([$DBUS_VERSION])
520 # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE
521 if test -n ["`echo "$DBUS_VERSION" | $EGREP '^0\.[[:digit:]]+'`"]; then
522 DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE"
523 fi
524 DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`"
525 CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS"
526 LIBS="$LIBS $DBUS_LIBS"
527 AC_MSG_CHECKING([for D-Bus])
528 AC_LINK_IFELSE([AC_LANG_SOURCE([[
529#include <dbus/dbus.h>
530int main()
531{dbus_bus_get(DBUS_BUS_SESSION, NULL);}]])], HAVE_DBUS="yes", HAVE_DBUS="no")
532 if test "$HAVE_DBUS" = "yes"; then
533 AC_MSG_RESULT([yes])
534 else
535 AC_MSG_RESULT([no])
536 fi
537 CPPFLAGS="$old_CPPFLAGS"
538 LIBS="$old_LIBS"
539 else
540 AC_MSG_RESULT([no])
541 fi
542fi
543
544dnl GPG Agent -------------------
545
546AC_ARG_WITH(gpg_agent,
547AS_HELP_STRING([--without-gpg-agent],
548 [Disable support for GPG-Agent]),
549 [], [with_gpg_agent=yes])
550AC_MSG_CHECKING([whether to support GPG-Agent])
551if test "$with_gpg_agent" = "yes"; then
552 AC_MSG_RESULT([yes])
553 AC_DEFINE([SVN_HAVE_GPG_AGENT], [1],
554 [Is GPG Agent support enabled?])
555else
556 AC_MSG_RESULT([no])
557fi
558
559AC_SUBST(SVN_HAVE_GPG_AGENT)
560
561dnl GNOME Keyring -------------------
562
563AC_ARG_WITH(gnome_keyring,
564 AS_HELP_STRING([--with-gnome-keyring],
565 [Enable use of GNOME Keyring for auth credentials (enabled by default if found)]),
566 [with_gnome_keyring="$withval"],
567 [with_gnome_keyring=auto])
568
569found_gnome_keyring=no
570AC_MSG_CHECKING([whether to look for GNOME Keyring])
571if test "$with_gnome_keyring" != "no"; then
572 AC_MSG_RESULT([yes])
573 if test "$svn_enable_shared" = "yes"; then
574 if test "$APR_HAS_DSO" = "yes"; then
575 if test -n "$PKG_CONFIG"; then
576 AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
577 if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
578 AC_MSG_RESULT([yes])
579 old_CPPFLAGS="$CPPFLAGS"
580 SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
581 CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
582 AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
583 AC_MSG_CHECKING([for GNOME Keyring])
584 if test "$found_gnome_keyring" = "yes"; then
585 AC_MSG_RESULT([yes])
586 AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
587 [Is GNOME Keyring support enabled?])
588 CPPFLAGS="$old_CPPFLAGS"
589 SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
590 else
591 AC_MSG_RESULT([no])
592 if test "$with_gnome_keyring" = "yes"; then
593 AC_MSG_ERROR([cannot find GNOME Keyring])
594 fi
595 fi
596 else
597 AC_MSG_RESULT([no])
598 if test "$with_gnome_keyring" = "yes"; then
599 AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
600 else
601 with_gnome_keyring=no
602 fi
603 fi
604 else
605 if test "$with_gnome_keyring" = "yes"; then
606 AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
607 else
608 with_gnome_keyring=no
609 fi
610 fi
611 else
612 if test "$with_gnome_keyring" = "yes"; then
613 AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
614 else
615 with_gnome_keyring=no
616 fi
617 fi
618 else
619 if test "$with_gnome_keyring" = "yes"; then
620 AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
621 else
622 with_gnome_keyring=no
623 fi
624 fi
625else
626 AC_MSG_RESULT([no])
627fi
628AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
629AC_SUBST(SVN_GNOME_KEYRING_LIBS)
630
631
632dnl Ev2 experimental features ----------------------
633dnl Note: The Ev2 implementations will be built unconditionally, but by
634dnl providing this flag, users can choose to use the currently-shimmed Ev2
635dnl editor implementations for various operations. This will probably
636dnl negatively impact performance, but is useful for testing.
637AC_ARG_ENABLE(ev2-impl,
638 AS_HELP_STRING([--enable-ev2-impl],
639 [Use Ev2 implementations, where available [EXPERIMENTAL]]),
640 [enable_ev2_impl=$enableval],[enable_ev2_impl=no])
641if test "$enable_ev2_impl" = "yes"; then
642 AC_DEFINE(ENABLE_EV2_IMPL, 1,
643 [Define to 1 if Ev2 implementations should be used.])
644fi
645
646
647dnl I18n -------------------
648
649AC_ARG_ENABLE(nls,
650 AS_HELP_STRING([--disable-nls],[Disable gettext functionality]),
651 [enable_nls=$enableval],[enable_nls=yes])
652
653USE_NLS="no"
654if test "$enable_nls" = "yes"; then
655 dnl First, check to see if there is a working msgfmt.
656 AC_PATH_PROG(MSGFMT, msgfmt, none)
657 AC_PATH_PROG(MSGMERGE, msgmerge, none)
658 AC_PATH_PROG(XGETTEXT, xgettext, none)
659 if test "$MSGFMT" != "none"; then
660 AC_SEARCH_LIBS(bindtextdomain, [intl], [],
661 [
662 enable_nls="no"
663 ])
664 if test "$enable_nls" = "no"; then
665 # Destroy the cached result so we can test again
666 unset ac_cv_search_bindtextdomain
667 # On some systems, libintl needs libiconv to link properly,
668 # so try again with -liconv.
669 AC_SEARCH_LIBS(bindtextdomain, [intl],
670 [
671 enable_nls="yes"
672 # This is here so that -liconv ends up in LIBS
673 # if it worked with -liconv.
674 AC_CHECK_LIB(iconv, libiconv_open)
675 ],
676 [
677 AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.])
678 enable_nls="no"
679 ], -liconv)
680 fi
681 if test "$enable_nls" = "yes"; then
682 AC_DEFINE(ENABLE_NLS, 1,
683 [Define to 1 if translation of program messages to the user's
684 native language is requested.])
685 USE_NLS="yes"
686 fi
687 fi
688fi
689
690AH_BOTTOM([
691/* Indicate to translators that string X should be translated. Do not look
692 up the translation at run time; just expand to X. This macro is suitable
693 for use where a constant string is required at compile time. */
694#define N_(x) x
695/* Indicate to translators that we have decided the string X should not be
696 translated. Expand to X. */
697#define U_(x) x
698#ifdef ENABLE_NLS
699#include <locale.h>
700#include <libintl.h>
701/* Indicate to translators that string X should be translated. At run time,
702 look up and return the translation of X. */
703#define _(x) dgettext(PACKAGE_NAME, x)
704/* Indicate to translators that strings X1 and X2 are singular and plural
705 forms of the same message, and should be translated. At run time, return
706 an appropriate translation depending on the number N. */
707#define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
708#else
709#define _(x) (x)
710#define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)
711#define gettext(x) (x)
712#define dgettext(domain, x) (x)
713#endif
714])
715
716dnl Used to simulate makefile conditionals.
717GETTEXT_CODESET=\#
718NO_GETTEXT_CODESET=\#
719if test $USE_NLS = "yes"; then
720 AC_CHECK_FUNCS(bind_textdomain_codeset,
721 [ GETTEXT_CODESET="" ],
722 [ NO_GETTEXT_CODESET="" ])
723fi
724AC_SUBST(GETTEXT_CODESET)
725AC_SUBST(NO_GETTEXT_CODESET)
726
727# Check if we are using GNU gettext.
728GNU_GETTEXT=no
729MSGFMTFLAGS=''
730if test $USE_NLS = "yes"; then
731 AC_MSG_CHECKING(if we are using GNU gettext)
732 if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then
733 GNU_GETTEXT=yes
734 MSGFMTFLAGS='-c'
735 fi
736 AC_MSG_RESULT($GNU_GETTEXT)
737fi
738AC_SUBST(MSGFMTFLAGS)
739
740dnl libmagic -------------------
741
742libmagic_found=no
743
744AC_ARG_WITH(libmagic,AS_HELP_STRING([--with-libmagic=PREFIX],
745 [libmagic filetype detection library]),
746[
747 if test "$withval" = "yes" ; then
748 AC_CHECK_HEADER(magic.h, [
749 AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
750 ])
751 libmagic_prefix="the default locations"
752 elif test "$withval" != "no"; then
753 libmagic_prefix=$withval
754 save_cppflags="$CPPFLAGS"
755 CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include"
756 AC_CHECK_HEADERS(magic.h,[
757 save_ldflags="$LDFLAGS"
758 LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS"
759 AC_CHECK_LIB(magic, magic_open, [libmagic_found="yes"])
760 LDFLAGS="$save_ldflags"
761 ])
762 CPPFLAGS="$save_cppflags"
763 fi
764 if test "$withval" != "no" && test "$libmagic_found" = "no"; then
765 AC_MSG_ERROR([[--with-libmagic requested, but libmagic not found at $libmagic_prefix]])
766 fi
767],
768[
769 AC_CHECK_HEADER(magic.h, [
770 AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"])
771 ])
772])
773
774if test "$libmagic_found" != "no"; then
775 AC_DEFINE([SVN_HAVE_LIBMAGIC], [1], [Defined if libmagic support is enabled])
776 SVN_MAGIC_LIBS="-lmagic"
777fi
778
779if test "$libmagic_found" = "yes"; then
780 SVN_MAGIC_INCLUDES="-I$libmagic_prefix/include"
781 LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$libmagic_prefix/lib)`"
782fi
783
784AC_SUBST(SVN_MAGIC_INCLUDES)
785AC_SUBST(SVN_MAGIC_LIBS)
786
787dnl KWallet -------------------
788SVN_LIB_KWALLET
789
790if test "$svn_lib_kwallet" = "yes"; then
791 AC_DEFINE([SVN_HAVE_KWALLET], 1,
792 [Defined if KWallet support is enabled])
793fi
794
795dnl plaintext passwords -------------------
796AC_ARG_ENABLE(plaintext-password-storage,
797AS_HELP_STRING([--disable-plaintext-password-storage],
798 [Disable on-disk caching of plaintext passwords and passphrases.
799 (Leaving this functionality enabled will not force Subversion
800 to store passwords in plaintext, but does permit users to
801 explicitly allow that behavior via runtime configuration.)]),
802[
803 if test "$enableval" = "no"; then
804 AC_MSG_NOTICE([Disabling plaintext password/passphrase storage])
805 AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1,
806 [Defined if plaintext password/passphrase storage is disabled])
807 fi
808])
809
810dnl Build and install rules -------------------
811
812INSTALL_STATIC_RULES="install-bin install-docs"
813INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static"
814INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE"
815BUILD_RULES="fsmod-lib ramod-lib lib bin test sub-test $BUILD_APACHE_RULE tools"
816
817if test "$svn_lib_berkeley_db" = "yes"; then
818 BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"
819 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
820 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib"
821 BDB_TEST_DEPS="\$(BDB_TEST_DEPS)"
822 BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)"
823fi
824
825if test "$svn_lib_serf" = "yes"; then
826 BUILD_RULES="$BUILD_RULES serf-lib"
827 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
828 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib"
829fi
830
831if test "$svn_lib_kwallet" = "yes"; then
832 BUILD_RULES="$BUILD_RULES kwallet-lib"
833 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`"
834 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib"
835fi
836
837if test "$found_gnome_keyring" = "yes"; then
838 BUILD_RULES="$BUILD_RULES gnome-keyring-lib"
839 INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`"
840 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib"
841fi
842
843if test "$USE_NLS" = "yes"; then
844 BUILD_RULES="$BUILD_RULES locale"
845 INSTALL_RULES="$INSTALL_RULES install-locale"
846fi
847
848AC_SUBST(BUILD_RULES)
849AC_SUBST(INSTALL_STATIC_RULES)
850AC_SUBST(INSTALL_RULES)
851AC_SUBST(BDB_TEST_DEPS)
852AC_SUBST(BDB_TEST_PROGRAMS)
853
854dnl Check for header files ----------------
855
856dnl Standard C headers
857AC_HEADER_STDC
858
859dnl Check for typedefs, structures, and compiler characteristics ----------
860
861dnl if compiler doesn't understand `const', then define it empty
862AC_C_CONST
863
864dnl if non-existent, define size_t to be `unsigned'
865AC_TYPE_SIZE_T
866
867
868dnl Check for library functions ----------
869
870AC_FUNC_MEMCMP
871
872dnl svn_error's default warning handler uses vfprintf()
873AC_FUNC_VPRINTF
874
875dnl check for functions needed in special file handling
876AC_CHECK_FUNCS(symlink readlink)
877
878dnl check for uname
879AC_CHECK_HEADERS(sys/utsname.h, [AC_CHECK_FUNCS(uname)], [])
880
881dnl check for termios
882AC_CHECK_HEADER(termios.h,[
883 AC_CHECK_FUNCS(tcgetattr tcsetattr,[
884 AC_DEFINE(HAVE_TERMIOS_H,1,[Defined if we have a usable termios library.])
885 ])
886])
887
888dnl Process some configuration options ----------
889
890AC_ARG_WITH(openssl,
891AS_HELP_STRING([--with-openssl],
892 [This option does NOT affect the Subversion build process in any
893 way. It tells an integrated Serf HTTP client library build
894 process where to locate the OpenSSL library when (and only when)
895 building Serf as an integrated part of the Subversion build
896 process. When linking to a previously installed version of Serf
897 instead, you do not need to use this option.]),
898[])
899
900AC_ARG_ENABLE(debug,
901AS_HELP_STRING([--enable-debug],
902 [Turn on debugging]),
903[
904 if test "$enableval" = "yes" ; then
905 enable_debugging="yes"
906 else
907 enable_debugging="no"
908 fi
909],
910[
911 # Neither --enable-debug nor --disable-debug was passed.
912 enable_debugging="maybe"
913])
914
915AC_ARG_ENABLE(optimize,
916AS_HELP_STRING([--enable-optimize],
917 [Turn on optimizations]),
918[
919 if test "$enableval" = "yes" ; then
920 enable_optimization="yes"
921 else
922 enable_optimization="no"
923 fi
924],
925[
926 # Neither --enable-optimize nor --disable-optimize was passed.
927 enable_optimization="maybe"
928])
929
930dnl Use -Wl,--no-undefined during linking of some libraries
931AC_ARG_ENABLE(disallowing-of-undefined-references,
932 [AS_HELP_STRING([--enable-disallowing-of-undefined-references],
933 [Use -Wl,--no-undefined flag during linking of some libraries to disallow undefined references])])
934if test "$enable_disallowing_of_undefined_references" != "yes" && test "`uname`" != "Linux"; then
935 enable_disallowing_of_undefined_references="no"
936fi
937if test "$enable_disallowing_of_undefined_references" != "no"; then
938 AC_MSG_CHECKING([for -Wl,--no-undefined])
939 old_LDFLAGS="$LDFLAGS"
940 LDFLAGS="$LDFLAGS -Wl,--no-undefined"
941 AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){;}]])], [svn_wl_no_undefined="yes"], [svn_wl_no_undefined="no"])
942 LDFLAGS="$old_LDFLAGS"
943 if test "$svn_wl_no_undefined" = "yes"; then
944 AC_MSG_RESULT([yes])
945 for library_dir in "$abs_srcdir/subversion/libsvn_"*; do
946 eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined"
947 done
948 else
949 AC_MSG_RESULT([no])
950 if test "$enable_disallowing_of_undefined_references" = "yes"; then
951 AC_MSG_ERROR([--enable-disallowing-of-undefined-references explicitly requested, but -Wl,--no-undefined not supported])
952 fi
953 fi
954fi
955AC_SUBST([libsvn_auth_gnome_keyring_LDFLAGS])
956AC_SUBST([libsvn_auth_kwallet_LDFLAGS])
957AC_SUBST([libsvn_client_LDFLAGS])
958AC_SUBST([libsvn_delta_LDFLAGS])
959AC_SUBST([libsvn_diff_LDFLAGS])
960AC_SUBST([libsvn_fs_LDFLAGS])
961AC_SUBST([libsvn_fs_base_LDFLAGS])
962AC_SUBST([libsvn_fs_fs_LDFLAGS])
963AC_SUBST([libsvn_fs_util_LDFLAGS])
964AC_SUBST([libsvn_ra_LDFLAGS])
965AC_SUBST([libsvn_ra_local_LDFLAGS])
966AC_SUBST([libsvn_ra_serf_LDFLAGS])
967AC_SUBST([libsvn_ra_svn_LDFLAGS])
968AC_SUBST([libsvn_repos_LDFLAGS])
969AC_SUBST([libsvn_subr_LDFLAGS])
970AC_SUBST([libsvn_wc_LDFLAGS])
971
972
973AC_ARG_ENABLE(maintainer-mode,
974AS_HELP_STRING([--enable-maintainer-mode],
975 [Turn on debugging and very strict compile-time warnings]),
976[
977 if test "$enableval" = "yes" ; then
978 if test "$enable_debugging" = "no" ; then
979 AC_MSG_ERROR([Can't have --disable-debug and --enable-maintainer-mode])
980 fi
981 enable_debugging=yes
982
983 dnl Enable some extra warnings. Put these before the user's flags
984 dnl so the user can specify flags that override these.
985 if test "$GCC" = "yes"; then
986 AC_MSG_NOTICE([maintainer-mode: adding GCC warning flags])
987
988 dnl some additional flags that can be handy for an occasional review,
989 dnl but throw too many warnings in svn code, of too little importance,
990 dnl to keep these enabled. Remove the "dnl" to do a run with these
991 dnl switches enabled.
992 dnl ./configure CUSERFLAGS="-Wswitch-enum -Wswitch-default"
993
994 dnl Add each of the following flags only if the C compiler accepts it.
995 CFLAGS_KEEP="$CFLAGS"
996 CFLAGS=""
997
998 SVN_CFLAGS_ADD_IFELSE([-Werror=implicit-function-declaration])
999 SVN_CFLAGS_ADD_IFELSE([-Werror=declaration-after-statement])
1000 SVN_CFLAGS_ADD_IFELSE([-Wextra-tokens])
1001 SVN_CFLAGS_ADD_IFELSE([-Wnewline-eof])
1002 SVN_CFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
1003 SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
1004 SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
1005 SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
1006
1007 CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
1008 CFLAGS="$CFLAGS_KEEP"
1009
1010 dnl Add flags that all versions of GCC (should) support
1011 CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long $CMAINTAINERFLAGS"
1012 fi
1013 if test "$GXX" = "yes"; then
1014 AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
1015
1016 dnl Add each of the following flags only if the C++ compiler accepts it.
1017 CXXFLAGS_KEEP="$CXXFLAGS"
1018 CXXFLAGS=""
1019
1020 SVN_CXXFLAGS_ADD_IFELSE([-Wextra-tokens])
1021 SVN_CXXFLAGS_ADD_IFELSE([-Wnewline-eof])
1022 SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
1023 SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers])
1024
1025 CXXMAINTAINERFLAGS="$CXXFLAGS $CXXMAINTAINERFLAGS"
1026 CXXFLAGS="$CXXFLAGS_KEEP"
1027
1028 dnl Add flags that all versions of G++ (should) support
1029 CXXMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wunused -Wunreachable-code $CXXMAINTAINERFLAGS"
1030 fi
1031 fi
1032])
1033
1034if test "$enable_debugging" = "yes" ; then
1035 dnl At the moment, we don't want optimization, because we're
1036 dnl debugging. Unless optiization was explicitly enabled.
1037 if test "$enable_optimization" != "yes"; then
1038 AC_MSG_NOTICE([Disabling optimizations for debugging])
1039 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1040 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1041 fi
1042 dnl Add debugging flags, unless they were set by the user
1043 if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then
1044 AC_MSG_NOTICE([Enabling debugging for C])
1045 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1046 SVN_CFLAGS_ADD_IFELSE([-fno-inline])
1047 SVN_CFLAGS_ADD_IFELSE([-fno-omit-frame-pointer])
1048 SVN_CFLAGS_ADD_IFELSE([-g3],[],[
1049 SVN_CFLAGS_ADD_IFELSE([-g2],[],[
1050 SVN_CFLAGS_ADD_IFELSE([-g])])])
1051 fi
1052 if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then
1053 AC_MSG_NOTICE([Enabling debugging for C++])
1054 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1055 SVN_CXXFLAGS_ADD_IFELSE([-fno-inline])
1056 SVN_CXXFLAGS_ADD_IFELSE([-fno-omit-frame-pointer])
1057 SVN_CXXFLAGS_ADD_IFELSE([-g3],[],[
1058 SVN_CXXFLAGS_ADD_IFELSE([-g2],[],[
1059 SVN_CXXFLAGS_ADD_IFELSE([-g])])])
1060 fi
1061 dnl SVN_DEBUG enables specific features for developer builds
1062 dnl AP_DEBUG enables specific (Apache) features for developer builds
1063 CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
1064 CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
1065elif test "$enable_debugging" = "no" ; then
1066 AC_MSG_NOTICE([Disabling debugging])
1067 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1068 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"]
1069 dnl Compile with NDEBUG to get rid of assertions
1070 CFLAGS="$CFLAGS -DNDEBUG"
1071 CXXFLAGS="$CXXFLAGS -DNDEBUG"
1072# elif test "$enable_debugging" = "maybe" ; then
1073# # do nothing
1074fi
1075
1076if test "$enable_optimization" = "yes"; then
1077 dnl Add optimization flags, unless they were set by the user
1078 if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then
1079 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1080 if test "$enable_debugging" = "yes"; then
1081 AC_MSG_NOTICE([Enabling optimizations for C (with debugging enabled)])
1082 SVN_CFLAGS_ADD_IFELSE([-O1],[],[
1083 SVN_CFLAGS_ADD_IFELSE([-O])])
1084 else
1085 AC_MSG_NOTICE([Enabling optimizations for C])
1086 SVN_CFLAGS_ADD_IFELSE([-O3],[],[
1087 SVN_CFLAGS_ADD_IFELSE([-O2],[],[
1088 SVN_CFLAGS_ADD_IFELSE([-O1],[],[
1089 SVN_CFLAGS_ADD_IFELSE([-O])])])])
1090 SVN_CFLAGS_ADD_IFELSE([-Wno-clobbered])
1091 SVN_CFLAGS_ADD_IFELSE([-flto])
1092 fi
1093 fi
1094 if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then
1095 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1096 if test "$enable_debugging" = "yes"; then
1097 AC_MSG_NOTICE([Enabling optimizations for C++ (with debugging enabled)])
1098 SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[
1099 SVN_CXXFLAGS_ADD_IFELSE([-O])])
1100 else
1101 AC_MSG_NOTICE([Enabling optimizations for C++])
1102 SVN_CXXFLAGS_ADD_IFELSE([-O3],[],[
1103 SVN_CXXFLAGS_ADD_IFELSE([-O2],[],[
1104 SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[
1105 SVN_CXXFLAGS_ADD_IFELSE([-O])])])])
1106 SVN_CXXFLAGS_ADD_IFELSE([-Wno-clobbered])
1107 SVN_CXXFLAGS_ADD_IFELSE([-flto])
1108 fi
1109 fi
1110elif test "$enable_optimization" = "no"; then
1111 dnl Remove all optimization flags
1112 AC_MSG_NOTICE([Disabling optimizations])
1113 CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1114 CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"]
1115# elif test "$enable_optimization" = "maybe" ; then
1116# # do nothing
1117fi
1118
1119dnl Dump the current compiler options
1120AC_MSG_NOTICE([C compiler flags: $CFLAGS])
1121AC_MSG_NOTICE([ user-defined: $CUSERFLAGS])
1122AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS])
1123AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS])
1124AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS])
1125AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS])
1126
1127AC_ARG_ENABLE(full-version-match,
1128AS_HELP_STRING([--disable-full-version-match],
1129 [Disable the full version match rules when checking
1130 Subversion library compatibility.]),
1131[
1132 if test "$enableval" = "no" ; then
1133 AC_MSG_NOTICE([Disabling svn full version matching])
1134 AC_DEFINE(SVN_DISABLE_FULL_VERSION_MATCH, 1,
1135 [Defined if the full version matching rules are disabled])
1136 fi
1137])
1138
1139AC_ARG_WITH(editor,
1140AS_HELP_STRING([--with-editor=PATH],
1141 [Specify a default editor for the subversion client.]),
1142[
1143
1144 if test "$withval" = "yes" ; then
1145 AC_MSG_ERROR([--with-editor requires an argument.])
1146 else
1147 SVN_CLIENT_EDITOR=$withval
1148 AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR",
1149 [The path of a default editor for the client.])
1150
1151 fi
1152
1153])
1154
1155SVN_LIB_Z
1156
1157MOD_ACTIVATION=""
1158AC_ARG_ENABLE(mod-activation,
1159AS_HELP_STRING([--enable-mod-activation],
1160 [Enable mod_dav_svn in httpd.conf]),
1161[
1162 if test "$enableval" = "yes" ; then
1163 MOD_ACTIVATION="-a"
1164 AC_MSG_NOTICE([Enabling apache module activation])
1165 else
1166 AC_MSG_NOTICE([Disabling apache module activation])
1167 fi
1168])
1169AC_SUBST(MOD_ACTIVATION)
1170
1171
1172
1173AC_ARG_ENABLE(gcov,
1174AC_HELP_STRING([--enable-gcov],
1175 [Turn on gcov coverage testing (GCC only).]),
1176[
1177 if test "$enableval" = "yes" ; then
1178 dnl Probably other compilers support something similar;
1179 dnl feel free to extend this to include them.
1180 if test "$GCC" = "yes"; then
1181 if test "$svn_enable_shared" = "yes" ; then
1182 AC_MSG_ERROR([Can't have --enable-gcov without --disable-shared (we
1183 recommend also using --enable-all-static).])
1184 fi
1185 if test ! "$enable_all_static" = "yes" ; then
1186 AC_MSG_WARN(We recommend --enable-all-static with --enable-gcov.)
1187 fi
1188 AC_MSG_NOTICE([Enabling gcov coverage testing.])
1189 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
1190 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
1191 else
1192 AC_MSG_ERROR([We only support --enable-gcov with GCC right now.])
1193 fi
1194 fi
1195])
1196
1197AC_ARG_ENABLE(gprof,
1198AS_HELP_STRING([--enable-gprof],
1199 [Produce gprof profiling data in 'gmon.out' (GCC only).]),
1200[
1201 if test "$enableval" = "yes" ; then
1202 dnl Probably other compilers support -pg or something similar;
1203 dnl feel free to extend this to include them.
1204 if test "$GCC" = "yes"; then
1205 if test "$svn_enable_shared" = "yes" ; then
1206 AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we
1207 recommend also using --enable-all-static).])
1208 fi
1209 if test ! "$enable_all_static" = "yes" ; then
1210 AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.)
1211 fi
1212 AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).])
1213 CFLAGS="$CFLAGS -pg"
1214 CXXFLAGS="$CXXFLAGS -pg"
1215 LT_LDFLAGS="$LT_LDFLAGS -pg"
1216 else
1217 AC_MSG_ERROR([We only support --enable-gprof with GCC right now.])
1218 fi
1219 fi
1220])
1221
1222
1223# Scripting and Bindings languages
1224
1225# Python: Used for testsuite, and bindings
1226
1227
1228PYTHON="`$abs_srcdir/build/find_python.sh`"
1229if test -z "$PYTHON"; then
1230 AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
1231 AC_MSG_WARN([or to use the Subversion Python bindings])
1232 AC_MSG_WARN([])
1233 AC_MSG_WARN([If you have a suitable Python installed, but not on the])
1234 AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
1235 AC_MSG_WARN([to the Python executable, and re-run configure])
1236fi
1237AC_PATH_PROGS(PYTHON, "$PYTHON", none)
1238
1239# The minimum version for the JVM runtime for our Java bytecode.
1240JAVA_OLDEST_WORKING_VER='1.5'
1241# SVN_CHECK_JDK sets $JAVA_CLASSPATH
1242SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
1243
1244AC_PATH_PROG(PERL, perl, none)
1245
1246if test -n "$RUBY"; then
1247 AC_PATH_PROG(RUBY, "$RUBY", none)
1248else
1249 AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby18 ruby1.9 ruby1 ruby1.9.3 ruby193, none)
1249 AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby18 ruby1.9 ruby1 ruby1.9.3 ruby193 ruby2.0 ruby2.1, none)
1250fi
1251if test "$RUBY" != "none"; then
1252 AC_MSG_CHECKING([rb_hash_foreach])
1253 if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then
1254 AC_MSG_RESULT([yes])
1255 if test -n "$RDOC"; then
1256 AC_PATH_PROG(RDOC, "$RDOC", none)
1257 else
1250fi
1251if test "$RUBY" != "none"; then
1252 AC_MSG_CHECKING([rb_hash_foreach])
1253 if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then
1254 AC_MSG_RESULT([yes])
1255 if test -n "$RDOC"; then
1256 AC_PATH_PROG(RDOC, "$RDOC", none)
1257 else
1258 AC_PATH_PROGS(RDOC, rdoc rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193, none)
1258 AC_PATH_PROGS(RDOC, rdoc rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193 rdoc2.0 rdoc2.1, none)
1259 fi
1260 AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
1261 svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`"
1262 ])
1263 RUBY_MAJOR="$svn_cv_ruby_major"
1264
1265 AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
1266 svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`"
1267 ])
1268 RUBY_MINOR="$svn_cv_ruby_minor"
1269
1270 AC_CACHE_CHECK([for Ruby teeny version], [svn_cv_ruby_teeny],[
1271 svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = RUBY_VERSION.split("."); print teeny;'`"
1272 ])
1273 RUBY_TEENY="$svn_cv_ruby_teeny"
1274
1275 AC_SUBST(RUBY_MAJOR)
1276 AC_SUBST(RUBY_MINOR)
1277 AC_SUBST(RUBY_TEENY)
1278 if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" -lt "3" \); then
1279 # Disallow Ruby between 1.8.7 and 1.9.3
1280 RUBY="none"
1281 AC_MSG_WARN([The detected Ruby is between 1.9 and 1.9.3])
1282 AC_MSG_WARN([Only 1.8.x and 1.9.3 releases are supported at this time])
1283 fi
1284 else
1285 AC_MSG_RESULT([no])
1286 RUBY="none"
1287 AC_MSG_WARN([The detected Ruby is too old for Subversion to use])
1288 AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the])
1289 AC_MSG_WARN([Subversion Ruby bindings])
1290 AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later])
1291 fi
1292fi
1293
1294SVN_CHECK_SWIG
1295
1296SVN_CHECK_CTYPESGEN
1297
1298dnl decide whether we want to link against the RA/FS libraries
1299AC_ARG_ENABLE(runtime-module-search,
1300AS_HELP_STRING([--enable-runtime-module-search],
1301 [Turn on dynamic loading of RA/FS libraries including
1302 third-party FS libraries]),
1303[
1304 if test "$enableval" = "yes"; then
1305 use_dso=yes
1306 if test "$svn_enable_shared" = "no"; then
1307 AC_MSG_ERROR([--enable-runtime-module-search conflicts with --disable-shared])
1308 fi
1309 AC_DEFINE(SVN_USE_DSO, 1,
1310 [Defined if svn should try to load DSOs])
1311 fi
1312])
1313
1314if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then
1315 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1,
1316 [Defined if libsvn_client should link against libsvn_ra_local])
1317 svn_ra_lib_deps="\$(RA_LOCAL_DEPS)"
1318 svn_ra_lib_install_deps="install-ramod-lib"
1319 svn_ra_lib_link="\$(RA_LOCAL_LINK)"
1320
1321 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
1322 [Defined if libsvn_client should link against libsvn_ra_svn])
1323 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
1324 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
1325
1326 if test "$svn_lib_serf" = "yes"; then
1327 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SERF, 1,
1328 [Defined if libsvn_client should link against libsvn_ra_serf])
1329 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)"
1330 svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib"
1331 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)"
1332 fi
1333
1334 SVN_RA_LIB_DEPS=$svn_ra_lib_deps
1335 SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps
1336 SVN_RA_LIB_LINK=$svn_ra_lib_link
1337
1338 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1,
1339 [Defined if libsvn_fs should link against libsvn_fs_fs])
1340 svn_fs_lib_deps="\$(FS_FS_DEPS)"
1341 svn_fs_lib_install_deps="install-fsmod-lib"
1342 svn_fs_lib_link="\$(FS_FS_LINK)"
1343
1344 if test "$svn_lib_berkeley_db" = "yes"; then
1345 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
1346 [Defined if libsvn_fs should link against libsvn_fs_base])
1347 svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)"
1348 svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib"
1349 svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)"
1350 fi
1351
1352 SVN_FS_LIB_DEPS=$svn_fs_lib_deps
1353 SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps
1354 SVN_FS_LIB_LINK=$svn_fs_lib_link
1355fi
1356
1357AC_SUBST(SVN_RA_LIB_DEPS)
1358AC_SUBST(SVN_RA_LIB_INSTALL_DEPS)
1359AC_SUBST(SVN_RA_LIB_LINK)
1360AC_SUBST(SVN_FS_LIB_DEPS)
1361AC_SUBST(SVN_FS_LIB_INSTALL_DEPS)
1362AC_SUBST(SVN_FS_LIB_LINK)
1363
1364# ==== JavaHL ================================================================
1365
1366dnl Possibly compile JavaHL
1367do_javahl_build=no
1368AC_ARG_ENABLE(javahl,
1369 AS_HELP_STRING([--enable-javahl],
1370 [Enable compilation of Java high-level bindings (requires C++)]),
1371 [ if test "$enableval" = "yes" ; then
1372 do_javahl_build="yes"
1373 fi
1374 ])
1375
1376JAVAHL_OBJDIR=""
1377INSTALL_EXTRA_JAVAHL_LIB=""
1378FIX_JAVAHL_LIB=""
1379JAVAHL_TESTS_TARGET=""
1380JAVAHL_COMPAT_TESTS_TARGET=""
1381LT_CXX_LIBADD=""
1382if test "$do_javahl_build" = "yes"; then
1383 dnl Check for suitable JDK
1384 if test "$JDK_SUITABLE" = "no"; then
1385 AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK.
1386 Please specify a suitable JDK using the --with-jdk option.])
1387 fi
1388
1389 dnl The temporary directory where libtool compiles libsvnjavahl.
1390 JAVAHL_OBJDIR='$(libsvnjavahl_PATH)/.libs'
1391
1392 os_arch=`uname`
1393 if test "$os_arch" = "Darwin"; then
1394 dnl On Darwin, JNI libs must be installed as .jnilib
1395 INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib'
1396 FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib"
1397 fi
1398 # This segment (and the rest of r10800) is very likely unnecessary
1399 # with libtool 1.5, which automatically adds libstdc++ as a
1400 # dependency to the C++ libraries it builds. So at some future time
1401 # when autogen.sh requires libtool 1.5 or higher, we can get rid of
1402 # it.
1403 AC_MSG_CHECKING([for additional flags to link C++ libraries])
1404 if test "x$ac_compiler_gnu" = "xyes"; then
1405 LT_CXX_LIBADD="-lstdc++"
1406 AC_MSG_RESULT([$LT_CXX_LIBADD])
1407 else
1408 AC_MSG_RESULT([none needed])
1409 fi
1410fi
1411AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB)
1412AC_SUBST(JAVAHL_OBJDIR)
1413AC_SUBST(FIX_JAVAHL_LIB)
1414AC_SUBST(LT_CXX_LIBADD)
1415
1416AC_ARG_WITH(junit,
1417AS_HELP_STRING([--with-junit=PATH],
1418 [Specify a path to the junit JAR file.]),
1419[
1420 if test "$withval" != "no"; then
1421 if test -n "$JAVA_CLASSPATH"; then
1422 JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH"
1423 else
1424 JAVA_CLASSPATH="$withval"
1425 fi
1426 JAVAHL_TESTS_TARGET="javahl-tests"
1427 JAVAHL_COMPAT_TESTS_TARGET="javahl-compat-tests"
1428 fi
1429])
1430AC_SUBST(JAVA_CLASSPATH)
1431AC_SUBST(JAVAHL_TESTS_TARGET)
1432AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
1433
1434# ==== Miscellaneous bits ====================================================
1435
1436# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
1437### I think we get this flag from APR, so the fix probably belongs there
1438if test "$CC" = "clang"; then
1439 SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
1440fi
1441
1442# Need to strip '-no-cpp-precomp' from CPPFLAGS for SWIG as well.
1443SWIG_CPPFLAGS="$CPPFLAGS"
1444SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-no-cpp-precomp ])
1445AC_SUBST([SWIG_CPPFLAGS])
1446
1447dnl Since this is used only on Unix-y systems, define the path separator as '/'
1448AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
1449 [Defined to be the path separator used on your local filesystem])
1450
1451AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null",
1452 [Defined to be the null device for the system])
1453
1454DEFAULT_FS_TYPE="fsfs"
1455AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE",
1456 [The fs type to use by default])
1457
1458DEFAULT_HTTP_LIBRARY="serf"
1459AC_DEFINE_UNQUOTED(DEFAULT_HTTP_LIBRARY, "$DEFAULT_HTTP_LIBRARY",
1460 [The http library to use by default])
1461
1462# BSD/OS (BSDi) needs to use a different include syntax in Makefile
1463INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
1464case "$host" in
1465 *bsdi*)
1466 # Check whether they've installed GNU make
1467 if ! make --version > /dev/null 2>&1; then
1468 # BSDi make
1469 INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
1470 fi
1471 ;;
1472esac
1473AC_SUBST(INCLUDE_OUTPUTS)
1474
1475# ==== Detection complete - output and run config.status =====================
1476
1477AC_CONFIG_HEADERS(subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in)
1478AC_CONFIG_COMMANDS([svn_private_config.h.tmp],
1479 [svn_cf=subversion/svn_private_config.h;
1480 $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" $svn_cf.tmp > $svn_cf.tmp.new
1481 cmp -s $svn_cf.tmp.new $svn_cf || mv -f $svn_cf.tmp.new $svn_cf
1482 rm -f $svn_cf.tmp.new $svn_cf.tmp],
1483 [SED="$SED"
1484 SVN_DB_HEADER="$SVN_DB_HEADER"])
1485AC_CONFIG_FILES([Makefile])
1486
1487SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
1488SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
1489SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)
1490if test -e packages/solaris/pkginfo.in; then
1491 SVN_CONFIG_SCRIPT(packages/solaris/pkginfo)
1492fi
1493AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
1494
1495# Ensure that SWIG is checked after reconfiguration.
1496rm -f .swig_checked
1497
1498dnl Provide ${host} for use in compiled code (for svn --version)
1499AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
1500 [Defined to the config.guess name of the build system])
1501
1502dnl Provide ${target} for use in compiled code (for user-agent string)
1503AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "${target}",
1504 [Defined to the config.guess name of the build target])
1505
1506AC_OUTPUT
1507
1508# ==== Print final messages to user ==========================================
1509
1510dnl Configure is long - users tend to miss warnings printed during it.
1511dnl Hence, print a warnings about what we did and didn't configure at the
1512dnl end, where people will actually see them.
1513
1514if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then
1515 AC_MSG_WARN([We have configured without BDB filesystem support
1516
1517
1518Berkeley DB 6 was found, but not used. Please re-run configure (see
1519./config.nice) with the '--enable-bdb6' flag to use it,
1520or explicitly specify '--disable-bdb6' or '--without-berkeley-db'
1521to silence this warning.
1522
1523Please note that some versions of Berkeley DB 6+ are under the GNU Affero
1524General Public License, version 3:
1525https://oss.oracle.com/pipermail/bdb/2013-June/000056.html
1526
1527The AGPL-3.0 licence may impose special requirements for making available
1528source code of server-side software. The text of the licence is:
1529https://www.gnu.org/licenses/agpl-3.0.html
1530http://opensource.org/licenses/AGPL-3.0
1531
1532The Berkeley DB backend to Subversion is deprecated; see
1533http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated
1534
1535The Subversion developers have not tested Subversion with Berkeley DB 6 for
1536technical problems or bugs.
1537])
1538fi
1259 fi
1260 AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
1261 svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`"
1262 ])
1263 RUBY_MAJOR="$svn_cv_ruby_major"
1264
1265 AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
1266 svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`"
1267 ])
1268 RUBY_MINOR="$svn_cv_ruby_minor"
1269
1270 AC_CACHE_CHECK([for Ruby teeny version], [svn_cv_ruby_teeny],[
1271 svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = RUBY_VERSION.split("."); print teeny;'`"
1272 ])
1273 RUBY_TEENY="$svn_cv_ruby_teeny"
1274
1275 AC_SUBST(RUBY_MAJOR)
1276 AC_SUBST(RUBY_MINOR)
1277 AC_SUBST(RUBY_TEENY)
1278 if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" -lt "3" \); then
1279 # Disallow Ruby between 1.8.7 and 1.9.3
1280 RUBY="none"
1281 AC_MSG_WARN([The detected Ruby is between 1.9 and 1.9.3])
1282 AC_MSG_WARN([Only 1.8.x and 1.9.3 releases are supported at this time])
1283 fi
1284 else
1285 AC_MSG_RESULT([no])
1286 RUBY="none"
1287 AC_MSG_WARN([The detected Ruby is too old for Subversion to use])
1288 AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the])
1289 AC_MSG_WARN([Subversion Ruby bindings])
1290 AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later])
1291 fi
1292fi
1293
1294SVN_CHECK_SWIG
1295
1296SVN_CHECK_CTYPESGEN
1297
1298dnl decide whether we want to link against the RA/FS libraries
1299AC_ARG_ENABLE(runtime-module-search,
1300AS_HELP_STRING([--enable-runtime-module-search],
1301 [Turn on dynamic loading of RA/FS libraries including
1302 third-party FS libraries]),
1303[
1304 if test "$enableval" = "yes"; then
1305 use_dso=yes
1306 if test "$svn_enable_shared" = "no"; then
1307 AC_MSG_ERROR([--enable-runtime-module-search conflicts with --disable-shared])
1308 fi
1309 AC_DEFINE(SVN_USE_DSO, 1,
1310 [Defined if svn should try to load DSOs])
1311 fi
1312])
1313
1314if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then
1315 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1,
1316 [Defined if libsvn_client should link against libsvn_ra_local])
1317 svn_ra_lib_deps="\$(RA_LOCAL_DEPS)"
1318 svn_ra_lib_install_deps="install-ramod-lib"
1319 svn_ra_lib_link="\$(RA_LOCAL_LINK)"
1320
1321 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
1322 [Defined if libsvn_client should link against libsvn_ra_svn])
1323 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
1324 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
1325
1326 if test "$svn_lib_serf" = "yes"; then
1327 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SERF, 1,
1328 [Defined if libsvn_client should link against libsvn_ra_serf])
1329 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)"
1330 svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib"
1331 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)"
1332 fi
1333
1334 SVN_RA_LIB_DEPS=$svn_ra_lib_deps
1335 SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps
1336 SVN_RA_LIB_LINK=$svn_ra_lib_link
1337
1338 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1,
1339 [Defined if libsvn_fs should link against libsvn_fs_fs])
1340 svn_fs_lib_deps="\$(FS_FS_DEPS)"
1341 svn_fs_lib_install_deps="install-fsmod-lib"
1342 svn_fs_lib_link="\$(FS_FS_LINK)"
1343
1344 if test "$svn_lib_berkeley_db" = "yes"; then
1345 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
1346 [Defined if libsvn_fs should link against libsvn_fs_base])
1347 svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)"
1348 svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib"
1349 svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)"
1350 fi
1351
1352 SVN_FS_LIB_DEPS=$svn_fs_lib_deps
1353 SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps
1354 SVN_FS_LIB_LINK=$svn_fs_lib_link
1355fi
1356
1357AC_SUBST(SVN_RA_LIB_DEPS)
1358AC_SUBST(SVN_RA_LIB_INSTALL_DEPS)
1359AC_SUBST(SVN_RA_LIB_LINK)
1360AC_SUBST(SVN_FS_LIB_DEPS)
1361AC_SUBST(SVN_FS_LIB_INSTALL_DEPS)
1362AC_SUBST(SVN_FS_LIB_LINK)
1363
1364# ==== JavaHL ================================================================
1365
1366dnl Possibly compile JavaHL
1367do_javahl_build=no
1368AC_ARG_ENABLE(javahl,
1369 AS_HELP_STRING([--enable-javahl],
1370 [Enable compilation of Java high-level bindings (requires C++)]),
1371 [ if test "$enableval" = "yes" ; then
1372 do_javahl_build="yes"
1373 fi
1374 ])
1375
1376JAVAHL_OBJDIR=""
1377INSTALL_EXTRA_JAVAHL_LIB=""
1378FIX_JAVAHL_LIB=""
1379JAVAHL_TESTS_TARGET=""
1380JAVAHL_COMPAT_TESTS_TARGET=""
1381LT_CXX_LIBADD=""
1382if test "$do_javahl_build" = "yes"; then
1383 dnl Check for suitable JDK
1384 if test "$JDK_SUITABLE" = "no"; then
1385 AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK.
1386 Please specify a suitable JDK using the --with-jdk option.])
1387 fi
1388
1389 dnl The temporary directory where libtool compiles libsvnjavahl.
1390 JAVAHL_OBJDIR='$(libsvnjavahl_PATH)/.libs'
1391
1392 os_arch=`uname`
1393 if test "$os_arch" = "Darwin"; then
1394 dnl On Darwin, JNI libs must be installed as .jnilib
1395 INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib'
1396 FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib"
1397 fi
1398 # This segment (and the rest of r10800) is very likely unnecessary
1399 # with libtool 1.5, which automatically adds libstdc++ as a
1400 # dependency to the C++ libraries it builds. So at some future time
1401 # when autogen.sh requires libtool 1.5 or higher, we can get rid of
1402 # it.
1403 AC_MSG_CHECKING([for additional flags to link C++ libraries])
1404 if test "x$ac_compiler_gnu" = "xyes"; then
1405 LT_CXX_LIBADD="-lstdc++"
1406 AC_MSG_RESULT([$LT_CXX_LIBADD])
1407 else
1408 AC_MSG_RESULT([none needed])
1409 fi
1410fi
1411AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB)
1412AC_SUBST(JAVAHL_OBJDIR)
1413AC_SUBST(FIX_JAVAHL_LIB)
1414AC_SUBST(LT_CXX_LIBADD)
1415
1416AC_ARG_WITH(junit,
1417AS_HELP_STRING([--with-junit=PATH],
1418 [Specify a path to the junit JAR file.]),
1419[
1420 if test "$withval" != "no"; then
1421 if test -n "$JAVA_CLASSPATH"; then
1422 JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH"
1423 else
1424 JAVA_CLASSPATH="$withval"
1425 fi
1426 JAVAHL_TESTS_TARGET="javahl-tests"
1427 JAVAHL_COMPAT_TESTS_TARGET="javahl-compat-tests"
1428 fi
1429])
1430AC_SUBST(JAVA_CLASSPATH)
1431AC_SUBST(JAVAHL_TESTS_TARGET)
1432AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
1433
1434# ==== Miscellaneous bits ====================================================
1435
1436# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
1437### I think we get this flag from APR, so the fix probably belongs there
1438if test "$CC" = "clang"; then
1439 SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
1440fi
1441
1442# Need to strip '-no-cpp-precomp' from CPPFLAGS for SWIG as well.
1443SWIG_CPPFLAGS="$CPPFLAGS"
1444SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-no-cpp-precomp ])
1445AC_SUBST([SWIG_CPPFLAGS])
1446
1447dnl Since this is used only on Unix-y systems, define the path separator as '/'
1448AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
1449 [Defined to be the path separator used on your local filesystem])
1450
1451AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null",
1452 [Defined to be the null device for the system])
1453
1454DEFAULT_FS_TYPE="fsfs"
1455AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE",
1456 [The fs type to use by default])
1457
1458DEFAULT_HTTP_LIBRARY="serf"
1459AC_DEFINE_UNQUOTED(DEFAULT_HTTP_LIBRARY, "$DEFAULT_HTTP_LIBRARY",
1460 [The http library to use by default])
1461
1462# BSD/OS (BSDi) needs to use a different include syntax in Makefile
1463INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
1464case "$host" in
1465 *bsdi*)
1466 # Check whether they've installed GNU make
1467 if ! make --version > /dev/null 2>&1; then
1468 # BSDi make
1469 INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
1470 fi
1471 ;;
1472esac
1473AC_SUBST(INCLUDE_OUTPUTS)
1474
1475# ==== Detection complete - output and run config.status =====================
1476
1477AC_CONFIG_HEADERS(subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in)
1478AC_CONFIG_COMMANDS([svn_private_config.h.tmp],
1479 [svn_cf=subversion/svn_private_config.h;
1480 $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" $svn_cf.tmp > $svn_cf.tmp.new
1481 cmp -s $svn_cf.tmp.new $svn_cf || mv -f $svn_cf.tmp.new $svn_cf
1482 rm -f $svn_cf.tmp.new $svn_cf.tmp],
1483 [SED="$SED"
1484 SVN_DB_HEADER="$SVN_DB_HEADER"])
1485AC_CONFIG_FILES([Makefile])
1486
1487SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
1488SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
1489SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)
1490if test -e packages/solaris/pkginfo.in; then
1491 SVN_CONFIG_SCRIPT(packages/solaris/pkginfo)
1492fi
1493AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
1494
1495# Ensure that SWIG is checked after reconfiguration.
1496rm -f .swig_checked
1497
1498dnl Provide ${host} for use in compiled code (for svn --version)
1499AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
1500 [Defined to the config.guess name of the build system])
1501
1502dnl Provide ${target} for use in compiled code (for user-agent string)
1503AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "${target}",
1504 [Defined to the config.guess name of the build target])
1505
1506AC_OUTPUT
1507
1508# ==== Print final messages to user ==========================================
1509
1510dnl Configure is long - users tend to miss warnings printed during it.
1511dnl Hence, print a warnings about what we did and didn't configure at the
1512dnl end, where people will actually see them.
1513
1514if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then
1515 AC_MSG_WARN([We have configured without BDB filesystem support
1516
1517
1518Berkeley DB 6 was found, but not used. Please re-run configure (see
1519./config.nice) with the '--enable-bdb6' flag to use it,
1520or explicitly specify '--disable-bdb6' or '--without-berkeley-db'
1521to silence this warning.
1522
1523Please note that some versions of Berkeley DB 6+ are under the GNU Affero
1524General Public License, version 3:
1525https://oss.oracle.com/pipermail/bdb/2013-June/000056.html
1526
1527The AGPL-3.0 licence may impose special requirements for making available
1528source code of server-side software. The text of the licence is:
1529https://www.gnu.org/licenses/agpl-3.0.html
1530http://opensource.org/licenses/AGPL-3.0
1531
1532The Berkeley DB backend to Subversion is deprecated; see
1533http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated
1534
1535The Subversion developers have not tested Subversion with Berkeley DB 6 for
1536technical problems or bugs.
1537])
1538fi