~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
# ==== Check for programs ====================================================
50
50
 
51
51
# Look for a C compiler (before anything can set CFLAGS)
52
 
CMAINTAINERFLAGS="$CUSERFLAGS"
53
52
CUSERFLAGS="$CFLAGS"
54
53
AC_PROG_CC
55
54
SVN_CC_MODE_SETUP
56
55
 
57
56
# Look for a C++ compiler (before anything can set CXXFLAGS)
58
 
CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
59
57
CXXUSERFLAGS="$CXXFLAGS"
60
58
AC_PROG_CXX
61
59
SVN_CXX_MODE_SETUP
92
90
 
93
91
dnl verify apr version and set apr flags
94
92
dnl These regular expressions should not contain "\(" and "\)".
95
 
dnl The specific reason we require APR 0.9.7 is:
96
 
dnl   It contains fixes to its file writing routines
97
 
dnl   now generating errors instead of silently ignoring
98
 
dnl   them.  Only .7 and later can guarantee repository
99
 
dnl   integrity with FSFS.
100
93
 
101
 
APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
 
94
APR_VER_REGEXES=["1\.[3-9]\. 2\."]
102
95
 
103
96
SVN_LIB_APR($APR_VER_REGEXES)
104
97
 
111
104
  AC_SUBST(SVN_APRUTIL_INCLUDES)
112
105
  AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
113
106
  AC_SUBST(SVN_APRUTIL_LIBS)
 
107
  SVN_APR_MAJOR_VERSION=2
114
108
else
115
109
  svn_lib_ver=0
116
 
  APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
 
110
  APU_VER_REGEXES=["1\.[3-9]\."]
117
111
  SVN_LIB_APRUTIL($APU_VER_REGEXES)
 
112
  SVN_APR_MAJOR_VERSION=1
118
113
fi
 
114
AC_SUBST(SVN_APR_MAJOR_VERSION)
119
115
SVN_LT_SOVERSION="-version-info $svn_lib_ver"
120
116
AC_SUBST(SVN_LT_SOVERSION)
121
117
AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
125
121
AC_PATH_PROG(PKG_CONFIG, pkg-config)
126
122
 
127
123
dnl Search for serf
128
 
SVN_LIB_SERF(1,2,1)
 
124
SVN_LIB_SERF(1,3,4)
129
125
 
130
126
if test "$svn_lib_serf" = "yes"; then
131
127
  AC_DEFINE([SVN_HAVE_SERF], 1,
142
138
 
143
139
 
144
140
dnl Find Apache with a recent-enough magic module number
145
 
SVN_FIND_APACHE(20020903)
 
141
SVN_FIND_APACHE(20051115)
146
142
 
147
143
dnl Search for SQLite.  If you change SQLITE_URL from a .zip to
148
144
dnl something else also update build/ac-macros/sqlite.m4 to reflect
167
163
fi
168
164
 
169
165
SVN_CHECK_FOR_ATOMIC_BUILTINS
170
 
 
171
166
if test "$svn_cv_atomic_builtins" = "yes"; then
172
167
    AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
173
168
fi
227
222
  SVN_LIBTOOL="$sh_libtool"
228
223
else
229
224
  sh_libtool="$abs_builddir/libtool"
230
 
  SVN_LIBTOOL="\$(SHELL) $sh_libtool"
 
225
  SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
231
226
fi
232
227
AC_SUBST(SVN_LIBTOOL)
233
228
 
324
319
esac
325
320
AC_SUBST(LT_NO_UNDEFINED)
326
321
 
327
 
AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
328
 
case $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
 
    ;;
337
 
esac
338
 
 
339
322
dnl Check for trang.
340
323
trang=yes
341
324
AC_ARG_WITH(trang,
570
553
AC_MSG_CHECKING([whether to look for GNOME Keyring])
571
554
if test "$with_gnome_keyring" != "no"; then
572
555
  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
 
556
  case "$host" in
 
557
  *-*-darwin*)
 
558
    if test "$with_gnome_keyring" = "yes"; then
 
559
      AC_MSG_ERROR([--with-gnome-keyring is not supported on Mac OS X.])
 
560
    else
 
561
      with_gnome_keyring=no
 
562
    fi
 
563
    ;;
 
564
  *)
 
