Description: Fix PCRE related code after repacking
 Fix a few usages of PCRE after total removal through repacking.
Author: Obey Arthur Liu <arthur@milliways.fr>
Last-Update: 2012-05-23
--- a/configure.in
+++ b/configure.in
@@ -502,6 +502,8 @@ AC_CHECK_LIB(inet, gethostbyname, [VLIBS
 AC_CHECK_LIB(socket, socket, [VLIBS="-lsocket $VLIBS"], [], $VLIBS) # SVR4 sockets
 fi
 AC_CHECK_LIB(m, cos, [VLIBS="-lm $VLIBS"]) # complex math
+# Added by Debian maintainer, replaces shipped pcre
+AC_CHECK_LIB(pcre, pcre_compile)
 
 ##########################################################################
 ##									##
--- a/libsrc/Wi/bif_regexp.c
+++ b/libsrc/Wi/bif_regexp.c
@@ -28,7 +28,9 @@
 #include "multibyte.h"
 #include "srvmultibyte.h"
 
-#include "util/pcrelib/pcre.h"
+// Debian maintainer: replaced by external PCRE
+// #include "util/pcrelib/pcre.h"
+#include "pcre.h"
 
 /*
    typedef struct rx_query_s {
--- a/libsrc/Wi/xqf.c
+++ b/libsrc/Wi/xqf.c
@@ -38,7 +38,9 @@
 #include "xpf.h"
 #include "xqf.h"
 
-#include "util/pcrelib/pcre.h"
+// Debian maintainer: replaced by external PCRE
+// #include "util/pcrelib/pcre.h"
+#include "pcre.h"
 
 #define ecm_isname(c) \
   ( ((c) & ~0xFF) ? (ecm_utf8props[(c)] & ECM_ISNAME) : \
--- a/libsrc/util/Makefile.am
+++ b/libsrc/util/Makefile.am
@@ -87,24 +87,26 @@ libutil_la_SOURCES = \
 	virt_mbsnrtowcs.c \
 	virt_wcrtomb.c \
 	virt_wcs_mask.c \
-	virt_wcsnrtombs.c \
-	pcrelib/pcre_chartables.c \
-	pcrelib/pcre_compile.c \
-	pcrelib/pcre_config.c \
-	pcrelib/pcre_dfa_exec.c \
-	pcrelib/pcre_exec.c \
-	pcrelib/pcre_fullinfo.c \
-	pcrelib/pcre_get.c \
-	pcrelib/pcre_globals.c \
-	pcrelib/pcre_newline.c \
-	pcrelib/pcre_ord2utf8.c \
-	pcrelib/pcre_study.c \
-	pcrelib/pcre_tables.c \
-	pcrelib/pcre_try_flipped.c \
-	pcrelib/pcre_ucd.c \
-	pcrelib/pcre_valid_utf8.c \
-	pcrelib/pcre_version.c \
-	pcrelib/pcre_xclass.c
+	virt_wcsnrtombs.c
+# From above:
+# Debian maintainer: Replaced by external PCRE
+#	pcrelib/pcre_chartables.c \
+#	pcrelib/pcre_compile.c \
+#	pcrelib/pcre_config.c \
+#	pcrelib/pcre_dfa_exec.c \
+#	pcrelib/pcre_exec.c \
+#	pcrelib/pcre_fullinfo.c \
+#	pcrelib/pcre_get.c \
+#	pcrelib/pcre_globals.c \
+#	pcrelib/pcre_newline.c \
+#	pcrelib/pcre_ord2utf8.c \
+#	pcrelib/pcre_study.c \
+#	pcrelib/pcre_tables.c \
+#	pcrelib/pcre_try_flipped.c \
+#	pcrelib/pcre_ucd.c \
+#	pcrelib/pcre_valid_utf8.c \
+#	pcrelib/pcre_version.c \
+#	pcrelib/pcre_xclass.c
 
 
 BUILT_SOURCES = getdate.c
@@ -123,14 +125,16 @@ EXTRA_DIST = \
 	getdate.y \
 	MSG_BG.bin \
 	MSG_EN.bin \
-	pcrelib/AUTHORS \
-	pcrelib/LICENCE \
-	pcrelib/*.c \
-	pcrelib/*.h \
-	pcrelib/*.src \
 	win32/ptrlong.h \
 	win32/syslog.c \
 	win32/syslog.h \
 	winlog.mc \
 	winlog.rc
+# From above:
+# Debian maintainer: Replaced by external PCRE
+#	pcrelib/AUTHORS \
+#	pcrelib/LICENCE \
+#	pcrelib/*.c \
+#	pcrelib/*.h \
+#	pcrelib/*.src
 
