RE: [exim] pcre

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Bethune
Fecha:  
A: exim-users
Asunto: RE: [exim] pcre

> Debian's exim4 is patched to dynamically link against the pcre library
> from Debian's pcre package. The patch looks quite easy, see
> http://svn.debian.org/wsvn/pkg-exim4/exim/trunk/debian/patches

/36_pcre.dpatch?op=file&rev=0&sc=0h

thanks! Below is the patch for redhat (tested on rhel3).
(on build system install pcre and pcre-devel, on prod system install pcre shared libraries; exim binary is build with dynamic link to libpcre.so.0)
"working for me" in production now.

diff -Naur exim-4.52.orig/OS/Makefile-Base exim-4.52/OS/Makefile-Base
--- exim-4.52.orig/OS/Makefile-Base     Fri Jul  1 04:09:15 2005
+++ exim-4.52/OS/Makefile-Base  Tue Sep 13 10:43:47 2005
@@ -103,7 +103,7 @@
 # This is the real default target for all the various exim binaries and
 # scripts, once the configuring stuff is done.


-allexim: config.h buildpcre $(EXIM_MONITOR) exicyclog exinext exiwhat \
+allexim: config.h $(EXIM_MONITOR) exicyclog exinext exiwhat \
         exigrep eximstats exipick exiqgrep exiqsumm \
         transport-filter.pl convert4r3 convert4r4 \
         exim_checkaccess \
@@ -314,7 +314,7 @@
         local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \
         $(OBJ_WITH_OLD_DEMIME) $(OBJ_EXPERIMENTAL)


-exim:   pcre/libpcre.a lookups/lookups.a auths/auths.a \
+exim:   lookups/lookups.a auths/auths.a \
         routers/routers.a transports/transports.a \
         $(OBJ_EXIM) version.c
        @echo " "
@@ -325,7 +325,7 @@
        rm -f exim
        @echo "$(LNCC) -o exim"
        $(FE)$(PURIFY) $(LNCC) -o exim $(LFLAGS) $(OBJ_EXIM) version.o \
-         pcre/libpcre.a \
+         -lpcre \
          routers/routers.a transports/transports.a lookups/lookups.a \
          auths/auths.a \
          $(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \
@@ -429,14 +429,14 @@


OBJ_MONBIN = util-spool_in.o util-store.o util-string.o tod.o tree.o $(MONBIN)

-eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) pcre/libpcre.a \
+eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \
             ../exim_monitor/em_version.c
        @echo "$(CC) exim_monitor/em_version.c"
        $(FE)$(CC) -o em_version.o -c \
          $(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c
        @echo "$(LNCC) -o eximon.bin"
        $(FE)$(PURIFY) $(LNCC) -o eximon.bin em_version.o $(LFLAGS) $(XLFLAGS) \
-       $(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 pcre/libpcre.a \
+       $(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 -lpcre \
          $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc
        @if [ x"$(STRIP_COMMAND)" != x"" ]; then \
          echo $(STRIP_COMMAND) eximon.bin; \
diff -Naur exim-4.52.orig/exim_monitor/em_hdr.h exim-4.52/exim_monitor/em_hdr.h
--- exim-4.52.orig/exim_monitor/em_hdr.h        Fri Jul  1 04:09:15 2005
+++ exim-4.52/exim_monitor/em_hdr.h     Tue Sep 13 10:53:23 2005
@@ -87,7 +87,7 @@


/* Regular expression include */

-#include "pcre/pcre.h"
+#include <pcre/pcre.h>

 /* Includes from the main source of Exim. We need to have MAXPACKET defined for
 the benefit of structs.h. One of these days I should tidy up this interface so
diff -Naur exim-4.52.orig/src/exim.h exim-4.52/src/exim.h
--- exim-4.52.orig/src/exim.h   Fri Jul  1 04:09:15 2005
+++ exim-4.52/src/exim.h        Tue Sep 13 10:53:03 2005
@@ -414,7 +414,7 @@


/* The header from the PCRE regex package */

-#include "pcre/pcre.h"
+#include <pcre/pcre.h>

/* Exim includes are in several files. Note that local_scan.h #includes
mytypes.h and store.h, so we don't need to mention them explicitly. */