From e655b84d30db639375b1cce101d82d75f6df2e36 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 1 Jun 2004 18:28:31 +0000 Subject: Build fixes --- configure.in | 48 +++++++++++++++++++++++++++++++++++++++++++++--- lib/priv.h | 11 ++++++++++- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index dba3f82..b1edc18 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,42 @@ -# Process this file with autoconf to produce a configure script. -AC_INIT(rep, 2.3.2b, nielsen@memberwebs.com) -AM_INIT_AUTOMAKE(rep, 2.3.2b) +dnl +dnl Copyright (c) 2004, Nate Nielsen +dnl All rights reserved. +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions +dnl are met: +dnl +dnl * Redistributions of source code must retain the above +dnl copyright notice, this list of conditions and the +dnl following disclaimer. +dnl * Redistributions in binary form must reproduce the +dnl above copyright notice, this list of conditions and +dnl the following disclaimer in the documentation and/or +dnl other materials provided with the distribution. +dnl * The names of contributors to this software may not be +dnl used to endorse or promote products derived from this +dnl software without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +dnl FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +dnl COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +dnl INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +dnl BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +dnl OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +dnl AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +dnl THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +dnl DAMAGE. +dnl +dnl +dnl CONTRIBUTORS +dnl Nate Nielsen +dnl + +AC_INIT(rep, 2.3.2c, nielsen@memberwebs.com) +AM_INIT_AUTOMAKE(rep, 2.3.2c) LDFLAGS="$LDFLAGS -L/usr/local/lib" @@ -36,6 +72,12 @@ AC_CHECK_HEADERS([memory.h stddef.h stdlib.h string.h stdarg.h], , [echo "ERROR: Required header missing"; exit 1]) AC_CHECK_HEADERS([unistd.h err.h]) +AC_CHECK_HEADERS([pcre.h], [ AC_DEFINE_UNQUOTED([PCRE_H], ["pcre.h"], [PCRE header path]) ], + [ AC_CHECK_HEADERS([pcre/pcre.h], + [ AC_DEFINE([PCRE_H], ["pcre/pcre.h"], [PCRE header path]) ], + [echo "ERROR: Required PCRE header missing"; exit 1]) + ]) + # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T diff --git a/lib/priv.h b/lib/priv.h index dce25fe..d671fd7 100644 --- a/lib/priv.h +++ b/lib/priv.h @@ -20,7 +20,16 @@ #ifndef __PRIV_H__ #define __PRIV_H__ -#include "pcre.h" +/* Force use of win32 configuration if compiling there */ +#ifdef _WIN32 +#include "../config.win32.h" +#else +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif +#endif + +#include PCRE_H #include "execute.h" /* -- cgit v1.2.3