565
    if test "$svn_enable_shared" = "yes"; then
 
566
      if test "$APR_HAS_DSO" = "yes"; then
 
567
        if test -n "$PKG_CONFIG"; then
 
568
          AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
 
569
          if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
585
570
            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`"
 
571
            old_CPPFLAGS="$CPPFLAGS"
 
572
            SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
 
573
            CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
 
574
            AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
 
575
            AC_MSG_CHECKING([for GNOME Keyring])
 
576
            if test "$found_gnome_keyring" = "yes"; then
 
577
              AC_MSG_RESULT([yes])
 
578
              AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], 
 
579
                        [Is GNOME Keyring support enabled?])
 
580
              CPPFLAGS="$old_CPPFLAGS"
 
581
              SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
 
582
            else
 
583
              AC_MSG_RESULT([no])
 
584
              if test "$with_gnome_keyring" = "yes"; then
 
585
                AC_MSG_ERROR([cannot find GNOME Keyring])
 
586
              fi
 
587
            fi
590
588
          else
591
589
            AC_MSG_RESULT([no])
592
590
            if test "$with_gnome_keyring" = "yes"; then
593
 
              AC_MSG_ERROR([cannot find GNOME Keyring])
 
591
              AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
 
592
            else
 
593
              with_gnome_keyring=no
594
594
            fi
595
595
          fi
596
596
        else
597
 
          AC_MSG_RESULT([no])
598
597
          if test "$with_gnome_keyring" = "yes"; then
599
 
            AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
 
598
            AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
600
599
          else
601
600
            with_gnome_keyring=no
602
601
          fi
603
602
        fi
604
603
      else
605
604
        if test "$with_gnome_keyring" = "yes"; then
606
 
          AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
 
605
          AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
607
606
        else
608
607
          with_gnome_keyring=no
609
608
        fi
610
609
      fi
611
610
    else
612
611
      if test "$with_gnome_keyring" = "yes"; then
613
 
        AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
 
612
        AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
614
613
      else
615
614
        with_gnome_keyring=no
616
615
      fi
617
616
    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
 
617
    ;;
 
618
  esac
625
619
else
626
620
  AC_MSG_RESULT([no])
627
621
fi
628
622
AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
629
623
AC_SUBST(SVN_GNOME_KEYRING_LIBS)
630
624
 
 
625
dnl Googlemock -----------------
 
626
AC_ARG_ENABLE([gmock],
 
627
  AS_HELP_STRING([--disable-gmock],
 
628
                 [Do not use the Googlemock testing framework]),
 
629
  [],
 
630
  [enable_gmock=yes])
 
631
 
 
632
AC_SUBST([GMOCK_SRCDIR], [$abs_srcdir/gmock-fused])
 
633
AC_MSG_CHECKING([whether use Googlemock])
 
634
if test "$enable_gmock" != "no"; then
 
635
  if test -d "$GMOCK_SRCDIR"; then
 
636
    AC_MSG_RESULT([yes])
 
637
    SVN_USE_GMOCK=true
 
638
  else
 
639
    AC_MSG_RESULT([no])
 
640
    SVN_USE_GMOCK=false
 
641
  fi
 
642
else
 
643
  AC_MSG_RESULT([no])
 
644
  SVN_USE_GMOCK_SOURCES=false
 
645
fi
 
646
AC_SUBST([SVN_USE_GMOCK])
631
647
 
632
648
dnl Ev2 experimental features ----------------------
633
649
dnl Note: The Ev2 implementations will be built unconditionally, but by
651
667
  [enable_nls=$enableval],[enable_nls=yes])
652
668
 
653
669
USE_NLS="no"
 
670
SVN_INTL_LIBS=""
654
671
if test "$enable_nls" = "yes"; then
655
672
  dnl First, check to see if there is a working msgfmt.
656
673
  AC_PATH_PROG(MSGFMT, msgfmt, none)
657
674
  AC_PATH_PROG(MSGMERGE, msgmerge, none)
658
675
  AC_PATH_PROG(XGETTEXT, xgettext, none)
659
676
  if test "$MSGFMT" != "none"; then
660
 
    AC_SEARCH_LIBS(bindtextdomain, [intl], [],
 
677
    AC_SEARCH_LIBS(bindtextdomain, [intl],
 
678
                   [
 
679
                      # in case libintl needs to be linked explicitly,
 
680
                      # $ac_cv_search_bindtextdomain contains -l linker flags
 
681
                      if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
 
682
                      then
 
683
                        SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
 
684
                      fi
 
685
                   ],
661
686
                   [
662
687
                    enable_nls="no"
663
688
                   ])
669
694
      AC_SEARCH_LIBS(bindtextdomain, [intl],
670
695
                     [
671
696
                      enable_nls="yes"
 
697
                      if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
 
698
                      then
 
699
                        SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
 
700
                      fi
672
701
                      # This is here so that -liconv ends up in LIBS
673
702
                      # if it worked with -liconv.
674
703
                      AC_CHECK_LIB(iconv, libiconv_open)
687
716
  fi
688
717
fi
689
718
 
 
719
AC_SUBST(SVN_INTL_LIBS)
 
720
 
690
721
AH_BOTTOM([
691
722
/* Indicate to translators that string X should be translated.  Do not look
692
723
   up the translation at run time; just expand to X.  This macro is suitable
711
742
#define gettext(x) (x)
712
743
#define dgettext(domain, x) (x)
713
744
#endif
 
745
 
 
746
/* compiler hints */
 
747
#if defined(__GNUC__) && (__GNUC__ >= 3)
 
748
# define SVN__PREDICT_FALSE(x) (__builtin_expect(x, 0))
 
749
# define SVN__PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
 
750
#else
 
751
# define SVN__PREDICT_FALSE(x) (x)
 
752
# define SVN__PREDICT_TRUE(x) (x)
 
753
#endif
 
754
 
 
755
#if defined(SVN_DEBUG)
 
756
# define SVN__FORCE_INLINE
 
757
# define SVN__PREVENT_INLINE
 
758
#elif defined(__GNUC__)
 
759
# define SVN__FORCE_INLINE APR_INLINE __attribute__ ((always_inline))
 
760
# define SVN__PREVENT_INLINE __attribute__ ((noinline))
 
761
#else
 
762
# define SVN__FORCE_INLINE APR_INLINE
 
763
# define SVN__PREVENT_INLINE
 
764
#endif
 
765
 
 
766
/* Macro used to specify that a variable is intentionally left unused.
 
767
   Supresses compiler warnings about the variable being unused.  */
 
768
#define SVN_UNUSED(v) ( (void)(v) )
714
769
])
715
770
 
716
771
dnl Used to simulate makefile conditionals.
887
942
 
888
943
dnl Process some configuration options ----------
889
944
 
890
 
AC_ARG_WITH(openssl,
891
 
AS_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
 
 
900
945
AC_ARG_ENABLE(debug,
901
946
AS_HELP_STRING([--enable-debug],
902
947
               [Turn on debugging]),
989
1034
        dnl but throw too many warnings in svn code, of too little importance,
990
1035
        dnl to keep these enabled. Remove the "dnl" to do a run with these
991
1036
        dnl switches enabled.
992
 
        dnl ./configure CUSERFLAGS="-Wswitch-enum -Wswitch-default"
 
1037
        dnl ./configure CFLAGS="-Wswitch-enum -Wswitch-default"
993
1038
 
994
1039
        dnl Add each of the following flags only if the C compiler accepts it.
995
1040
        CFLAGS_KEEP="$CFLAGS"
1003
1048
        SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
1004
1049
        SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
1005
1050
        SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
 
1051
        SVN_CFLAGS_ADD_IFELSE([-Wmissing-variable-declarations])
1006
1052
 
1007
 
        CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
 
1053
        CMAINTAINERFLAGS="$CFLAGS"
1008
1054
        CFLAGS="$CFLAGS_KEEP"
1009
1055
 
1010
1056
        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"
 
1057
        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 -Wbad-function-cast $CMAINTAINERFLAGS"
1012
1058
      fi
1013
1059
      if test "$GXX" = "yes"; then
1014
1060
        AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
1022
1068
        SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
1023
1069
        SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers])
1024
1070
 
1025
 
        CXXMAINTAINERFLAGS="$CXXFLAGS $CXXMAINTAINERFLAGS"
 
1071
        CXXMAINTAINERFLAGS="$CXXFLAGS"
1026
1072
        CXXFLAGS="$CXXFLAGS_KEEP"
1027
1073
 
1028
1074
        dnl Add flags that all versions of G++ (should) support
1227
1273
 
1228
1274
PYTHON="`$abs_srcdir/build/find_python.sh`"
1229
1275
if test -z "$PYTHON"; then
1230
 
  AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
 
1276
  AC_MSG_WARN([Python 2.7 or later is required to run the testsuite])
1231
1277
  AC_MSG_WARN([or to use the Subversion Python bindings])
1232
1278
  AC_MSG_WARN([])
1233
1279
  AC_MSG_WARN([If you have a suitable Python installed, but not on the])
1237
1283
AC_PATH_PROGS(PYTHON, "$PYTHON", none)
1238
1284
 
1239
1285
# The minimum version for the JVM runtime for our Java bytecode.
1240
 
JAVA_OLDEST_WORKING_VER='1.5'
 
1286
JAVA_OLDEST_WORKING_VER='1.6'
1241
1287
# SVN_CHECK_JDK sets $JAVA_CLASSPATH
1242
1288
SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
1243
1289
 
1341
1387
  svn_fs_lib_install_deps="install-fsmod-lib"
1342
1388
  svn_fs_lib_link="\$(FS_FS_LINK)"
1343
1389
 
 
1390
  AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_X, 1,
 
1391
      [Defined if libsvn_fs should link against libsvn_fs_x])
 
1392
  svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_X_DEPS)"
 
1393
  svn_fs_lib_link="$svn_fs_lib_link \$(FS_X_LINK)"
 
1394
dnl  FSFS already installs fsmod
 
1395
dnl  svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-fsmod-lib"
 
1396
 
1344
1397
  if test "$svn_lib_berkeley_db" = "yes"; then
1345
1398
  AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
1346
1399
      [Defined if libsvn_fs should link against libsvn_fs_base])
1402
1455
  # it.
1403
1456
  AC_MSG_CHECKING([for additional flags to link C++ libraries])
1404
1457
  if test "x$ac_compiler_gnu" = "xyes"; then
1405
 
    LT_CXX_LIBADD="-lstdc++"
1406
 
    AC_MSG_RESULT([$LT_CXX_LIBADD])
 
1458
    case "$host" in
 
1459
      *freebsd10*)
 
1460
        AC_MSG_RESULT([none needed])
 
1461
      ;;
 
1462
      *)
 
1463
        LT_CXX_LIBADD="-lstdc++"
 
1464
        AC_MSG_RESULT([$LT_CXX_LIBADD])
 
1465
      ;;
 
1466
    esac
1407
1467
  else
1408
1468
    AC_MSG_RESULT([none needed])
1409
1469
  fi
1433
1493
 
1434
1494
# ==== Miscellaneous bits ====================================================
1435
1495
 
 
1496
AC_CHECK_HEADERS([stdbool.h inttypes.h])
 
1497
 
1436
1498
# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
1437
1499
### I think we get this flag from APR, so the fix probably belongs there
1438
1500
if test "$CC" = "clang"; then
1484
1546
                    SVN_DB_HEADER="$SVN_DB_HEADER"])
1485
1547
AC_CONFIG_FILES([Makefile])
1486
1548
 
 
1549
# Create pkg-config .pc files from .pc.in files
 
1550
for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do
 
1551
  pc_file=${pc_in_file#${abs_srcdir}/}
 
1552
  pc_file=${pc_file%.in}
 
1553
  AC_CONFIG_FILES([${pc_file}])
 
1554
done
 
1555
 
1487
1556
SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
1488
1557
SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
1489
1558
SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)