1 | dnl configure.ac: Autoconfiscation for Subversion |
---|
2 | dnl Process this file with autoconf to produce a configure script. |
---|
3 | |
---|
4 | AC_PREREQ(2.58) |
---|
5 | |
---|
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. |
---|
8 | AC_INIT([subversion], |
---|
9 | [esyscmd(python build/getversion.py SVN subversion/include/svn_version.h)], |
---|
10 | [http://subversion.tigris.org/]) |
---|
11 | |
---|
12 | AC_CONFIG_SRCDIR(subversion/include/svn_types.h) |
---|
13 | AC_CONFIG_AUX_DIR([build]) |
---|
14 | |
---|
15 | AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION) |
---|
16 | |
---|
17 | AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"]) |
---|
18 | AC_SUBST([abs_builddir], ["`pwd`"]) |
---|
19 | if test "$abs_srcdir" = "$abs_builddir"; then |
---|
20 | canonicalized_srcdir="" |
---|
21 | else |
---|
22 | canonicalized_srcdir="$srcdir/" |
---|
23 | fi |
---|
24 | AC_SUBST([canonicalized_srcdir]) |
---|
25 | |
---|
26 | SWIG_LDFLAGS="$LDFLAGS" |
---|
27 | AC_SUBST([SWIG_LDFLAGS]) |
---|
28 | |
---|
29 | # Generate config.nice early (before the arguments are munged) |
---|
30 | SVN_CONFIG_NICE(config.nice) |
---|
31 | |
---|
32 | # ==== Check for programs ==================================================== |
---|
33 | |
---|
34 | # Look for a C compiler (before anything can set CFLAGS) |
---|
35 | AC_PROG_CC |
---|
36 | |
---|
37 | # Look for a C++ compiler |
---|
38 | AC_PROG_CXX |
---|
39 | |
---|
40 | # Look for a C pre-processor |
---|
41 | AC_PROG_CPP |
---|
42 | |
---|
43 | # Grab target_cpu, so we can use it in the Solaris pkginfo file |
---|
44 | AC_CANONICAL_TARGET |
---|
45 | |
---|
46 | # Look for an extended grep |
---|
47 | AC_PROG_EGREP |
---|
48 | |
---|
49 | AC_PROG_LN_S |
---|
50 | |
---|
51 | AC_PROG_INSTALL |
---|
52 | # If $INSTALL is relative path to our fallback install-sh, then convert |
---|
53 | # to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool |
---|
54 | # may try to use it from a changed working directory. |
---|
55 | if test "$INSTALL" = "build/install-sh -c"; then |
---|
56 | INSTALL="$abs_srcdir/$INSTALL" |
---|
57 | fi |
---|
58 | |
---|
59 | AC_SUBST([MKDIR], ["$INSTALL -d"]) |
---|
60 | |
---|
61 | # ==== Libraries, for which we may have source to build ====================== |
---|
62 | |
---|
63 | dnl verify apr version and set apr flags |
---|
64 | dnl These regular expressions should not contain "\(" and "\)". |
---|
65 | dnl The specific reason we require APR 0.9.7 is: |
---|
66 | dnl It contains fixes to its file writing routines |
---|
67 | dnl now generating errors instead of silently ignoring |
---|
68 | dnl them. Only .7 and later can guarantee repository |
---|
69 | dnl integrity with FSFS. |
---|
70 | |
---|
71 | APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."] |
---|
72 | APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."] |
---|
73 | |
---|
74 | SVN_LIB_APR($APR_VER_REGEXES) |
---|
75 | SVN_LIB_APRUTIL($APU_VER_REGEXES) |
---|
76 | |
---|
77 | dnl Search for pkg-config |
---|
78 | AC_PATH_PROG(PKG_CONFIG, pkg-config) |
---|
79 | |
---|
80 | # Either a space-separated list of allowable Neon versions, or "any" to |
---|
81 | # mean allow anything. |
---|
82 | NEON_ALLOWED_LIST="0\.25 0\.26 0\.27\.2 0\.28" |
---|
83 | NEON_RECOMMENDED_VER=0.28.4 |
---|
84 | NEON_URL="http://www.webdav.org/neon/neon-${NEON_RECOMMENDED_VER}.tar.gz" |
---|
85 | dnl You can skip the neon version check only if you know what you are doing |
---|
86 | AC_ARG_ENABLE(neon-version-check, |
---|
87 | AS_HELP_STRING([--disable-neon-version-check], |
---|
88 | [do not check the Neon version]), |
---|
89 | [ |
---|
90 | if test "$enableval" = "no" ; then |
---|
91 | NEON_ALLOWED_LIST="any" |
---|
92 | fi |
---|
93 | ], |
---|
94 | []) |
---|
95 | SVN_LIB_NEON($NEON_ALLOWED_LIST, $NEON_RECOMMENDED_VER, $NEON_URL) |
---|
96 | |
---|
97 | if test "$svn_lib_neon" = "yes"; then |
---|
98 | AC_DEFINE([SVN_HAVE_NEON], 1, |
---|
99 | [Defined if support for Neon is enabled]) |
---|
100 | fi |
---|
101 | |
---|
102 | dnl Search for serf as an alternative to neon |
---|
103 | SVN_LIB_SERF |
---|
104 | |
---|
105 | if test "$svn_lib_serf" = "yes"; then |
---|
106 | AC_DEFINE([SVN_HAVE_SERF], 1, |
---|
107 | [Defined if support for Serf is enabled]) |
---|
108 | fi |
---|
109 | |
---|
110 | dnl Search for apr_memcache (only affects fs_fs) |
---|
111 | SVN_LIB_APR_MEMCACHE |
---|
112 | |
---|
113 | if test "$svn_lib_apr_memcache" = "yes"; then |
---|
114 | AC_DEFINE(SVN_HAVE_MEMCACHE, 1, |
---|
115 | [Defined if apr_memcache (standalone or in apr-util) is present]) |
---|
116 | fi |
---|
117 | |
---|
118 | |
---|
119 | dnl Find Apache with a recent-enough magic module number |
---|
120 | SVN_FIND_APACHE(20020903) |
---|
121 | |
---|
122 | dnl Search for SQLite |
---|
123 | SQLITE_MINIMUM_VER="3.4.0" |
---|
124 | SQLITE_RECOMMENDED_VER="3.6.13" |
---|
125 | SQLITE_URL="http://www.sqlite.org/sqlite-amalgamation-${SQLITE_RECOMMENDED_VER}.tar.gz" |
---|
126 | SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER}, |
---|
127 | ${SQLITE_URL}) |
---|
128 | |
---|
129 | dnl Set up a number of directories --------------------- |
---|
130 | |
---|
131 | dnl Create SVN_BINDIR for proper substitution |
---|
132 | if test "${bindir}" = '${exec_prefix}/bin'; then |
---|
133 | if test "${exec_prefix}" = "NONE"; then |
---|
134 | if test "${prefix}" = "NONE"; then |
---|
135 | SVN_BINDIR="${ac_default_prefix}/bin" |
---|
136 | else |
---|
137 | SVN_BINDIR="${prefix}/bin" |
---|
138 | fi |
---|
139 | else |
---|
140 | SVN_BINDIR="${exec_prefix}/bin" |
---|
141 | fi |
---|
142 | else |
---|
143 | SVN_BINDIR="${bindir}" |
---|
144 | fi |
---|
145 | |
---|
146 | dnl fully evaluate this value. when we substitute it into our tool scripts, |
---|
147 | dnl they will not have things such as ${bindir} available |
---|
148 | SVN_BINDIR="`eval echo ${SVN_BINDIR}`" |
---|
149 | AC_SUBST(SVN_BINDIR) |
---|
150 | |
---|
151 | dnl provide ${bindir} in svn_private_config.h for use in compiled code |
---|
152 | AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}", |
---|
153 | [Defined to be the path to the installed binaries]) |
---|
154 | |
---|
155 | dnl This purposely does *not* allow for multiple parallel installs. |
---|
156 | dnl However, it is compatible with most gettext usages. |
---|
157 | localedir='${datadir}/locale' |
---|
158 | AC_SUBST(localedir) |
---|
159 | |
---|
160 | dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR. |
---|
161 | if test "${datadir}" = '${prefix}/share' && test "${prefix}" = "NONE"; then |
---|
162 | exp_localedir='${ac_default_prefix}/share/locale' |
---|
163 | else |
---|
164 | exp_localedir=$localedir |
---|
165 | fi |
---|
166 | SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}") |
---|
167 | AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}", |
---|
168 | [Defined to be the path to the installed locale dirs]) |
---|
169 | |
---|
170 | dnl Check for libtool -- we'll definitely need it for all our shared libs! |
---|
171 | echo "configuring libtool now" |
---|
172 | AC_ARG_ENABLE(experimental-libtool, |
---|
173 | AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]), |
---|
174 | [experimental_libtool=$enableval],[experimental_libtool=no]) |
---|
175 | |
---|
176 | if test "$experimental_libtool" = "yes"; then |
---|
177 | echo "using APR's libtool" |
---|
178 | sh_libtool="`$apr_config --apr-libtool`" |
---|
179 | LIBTOOL="$sh_libtool" |
---|
180 | SVN_LIBTOOL="$sh_libtool" |
---|
181 | else |
---|
182 | sh_libtool="$abs_builddir/libtool" |
---|
183 | SVN_LIBTOOL="\$(SHELL) $sh_libtool" |
---|
184 | dnl libtoolize requires that the following line not be indented |
---|
185 | ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL]) |
---|
186 | fi |
---|
187 | AC_SUBST(SVN_LIBTOOL) |
---|
188 | |
---|
189 | dnl Before configuring libtool check for --enable-all-static option |
---|
190 | AC_ARG_ENABLE(all-static, |
---|
191 | AS_HELP_STRING([--enable-all-static], |
---|
192 | [Build completely static (standalone) binaries.]), |
---|
193 | [ |
---|
194 | if test "$enableval" = "yes" ; then |
---|
195 | LT_LDFLAGS="-all-static $LT_LDFLAGS" |
---|
196 | fi |
---|
197 | ]) |
---|
198 | |
---|
199 | AC_SUBST(LT_LDFLAGS) |
---|
200 | |
---|
201 | dnl Check if -no-undefined is needed for the platform. |
---|
202 | dnl It should always work but with libtool 1.4.3 on OS X it breaks the build. |
---|
203 | dnl So we only turn it on for platforms where we know we really need it. |
---|
204 | AC_MSG_CHECKING([whether libtool needs -no-undefined]) |
---|
205 | case $host in |
---|
206 | *-*-cygwin*) |
---|
207 | AC_MSG_RESULT([yes]) |
---|
208 | LT_NO_UNDEFINED="-no-undefined" |
---|
209 | ;; |
---|
210 | *) |
---|
211 | AC_MSG_RESULT([no]) |
---|
212 | LT_NO_UNDEFINED="" |
---|
213 | ;; |
---|
214 | esac |
---|
215 | AC_SUBST(LT_NO_UNDEFINED) |
---|
216 | |
---|
217 | AC_MSG_CHECKING([whether to avoid circular linkage at all costs]) |
---|
218 | case $host in |
---|
219 | *-*-cygwin*) |
---|
220 | AC_MSG_RESULT([yes]) |
---|
221 | AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1, |
---|
222 | [Define if circular linkage is not possible on this platform.]) |
---|
223 | ;; |
---|
224 | *) |
---|
225 | AC_MSG_RESULT([no]) |
---|
226 | ;; |
---|
227 | esac |
---|
228 | |
---|
229 | dnl Check for trang. |
---|
230 | trang=yes |
---|
231 | AC_ARG_WITH(trang, |
---|
232 | AS_HELP_STRING([--with-trang=PATH], |
---|
233 | [Specify the command to run the trang schema converter]), |
---|
234 | [ |
---|
235 | trang="$withval" |
---|
236 | ]) |
---|
237 | if test "$trang" = "yes"; then |
---|
238 | AC_PATH_PROG(TRANG, trang, none) |
---|
239 | else |
---|
240 | TRANG="$trang" |
---|
241 | AC_SUBST(TRANG) |
---|
242 | fi |
---|
243 | |
---|
244 | |
---|
245 | dnl Check for libraries -------------------- |
---|
246 | |
---|
247 | # Berkeley DB on SCO OpenServer needs -lsocket |
---|
248 | AC_CHECK_LIB(socket, socket) |
---|
249 | |
---|
250 | # Build the BDB filesystem library only if we have an appropriate |
---|
251 | # version of Berkeley DB. |
---|
252 | case "$host" in |
---|
253 | powerpc-apple-darwin*) |
---|
254 | # Berkeley DB 4.0 does not work on OS X. |
---|
255 | SVN_FS_WANT_DB_MAJOR=4 |
---|
256 | SVN_FS_WANT_DB_MINOR=1 |
---|
257 | SVN_FS_WANT_DB_PATCH=25 |
---|
258 | ;; |
---|
259 | *) |
---|
260 | SVN_FS_WANT_DB_MAJOR=4 |
---|
261 | SVN_FS_WANT_DB_MINOR=0 |
---|
262 | SVN_FS_WANT_DB_PATCH=14 |
---|
263 | ;; |
---|
264 | esac |
---|
265 | # Look for libdb4.so first: |
---|
266 | SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR, |
---|
267 | $SVN_FS_WANT_DB_PATCH, [db4 db]) |
---|
268 | |
---|
269 | AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR, |
---|
270 | [The desired major version for the Berkeley DB]) |
---|
271 | AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR, |
---|
272 | [The desired minor version for the Berkeley DB]) |
---|
273 | AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH, |
---|
274 | [The desired patch version for the Berkeley DB]) |
---|
275 | |
---|
276 | AC_SUBST(SVN_DB_INCLUDES) |
---|
277 | AC_SUBST(SVN_DB_LIBS) |
---|
278 | |
---|
279 | SVN_LIB_SASL |
---|
280 | |
---|
281 | if test "$svn_lib_sasl" = "yes"; then |
---|
282 | AC_DEFINE(SVN_HAVE_SASL, 1, |
---|
283 | [Defined if Cyrus SASL v2 is present on the system]) |
---|
284 | fi |
---|
285 | |
---|
286 | dnl Mac OS KeyChain ------------------- |
---|
287 | |
---|
288 | AC_ARG_ENABLE(keychain, |
---|
289 | AS_HELP_STRING([--disable-keychain], |
---|
290 | [Disable use of Mac OS KeyChain for auth credentials]), |
---|
291 | [enable_keychain=$enableval],[enable_keychain=yes]) |
---|
292 | |
---|
293 | AC_MSG_CHECKING([for Mac OS KeyChain Services]) |
---|
294 | |
---|
295 | if test "$enable_keychain" = "yes"; then |
---|
296 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <AvailabilityMacros.h> |
---|
297 | #if !DARWIN || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2) |
---|
298 | #error KeyChain API unavailable. |
---|
299 | #endif]], [[]])],[],[enable_keychain=no]) |
---|
300 | fi |
---|
301 | |
---|
302 | if test "$enable_keychain" = "yes"; then |
---|
303 | dnl ### Hack. We should only need to pass the -framework options when |
---|
304 | dnl linking libsvn_subr, since it is the only library that uses Keychain. |
---|
305 | dnl |
---|
306 | dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for |
---|
307 | dnl OS X frameworks like it does for normal libraries, so we need to |
---|
308 | dnl explicitly pass the option to all the users of libsvn_subr to allow |
---|
309 | dnl static builds to link successfully. |
---|
310 | dnl |
---|
311 | dnl This does mean that all executables we link will be linked directly |
---|
312 | dnl to these frameworks - even when building shared libraries - but that |
---|
313 | dnl shouldn't cause any problems. |
---|
314 | LIBS="$LIBS -framework Security" |
---|
315 | LIBS="$LIBS -framework CoreFoundation" |
---|
316 | LIBS="$LIBS -framework CoreServices" |
---|
317 | AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?]) |
---|
318 | AC_MSG_RESULT([yes]) |
---|
319 | else |
---|
320 | AC_MSG_RESULT([no]) |
---|
321 | fi |
---|
322 | |
---|
323 | |
---|
324 | dnl APR_HAS_DSO ------------------- |
---|
325 | |
---|
326 | AC_MSG_CHECKING([whether APR has support for DSOs]) |
---|
327 | old_CPPFLAGS="$CPPFLAGS" |
---|
328 | CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" |
---|
329 | AC_PREPROC_IFELSE([ |
---|
330 | #include <apr.h> |
---|
331 | #if !APR_HAS_DSO |
---|
332 | #error |
---|
333 | #endif], |
---|
334 | APR_HAS_DSO="yes" |
---|
335 | AC_MSG_RESULT([yes]), |
---|
336 | APR_HAS_DSO="no" |
---|
337 | AC_MSG_RESULT([no])) |
---|
338 | CPPFLAGS="$old_CPPFLAGS" |
---|
339 | |
---|
340 | |
---|
341 | dnl D-Bus (required for support for KWallet and GNOME Keyring) ------------------- |
---|
342 | |
---|
343 | if test -n "$PKG_CONFIG"; then |
---|
344 | AC_MSG_CHECKING([for D-Bus .pc file]) |
---|
345 | if $PKG_CONFIG --exists dbus-1; then |
---|
346 | AC_MSG_RESULT([yes]) |
---|
347 | old_CPPFLAGS="$CPPFLAGS" |
---|
348 | old_LIBS="$LIBS" |
---|
349 | DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`" |
---|
350 | AC_MSG_CHECKING([D-Bus version]) |
---|
351 | DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`" |
---|
352 | AC_MSG_RESULT([$DBUS_VERSION]) |
---|
353 | # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE |
---|
354 | if test -n ["`echo "$DBUS_VERSION" | $GREP '^0\.[[:digit:]]\+'`"]; then |
---|
355 | DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" |
---|
356 | fi |
---|
357 | DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`" |
---|
358 | CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS" |
---|
359 | LIBS="$LIBS $DBUS_LIBS" |
---|
360 | AC_MSG_CHECKING([for D-Bus]) |
---|
361 | AC_LINK_IFELSE([ |
---|
362 | #include <dbus/dbus.h> |
---|
363 | int main() |
---|
364 | {dbus_bus_get(DBUS_BUS_SESSION, NULL);}], HAVE_DBUS="yes", HAVE_DBUS="no") |
---|
365 | if test "$HAVE_DBUS" = "yes"; then |
---|
366 | AC_MSG_RESULT([yes]) |
---|
367 | else |
---|
368 | AC_MSG_RESULT([no]) |
---|
369 | fi |
---|
370 | CPPFLAGS="$old_CPPFLAGS" |
---|
371 | LIBS="$old_LIBS" |
---|
372 | else |
---|
373 | AC_MSG_RESULT([no]) |
---|
374 | fi |
---|
375 | fi |
---|
376 | |
---|
377 | dnl GNOME Keyring ------------------- |
---|
378 | |
---|
379 | AC_ARG_WITH(gnome_keyring, |
---|
380 | AS_HELP_STRING([--with-gnome-keyring], |
---|
381 | [Enable use of GNOME Keyring for auth credentials]), |
---|
382 | [with_gnome_keyring="$withval"], |
---|
383 | [with_gnome_keyring=no]) |
---|
384 | |
---|
385 | AC_MSG_CHECKING([whether to look for GNOME Keyring]) |
---|
386 | if test "$with_gnome_keyring" != "no"; then |
---|
387 | AC_MSG_RESULT([yes]) |
---|
388 | if test "$enable_shared" = "yes"; then |
---|
389 | if test "$APR_HAS_DSO" = "yes"; then |
---|
390 | if test -n "$PKG_CONFIG"; then |
---|
391 | if test "$HAVE_DBUS" = "yes"; then |
---|
392 | AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files]) |
---|
393 | if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then |
---|
394 | AC_MSG_RESULT([yes]) |
---|
395 | old_CPPFLAGS="$CPPFLAGS" |
---|
396 | SVN_GNOME_KEYRING_INCLUDES="$DBUS_CPPFLAGS `$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`" |
---|
397 | CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES" |
---|
398 | AC_CHECK_HEADER(gnome-keyring.h, with_gnome_keyring=yes, with_gnome_keyring=no) |
---|
399 | AC_MSG_CHECKING([for GNOME Keyring]) |
---|
400 | if test "$with_gnome_keyring" = "yes"; then |
---|
401 | AC_MSG_RESULT([yes]) |
---|
402 | AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], |
---|
403 | [Is GNOME Keyring support enabled?]) |
---|
404 | CPPFLAGS="$old_CPPFLAGS" |
---|
405 | SVN_GNOME_KEYRING_LIBS="$DBUS_LIBS `$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`" |
---|
406 | else |
---|
407 | AC_MSG_RESULT([no]) |
---|
408 | AC_MSG_ERROR([cannot find GNOME Keyring]) |
---|
409 | fi |
---|
410 | else |
---|
411 | AC_MSG_RESULT([no]) |
---|
412 | AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files]) |
---|
413 | fi |
---|
414 | else |
---|
415 | AC_MSG_ERROR([cannot find D-Bus]) |
---|
416 | fi |
---|
417 | else |
---|
418 | AC_MSG_ERROR([cannot find pkg-config]) |
---|
419 | fi |
---|
420 | else |
---|
421 | AC_MSG_ERROR([APR does not have support for DSOs]) |
---|
422 | fi |
---|
423 | else |
---|
424 | AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared]) |
---|
425 | fi |
---|
426 | else |
---|
427 | AC_MSG_RESULT([no]) |
---|
428 | fi |
---|
429 | AC_SUBST(SVN_GNOME_KEYRING_INCLUDES) |
---|
430 | AC_SUBST(SVN_GNOME_KEYRING_LIBS) |
---|
431 | |
---|
432 | |
---|
433 | dnl I18n ------------------- |
---|
434 | |
---|
435 | AC_ARG_ENABLE(nls, |
---|
436 | AS_HELP_STRING([--disable-nls],[Disable gettext functionality]), |
---|
437 | [enable_nls=$enableval],[enable_nls=yes]) |
---|
438 | |
---|
439 | USE_NLS="no" |
---|
440 | if test "$enable_nls" = "yes"; then |
---|
441 | dnl First, check to see if there is a working msgfmt. |
---|
442 | AC_PATH_PROG(MSGFMT, msgfmt, none) |
---|
443 | AC_PATH_PROG(MSGMERGE, msgmerge, none) |
---|
444 | AC_PATH_PROG(XGETTEXT, xgettext, none) |
---|
445 | if test "$MSGFMT" != "none"; then |
---|
446 | AC_SEARCH_LIBS(bindtextdomain, [intl], [], |
---|
447 | [ |
---|
448 | AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.]) |
---|
449 | enable_nls="no" |
---|
450 | ]) |
---|
451 | if test "$enable_nls" = "yes"; then |
---|
452 | AC_DEFINE(ENABLE_NLS, 1, |
---|
453 | [Define to 1 if translation of program messages to the user's |
---|
454 | native language is requested.]) |
---|
455 | USE_NLS="yes" |
---|
456 | fi |
---|
457 | fi |
---|
458 | fi |
---|
459 | |
---|
460 | AH_BOTTOM( |
---|
461 | #define N_(x) x |
---|
462 | #define U_(x) x |
---|
463 | #ifdef ENABLE_NLS |
---|
464 | #include <locale.h> |
---|
465 | #include <libintl.h> |
---|
466 | #define _(x) dgettext(PACKAGE_NAME, x) |
---|
467 | #define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n) |
---|
468 | #else |
---|
469 | #define _(x) (x) |
---|
470 | #define Q_(x1, x2, n) (((n) == 1) ? x1 : x2) |
---|
471 | #define gettext(x) (x) |
---|
472 | #define dgettext(domain, x) (x) |
---|
473 | #endif |
---|
474 | ) |
---|
475 | |
---|
476 | dnl Used to simulate makefile conditionals. |
---|
477 | GETTEXT_CODESET=\# |
---|
478 | NO_GETTEXT_CODESET=\# |
---|
479 | if test $USE_NLS = "yes"; then |
---|
480 | AC_CHECK_FUNCS(bind_textdomain_codeset, |
---|
481 | [ GETTEXT_CODESET="" ], |
---|
482 | [ NO_GETTEXT_CODESET="" ]) |
---|
483 | fi |
---|
484 | AC_SUBST(GETTEXT_CODESET) |
---|
485 | AC_SUBST(NO_GETTEXT_CODESET) |
---|
486 | |
---|
487 | # Check if we are using GNU gettext. |
---|
488 | GNU_GETTEXT=no |
---|
489 | MSGFMTFLAGS='' |
---|
490 | if test $USE_NLS = "yes"; then |
---|
491 | AC_MSG_CHECKING(if we are using GNU gettext) |
---|
492 | if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then |
---|
493 | GNU_GETTEXT=yes |
---|
494 | MSGFMTFLAGS='-c' |
---|
495 | fi |
---|
496 | AC_MSG_RESULT($GNU_GETTEXT) |
---|
497 | fi |
---|
498 | AC_SUBST(MSGFMTFLAGS) |
---|
499 | |
---|
500 | |
---|
501 | dnl KWallet ------------------- |
---|
502 | SVN_LIB_KWALLET |
---|
503 | |
---|
504 | if test "$svn_lib_kwallet" = "yes"; then |
---|
505 | AC_DEFINE([SVN_HAVE_KWALLET], 1, |
---|
506 | [Defined if KWallet support is enabled]) |
---|
507 | fi |
---|
508 | |
---|
509 | |
---|
510 | dnl Build and install rules ------------------- |
---|
511 | |
---|
512 | INSTALL_STATIC_RULES="install-bin install-docs" |
---|
513 | INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static" |
---|
514 | INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE" |
---|
515 | BUILD_RULES="fsmod-lib ramod-lib lib bin test $BUILD_APACHE_RULE" |
---|
516 | |
---|
517 | if test "$svn_lib_berkeley_db" = "yes"; then |
---|
518 | BUILD_RULES="$BUILD_RULES bdb-lib bdb-test" |
---|
519 | INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`" |
---|
520 | INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib" |
---|
521 | BDB_TEST_DEPS="\$(BDB_TEST_DEPS)" |
---|
522 | BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)" |
---|
523 | fi |
---|
524 | |
---|
525 | if test "$svn_lib_neon" = "yes"; then |
---|
526 | BUILD_RULES="$BUILD_RULES neon-lib" |
---|
527 | INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-neon-lib/'`" |
---|
528 | INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-neon-lib" |
---|
529 | fi |
---|
530 | |
---|
531 | if test "$svn_lib_serf" = "yes"; then |
---|
532 | BUILD_RULES="$BUILD_RULES serf-lib" |
---|
533 | INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`" |
---|
534 | INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib" |
---|
535 | fi |
---|
536 | |
---|
537 | if test "$svn_lib_kwallet" = "yes"; then |
---|
538 | BUILD_RULES="$BUILD_RULES kwallet-lib" |
---|
539 | INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-kwallet-lib/'`" |
---|
540 | INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib" |
---|
541 | fi |
---|
542 | |
---|
543 | if test "$with_gnome_keyring" = "yes"; then |
---|
544 | BUILD_RULES="$BUILD_RULES gnome-keyring-lib" |
---|
545 | INSTALL_RULES="`echo $INSTALL_RULES | sed 's/install-lib/install-lib install-gnome-keyring-lib/'`" |
---|
546 | INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib" |
---|
547 | fi |
---|
548 | |
---|
549 | if test "$USE_NLS" = "yes"; then |
---|
550 | BUILD_RULES="$BUILD_RULES locale" |
---|
551 | INSTALL_RULES="$INSTALL_RULES install-locale" |
---|
552 | fi |
---|
553 | |
---|
554 | AC_SUBST(BUILD_RULES) |
---|
555 | AC_SUBST(INSTALL_STATIC_RULES) |
---|
556 | AC_SUBST(INSTALL_RULES) |
---|
557 | AC_SUBST(BDB_TEST_DEPS) |
---|
558 | AC_SUBST(BDB_TEST_PROGRAMS) |
---|
559 | |
---|
560 | dnl Check for header files ---------------- |
---|
561 | |
---|
562 | dnl Standard C headers |
---|
563 | AC_HEADER_STDC |
---|
564 | |
---|
565 | dnl Check for typedefs, structures, and compiler characteristics ---------- |
---|
566 | |
---|
567 | dnl if compiler doesn't understand `const', then define it empty |
---|
568 | AC_C_CONST |
---|
569 | |
---|
570 | dnl if non-existent, define size_t to be `unsigned' |
---|
571 | AC_TYPE_SIZE_T |
---|
572 | |
---|
573 | |
---|
574 | dnl Check for library functions ---------- |
---|
575 | |
---|
576 | dnl libsvn_string uses memcmp() |
---|
577 | AC_FUNC_MEMCMP |
---|
578 | |
---|
579 | dnl svn_error's default warning handler uses vfprintf() |
---|
580 | AC_FUNC_VPRINTF |
---|
581 | |
---|
582 | dnl check for functions needed in special file handling |
---|
583 | AC_CHECK_FUNCS(symlink readlink) |
---|
584 | |
---|
585 | |
---|
586 | dnl Process some configuration options ---------- |
---|
587 | |
---|
588 | AC_ARG_WITH(ssl, |
---|
589 | AS_HELP_STRING([--with-ssl], |
---|
590 | [This option does NOT affect the Subversion build process in any |
---|
591 | way. It enables OpenSSL support in the Neon library. If and |
---|
592 | only if you are building Neon as an integrated part of the |
---|
593 | Subversion build process, rather than linking to an already |
---|
594 | installed version of Neon, you probably want to pass this |
---|
595 | option so that Neon (and so indirectly, Subversion) will be |
---|
596 | capable of https:// access.]), |
---|
597 | []) |
---|
598 | |
---|
599 | AC_ARG_ENABLE(debug, |
---|
600 | AS_HELP_STRING([--enable-debug], |
---|
601 | [Turn on debugging]), |
---|
602 | [ |
---|
603 | if test "$enableval" = "yes" ; then |
---|
604 | enable_debugging="yes" |
---|
605 | else |
---|
606 | enable_debugging="no" |
---|
607 | fi |
---|
608 | ], |
---|
609 | [ |
---|
610 | # Neither --enable-debug nor --disable-debug was passed. |
---|
611 | enable_debugging="maybe" |
---|
612 | |
---|
613 | # We leave this as 'maybe' because setting it to 'no' would modify the |
---|
614 | # CFLAGS/CXXFLAGS later (just after the --enable-maintainer-mode block), |
---|
615 | # and we don't want to force that. |
---|
616 | # |
---|
617 | # TODO: set enable_debugging='no' here, and provide another way to disable |
---|
618 | # the CFLAGS/CXXFLAGS munging. |
---|
619 | ]) |
---|
620 | |
---|
621 | |
---|
622 | AC_ARG_ENABLE(maintainer-mode, |
---|
623 | AS_HELP_STRING([--enable-maintainer-mode], |
---|
624 | [Turn on debugging and very strict compile-time warnings]), |
---|
625 | [ |
---|
626 | if test "$enableval" = "yes" ; then |
---|
627 | if test "$enable_debugging" = "no" ; then |
---|
628 | AC_MSG_ERROR(Can't have --disable-debug and --enable-maintainer-mode) |
---|
629 | fi |
---|
630 | enable_debugging=yes |
---|
631 | if test "$GCC" = "yes"; then |
---|
632 | AC_MSG_NOTICE([maintainer-mode: adding GCC warning flags]) |
---|
633 | dnl Enable some extra warnings. Put these before the user's flags |
---|
634 | dnl so the user can specify flags that override these. |
---|
635 | CFLAGS="-Wpointer-arith -Wwrite-strings -Wshadow -ansi -Wall -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Wno-long-long $CFLAGS" |
---|
636 | CXXFLAGS="-Wpointer-arith -Wwrite-strings -Wshadow $CXXFLAGS" |
---|
637 | |
---|
638 | dnl some additional flags that can be handy for an occasional review, |
---|
639 | dnl but throw too many warnings in svn code, of too little importance, |
---|
640 | dnl to keep these enabled. Remove the "dnl" to do a run with these |
---|
641 | dnl switches enabled. |
---|
642 | dnl CFLAGS="-Wswitch-enum -Wswitch-default $CFLAGS" |
---|
643 | |
---|
644 | dnl Add each of the following flags only if the compiler accepts it. |
---|
645 | |
---|
646 | CFLAGS_KEEP="$CFLAGS" |
---|
647 | AC_LANG_PUSH([C]) |
---|
648 | |
---|
649 | CFLAGS="-Wextra-tokens $CFLAGS_KEEP" |
---|
650 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"]) |
---|
651 | |
---|
652 | CFLAGS="-Wnewline-eof $CFLAGS_KEEP" |
---|
653 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"]) |
---|
654 | |
---|
655 | CFLAGS="-Wshorten-64-to-32 $CFLAGS_KEEP" |
---|
656 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"]) |
---|
657 | |
---|
658 | CFLAGS="-Wold-style-definition $CFLAGS_KEEP" |
---|
659 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"]) |
---|
660 | |
---|
661 | AC_LANG_POP([C]) |
---|
662 | CFLAGS="$CFLAGS_KEEP" |
---|
663 | fi |
---|
664 | fi |
---|
665 | ]) |
---|
666 | |
---|
667 | if test "$enable_debugging" = "yes" ; then |
---|
668 | dnl At the moment, we don't want optimization, because we're |
---|
669 | dnl debugging. |
---|
670 | CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-O[^ ]* //g'`"] |
---|
671 | CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-O[^ ]* //g'`"] |
---|
672 | dnl SVN_DEBUG enables specific features for developer builds |
---|
673 | dnl AP_DEBUG enables specific (Apache) features for developer builds |
---|
674 | CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG" |
---|
675 | CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" |
---|
676 | elif test "$enable_debugging" = "no" ; then |
---|
677 | CFLAGS=["`echo $CFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"] |
---|
678 | CXXFLAGS=["`echo $CXXFLAGS' ' | sed -e 's/-g[0-9] //g' | sed -e 's/-g//g'`"] |
---|
679 | dnl Compile with NDEBUG to get rid of assertions |
---|
680 | CFLAGS="$CFLAGS -DNDEBUG" |
---|
681 | CXXFLAGS="$CXXFLAGS -DNDEBUG" |
---|
682 | # elif test "$enable_debugging" = "maybe" ; then |
---|
683 | # # do nothing |
---|
684 | fi |
---|
685 | |
---|
686 | |
---|
687 | AC_ARG_WITH(editor, |
---|
688 | AS_HELP_STRING([--with-editor=PATH], |
---|
689 | [Specify a default editor for the subversion client.]), |
---|
690 | [ |
---|
691 | |
---|
692 | if test "$withval" = "yes" ; then |
---|
693 | AC_MSG_ERROR([--with-editor requires an argument.]) |
---|
694 | else |
---|
695 | SVN_CLIENT_EDITOR=$withval |
---|
696 | AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR", |
---|
697 | [The path of a default editor for the client.]) |
---|
698 | |
---|
699 | fi |
---|
700 | |
---|
701 | ]) |
---|
702 | |
---|
703 | SVN_LIB_Z |
---|
704 | |
---|
705 | MOD_ACTIVATION="-a" |
---|
706 | AC_ARG_ENABLE(mod-activation, |
---|
707 | AS_HELP_STRING([--disable-mod-activation], |
---|
708 | [Do not enable mod_dav_svn in httpd.conf]), |
---|
709 | [ |
---|
710 | if test "$enableval" = "no" ; then |
---|
711 | MOD_ACTIVATION="" |
---|
712 | AC_MSG_NOTICE([Disabling apache module activation]) |
---|
713 | else |
---|
714 | AC_MSG_NOTICE([Enabling apache module activation]) |
---|
715 | fi |
---|
716 | ]) |
---|
717 | AC_SUBST(MOD_ACTIVATION) |
---|
718 | |
---|
719 | |
---|
720 | |
---|
721 | AC_ARG_ENABLE(gprof, |
---|
722 | AS_HELP_STRING([--enable-gprof], |
---|
723 | [Produce gprof profiling data in 'gmon.out' (GCC only).]), |
---|
724 | [ |
---|
725 | if test "$enableval" = "yes" ; then |
---|
726 | dnl Probably other compilers support -pg or something similar; |
---|
727 | dnl feel free to extend this to include them. |
---|
728 | if test "$GCC" = "yes"; then |
---|
729 | if test "$enable_shared" = "yes" ; then |
---|
730 | AC_MSG_ERROR(Can't have --enable-gprof without --disable-shared (we |
---|
731 | recommend also using --enable-all-static).) |
---|
732 | fi |
---|
733 | if test ! "$enable_all_static" = "yes" ; then |
---|
734 | AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.) |
---|
735 | fi |
---|
736 | AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).]) |
---|
737 | CFLAGS="$CFLAGS -pg" |
---|
738 | CXXFLAGS="$CXXFLAGS -pg" |
---|
739 | LT_LDFLAGS="$LT_LDFLAGS -pg" |
---|
740 | else |
---|
741 | AC_MSG_ERROR(We only support --enable-gprof with GCC right now.) |
---|
742 | fi |
---|
743 | fi |
---|
744 | ]) |
---|
745 | |
---|
746 | |
---|
747 | # Scripting and Bindings languages |
---|
748 | |
---|
749 | # Python: Used for testsuite, and bindings |
---|
750 | |
---|
751 | |
---|
752 | PYTHON="`$abs_srcdir/build/find_python.sh`" |
---|
753 | if test -z "$PYTHON"; then |
---|
754 | AC_MSG_WARN([Python 2.4 or later is required to run the testsuite]) |
---|
755 | AC_MSG_WARN([or to use the Subversion Python bindings]) |
---|
756 | AC_MSG_WARN([]) |
---|
757 | AC_MSG_WARN([If you have a suitable Python installed, but not on the]) |
---|
758 | AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path]) |
---|
759 | AC_MSG_WARN([to the Python executable, and re-run configure]) |
---|
760 | fi |
---|
761 | AC_PATH_PROGS(PYTHON, "$PYTHON", none) |
---|
762 | |
---|
763 | # The minimum version for the JVM runtime for our Java bytecode. |
---|
764 | JAVA_OLDEST_WORKING_VER='1.2' |
---|
765 | # SVN_CHECK_JDK sets $JAVA_CLASSPATH |
---|
766 | SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER) |
---|
767 | |
---|
768 | AC_PATH_PROG(PERL, perl, none) |
---|
769 | |
---|
770 | AC_PATH_PROG(RUBY, ruby, none) |
---|
771 | if test "$RUBY" != "none"; then |
---|
772 | if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)'; then |
---|
773 | AC_PATH_PROG(RDOC, rdoc, none) |
---|
774 | AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[ |
---|
775 | svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MAJOR))'`" |
---|
776 | ]) |
---|
777 | RUBY_MAJOR="$svn_cv_ruby_major" |
---|
778 | |
---|
779 | AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[ |
---|
780 | svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(MINOR))'`" |
---|
781 | ]) |
---|
782 | RUBY_MINOR="$svn_cv_ruby_minor" |
---|
783 | |
---|
784 | AC_SUBST(RUBY_MAJOR) |
---|
785 | AC_SUBST(RUBY_MINOR) |
---|
786 | else |
---|
787 | RUBY="none" |
---|
788 | AC_MSG_WARN([The detected Ruby is too old for Subversion to use]) |
---|
789 | AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the]) |
---|
790 | AC_MSG_WARN([Subversion Ruby bindings]) |
---|
791 | AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later]) |
---|
792 | fi |
---|
793 | fi |
---|
794 | |
---|
795 | SVN_CHECK_SWIG |
---|
796 | |
---|
797 | SVN_CHECK_CTYPESGEN |
---|
798 | |
---|
799 | dnl decide whether we want to link against the RA/FS libraries |
---|
800 | AC_ARG_ENABLE(runtime-module-search, |
---|
801 | AS_HELP_STRING([--enable-runtime-module-search], |
---|
802 | [Turn on dynamic loading of RA/FS libraries]), |
---|
803 | [ |
---|
804 | if test "$enableval" = "yes"; then |
---|
805 | use_dso=yes |
---|
806 | if test "$enable_shared" = "no"; then |
---|
807 | AC_MSG_ERROR([--enable-runtime-module-search conflicts with --disable-shared]) |
---|
808 | fi |
---|
809 | AC_DEFINE(SVN_USE_DSO, 1, |
---|
810 | [Defined if svn should try to load DSOs]) |
---|
811 | fi |
---|
812 | ]) |
---|
813 | |
---|
814 | if test "$enable_shared" = "no" || test "$use_dso" != "yes"; then |
---|
815 | ### We want ra_local first to handle the following scenario: |
---|
816 | ### user has neon and db3 in /usr/local, and db4 in |
---|
817 | ### /usr/local/BerkeleyDB.4.0. If libsvn_ra_neon.la comes before |
---|
818 | ### libsvn_fs.la then libtool ends up linking libsvn_fs to the db3 |
---|
819 | ### in /usr/local/lib |
---|
820 | AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL, 1, |
---|
821 | [Defined if libsvn_client should link against libsvn_ra_local]) |
---|
822 | svn_ra_lib_deps="\$(RA_LOCAL_DEPS)" |
---|
823 | svn_ra_lib_install_deps="install-ramod-lib" |
---|
824 | svn_ra_lib_link="\$(RA_LOCAL_LINK)" |
---|
825 | |
---|
826 | AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SVN, 1, |
---|
827 | [Defined if libsvn_client should link against libsvn_ra_svn]) |
---|
828 | svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)" |
---|
829 | svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)" |
---|
830 | |
---|
831 | if test "$svn_lib_neon" = "yes"; then |
---|
832 | AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_NEON, 1, |
---|
833 | [Defined if libsvn_client should link against libsvn_ra_neon]) |
---|
834 | svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_NEON_DEPS)" |
---|
835 | svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-neon-lib" |
---|
836 | svn_ra_lib_link="$svn_ra_lib_link \$(RA_NEON_LINK)" |
---|
837 | fi |
---|
838 | |
---|
839 | if test "$svn_lib_serf" = "yes"; then |
---|
840 | AC_DEFINE(SVN_LIBSVN_CLIENT_LINKS_RA_SERF, 1, |
---|
841 | [Defined if libsvn_client should link against libsvn_ra_serf]) |
---|
842 | svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)" |
---|
843 | svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib" |
---|
844 | svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)" |
---|
845 | fi |
---|
846 | |
---|
847 | SVN_RA_LIB_DEPS=$svn_ra_lib_deps |
---|
848 | SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps |
---|
849 | SVN_RA_LIB_LINK=$svn_ra_lib_link |
---|
850 | |
---|
851 | AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1, |
---|
852 | [Defined if libsvn_fs should link against libsvn_fs_fs]) |
---|
853 | svn_fs_lib_deps="\$(FS_FS_DEPS)" |
---|
854 | svn_fs_lib_install_deps="install-fsmod-lib" |
---|
855 | svn_fs_lib_link="\$(FS_FS_LINK)" |
---|
856 | |
---|
857 | if test "$svn_lib_berkeley_db" = "yes"; then |
---|
858 | AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1, |
---|
859 | [Defined if libsvn_fs should link against libsvn_fs_base]) |
---|
860 | svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)" |
---|
861 | svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib" |
---|
862 | svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)" |
---|
863 | fi |
---|
864 | |
---|
865 | SVN_FS_LIB_DEPS=$svn_fs_lib_deps |
---|
866 | SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps |
---|
867 | SVN_FS_LIB_LINK=$svn_fs_lib_link |
---|
868 | fi |
---|
869 | |
---|
870 | AC_SUBST(SVN_RA_LIB_DEPS) |
---|
871 | AC_SUBST(SVN_RA_LIB_INSTALL_DEPS) |
---|
872 | AC_SUBST(SVN_RA_LIB_LINK) |
---|
873 | AC_SUBST(SVN_FS_LIB_DEPS) |
---|
874 | AC_SUBST(SVN_FS_LIB_INSTALL_DEPS) |
---|
875 | AC_SUBST(SVN_FS_LIB_LINK) |
---|
876 | |
---|
877 | # ==== JavaHL ================================================================ |
---|
878 | |
---|
879 | dnl Possibly compile JavaHL |
---|
880 | do_javahl_build=no |
---|
881 | AC_ARG_ENABLE(javahl, |
---|
882 | AS_HELP_STRING([--enable-javahl], |
---|
883 | [Enable compilation of Java high-level bindings (requires C++)]), |
---|
884 | [ if test "$enableval" = "yes" ; then |
---|
885 | do_javahl_build="yes" |
---|
886 | fi |
---|
887 | ]) |
---|
888 | |
---|
889 | JAVAHL_OBJDIR="" |
---|
890 | INSTALL_EXTRA_JAVAHL_LIB="" |
---|
891 | FIX_JAVAHL_LIB="" |
---|
892 | JAVAHL_TESTS_TARGET="" |
---|
893 | LT_CXX_LIBADD="" |
---|
894 | if test "$do_javahl_build" = "yes"; then |
---|
895 | dnl Check for suitable JDK |
---|
896 | if test "$JDK_SUITABLE" = "no"; then |
---|
897 | AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK. |
---|
898 | Please specify a suitable JDK using the --with-jdk option.]) |
---|
899 | fi |
---|
900 | |
---|
901 | dnl The temporary directory where libtool compiles libsvnjavahl. |
---|
902 | dnl N.B. objdir is "the name of the directory that contains temporary |
---|
903 | dnl libtool files" and it is set by libtool.m4 |
---|
904 | JAVAHL_OBJDIR='$(libsvnjavahl_PATH)'/$objdir |
---|
905 | |
---|
906 | os_arch=`uname` |
---|
907 | if test "$os_arch" = "Darwin"; then |
---|
908 | dnl On Darwin, JNI libs must be installed as .jnilib |
---|
909 | INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib' |
---|
910 | FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib" |
---|
911 | fi |
---|
912 | # This segment (and the rest of r10800) is very likely unnecessary |
---|
913 | # with libtool 1.5, which automatically adds libstdc++ as a |
---|
914 | # dependency to the C++ libraries it builds. So at some future time |
---|
915 | # when autogen.sh requires libtool 1.5 or higher, we can get rid of |
---|
916 | # it. |
---|
917 | AC_MSG_CHECKING([for additional flags to link C++ libraries]) |
---|
918 | if test "x$ac_compiler_gnu" = "xyes"; then |
---|
919 | LT_CXX_LIBADD="-lstdc++" |
---|
920 | AC_MSG_RESULT([$LT_CXX_LIBADD]) |
---|
921 | else |
---|
922 | AC_MSG_RESULT([none needed]) |
---|
923 | fi |
---|
924 | fi |
---|
925 | AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB) |
---|
926 | AC_SUBST(JAVAHL_OBJDIR) |
---|
927 | AC_SUBST(FIX_JAVAHL_LIB) |
---|
928 | AC_SUBST(LT_CXX_LIBADD) |
---|
929 | |
---|
930 | AC_ARG_WITH(junit, |
---|
931 | AS_HELP_STRING([--with-junit=PATH], |
---|
932 | [Specify a path to the junit JAR file.]), |
---|
933 | [ |
---|
934 | if test "$withval" != "no"; then |
---|
935 | if test -n "$JAVA_CLASSPATH"; then |
---|
936 | JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH" |
---|
937 | else |
---|
938 | JAVA_CLASSPATH="$withval" |
---|
939 | fi |
---|
940 | JAVAHL_TESTS_TARGET="javahl-tests" |
---|
941 | fi |
---|
942 | ]) |
---|
943 | AC_SUBST(JAVA_CLASSPATH) |
---|
944 | AC_SUBST(JAVAHL_TESTS_TARGET) |
---|
945 | |
---|
946 | # ==== Miscellaneous bits ==================================================== |
---|
947 | |
---|
948 | dnl Since this is used only on Unix-y systems, define the path separator as '/' |
---|
949 | AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/', |
---|
950 | [Defined to be the path separator used on your local filesystem]) |
---|
951 | |
---|
952 | AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null", |
---|
953 | [Defined to be the null device for the system]) |
---|
954 | |
---|
955 | DEFAULT_FS_TYPE="fsfs" |
---|
956 | AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE", |
---|
957 | [The fs type to use by default]) |
---|
958 | |
---|
959 | # BSD/OS (BSDi) needs to use a different include syntax in Makefile |
---|
960 | INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk" |
---|
961 | case "$host" in |
---|
962 | *bsdi*) |
---|
963 | # Check whether they've installed GNU make |
---|
964 | if ! make --version > /dev/null 2>&1; then |
---|
965 | # BSDi make |
---|
966 | INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\"" |
---|
967 | fi |
---|
968 | ;; |
---|
969 | esac |
---|
970 | AC_SUBST(INCLUDE_OUTPUTS) |
---|
971 | |
---|
972 | # ==== Detection complete - output and run config.status ===================== |
---|
973 | |
---|
974 | AC_CONFIG_HEADERS(subversion/svn_private_config.h) |
---|
975 | AC_CONFIG_COMMANDS([svn_private_config.h], |
---|
976 | [sed -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" subversion/svn_private_config.h > subversion/svn_private_config.h.new |
---|
977 | mv -f subversion/svn_private_config.h.new subversion/svn_private_config.h], |
---|
978 | [SVN_DB_HEADER="$SVN_DB_HEADER"]) |
---|
979 | AC_CONFIG_FILES([Makefile]) |
---|
980 | |
---|
981 | SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py) |
---|
982 | SVN_CONFIG_SCRIPT(contrib/client-side/svn_load_dirs/svn_load_dirs.pl) |
---|
983 | SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/svncopy.pl) |
---|
984 | SVN_CONFIG_SCRIPT(contrib/client-side/svncopy/testsvncopy.pl) |
---|
985 | SVN_CONFIG_SCRIPT(contrib/hook-scripts/commit-email.pl) |
---|
986 | SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl) |
---|
987 | SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL) |
---|
988 | SVN_CONFIG_SCRIPT(packages/solaris/pkginfo) |
---|
989 | AC_SUBST(SVN_CONFIG_SCRIPT_FILES) |
---|
990 | |
---|
991 | AC_OUTPUT |
---|
992 | |
---|
993 | # ==== Print final messages to user ========================================== |
---|
994 | |
---|
995 | dnl Configure is long - users tend to miss warnings printed during it. |
---|
996 | dnl Hence, print a warnings about what we did and didn't configure at the |
---|
997 | dnl end, where people will actually see them. |
---|
998 | |
---|
999 | case "$svn_lib_berkeley_db" in |
---|
1000 | "no" ) |
---|
1001 | db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" |
---|
1002 | AC_MSG_WARN([we have configured without BDB filesystem support |
---|
1003 | |
---|
1004 | |
---|
1005 | You don't seem to have Berkeley DB version $db_version or newer |
---|
1006 | installed and linked to APR-UTIL. We have created Makefiles which |
---|
1007 | will build without the Berkeley DB back-end; your repositories will |
---|
1008 | use FSFS as the default back-end. You can find the latest version of |
---|
1009 | Berkeley DB here: |
---|
1010 | http://www.oracle.com/technology/software/products/berkeley-db/index.html |
---|
1011 | ]) |
---|
1012 | ;; |
---|
1013 | esac |
---|
1014 | |
---|