You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sa...@locus.apache.org on 2000/06/12 08:44:27 UTC

cvs commit: apache-2.0/src/lib/pcre pcre.h Makefile.in

sascha      00/06/11 23:44:27

  Modified:    src      configure.in
               src/lib/pcre Makefile.in
  Added:       src/lib/pcre pcre.h
  Log:
  Build only needed parts of libpcre. This is more light-wheight than
  having a complete build-subsystem for PCRE.
  
  Revision  Changes    Path
  1.57      +2 -2      apache-2.0/src/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -u -r1.56 -r1.57
  --- configure.in	2000/06/12 04:17:44	1.56
  +++ configure.in	2000/06/12 06:44:26	1.57
  @@ -30,7 +30,7 @@
   fi
   
   dnl ## Run configure for packages Apache uses
  -AC_CONFIG_SUBDIRS(lib/pcre lib/apr)
  +AC_CONFIG_SUBDIRS(lib/apr)
   
   dnl
   dnl ## Preload our OS configuration
  @@ -173,7 +173,7 @@
     progname="httpd"] )
   
   APACHE_FAST_OUTPUT(Makefile ap/Makefile lib/Makefile main/Makefile)
  -APACHE_FAST_OUTPUT(modules/Makefile os/Makefile support/Makefile)
  +APACHE_FAST_OUTPUT(modules/Makefile os/Makefile support/Makefile lib/pcre/Makefile)
   
   APACHE_GEN_CONFIG_VARS
   
  
  
  
  1.4       +14 -213   apache-2.0/src/lib/pcre/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/pcre/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- Makefile.in	2000/06/11 14:08:16	1.3
  +++ Makefile.in	2000/06/12 06:44:26	1.4
  @@ -1,218 +1,19 @@
  +LTLIBRARY_NAME = libpcre.la
  +LTLIBRARY_SOURCES = maketables.c get.c study.c pcre.c pcreposix.c
   
  -# Makefile.in for PCRE (Perl-Compatible Regular Expression) library.
  +CLEANFILES = dftables dftables.lo config.h chartables.c
   
  -#---------------------------------------------------------------------------#
  -# To build mingw32 DLL uncomment the next two lines. This addition for      #
  -# mingw32 was contributed by <Pa...@technologist.com>. I (Philip  #
  -# Hazel) don't know anything about it! There are some additional targets at #
  -# the bottom of this Makefile.                                              #
  -#---------------------------------------------------------------------------#
  -#
  -# include dll.mk
  -# DLL_LDFLAGS=-s
  -
  -#---------------------------------------------------------------------------#
  -# The next few lines are modified by "configure" to insert data that it is  #
  -# given in its arguments, or which it finds out for itself.                 #
  -#---------------------------------------------------------------------------#
  -
  -# BINDIR is the directory in which the pgrep command is installed.
  -# INCDIR is the directory in which the public header file pcre.h is installed.
  -# LIBDIR is the directory in which the libraries are installed.
  -# MANDIR is the directory in which the man pages are installed.
  -# The pcretest program, as it is a test program, does not get installed
  -# anywhere.
  -
  -SHELL=@SHELL@
  -prefix = @prefix@
  -exec_prefix = @exec_prefix@
  -
  -BINDIR = @bindir@
  -LIBDIR = @libdir@
  -INCDIR = @includedir@
  -MANDIR = @mandir@
  -
  -CC = @CC@
  -CFLAGS = @CFLAGS@
  -RANLIB = @RANLIB@
  -
  -# LIBTOOL defaults to "", which cuts out the building of shared libraries.
  -# If "configure" is called with --enable-shared-libraries, then LIBTOOL is
  -# set to "libtool", which causes shared libraries to be built, and LIBSUFFIX
  -# is set to "la" instead of "a", which causes the shared libraries to be
  -# installed.
  -
  -LIBTOOL = @LIBTOOL@
  -LIBSUFFIX = @LIBSUFFIX@
  -
  -# These are the version numbers for the shared libraries
  -
  -PCRELIBVERSION = @PCRE_LIB_VERSION@
  -PCREPOSIXLIBVERSION = @PCRE_POSIXLIB_VERSION@
  -
  -
  -#---------------------------------------------------------------------------#
  -# A copy of install-sh is in this distribution and is used by default.      #
  -#---------------------------------------------------------------------------#
  -
  -INSTALL = ./install-sh -c
  -INSTALL_DATA = ${INSTALL} -m 644
  -
  -
  -#---------------------------------------------------------------------------#
  -# For almost all systems, the command to create a library is "ar cq", but   #
  -# there is at least one where it is different, to make this configurable.   #
  -# However, I haven't got round to learning how to make "configure" find     #
  -# this out for itself. It is necessary to use a command such as             #
  -# "make AR='ar -rc'" if you need to vary this.                              #
  -#---------------------------------------------------------------------------#
  -
  -AR = ar cq
  -
  -
  -##############################################################################
  -
  -
  -OBJ = maketables.o get.o study.o pcre.o
  -LOBJ = maketables.lo get.lo study.lo pcre.lo
  -
  -all:            libtool libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX) pcretest pgrep
  -
  -libtool:        config.guess config.sub ltconfig ltmain.sh
  -		@if test "$(LIBTOOL)" = "libtool"; then \
  -		  echo '--- Building libtool ---'; \
  -		  ./ltconfig ./ltmain.sh; \
  -		  echo '--- Built libtool ---'; fi
  -
  -pgrep:          libpcre.$(LIBSUFFIX) pgrep.o
  -		  @echo ' '
  -		  @echo '--- Building pgrep utility'
  -		  @echo ' '
  -		$(LIBTOOL) $(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.$(LIBSUFFIX)
  -
  -pcretest:       libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX) pcretest.o
  -		  @echo ' '
  -		  @echo '--- Building pcretest testing program'
  -		  @echo ' '
  -		$(LIBTOOL) $(PURIFY) $(CC) $(CFLAGS) -o pcretest pcretest.o \
  -		  libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX)
  -
  -libpcre.a:      $(OBJ)
  -		@echo ' '
  -		@echo '--- Building static library: libpcre'
  -		@echo ' '
  -		-rm -f libpcre.a
  -		$(AR) libpcre.a $(OBJ)
  -		$(RANLIB) libpcre.a
  -
  -libpcre.la:     $(OBJ)
  -		@echo ' '
  -		@echo '--- Building shared library: libpcre'
  -		@echo ' '
  -		-rm -f libpcre.la
  -		libtool $(CC) -version-info '$(PCRELIBVERSION)' -o libpcre.la -rpath $(LIBDIR) $(LOBJ)
  -
  -libpcreposix.a: pcreposix.o
  -		@echo ' '
  -		@echo '--- Building static library: libpcreposix'
  -		@echo ' '
  -		-rm -f libpcreposix.a
  -		$(AR) libpcreposix.a pcreposix.o
  -		$(RANLIB) libpcreposix.a
  -
  -libpcreposix.la: pcreposix.o
  -		@echo ' '
  -		@echo '--- Building shared library: libpcreposix'
  -		@echo ' '
  -		-rm -f libpcreposix.la
  -		libtool $(CC) -version-info '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la -rpath $(LIBDIR) pcreposix.lo
  -
  -pcre.o:         chartables.c pcre.c pcre.h internal.h config.h Makefile
  -		$(LIBTOOL) $(CC) -c $(CFLAGS) pcre.c
  -
  -pcreposix.o:    pcreposix.c pcreposix.h internal.h pcre.h config.h Makefile
  -		$(LIBTOOL) $(CC) -c $(CFLAGS) pcreposix.c
  -
  -maketables.o:   maketables.c pcre.h internal.h config.h Makefile
  -		$(LIBTOOL) $(CC) -c $(CFLAGS) maketables.c
  -
  -get.o:          get.c pcre.h internal.h config.h Makefile
  -		$(LIBTOOL) $(CC) -c $(CFLAGS) get.c
  -
  -study.o:        study.c pcre.h internal.h config.h Makefile
  -		$(LIBTOOL) $(CC) -c $(CFLAGS) study.c
  -
  -pcretest.o:     pcretest.c pcre.h config.h Makefile
  -		$(CC) -c $(CFLAGS) pcretest.c
  -
  -pgrep.o:        pgrep.c pcre.h Makefile config.h
  -		$(CC) -c $(CFLAGS) pgrep.c
  -
  -# An auxiliary program makes the default character table source
  -
  -chartables.c:   dftables
  -		./dftables >chartables.c
  -
  -dftables:       dftables.c maketables.c pcre.h internal.h config.h Makefile
  -		$(CC) -o dftables $(CFLAGS) dftables.c
  -
  -install:        all
  -		$(LIBTOOL) $(INSTALL_DATA) libpcre.$(LIBSUFFIX) $(LIBDIR)/libpcre.$(LIBSUFFIX)
  -		$(LIBTOOL) $(INSTALL_DATA) libpcreposix.$(LIBSUFFIX) $(LIBDIR)/libpcreposix.$(LIBSUFFIX)
  -		$(INSTALL_DATA) pcre.h $(INCDIR)/pcre.h
  -		$(INSTALL_DATA) pcreposix.h $(INCDIR)/pcreposix.h
  -		$(INSTALL_DATA) doc/pcre.3 $(MANDIR)/man3/pcre.3
  -		$(INSTALL_DATA) doc/pcreposix.3 $(MANDIR)/man3/pcreposix.3
  -		$(INSTALL_DATA) doc/pgrep.1 $(MANDIR)/man1/pgrep.1
  -		@if test "$(LIBTOOL)" = "libtool"; then \
  -		  echo ' '; \
  -		  echo '--- Rebuilding pgrep to use installed shared library ---'; \
  -		  echo $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \
  -		  $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \
  -		  echo '--- Rebuilding pcretest to use installed shared library ---'; \
  -		  echo $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
  -		  $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
  -		fi
  -		$(INSTALL)	pgrep $(BINDIR)/pgrep
  -		$(INSTALL)	pcre-config $(BINDIR)/pcre-config
  -
  -# We deliberately omit dftables 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 -rf *.o *.lo *.a *.la .libs pcretest pgrep testtry *.exe
  -
  -# But "make distclean" should get back to a virgin distribution
  -
  -distclean:      clean
  -		-rm -f chartables.c libtool pcre-config pcre.h \
  -		Makefile config.h config.status config.log config.cache
  -
  -check:          runtest
  -
  -runtest:        all
  -		./RunTest
  -
  -depend:
  -	echo '*** SKIPPING PCRE UNTIL SOMEONE MAKES IT WORK ***'
  -
  -######## MINGW32 ############### MINGW32 ############### MINGW32 #############
  -
  -# This addition for mingw32 was contributed by  Paul Sokolovsky
  -# <Pa...@technologist.com>. I (PH) don't know anything about it!
  -
  -dll:            _dll libpcre.dll.a pgrep_d pcretest_d
  -
  -_dll:
  -		$(MAKE) CFLAGS=-DSTATIC pcre.dll
  -
  -pcre.dll:       $(OBJ) pcreposix.o pcre.def
  -libpcre.dll.a:  pcre.def
  +include $(top_srcdir)/build/ltlib.mk
   
  -pgrep_d:        libpcre.dll.a pgrep.o
  -		$(CC) $(CFLAGS) -L. -o pgrep pgrep.o -lpcre.dll
  +config.h:
  +	touch $@
   
  -pcretest_d:     libpcre.dll.a pcretest.o
  -		$(PURIFY) $(CC) $(CFLAGS) -L. -o pcretest pcretest.o -lpcre.dll
  +$(LTLIBRARY_OBJECTS) dftables.lo: config.h
   
  -# End
  +dftables: dftables.lo
  +	$(LINK) $(EXTRA_LDFLAGS) dftables.lo
  +
  +chartables.c: dftables
  +	./dftables > $@
  +
  +pcre.lo: chartables.c
  
  
  
  1.1                  apache-2.0/src/lib/pcre/pcre.h
  
  Index: pcre.h
  ===================================================================
  /*************************************************
  *       Perl-Compatible Regular Expressions      *
  *************************************************/
  
  /* Copyright (c) 1997-2000 University of Cambridge */
  
  #ifndef _PCRE_H
  #define _PCRE_H
  
  #define PCRE_MAJOR 3
  #define PCRE_MINOR 1
  #define PCRE_DATE  09-Feb-2000
  
  /* Win32 uses DLL by default */
  
  #ifdef _WIN32
  # ifdef STATIC
  #  define PCRE_DL_IMPORT
  # else
  #  define PCRE_DL_IMPORT __declspec(dllimport)
  # endif
  #else
  # define PCRE_DL_IMPORT
  #endif
  
  /* Have to include stdlib.h in order to ensure that size_t is defined;
  it is needed here for malloc. */
  
  #include <sys/types.h>
  #include <stdlib.h>
  
  /* Allow for C++ users */
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /* Options */
  
  #define PCRE_CASELESS        0x0001
  #define PCRE_MULTILINE       0x0002
  #define PCRE_DOTALL          0x0004
  #define PCRE_EXTENDED        0x0008
  #define PCRE_ANCHORED        0x0010
  #define PCRE_DOLLAR_ENDONLY  0x0020
  #define PCRE_EXTRA           0x0040
  #define PCRE_NOTBOL          0x0080
  #define PCRE_NOTEOL          0x0100
  #define PCRE_UNGREEDY        0x0200
  #define PCRE_NOTEMPTY        0x0400
  
  /* Exec-time and get-time error codes */
  
  #define PCRE_ERROR_NOMATCH        (-1)
  #define PCRE_ERROR_NULL           (-2)
  #define PCRE_ERROR_BADOPTION      (-3)
  #define PCRE_ERROR_BADMAGIC       (-4)
  #define PCRE_ERROR_UNKNOWN_NODE   (-5)
  #define PCRE_ERROR_NOMEMORY       (-6)
  #define PCRE_ERROR_NOSUBSTRING    (-7)
  
  /* Request types for pcre_fullinfo() */
  
  #define PCRE_INFO_OPTIONS         0
  #define PCRE_INFO_SIZE            1
  #define PCRE_INFO_CAPTURECOUNT    2
  #define PCRE_INFO_BACKREFMAX      3
  #define PCRE_INFO_FIRSTCHAR       4
  #define PCRE_INFO_FIRSTTABLE      5
  #define PCRE_INFO_LASTLITERAL     6
  
  /* Types */
  
  typedef void pcre;
  typedef void pcre_extra;
  
  /* Store get and free functions. These can be set to alternative malloc/free
  functions if required. Some magic is required for Win32 DLL; it is null on
  other OS. */
  
  PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
  PCRE_DL_IMPORT extern void  (*pcre_free)(void *);
  
  #undef PCRE_DL_IMPORT
  
  /* Functions */
  
  extern pcre *pcre_compile(const char *, int, const char **, int *,
    const unsigned char *);
  extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
  extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
    int, int, int, int *, int);
  extern int pcre_get_substring(const char *, int *, int, int, const char **);
  extern int pcre_get_substring_list(const char *, int *, int, const char ***);
  extern int pcre_info(const pcre *, int *, int *);
  extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
  extern unsigned const char *pcre_maketables(void);
  extern pcre_extra *pcre_study(const pcre *, int, const char **);
  extern const char *pcre_version(void);
  
  #ifdef __cplusplus
  }  /* extern "C" */
  #endif
  
  #endif /* End of pcre.h */