# # # rename "botan" # to "Attic/botan" # # rename "lua" # to "Attic/lua" # # rename "pcre" # to "Attic/pcre" # # rename "pcre/pcrepattern.texi" # to "pcrepattern.texi" # # rename "pcre/pcresyntax.texi" # to "pcresyntax.texi" # # add_dir "Attic" # # add_file "m4/botan.m4" # content [752f096eef36e41c52160d02214d32f94663ca5a] # # add_file "m4/lua.m4" # content [94bfca8bd9c2ea85a18d932edc7b8c21690bf129] # # patch "Makefile.am" # from [a0fe85510172035d9dc17976db02c8023c3b9219] # to [c850e4c62a84dd138a435f3c78c5bdabebcd6231] # # patch "botan_pipe_cache.hh" # from [6a935f221e4a9368cbef90618e4a3847d1053dbc] # to [21898f46e28b96c8471b488237b4f716f8389bda] # # patch "configure.ac" # from [81d3d689b13f3b20219b8eace2fc50074df86f1a] # to [5dfd3b40a0493ea8f3e28d4b89886fbae91b8d6e] # # patch "debian/control" # from [adc34d4cb8141eb255c300b1177f91fee1d23f5b] # to [a63c724b71b68586d2c9c7fbbb2717689455192a] # # patch "m4/pcre.m4" # from [beb5310e881b21a03007ca3ae670f1899bf60ed0] # to [69b51a3c7bd9fbfe877649f0b6d88631068be3c4] # # patch "monotone.texi" # from [8542311382a69a2d94963663f5336ad83f842ea2] # to [553a6447747ec2e35a4beaa8b06b280628886e8a] # # patch "pcrewrap.hh" # from [88a5febaa51ead63372be8464b5e9c463b1fa653] # to [2759a4367510fbf91402fd195711bf2d1a1c2330] # ============================================================ --- m4/botan.m4 752f096eef36e41c52160d02214d32f94663ca5a +++ m4/botan.m4 752f096eef36e41c52160d02214d32f94663ca5a @@ -0,0 +1,78 @@ +# Currently we accept botan version 1.7.8 and newer, limited to the +# development branch 1.7, emitting a warning if the found botan is +# newer than 1.7.15. + +AC_DEFUN([MTN_FIND_BOTAN], +[ + AC_MSG_CHECKING([for Botan version 1.7.8 or newer]) + if test -n "`type -p botan-config`"; then + BOTAN_VERSION="`botan-config --version`" + BOTAN_CPPFLAGS="`botan-config --cflags`" + + # botan-config has the annoying habit of telling us to use + # -L switches for directories that the compiler will search + # automatically. + BOTAN_LIBS="`botan-config --libs | \ + sed -e 's:-L */usr/lib/*::' -e 's:-R */usr/lib/*::' \ + -e 's:-L */lib/*::' -e 's:-R */lib/*::'`" + + found_botan=yes + + # make sure we have to do with botan version 1.7 + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $BOTAN_CPPFLAGS" + AC_PREPROC_IFELSE([ +#include + +#ifndef BOTAN_VERSION_MAJOR +#error Botan didn't define version macros?!? +#endif + +#if BOTAN_VERSION_MAJOR != 1 +#error Botan major version mismatch. +#endif], + [botan_version_match=yes], + [botan_version_match=no]) + if test $botan_version_match = no; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Your botan library version not match ($BOTAN_VERSION).]) + fi + + # prevent from building against older, no longer supported versions + AC_PREPROC_IFELSE([ +#include + +#if BOTAN_VERSION_PATCH < 8 +#error Botan is too old +#endif], + [botan_version_match=yes], + [botan_version_match=no]) + if test $botan_version_match = no; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Your botan library is too old ($BOTAN_VERSION).]) + fi + + # check against unknown versions from the future and warn + AC_PREPROC_IFELSE([ +#include + +#if BOTAN_VERSION_PATCH > 15 +#error Botan from the future +#endif], + [botan_version_match=yes], + [botan_version_match=no]) + if test $botan_version_match = no; then + AC_MSG_WARN([Your botan library version ($BOTAN_VERSION) is newer than expected. Monotone might not build cleanly.]) + fi + + CFLAGS="$save_CFLAGS" + AC_MSG_RESULT([yes]) + AC_SUBST(BOTAN_LIBS) + AC_SUBST(BOTAN_CFLAGS) + else + found_botan=no + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Botan cannot be found.]) + fi +]) + ============================================================ --- m4/lua.m4 94bfca8bd9c2ea85a18d932edc7b8c21690bf129 +++ m4/lua.m4 94bfca8bd9c2ea85a18d932edc7b8c21690bf129 @@ -0,0 +1,72 @@ +# This is a separate macro primarily to trick autoconf into not looking +# for pkg-config. +AC_DEFUN([MTN_FIND_LUA], +[ PKG_PROG_PKG_CONFIG + AC_MSG_CHECKING([for lua 5.1]) + + # We manually test the variables here because we want them to work + # even if pkg-config isn't installed. The use of + instead of :+ is + # deliberate; the user should be able to tell us that the empty string + # is the correct set of flags. (PKG_CHECK_MODULES gets this wrong!) + if test -n "${LUA_CFLAGS+set}" || test -n "${LUA_LIBS+set}"; then + found_liblua=yes + else + PKG_CHECK_MODULES([LUA], [lua5.1], + [found_liblua=yes], [found_liblua=no]) + fi + + if test $found_liblua = no; then + # try lua-config5x, in case we're on a system with no pkg-config + if test -n "`type -p lua-config51`"; then + LUA_CFLAGS="`lua-config51 --include`" + LUA_LIBS="`lua-config51 --libs`" + found_liblua=yes + AC_MSG_RESULT([yes]) + fi + fi + + if test $found_liblua = no; then + AC_MSG_RESULT([no; guessing]) + LUA_CFLAGS= + LUA_LIBS=-llua5.1 + fi + + # Wherever we got the settings from, make sure they work. + LUA_CFLAGS="`echo :$LUA_CFLAGS | sed -e 's/^:@<:@ @:>@*//; s/@<:@ @:>@*$//'`" + LUA_LIBS="`echo :$LUA_LIBS | sed -e 's/^:@<:@ @:>@*//; s/@<:@ @:>@*$//'`" + + AC_MSG_NOTICE([using lua compile flags: "$LUA_CFLAGS"]) + AC_MSG_NOTICE([using lua link flags: "$LUA_LIBS"]) + + AC_CACHE_CHECK([whether the lua library is usable], ac_cv_lib_lua_works, + [save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$LIBS $LUA_LIBS" + CFLAGS="$CFLAGS $LUA_CFLAGS" + CPPFLAGS="$CFLAGS $LUA_CFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [ +extern "C" +{ + #include + #include + #include +} + ], + [ +lua_State *st; + +#if LUA_VERSION_NUM != 501 +#error Lua version mismatch +#endif + +st = luaL_newstate(); + ])], + [ac_cv_lib_lua_works=yes], [ac_cv_lib_lua_works=no]) + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS"]) + if test $ac_cv_lib_lua_works = no; then + AC_MSG_ERROR([Your lua library is not usable.]) + fi + +]) ============================================================ --- Makefile.am a0fe85510172035d9dc17976db02c8023c3b9219 +++ Makefile.am c850e4c62a84dd138a435f3c78c5bdabebcd6231 @@ -105,96 +105,6 @@ NETXX_SOURCES = \ netxx/streambase.h netxx/streamserver.h netxx/timeout.h \ netxx/types.h -BOTAN_SOURCES = \ - botan/aes.cpp botan/aes_tab.cpp botan/alg_id.cpp botan/arc4.cpp \ - botan/asn1_alt.cpp botan/asn1_att.cpp botan/asn1_dn.cpp \ - botan/asn1_int.cpp botan/asn1_ku.cpp botan/asn1_oid.cpp \ - botan/asn1_str.cpp botan/asn1_tm.cpp botan/base64.cpp \ - botan/base.cpp botan/basefilt.cpp botan/ber_dec.cpp \ - botan/big_code.cpp botan/bigint.cpp botan/big_io.cpp \ - botan/big_ops2.cpp botan/big_ops3.cpp botan/big_rand.cpp \ - botan/blinding.cpp botan/buf_es.cpp \ - botan/buf_filt.cpp botan/cbc.cpp botan/cbc_mac.cpp \ - botan/certstor.cpp botan/cfb.cpp botan/charset.cpp \ - botan/crc32.cpp botan/crl_ent.cpp botan/ctr.cpp botan/cts.cpp \ - botan/data_snk.cpp botan/data_src.cpp botan/datastor.cpp \ - botan/def_alg.cpp botan/defalloc.cpp botan/def_mode.cpp \ - botan/def_ops.cpp botan/def_powm.cpp botan/der_enc.cpp \ - botan/des.cpp botan/des_tab.cpp botan/dh.cpp botan/divide.cpp \ - botan/dl_algo.cpp botan/dl_group.cpp botan/dlies.cpp \ - botan/dsa_gen.cpp botan/eax.cpp botan/ecb.cpp botan/eme1.cpp \ - botan/eme_pkcs.cpp botan/emsa1.cpp botan/emsa2.cpp \ - botan/emsa3.cpp botan/emsa4.cpp botan/emsa_raw.cpp \ - botan/eng_base.cpp botan/engine.cpp botan/es_dev.cpp \ - botan/es_egd.cpp botan/exceptn.cpp botan/filter.cpp \ - botan/filters.cpp botan/get_algo.cpp botan/get_enc.cpp \ - botan/get_pbe.cpp botan/hash_id.cpp botan/hex.cpp \ - botan/hmac.cpp botan/if_algo.cpp botan/init_def.cpp \ - botan/init_opt.cpp botan/jacobi.cpp botan/kdf.cpp \ - botan/keypair.cpp botan/libstate.cpp botan/look_pk.cpp \ - botan/make_prm.cpp botan/mdx_hash.cpp botan/mem_pool.cpp \ - botan/mgf1.cpp botan/mlock.cpp botan/modebase.cpp \ - botan/mode_pad.cpp botan/modules.cpp botan/mp_asm.cpp \ - botan/mp_comba.cpp botan/mp_karat.cpp botan/mp_misc.cpp \ - botan/mp_monty.cpp \ - botan/mp_mulop.cpp botan/mp_numth.cpp botan/mp_shift.cpp \ - botan/mutex.cpp botan/noekeon.cpp botan/numthry.cpp \ - botan/ofb.cpp botan/oids.cpp botan/out_buf.cpp \ - botan/parsing.cpp botan/pbes1.cpp botan/pbes2.cpp \ - botan/pem.cpp botan/pipe.cpp botan/pipe_io.cpp \ - botan/pipe_rw.cpp botan/pk_algs.cpp botan/pk_core.cpp \ - botan/pkcs10.cpp botan/pkcs5.cpp botan/pkcs8.cpp \ - botan/pk_keys.cpp botan/pk_util.cpp botan/policy.cpp \ - botan/powm_fw.cpp botan/powm_mnt.cpp botan/pow_mod.cpp \ - botan/prf_x942.cpp botan/primes.cpp botan/pubkey.cpp \ - botan/randpool.cpp botan/reducer.cpp botan/rng.cpp \ - botan/rsa.cpp botan/s2k.cpp botan/secqueue.cpp \ - botan/selftest.cpp botan/sha160.cpp botan/sha256.cpp \ - botan/symkey.cpp botan/timers.cpp botan/ui.cpp botan/util.cpp \ - botan/x509_ca.cpp botan/x509cert.cpp botan/x509_crl.cpp \ - botan/x509_ext.cpp botan/x509find.cpp botan/x509_key.cpp \ - botan/x509_obj.cpp botan/x509opt.cpp botan/x509self.cpp \ - botan/x509stor.cpp botan/x931_rng.cpp \ - \ - botan/aes.h botan/alg_id.h botan/allocate.h botan/arc4.h \ - botan/asn1_int.h botan/asn1_obj.h botan/asn1_oid.h \ - botan/base64.h botan/basefilt.h botan/base.h botan/ber_dec.h \ - botan/bigint.h botan/bit_ops.h botan/blinding.h botan/botan.h \ - botan/bswap.h \ - botan/buf_es.h botan/buf_filt.h botan/build.h botan/cbc.h \ - botan/cbc_mac.h botan/certstor.h botan/cfb.h botan/charset.h \ - botan/crc32.h botan/crl_ent.h botan/ctr.h botan/cts.h \ - botan/data_snk.h botan/data_src.h botan/datastor.h \ - botan/defalloc.h botan/def_powm.h botan/der_enc.h botan/des.h \ - botan/dh.h botan/dl_algo.h botan/dl_group.h botan/dlies.h \ - botan/eax.h botan/ecb.h botan/eme.h botan/emsa.h \ - botan/eng_def.h botan/engine.h botan/enums.h botan/es_dev.h \ - botan/es_egd.h botan/exceptn.h botan/filter.h botan/filters.h \ - botan/hash_id.h botan/hex.h botan/hmac.h botan/if_algo.h \ - botan/init.h botan/kdf.h botan/keypair.h botan/libstate.h \ - botan/loadstor.h botan/look_add.h botan/look_pk.h \ - botan/lookup.h botan/mdx_hash.h botan/mem_ops.h \ - botan/mem_pool.h botan/mgf1.h botan/modebase.h botan/mode_pad.h \ - botan/modules.h botan/mp_asm.h botan/mp_asmi.h botan/mp_core.h \ - botan/mp_types.h botan/mutex.h botan/noekeon.h botan/numthry.h \ - botan/ofb.h botan/oids.h botan/out_buf.h botan/parsing.h \ - botan/pbe.h botan/pbe_pkcs.h botan/pem.h botan/pipe.h \ - botan/pk_algs.h botan/pk_core.h botan/pkcs10.h botan/pkcs5.h \ - botan/pkcs8.h botan/pk_keys.h botan/pk_ops.h botan/pk_util.h \ - botan/pow_mod.h botan/pubkey.h botan/randpool.h botan/reducer.h \ - botan/rng.h botan/rotate.h botan/rsa.h botan/s2k.h \ - botan/secmem.h \ - botan/secqueue.h botan/selftest.h botan/sha160.h botan/sha256.h \ - botan/stl_util.h botan/symkey.h botan/timers.h botan/types.h \ - botan/ui.h botan/util.h botan/version.h botan/x509_ca.h \ - botan/x509cert.h botan/x509_crl.h botan/x509_ext.h \ - botan/x509find.h botan/x509_key.h botan/x509_obj.h \ - botan/x509self.h botan/x509stor.h botan/x931_rng.h \ - botan/xor_buf.h - - -# windows only: botan/es_capi.h botan/es_capi.cpp botan/es_win32.{cpp,h} - BOOST_SANDBOX_SOURCES = \ boost/circular_buffer_adaptor.hpp \ boost/circular_buffer_base.hpp \ @@ -226,60 +136,12 @@ SQLITE_SOURCES = \ sqlite/vdbe.h sqlite/vdbeInt.h \ sqlite/pager.h sqlite/btreeInt.h sqlite/sqliteLimit.h -LUA_SOURCES = \ - lua/lapi.cc lua/lapi.h \ - lua/lcode.cc lua/lcode.h \ - lua/ldebug.cc lua/ldebug.h \ - lua/ldo.cc lua/ldo.h \ - lua/ldump.cc \ - lua/lfunc.cc lua/lfunc.h \ - lua/lgc.cc lua/lgc.h \ - lua/linit.cc \ - lua/llex.cc lua/llex.h \ - lua/lmem.cc lua/lmem.h \ - lua/lobject.cc lua/lobject.h \ - lua/lopcodes.cc lua/lopcodes.h \ - lua/lparser.cc lua/lparser.h \ - lua/lstate.cc lua/lstate.h \ - lua/lstring.cc lua/lstring.h \ - lua/ltable.cc lua/ltable.h \ - lua/ltests.cc \ - lua/ltm.cc lua/ltm.h \ - lua/lundump.cc lua/lundump.h \ - lua/lvm.cc lua/lvm.h \ - lua/lzio.cc lua/lzio.h \ - \ - lua/luaconf.h lua/llimits.h \ - lua/lua.h lua/lauxlib.h lua/lualib.h \ - \ - lua/lauxlib.cc \ - lua/lbaselib.cc \ - lua/ldblib.cc \ - lua/liolib.cc \ - lua/lmathlib.cc \ - lua/loadlib.cc \ - lua/lstrlib.cc \ - lua/ltablib.cc \ - lua/loslib.cc - IDNA_SOURCES = \ idna/gunibreak.h idna/gunidecomp.h idna/idna.h idna/nfkc.c \ idna/punycode.c idna/rfc3454.c idna/stringprep.h idna/version.c \ idna/gunicomp.h idna/idna.c idna/idn-int.h idna/profiles.c \ idna/punycode.h idna/stringprep.c idna/toutf8.c -PCRE_SOURCES = \ - pcre/pcre_chartables.c pcre/pcre_compile.c pcre/pcre_config.c \ - pcre/pcre_dfa_exec.c pcre/pcre_exec.c pcre/pcre_fullinfo.c \ - pcre/pcre_get.c pcre/pcre_globals.c pcre/pcre_info.c \ - pcre/pcre_maketables.c pcre/pcre_newline.c \ - pcre/pcre_ord2utf8.c pcre/pcre_refcount.c pcre/pcre_study.c \ - pcre/pcre_tables.c pcre/pcre_try_flipped.c \ - pcre/pcre_ucp_searchfuncs.c pcre/pcre_valid_utf8.c \ - pcre/pcre_version.c pcre/pcre_xclass.c pcre/pcre_config.h \ - pcre/pcre.h pcre/pcre_internal.h pcre/ucp.h pcre/ucpinternal.h \ - pcre/ucptable.h - UNIX_PLATFORM_SOURCES = \ unix/read_password.cc unix/get_system_flavour.cc \ unix/process.cc unix/terminal.cc unix/inodeprint.cc \ @@ -355,16 +217,10 @@ lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_ noinst_LIBRARIES = libplatform.a lib3rdparty.a libplatform_a_SOURCES = platform.hh tester-plaf.hh lib3rdparty_a_SOURCES = $(BOOST_SANDBOX_SOURCES) \ - $(BOTAN_SOURCES) \ $(IDNA_SOURCES) \ $(NETXX_SOURCES) \ - $(LUA_SOURCES) \ $(SQLITE_SOURCES) -if INCLUDED_PCRE -lib3rdparty_a_SOURCES += $(PCRE_SOURCES) -endif - htmldir = $(datadir)/doc/monotone html_DATA = monotone.html @@ -407,50 +263,36 @@ mtn_LDFLAGS = lib3rdparty_a_CXXFLAGS = $(AM_CXXFLAGS) $(LIB3RDPARTY_CXXFLAGS) -fpermissive mtn_LDFLAGS = -mtn_CPPFLAGS = -I$(top_srcdir)/lua +mtn_CPPFLAGS = -I$(top_srcdir)/lua $(PCRE_FLAGS) $(BOTAN_CPPFLAGS) $(LUA_CFLAGS) mtn_CFLAGS = $(AM_CFLAGS) $(MTN_CFLAGS) mtn_CXXFLAGS = $(AM_CXXFLAGS) $(PCH_FLAGS) $(MTN_CXXFLAGS) -mtn_LDADD = libplatform.a lib3rdparty.a $(BOOSTLIBS) $(LIBICONV) $(LIBINTL) +mtn_LDADD = libplatform.a lib3rdparty.a $(BOOSTLIBS) $(LIBICONV) $(LIBINTL) \ + $(PCRE_LIBS) $(BOTAN_LIBS) $(LUA_LIBS) unit_tester_LDFLAGS = -unit_tester_CPPFLAGS = -DBUILD_UNIT_TESTS -I$(top_srcdir)/lua +unit_tester_CPPFLAGS = -DBUILD_UNIT_TESTS -I$(top_srcdir)/lua $(PCRE_FLAGS) $(BOTAN_CPPFLAGS) $(LUA_CFLAGS) unit_tester_CXXFLAGS = $(AM_CXXFLAGS) $(PCH_FLAGS) unit_tester_LDADD += libplatform.a lib3rdparty.a \ - $(BOOSTLIBS) $(LIBICONV) $(LIBINTL) + $(BOOSTLIBS) $(LIBICONV) $(LIBINTL) $(PCRE_LIBS) \ + $(BOTAN_LIBS) $(LUA_LIBS) tester_LDFLAGS = -tester_CPPFLAGS = -I$(top_srcdir)/lua +tester_CPPFLAGS = -I$(top_srcdir)/lua $(PCRE_FLAGS) $(BOTAN_CPPFLAGS) $(LUA_CFLAGS) tester_CXXFLAGS = $(AM_CXXFLAGS) -tester_LDADD += libplatform.a lib3rdparty.a $(BOOSTLIBS) $(LIBICONV) $(LIBINTL) +tester_LDADD += libplatform.a lib3rdparty.a $(BOOSTLIBS) $(LIBICONV) \ + $(LIBINTL) $(PCRE_LIBS) $(BOTAN_LIBS) $(LUA_LIBS) -if INCLUDED_PCRE - lib3rdparty_a_CPPFLAGS += -I$(top_srcdir)/pcre - mtn_CPPFLAGS += -I$(top_srcdir)/pcre - unit_tester_CPPFLAGS += -I$(top_srcdir)/pcre - tester_CPPFLAGS += -I$(top_srcdir)/pcre -else - mtn_CPPFLAGS += $(PCRE_CFLAGS) - unit_tester_CPPFLAGS += $(PCRE_CFLAGS) - tester_CPPFLAGS += $(PCRE_CFLAGS) - - mtn_LDADD += $(PCRE_LIBS) - unit_tester_LDADD += $(PCRE_LIBS) - tester_LDADD += $(PCRE_LIBS) -endif - if WIN32_PLATFORM libplatform_a_SOURCES += $(WIN32_PLATFORM_SOURCES) mtn_SOURCES += win32/main.cc mtn_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi unit_tester_LDADD += -lshfolder -lws2_32 -lintl -liconv -liphlpapi lib3rdparty_a_CPPFLAGS += -DWIN32 - lib3rdparty_a_SOURCES += botan/es_capi.cpp botan/es_win32.cpp tester_SOURCES += win32/tester-plaf.cc check_net_SOURCES = win32/tester-check-net.c else libplatform_a_SOURCES += $(UNIX_PLATFORM_SOURCES) mtn_SOURCES += unix/main.cc - lib3rdparty_a_SOURCES += botan/es_dev.cpp tester_SOURCES += unix/tester-plaf.cc check_net_SOURCES = unix/tester-check-net.c endif @@ -498,7 +340,7 @@ EPS_FIGURES=$(addprefix $(top_builddir)/ PNG_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.png))) EPS_FIGURES=$(addprefix $(top_builddir)/figures/,$(notdir $(PDF_FIGURES:.pdf=.eps))) -TEXI_FRAGMENTS = pcre/pcrepattern.texi pcre/pcresyntax.texi +TEXI_FRAGMENTS = pcrepattern.texi pcresyntax.texi info_TEXINFOS = monotone.texi EXTRA_DIST = $(PDF_FIGURES) $(PNG_FIGURES) INSTALL README.changesets \ ============================================================ --- botan_pipe_cache.hh 6a935f221e4a9368cbef90618e4a3847d1053dbc +++ botan_pipe_cache.hh 21898f46e28b96c8471b488237b4f716f8389bda @@ -10,8 +10,9 @@ // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. -#include +#include #include + #include "sanity.hh" // This file defines a simple lifetime-of-the-program caching strategy for ============================================================ --- configure.ac 81d3d689b13f3b20219b8eace2fc50074df86f1a +++ configure.ac 5dfd3b40a0493ea8f3e28d4b89886fbae91b8d6e @@ -140,7 +140,9 @@ AC_SEARCH_LIBS([deflate], [z], , AC_MSG_ # simple library checks AC_SEARCH_LIBS([deflate], [z], , AC_MSG_FAILURE([zlib is required])) -MTN_LIB_PCRE +MTN_FIND_LUA +MTN_FIND_PCRE +MTN_FIND_BOTAN # check for all things boost-related BOOST_VERSION_CHECK ============================================================ --- debian/control adc34d4cb8141eb255c300b1177f91fee1d23f5b +++ debian/control a63c724b71b68586d2c9c7fbbb2717689455192a @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 4.2.0), aut Homepage: http://monotone.ca/ Vcs-Browser: http://viewmtn.angrygoats.net/branch/changes/net.venge.monotone Build-Depends: debhelper (>= 4.2.0), autotools-dev, libz-dev, po-debconf, - libboost-dev (>= 1.34.1-2), libpcre3-dev (>= 7.6), patch + libboost-dev (>= 1.34.1-2), liblua5.1-0-dev, libpcre3-dev (>= 7.6), botan1.7-dev, patch Build-Depends-Indep: ps2eps, texlive-base, texlive-generic-recommended, texlive-latex-base, texinfo, xpdf-utils Standards-Version: 3.8.0 ============================================================ --- m4/pcre.m4 beb5310e881b21a03007ca3ae670f1899bf60ed0 +++ m4/pcre.m4 69b51a3c7bd9fbfe877649f0b6d88631068be3c4 @@ -1,38 +1,8 @@ -# Set up to use either a bundled or a system-provided version of libpcre. -# -# If --with-system-pcre is specified and the library cannot be found -# or is unsuitable, the configure script will error out rather than -# falling back to the bundled version. This is to avoid surprising a -# user who expected their system libpcre to be used. "Unsuitable" is -# defined as "any version older than the bundled one". - -AC_DEFUN([MTN_LIB_PCRE], -[AC_ARG_WITH([system-pcre], - AC_HELP_STRING([--with-system-pcre], - [use a system-provided copy of libpcre instead of the default bundled - copy. (To use a specific installed version, use the environment - variables PCRE_CFLAGS and/or PCRE_LIBS.)]), - [case "$withval" in - ""|yes) with_system_pcre=yes ;; - no) with_system_pcre=no ;; - *) AC_MSG_ERROR([--with(out)-system-pcre takes no argument]) ;; - esac], - [with_system_pcre=no]) - if test "$with_system_pcre" = yes; then - MTN_FIND_PCRE - else - AC_DEFINE([PCRE_STATIC],[1],[Define if using bundled pcre]) - AC_MSG_NOTICE([using the bundled copy of PCRE]) - fi - AM_CONDITIONAL([INCLUDED_PCRE], [test $with_system_pcre = no]) - AC_SUBST([PCRE_CFLAGS]) - AC_SUBST([PCRE_LIBS]) -]) - # This is a separate macro primarily to trick autoconf into not looking # for pkg-config if we are using the bundled pcre. AC_DEFUN([MTN_FIND_PCRE], [ PKG_PROG_PKG_CONFIG + # We manually test the variables here because we want them to work # even if pkg-config isn't installed. The use of + instead of :+ is # deliberate; the user should be able to tell us that the empty string @@ -73,7 +43,7 @@ AC_DEFUN([MTN_FIND_PCRE], if test x"$PCRE_LIBS" != x"-lpcre"; then AC_MSG_NOTICE([using PCRE link flags: "$PCRE_LIBS"]) fi - AC_CACHE_CHECK([whether the system libpcre is usable], ac_cv_lib_pcre_works, + AC_CACHE_CHECK([whether the PCRE library is usable], ac_cv_lib_pcre_works, [save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$LIBS $PCRE_LIBS" @@ -91,27 +61,27 @@ AC_DEFUN([MTN_FIND_PCRE], LIBS="$save_LIBS" CFLAGS="$save_CFLAGS"]) if test $ac_cv_lib_pcre_works = no; then - AC_MSG_ERROR([system-provided libpcre is not usable. Correct your settings or use --with-system-pcre=no.]) + AC_MSG_ERROR([Your PCRE library is not usable.]) fi # This is deliberately not cached. - AC_MSG_CHECKING([whether the system libpcre is new enough]) - sed -n -e 's/#define PCRE_MAJOR[ ]*/#define BUNDLED_PCRE_MAJOR /p' \ - -e 's/#define PCRE_MINOR[ ]*/#define BUNDLED_PCRE_MINOR /p' \ - $srcdir/pcre/pcre.h > conftest.h + AC_MSG_CHECKING([whether the PCRE library is new enough]) + sed -n -e 's/#define REQUIRED_PCRE_MAJOR[ ]*/#define REQUIRED_PCRE_MAJOR /p' \ + -e 's/#define REQUIRED_PCRE_MINOR[ ]*/#define REQUIRED_PCRE_MINOR /p' \ + $srcdir/pcrewrap.hh > conftest.h save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PCRE_CFLAGS" AC_PREPROC_IFELSE([ #include "conftest.h" #include "pcre.h" -#if PCRE_MAJOR < BUNDLED_PCRE_MAJOR || \ - (PCRE_MAJOR == BUNDLED_PCRE_MAJOR && PCRE_MINOR < BUNDLED_PCRE_MINOR) +#if PCRE_MAJOR < REQUIRED_PCRE_MAJOR || \ + (PCRE_MAJOR == REQUIRED_PCRE_MAJOR && PCRE_MINOR < REQUIRED_PCRE_MINOR) #error out of date #endif], [pcre_version_match=yes], [pcre_version_match=no]) AC_MSG_RESULT($pcre_version_match) if test $pcre_version_match = no; then - AC_MSG_ERROR([system-provided libpcre is too old. Upgrade it, correct your settings, or use --with-system-pcre=no.]) + AC_MSG_ERROR([Your PCRE library is too old, please upgrade it.]) fi ]) ============================================================ --- monotone.texi 8542311382a69a2d94963663f5336ad83f842ea2 +++ monotone.texi 553a6447747ec2e35a4beaa8b06b280628886e8a @@ -11499,8 +11499,8 @@ @section Regular Expression Syntax * Regexp Details:: Details of regular expression syntax and semantics. @end menu address@hidden pcre/pcresyntax.texi address@hidden pcre/pcrepattern.texi address@hidden pcresyntax.texi address@hidden pcrepattern.texi @node Default hooks, General Index, Special Topics, Top @appendix Default hooks ============================================================ --- pcrewrap.hh 88a5febaa51ead63372be8464b5e9c463b1fa653 +++ pcrewrap.hh 2759a4367510fbf91402fd195711bf2d1a1c2330 @@ -10,6 +10,9 @@ #ifndef _PCREWRAP_HH #define _PCREWRAP_HH +#define REQUIRED_PCRE_MAJOR 7 +#define REQUIRED_PCRE_MINOR 6 + // This is a sensible C++ wrapper interface around the bare C API exported // by pcre.h. Note that pcre.h is a very "noisy" header in terms of macro // definitions and so we don't actually expose it here. Unfortunately, this