Salut!
voila donc le Makefile de pcre
En effet, lorsque je compile postfix, ce dernier me sort le message
d'erreur suivant:
gcc -wmissing-prototypes -DHAS_PCRE -DPATH_DB_H='<db185.h>' -g -02 -I.
DLINUX2 -c dict_pcre.c
dict_pcre.c:60: pcre.h: no such file or directory

Par contre une fois compil� en statique, faut il l'installer dans un
r�pertoire propre � postfix?

vincent.
Chmouel Boudjnah a �crit :
> 
> Vincent Heurteaux <[EMAIL PROTECTED]> writes:
> 
> > excusez moi j'ai oubli� les lignes du dessus.
> >
> > # Options for compiling executables and static library modules
> > #
> > # Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the
> > # memmove() function, but has bcopy().
> > #
> > # Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system
> > that
> > # lacks the strerror() function, but can provide the equivalent by
> > indexing
> > # into errlist.
> > CFLAGS = -O2
> 
> Quelle programme exactement ou pouvais vous m'envoyez le Makefile en
> entier ?
> 
> --
> Chmouel
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
# Make file for PCRE (Perl-Compatible Regular Expression) library.

# Edit these definitions for your system

# Should shared libraries be built: uncomment this to build them
BUILD-SHARED = true

# C Compiler to use 
CC = gcc

# Options for compiling executables and static library modules
#
# Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the
# memmove() function, but has bcopy().
#
# Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that
# lacks the strerror() function, but can provide the equivalent by indexing
# into errlist.
CFLAGS = -O2
CFLAGS = -static

# Command used to index static libraries
#
# It is believed that RANLIB=ranlib is required for AIX, BSDI, FreeBSD, Linux,
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix.
#RANLIB = @true
RANLIB = ranlib

# Options for compiling shared library modules
CFLAGS-PIC = $(CFLAGS) -fPIC

# Command to build a shared library
# $@ will be replaced by the name of the library, eg libpcre.so.1
MK-SHARED-LIB = gcc -shared -Wl,-soname,$@ -o $@ -lc

# Options to add a run-time library path to a program. This is used when
# building pcretest, and allows the tests to be run with the libraries still
# in this directory. This allows the libraries to be tested before they're
# installed over the old working set!
RPATH = -Wl,-rpath,.

# Everything below this line should not need modification
##########################################################################

OBJ = chartables.o study.o pcre.o
PICOBJ = chartables.o-pic study.o-pic pcre.o-pic

ifdef BUILD-SHARED # Building shared libs
all:            libpcre.a libpcreposix.a libpcre.so.1 libpcreposix.so.1 \
                                                        pcretest pgrep

# This assumes that anyone building shared libraries will want to use
# them for pgrep and pcretest. Is this a good assumption?

pgrep:          libpcre.so.1 pgrep.o
                $(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.so.1

pcretest:       libpcre.so.1 libpcreposix.so.1 pcretest.o
                $(CC) $(CFLAGS) -o pcretest pcretest.o libpcre.so.1 \
                                libpcreposix.so.1 $(RPATH)

else # Not building shared libs
all:            libpcre.a libpcreposix.a pcretest pgrep

pgrep:          libpcre.a pgrep.o
                $(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.a

pcretest:       libpcre.a libpcreposix.a pcretest.o
                $(CC) $(CFLAGS) -o pcretest pcretest.o libpcre.a libpcreposix.a
endif


# Libraries

libpcre.so.1:   $(PICOBJ)
                $(MK-SHARED-LIB) $(PICOBJ)

libpcre.a:      $(OBJ)
                /bin/rm -f libpcre.a
                ar cq libpcre.a $(OBJ)
                $(RANLIB) libpcre.a

libpcreposix.so.1: pcreposix.o-pic
                $(MK-SHARED-LIB) -L. -lpcre pcreposix.o-pic
 
libpcreposix.a: pcreposix.o
                /bin/rm -f libpcreposix.a
                ar cq libpcreposix.a pcreposix.o
                $(RANLIB) libpcreposix.a


# Object files for libraries

pcre.o:         pcre.c pcre.h internal.h
                $(CC) -c $(CFLAGS) pcre.c

pcre.o-pic:     pcre.c pcre.h internal.h
                $(CC) -c $(CFLAGS-PIC) -o $@ pcre.c

pcreposix.o:    pcreposix.c pcreposix.h internal.h
                $(CC) -c $(CFLAGS) pcreposix.c

pcreposix.o-pic:        pcreposix.c pcreposix.h internal.h
                $(CC) -c $(CFLAGS-PIC) -o $@ pcreposix.c

chartables.o:   chartables.c
                $(CC) -c $(CFLAGS) chartables.c

chartables.o-pic:       chartables.c
                $(CC) -c $(CFLAGS-PIC) -o $@ chartables.c

study.o:        study.c pcre.h internal.h
                $(CC) -c $(CFLAGS) study.c

study.o-pic:    study.c pcre.h internal.h
                $(CC) -c $(CFLAGS-PIC) -o $@ study.c


# Object files for extra programs

pcretest.o:     pcretest.c pcre.h
                $(CC) -c $(CFLAGS) pcretest.c

pgrep.o:        pgrep.c pcre.h
                $(CC) -c $(CFLAGS) pgrep.c


# An auxiliary program makes the character tables

chartables.c:    maketables
                ./maketables >chartables.c

maketables:     maketables.c
                $(CC) -o maketables $(CFLAGS) maketables.c


# Regression test

test:           all

                # First test
                ./pcretest testinput >my-testoutput
                diff -u3 testoutput my-testoutput

                # Second test
                ./pcretest -i testinput2 >my-testoutput2
                diff -u3 testoutput2 my-testoutput2

                rm my-testoutput*

# We deliberately omit maketables and chartables.c from 'make clean'; once made
# chartables.c shouldn't change, and if people have edited the tables by hand,
# you don't want to throw them away.

clean:;         rm -f *.o *.o-pic *.a *.so* pcretest pgrep

distclean:      clean
                rm -f maketables chartables.c

# Declare which targets are phony, i.e. do not really result in files of 
# that name

.PHONY: all test clean distclean

# End

Répondre à