1 dnl configure.ac: Autoconfiscation for Subversion
2 dnl Process this file with autoconf to produce a configure script.
6 dnl Get the version of Subversion, using m4's esyscmd() command to do this
7 dnl at m4-time, since AC_INIT() requires it then.
9 [esyscmd(python build/getversion.py subversion/include/svn_version.h)],
10 [http://subversion.tigris.org/])
12 AC_CONFIG_SRCDIR(subversion/include/svn_types.h)
13 AC_CONFIG_AUX_DIR([build])
15 AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION)
17 AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"])
18 AC_SUBST([abs_builddir], ["`pwd`"])
20 # Generate config.nice early (before the arguments are munged)
21 SVN_CONFIG_NICE(config.nice)
23 # ==== Check for programs ====================================================
25 # Look for a C compiler (before anything can set CFLAGS)
28 # Look for a C pre-processor
31 # Grab target_cpu, so we can use it in the Solaris pkginfo file
34 # Look for an extended grep, this macro appeared in autoconf-2.53b,
35 # before that, the search for an EGREP was always performed.
36 ifdef([AC_PROG_EGREP],[AC_PROG_EGREP],[])
41 # If $INSTALL is relative path to our fallback install-sh, then convert
42 # to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool
43 # may try to use it from a changed working directory.
44 if test "$INSTALL" = "build/install-sh -c"; then
45 INSTALL="$abs_srcdir/$INSTALL"
48 AC_SUBST([MKDIR], ["$INSTALL -d"])
51 dnl find Apache with a recent-enough magic module number.
52 SVN_FIND_APACHE(20020903)
54 # ==== Libraries, for which we may have source to build ======================
56 dnl verify apr version and set apr flags
57 dnl These regular expressions should not contain "\(" and "\)".
58 dnl The specific reason we require APR 0.9.7 is:
59 dnl It contains fixes to its file writing routines
60 dnl now generating errors instead of silently ignoring
61 dnl them. Only .7 and later can guarantee repository
62 dnl integrity with FSFS.
64 APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
65 APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
67 SVN_LIB_APR($APR_VER_REGEXES)
68 SVN_LIB_APRUTIL($APU_VER_REGEXES)
70 # Either a space-separated list of allowable Neon versions, or "any" to
71 # mean allow anything.
72 NEON_ALLOWED_LIST="0.25.0 0.25.1 0.25.2 0.25.3 0.25.4 0.25.5 0.26.0 0.26.1 0.26.2 0.26.3 0.26.4 0.27.2"
73 NEON_RECOMMENDED_VER=0.27.2
74 NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz"
75 dnl You can skip the neon version check only if you know what you are doing
76 AC_ARG_ENABLE(neon-version-check,
77 AS_HELP_STRING([--disable-neon-version-check],
78 [do not check the Neon version]),
80 if test "$enableval" = "no" ; then
81 NEON_ALLOWED_LIST="any"
85 SVN_LIB_NEON($NEON_ALLOWED_LIST, $NEON_RECOMMENDED_VER, $NEON_URL)
87 dnl Search for serf as an alternative to neon
90 dnl Set up a number of directories ---------------------
92 dnl Create SVN_BINDIR for proper substitution
93 if test "${bindir}" = '${exec_prefix}/bin'; then
94 if test "${exec_prefix}" = "NONE"; then
95 if test "${prefix}" = "NONE"; then
96 SVN_BINDIR="${ac_default_prefix}/bin"
98 SVN_BINDIR="${prefix}/bin"
101 SVN_BINDIR="${exec_prefix}/bin"
104 SVN_BINDIR="${bindir}"
107 dnl fully evaluate this value. when we substitute it into our tool scripts,
108 dnl they will not have things such as ${bindir} available
109 SVN_BINDIR="`eval echo ${SVN_BINDIR}`"
112 dnl provide ${bindir} in svn_private_config.h for use in compiled code
113 AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}",
114 [Defined to be the path to the installed binaries])
116 dnl This purposely does *not* allow for multiple parallel installs.
117 dnl However, it is compatible with most gettext usages.
118 localedir='${datadir}/locale'
121 dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR.
122 if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then
123 exp_localedir='${ac_default_prefix}/share/locale'
125 exp_localedir=$localedir
127 SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}")
128 AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}",
129 [Defined to be the path to the installed locale dirs])
131 dnl Check for libtool -- we'll definitely need it for all our shared libs!
132 echo "configuring libtool now"
133 AC_ARG_ENABLE(experimental-libtool,
134 AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]),
135 [experimental_libtool=$enableval],[experimental_libtool=no])
137 if test "$experimental_libtool" = "yes"; then
138 echo "using APR's libtool"
139 sh_libtool="`$apr_config --apr-libtool`"
140 LIBTOOL="$sh_libtool"
141 SVN_LIBTOOL="$sh_libtool"
143 sh_libtool="$abs_builddir/libtool"
144 SVN_LIBTOOL="\$(SHELL) $sh_libtool"
145 dnl libtoolize requires that the following line not be indented
148 AC_SUBST(SVN_LIBTOOL)
150 dnl Determine if the libtool version supports --tag or not
153 AC_MSG_CHECKING([whether libtool accepts --tag=XXX])
155 AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
156 if $sh_libtool --tag=CC --mode=compile \
157 $CC -c $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext >&5
160 SVN_LT_CCTAG="--tag=CC"
161 SVN_LT_CXXTAG="--tag=CXX"
166 rm -f conftest.$ac_ext
167 AC_SUBST(SVN_LT_CCTAG)
168 AC_SUBST(SVN_LT_CXXTAG)
170 dnl Before configuring libtool check for --enable-all-static option
171 AC_ARG_ENABLE(all-static,
172 AS_HELP_STRING([--enable-all-static],
173 [Build completely static (standalone) binaries.]),
175 if test "$enableval" = "yes" ; then
176 LT_LDFLAGS="-all-static $LT_LDFLAGS"
182 dnl Check if -no-undefined is needed for the platform.
183 dnl It should always work but with libtool 1.4.3 on OS X it breaks the build.
184 dnl So we only turn it on for platforms where we know we really need it.
185 AC_MSG_CHECKING([whether libtool needs -no-undefined])
189 LT_NO_UNDEFINED="-no-undefined"
196 AC_SUBST(LT_NO_UNDEFINED)
198 AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
202 AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
203 [Define if circular linkage is not possible on this platform.])
213 AS_HELP_STRING([--with-trang=PATH],
214 [Specify the command to run the trang schema converter]),
218 if test "$trang" = "yes"; then
219 AC_PATH_PROG(TRANG, trang, none)
226 dnl Check for libraries --------------------
228 # Berkeley DB on SCO OpenServer needs -lsocket
229 AC_CHECK_LIB(socket, socket)
231 # Build the BDB filesystem library only if we have an appropriate
232 # version of Berkeley DB.
234 powerpc-apple-darwin*)
235 # Berkeley DB 4.0 does not work on OS X.
236 SVN_FS_WANT_DB_MAJOR=4
237 SVN_FS_WANT_DB_MINOR=1
238 SVN_FS_WANT_DB_PATCH=25
241 SVN_FS_WANT_DB_MAJOR=4
242 SVN_FS_WANT_DB_MINOR=0
243 SVN_FS_WANT_DB_PATCH=14
246 # Look for libdb4.so first:
247 SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR,
248 $SVN_FS_WANT_DB_PATCH, [db4 db])
250 AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR,
251 [The desired major version for the Berkeley DB])
252 AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR,
253 [The desired minor version for the Berkeley DB])
254 AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH,
255 [The desired patch version for the Berkeley DB])
259 if test "$svn_lib_sasl" = "yes"; then
260 AC_DEFINE(SVN_HAVE_SASL, 1,
261 [Defined if Cyrus SASL v2 is present on the system])
264 dnl Mac OS KeyChain -------------------
266 AC_ARG_ENABLE(keychain,
267 AS_HELP_STRING([--disable-keychain],
268 [Disable use of Mac OS KeyChain for auth credentials]),
269 [enable_keychain=$enableval],[enable_keychain=yes])
271 AC_MSG_CHECKING([for Mac OS KeyChain Services])
273 if test "$enable_keychain" = "yes"; then
274 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <AvailabilityMacros.h>
275 #if !DARWIN || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2)
276 #error KeyChain API unavailable.
277 #endif]], [[]])],[],[enable_keychain=no])
280 if test "$enable_keychain" = "yes"; then
281 dnl ### Hack. We should only need to pass the -framework options when
282 dnl linking libsvn_subr, since it is the only library that uses Keychain.
284 dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for
285 dnl OS X frameworks like it does for normal libraries, so we need to
286 dnl explicitly pass the option to all the users of libsvn_subr to allow
287 dnl static builds to link successfully.
289 dnl This does mean that all executables we link will be linked directly
290 dnl to these frameworks - even when building shared libraries - but that
291 dnl shouldn't cause any problems.
292 LIBS="$LIBS -framework Security"
293 LIBS="$LIBS -framework CoreFoundation"
294 LIBS="$LIBS -framework CoreServices"
295 AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?])
302 dnl I18n -------------------
305 AS_HELP_STRING([--disable-nls],[Disable gettext functionality]),
306 [enable_nls=$enableval],[enable_nls=yes])
309 if test "$enable_nls" = "yes"; then
310 dnl First, check to see if there is a working msgfmt.
311 AC_PATH_PROG(MSGFMT, msgfmt, none)
312 AC_PATH_PROG(MSGMERGE, msgmerge, none)
313 AC_PATH_PROG(XGETTEXT, xgettext, none)
314 if test "$MSGFMT" != "none"; then
315 AC_SEARCH_LIBS(bindtextdomain, [intl], [],
317 AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.])
320 if test "$enable_nls" = "yes"; then
321 AC_DEFINE(ENABLE_NLS, 1,
322 [Define to 1 if translation of program messages to the user's
323 native language is requested.])
334 #define _(x) dgettext(PACKAGE_NAME, x)
337 #define gettext(x) (x)
338 #define dgettext(domain,x) (x)
342 dnl Used to simulate makefile conditionals.
344 NO_GETTEXT_CODESET=\#
345 if test $USE_NLS = "yes"; then
346 AC_CHECK_FUNCS(bind_textdomain_codeset,
347 [ GETTEXT_CODESET="" ],
348 [ NO_GETTEXT_CODESET="" ])
350 AC_SUBST(GETTEXT_CODESET)
351 AC_SUBST(NO_GETTEXT_CODESET)
353 # Check if we are using GNU gettext.
356 if test $USE_NLS = "yes"; then
357 AC_MSG_CHECKING(if we are using GNU gettext)
358 if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then
362 AC_MSG_RESULT($GNU_GETTEXT)
364 AC_SUBST(MSGFMTFLAGS)
366 INSTALL_STATIC_RULES="install-bin install-docs"
367 INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static"
368 INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE"
369 BUILD_RULES="fsmod-lib ramod-lib lib bin test $BUILD_APACHE_RULE"
371 if test "$svn_lib_berkeley_db" = "yes"; then
372 BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"
373 INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`"
374 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib"
375 BDB_TEST_DEPS="\$(BDB_TEST_DEPS)"
376 BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)"
379 if test "$svn_lib_neon" = "yes"; then
380 BUILD_RULES="$BUILD_RULES neon-lib"
381 INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`"
382 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-neon-lib"
385 if test "$svn_lib_serf" = "yes"; then
386 BUILD_RULES="$BUILD_RULES serf-lib"
387 INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`"
388 INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib"
391 if test "$USE_NLS" = "yes"; then
392 BUILD_RULES="$BUILD_RULES locale"
393 INSTALL_RULES="$INSTALL_RULES install-locale"
396 AC_SUBST(BUILD_RULES)
397 AC_SUBST(INSTALL_STATIC_RULES)
398 AC_SUBST(INSTALL_RULES)
399 AC_SUBST(BDB_TEST_DEPS)
400 AC_SUBST(BDB_TEST_PROGRAMS)
402 dnl Check for header files ----------------
404 dnl Standard C headers
407 dnl Check for typedefs, structures, and compiler characteristics ----------
409 dnl if compiler doesn't understand `const', then define it empty
412 dnl if non-existent, define size_t to be `unsigned'
416 dnl Check for library functions ----------
418 dnl libsvn_string uses memcmp()
421 dnl svn_error's default warning handler uses vfprintf()
424 dnl check for functions needed in special file handling
425 AC_CHECK_FUNCS(symlink readlink)
428 dnl Process some configuration options ----------
431 AS_HELP_STRING([--with-ssl],
432 [This option does NOT affect the Subversion build process in any
433 way. It enables OpenSSL support in the Neon library. If and
434 only if you are building Neon as an integrated part of the
435 Subversion build process, rather than linking to an already
436 installed version of Neon, you probably want to pass this
437 option so that Neon (and so indirectly, Subversion) will be
438 capable of https:// access.]),
442 AS_HELP_STRING([--enable-debug],
443 [Turn on debugging]),
445 if test "$enableval" = "yes" ; then
446 enable_debugging="yes"
448 enable_debugging="no"
452 AC_ARG_ENABLE(maintainer-mode,
453 AS_HELP_STRING([--enable-maintainer-mode],
454 [Turn on debugging and very strict compile-time warnings]),
456 if test "$enableval" = "yes" ; then
457 if test "$enable_debugging" = "no" ; then
458 AC_MSG_ERROR(Can't have --disable-debug and --enable-maintainer-mode)
461 if test "$GCC" = "yes"; then
462 CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow"
463 CXXFLAGS="$CXXFLAGS -Wpointer-arith -Wwrite-strings -Wshadow"
468 if test "$enable_debugging" = "yes" ; then
469 dnl At the moment, we don't want optimization, because we're
471 CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"]
472 CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-O[^ ]* //g'`"]
473 dnl SVN_DEBUG enables specific features for developer builds
474 dnl AP_DEBUG enables specific (Apache) features for developer builds
475 CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG"
476 CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG"
478 if test "$enable_debugging" = "no" ; then
479 CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"]
480 CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"]
486 AS_HELP_STRING([--with-editor=PATH],
487 [Specify a default editor for the subversion client.]),
490 if test "$withval" = "yes" ; then
491 AC_MSG_ERROR([--with-editor requires an argument.])
493 SVN_CLIENT_EDITOR=$withval
494 AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR",
495 [The path of a default editor for the client.])
504 AC_ARG_ENABLE(mod-activation,
505 AS_HELP_STRING([--disable-mod-activation],
506 [Do not enable mod_dav_svn in httpd.conf]),
508 if test "$enableval" = "no" ; then
510 AC_MSG_NOTICE([Disabling apache module activation])
512 AC_MSG_NOTICE([Enabling apache module activation])
515 AC_SUBST(MOD_ACTIVATION)
520 AS_HELP_STRING([--enable-gprof],
521 [Produce gprof profiling data in 'gmon.out' (GCC only).]),
523 if test "$enableval" = "yes" ; then
524 dnl Probably other compilers support -pg or something similar;
525 dnl feel free to extend this to include them.
526 if test "$GCC" = "yes"; then
527 if test "$enable_shared" = "yes" ; then
528 AC_MSG_ERROR(Can't have --enable-gprof without --disable-shared (we
529 recommend also using --enable-all-static).)
531 if test ! "$enable_all_static" = "yes" ; then
532 AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.)
534 AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).])
536 CXXFLAGS="$CXXFLAGS -pg"
537 LT_LDFLAGS="$LT_LDFLAGS -pg"
539 AC_MSG_ERROR(We only support --enable-gprof with GCC right now.)
545 # Scripting and Bindings languages
547 # Python: Used for testsuite, and bindings
550 PYTHON="`$abs_srcdir/build/find_python.sh`"
551 if test -z "$PYTHON"; then
552 AC_MSG_WARN([Python 2.2 or later is required to run the testsuite])
553 AC_MSG_WARN([or to use the Subversion Python bindings])
555 AC_MSG_WARN([If you have a suitable Python installed, but not on the])
556 AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path])
557 AC_MSG_WARN([to the Python executable, and re-run configure])
559 AC_PATH_PROGS(PYTHON, "$PYTHON", none)
561 # The minimum version for the JVM runtime for our Java bytecode.
562 JAVA_OLDEST_WORKING_VER='1.2'
563 # SVN_CHECK_JDK sets $JAVA_CLASSPATH
564 SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
566 AC_PATH_PROG(PERL, perl, none)
568 AC_PATH_PROG(RUBY, ruby, none)
569 if test "$RUBY" != "none"; then
570 if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)'; then
571 AC_PATH_PROG(RDOC, rdoc, none)
572 AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[
573 svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'`"
575 RUBY_MAJOR="$svn_cv_ruby_major"
577 AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[
578 svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MINOR))'`"
580 RUBY_MINOR="$svn_cv_ruby_minor"
586 AC_MSG_WARN([The detected Ruby is too old for Subversion to use])
587 AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the])
588 AC_MSG_WARN([Subversion Ruby bindings])
589 AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later])
595 dnl decide whether we want to link against the RA libraries
597 AS_HELP_STRING([--enable-dso], [Turn on DSO loading of RA libraries]),
599 if test "$enableval" = "yes"; then
601 if test "$enable_shared" = "no"; then
602 AC_MSG_ERROR([--enable-dso conflicts with --disable-shared])
607 if test "$enable_shared" = "no" || test "$enable_dso" != "yes"; then
608 ### We want ra_local first to handle the following scenario:
609 ### user has neon and db3 in /usr/local, and db4 in
610 ### /usr/local/BerkeleyDB.4.0. If libsvn_ra_neon.la comes before
611 ### libsvn_fs.la then libtool ends up linking libsvn_fs to the db3
612 ### in /usr/local/lib
613 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1,
614 [Defined if libsvn_client should link against libsvn_ra_local])
615 svn_ra_lib_deps="\$(RA_LOCAL_DEPS)"
616 svn_ra_lib_install_deps="install-ramod-lib"
617 svn_ra_lib_link="\$(RA_LOCAL_LINK)"
619 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1,
620 [Defined if libsvn_client should link against libsvn_ra_svn])
621 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)"
622 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)"
624 if test "$svn_lib_neon" = "yes"; then
625 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_NEON, 1,
626 [Defined if libsvn_client should link against libsvn_ra_neon])
627 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_NEON_DEPS)"
628 svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-neon-lib"
629 svn_ra_lib_link="$svn_ra_lib_link \$(RA_NEON_LINK)"
632 if test "$svn_lib_serf" = "yes"; then
633 AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SERF, 1,
634 [Defined if libsvn_client should link against libsvn_ra_serf])
635 svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)"
636 svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib"
637 svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)"
640 SVN_RA_LIB_DEPS=$svn_ra_lib_deps
641 SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps
642 SVN_RA_LIB_LINK=$svn_ra_lib_link
644 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1,
645 [Defined if libsvn_fs should link against libsvn_fs_fs])
646 svn_fs_lib_deps="\$(FS_FS_DEPS)"
647 svn_fs_lib_install_deps="install-fsmod-lib"
648 svn_fs_lib_link="\$(FS_FS_LINK)"
650 if test "$svn_lib_berkeley_db" = "yes"; then
651 AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
652 [Defined if libsvn_fs should link against libsvn_fs_base])
653 svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)"
654 svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib"
655 svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)"
658 SVN_FS_LIB_DEPS=$svn_fs_lib_deps
659 SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps
660 SVN_FS_LIB_LINK=$svn_fs_lib_link
663 AC_SUBST(SVN_RA_LIB_DEPS)
664 AC_SUBST(SVN_RA_LIB_INSTALL_DEPS)
665 AC_SUBST(SVN_RA_LIB_LINK)
666 AC_SUBST(SVN_FS_LIB_DEPS)
667 AC_SUBST(SVN_FS_LIB_INSTALL_DEPS)
668 AC_SUBST(SVN_FS_LIB_LINK)
670 # ==== JavaHL ================================================================
672 dnl Possibly compile JavaHL
674 AC_ARG_ENABLE(javahl,
675 AS_HELP_STRING([--enable-javahl],
676 [Enable compilation of Java high-level bindings (requires C++)]),
677 [ if test "$enableval" = "yes" ; then
678 do_javahl_build="yes"
683 INSTALL_EXTRA_JAVAHL_LIB=""
685 JAVAHL_TESTS_TARGET=""
687 if test "$do_javahl_build" = "yes"; then
688 dnl Check for suitable JDK
689 if test "$JDK_SUITABLE" = "no"; then
690 AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK.
691 Please specify a suitable JDK using the --with-jdk option.])
696 dnl The temporary directory where libtool compiles libsvnjavahl.
697 dnl N.B. objdir is "the name of the directory that contains temporary
698 dnl libtool files" and it is set by libtool.m4
699 JAVAHL_OBJDIR='$(libsvnjavahl_PATH)'/$objdir
702 if test "$os_arch" = "Darwin"; then
703 dnl On Darwin, JNI libs must be installed as .jnilib
704 INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib'
705 FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib"
707 # This segment (and the rest of r10800) is very likely unnecessary
708 # with libtool 1.5, which automatically adds libstdc++ as a
709 # dependency to the C++ libraries it builds. So at some future time
710 # when autogen.sh requires libtool 1.5 or higher, we can get rid of
712 AC_MSG_CHECKING([for additional flags to link C++ libraries])
713 if test "x$ac_compiler_gnu" = "xyes"; then
714 LT_CXX_LIBADD="-lstdc++"
715 AC_MSG_RESULT([$LT_CXX_LIBADD])
717 AC_MSG_RESULT([none needed])
720 AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB)
721 AC_SUBST(JAVAHL_OBJDIR)
722 AC_SUBST(FIX_JAVAHL_LIB)
723 AC_SUBST(LT_CXX_LIBADD)
726 AS_HELP_STRING([--with-junit=PATH],
727 [Specify a path to the junit JAR file.]),
729 if test "$withval" = "yes" ; then
730 AC_MSG_ERROR([--with-junit requires an argument.])
732 if test -n "$JAVA_CLASSPATH"; then
733 JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH"
735 JAVA_CLASSPATH="$withval"
737 JAVAHL_TESTS_TARGET="javahl-tests"
740 AC_SUBST(JAVA_CLASSPATH)
741 AC_SUBST(JAVAHL_TESTS_TARGET)
743 # ==== Miscellaneous bits ====================================================
745 dnl Since this is used only on Unix-y systems, define the path separator as '/'
746 AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
747 [Defined to be the path separator used on your local filesystem])
749 AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null",
750 [Defined to be the null device for the system])
752 DEFAULT_FS_TYPE="fsfs"
753 AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE",
754 [The fs type to use by default])
756 # BSD/OS (BSDi) needs to use a different include syntax in Makefile
757 INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk"
760 # Check whether they've installed GNU make
761 if ! make --version > /dev/null 2>&1; then
763 INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\""
767 AC_SUBST(INCLUDE_OUTPUTS)
769 # ==== Detection complete - output and run config.status =====================
771 AC_CONFIG_HEADER(subversion/svn_private_config.h)
772 AC_CONFIG_FILES([Makefile])
773 AC_CONFIG_COMMANDS(mkdir-init, [make mkdir-init])
775 SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
776 SVN_CONFIG_SCRIPT(contrib/client-side/svn_load_dirs/svn_load_dirs.pl)
777 SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/svncopy.pl)
778 SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/testsvncopy.pl)
779 SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
780 SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-email.pl)
781 SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)
782 SVN_CONFIG_SCRIPT(packages/solaris/pkginfo)
783 AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
787 # ==== Print final messages to user ==========================================
789 dnl Configure is long - users tend to miss warnings printed during it.
790 dnl Hence, print a warnings about what we did and didn't configure at the
791 dnl end, where people will actually see them.
793 case "$svn_lib_berkeley_db" in
795 db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH"
796 AC_MSG_WARN([we have configured without BDB filesystem support
799 You don't seem to have Berkeley DB version $db_version or newer
800 installed and linked to APR-UTIL. We have created Makefiles which
801 will build without the Berkeley DB back-end; your repositories will
802 use FSFS as the default back-end. You can find the latest version of
804 http://www.oracle.com/technology/software/products/berkeley-db/index.html