manoj 99/11/30 17:16:37
Modified: src acconfig.h.in acinclude.m4 configure.in
src/include ap_config.h http_log.h
src/main config.h.stub config.m4 http_log.c http_main.c
src/os/unix config.m4
src/regex config.m4
Added: src/include ap_ac_config.h
src/regex config.h.stub
Log:
Eliminate ap_config.h's checks when using autoconf. Now, ap_ac_config.h
is used instead, and autoconf's configure script will check for
everything else.
Revision Changes Path
1.3 +6 -0 apache-2.0/src/acconfig.h.in
Index: acconfig.h.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/acconfig.h.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -u -r1.2 -r1.3
--- acconfig.h.in 1999/11/30 07:54:07 1.2
+++ acconfig.h.in 1999/12/01 01:16:00 1.3
@@ -1,2 +1,8 @@
/* symbols defined by autoconf's configure script that aren't taken care
* of by autoheader */
+
+/* Define if EAGAIN is present on this system */
+#undef HAVE_EAGAIN
+
+/* Define if arguments to select() aren't what we expect */
+#undef SELECT_NEEDS_CAST
1.2 +33 -0 apache-2.0/src/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- acinclude.m4 1999/11/29 23:44:45 1.1
+++ acinclude.m4 1999/12/01 01:16:01 1.2
@@ -44,6 +44,39 @@
])
dnl
+dnl AC_CHECK_DEFINE(macro, headerfile)
+dnl
+dnl checks for the macro in the header file
+dnl
+AC_DEFUN(AC_CHECK_DEFINE,[
+ AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
+ AC_EGREP_CPP([YES_IS_DEFINED], [
+ #include <$2>
+ #ifdef $1
+ YES_IS_DEFINED
+ #endif
+ ], ac_cv_define_$1=yes, ac_cv_define_$1=no))
+ if test "$ac_cv_define_$1" = "yes" ; then
+ AC_DEFINE(HAVE_$1)
+ fi
+])
+
+dnl
+dnl AC_TYPE_RLIM_T
+dnl
+dnl If rlim_t is not defined, define it to int
+dnl
+AC_DEFUN(AC_TYPE_RLIM_T, [
+ AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [
+ AC_TRY_COMPILE([#include <sys/resource.h>], [rlim_t spoon;], [
+ ac_cv_type_rlim_t=yes
+ ],[ac_cv_type_rlim_t=no
+ AC_DEFINE(rlim_t, int)
+ ])
+ ])
+])
+
+dnl
dnl APACHE_ONCE(namespace, variable, code)
dnl
dnl execute code, if variable is not set in namespace
1.5 +33 -1 apache-2.0/src/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/configure.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -u -r1.4 -r1.5
--- configure.in 1999/11/30 03:52:36 1.4
+++ configure.in 1999/12/01 01:16:02 1.5
@@ -12,7 +12,8 @@
APACHE_VERSION=$VERSION
AC_SUBST(APACHE_VERSION)
-dnl XXX - doesn't actually work, because of the APACHE_OUTPUT_FILES error
+dnl XXX - make will sometimes die as annoyingly as automake with this option
+dnl just remake and continue
AM_MAINTAINER_MODE
dnl We want this one before the checks, so the checks can modify CFLAGS
@@ -43,14 +44,30 @@
dnl them at the base of the tree. If some are specific to a single
dnl directory, they should be moved (Comment #Spoon)
+AC_HEADER_STDC
AC_CHECK_HEADERS( \
unistd.h \
+sys/stat.h \
sys/time.h \
+sys/types.h \
+sys/socket.h \
+netinet/in.h \
+arpa/inet.h \
+netdb.h \
+pwd.h \
+grp.h \
)
+AC_HEADER_SYS_WAIT
+
+dnl ## Check for C preprocessor symbols
+
+AC_CHECK_DEFINE(EAGAIN, errno.h)
dnl ## Check for typedefs, structures, and compiler characteristics.
+AC_C_CONST
AC_C_INLINE
+AC_TYPE_PID_T
dnl ## Check for library functions
@@ -67,7 +84,22 @@
difftime \
gettimeofday \
memmove \
+bzero \
)
+
+AC_CHECK_FUNCS(inet_addr inet_network, break, [
+ AC_MSG_ERROR(inet_addr function not found)
+])
+
+AC_FUNC_SELECT_ARGTYPES
+
+dnl Check if we'll actually need to cast select args all the time
+if test "$ac_cv_func_select_arg1" != "int" \
+ -o "$ac_cv_func_select_arg234" != "fd_set *" \
+ -o "$ac_cv_func_select_arg5" != "struct timeval *" ; then
+
+ AC_DEFINE(SELECT_NEEDS_CAST)
+fi
AM_PROG_LIBTOOL
1.12 +10 -0 apache-2.0/src/include/ap_config.h
Index: ap_config.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/ap_config.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -u -r1.11 -r1.12
--- ap_config.h 1999/11/30 03:52:39 1.11
+++ ap_config.h 1999/12/01 01:16:05 1.12
@@ -62,6 +62,11 @@
extern "C" {
#endif
+#ifdef HAVE_CONFIG_H
+#include "ap_ac_config.h" /* If we're using autoconf, go to the new
+ ap_config.h replacement */
+#else /* HAVE_CONFIG_H */
+
/*
* ap_config.h: system-dependant #defines and includes...
* See PORTING for a listing of what they mean
@@ -1406,6 +1411,10 @@
#define HAVE_SYS_TIMES_H
#endif
+#if !defined(NO_RELIABLE_PIPED_LOGS)
+#define HAVE_RELIABLE_PIPED_LOGS
+#endif
+
#endif /* HAVE_CONFIG_H */
/* The assumption is that when the functions are missing,
@@ -1462,6 +1471,7 @@
#undef USE_SYSVSEM_SERIALIZED_ACCEPT
#undef USE_PTHREAD_SERIALIZED_ACCEPT
#endif
+#endif /* HAVE_CONFIG_H */
#ifdef __cplusplus
}
1.10 +2 -2 apache-2.0/src/include/http_log.h
Index: http_log.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/http_log.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -u -r1.9 -r1.10
--- http_log.h 1999/11/30 23:27:18 1.9
+++ http_log.h 1999/12/01 01:16:06 1.10
@@ -143,7 +143,7 @@
typedef struct piped_log {
ap_context_t *p;
-#ifndef NO_RELIABLE_PIPED_LOGS
+#ifdef HAVE_RELIABLE_PIPED_LOGS
char *program;
ap_proc_t *pid;
ap_file_t *fds[2];
@@ -154,7 +154,7 @@
API_EXPORT(piped_log *) ap_open_piped_log (ap_context_t *p, const char
*program);
API_EXPORT(void) ap_close_piped_log (piped_log *);
-#ifndef NO_RELIABLE_PIPED_LOGS
+#ifdef HAVE_RELIABLE_PIPED_LOGS
#define ap_piped_log_read_fd(pl) ((pl)->fds[0])
#define ap_piped_log_write_fd(pl) ((pl)->fds[1])
#else
1.1 apache-2.0/src/include/ap_ac_config.h
Index: ap_ac_config.h
===================================================================
/* ====================================================================
* Copyright (c) 1995-1999 The Apache Group. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* 4. The names "Apache Server" and "Apache Group" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the Apache Group
* for use in the Apache HTTP server project (http://www.apache.org/)."
*
* THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Group and was originally based
* on public domain software written at the National Center for
* Supercomputing Applications, University of Illinois, Urbana-Champaign.
* For more information on the Apache Group and the Apache HTTP server
* project, please see <http://www.apache.org/>.
*
*/
#ifndef AP_AC_CONFIG_H
#define AP_AC_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */
#ifdef WIN32
#include "ap_config_win32.h"
#include "../os/win32/os.h"
#else
#include "ap_config_auto.h"
#include "os.h"
#endif /* WIN32 */
#ifdef STDC_HEADERS
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
/* The next three are for inet_*() */
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_PWD_H /* XXX - For getpw*. This should be moved to unixd */
#include <pwd.h>
#endif
#ifdef HAVE_GRP_H /* XXX - For getgr*. This should be moved to unixd */
#include <grp.h>
#endif
#ifdef HAVE_SYS_WAIT_H
/* We have a POSIX wait interface */
#include <sys/wait.h>
#define ap_wait_t int
#else /* HAVE_SYS_WAIT_H */
/* We don't have a POSIX wait interface. Assume we have the old-style. Is this
* a bad assumption? */
#include <sys/wait.h>
#define ap_wait_t union wait
#define WEXITSTATUS(status) (int)((status).w_retcode)
#define WTERMSIG(status) (int)((status).w_termsig)
#endif /* HAVE_SYS_WAIT_H */
/* ap_ versions of ctype macros to make sure they deal with 8-bit chars */
#include "ap_ctype.h"
/* Find a function to serve as Apache's inet_addr */
#ifdef HAVE_INET_ADDR
#define ap_inet_addr inet_addr
#elif defined(HAVE_INET_NETWORK) /* only DGUX, as far as I know */
#define ap_inet_addr inet_network
#endif
/* XXX - This probably doesn't handle OS/2 */
#ifdef SELECT_NEEDS_CAST
#define ap_select(_a, _b, _c, _d, _e) \
select((_a), (int *)(_b), (int *)(_c), (int *)(_d), (_e))
#else
#define ap_select(_a, _b, _c, _d, _e) \
select(_a, _b, _c, _d, _e)
#endif
/* So that we can use inline on some critical functions, and use
* GNUC attributes (such as to get -Wall warnings for printf-like
* functions). Only do this in gcc 2.7 or later ... it may work
* on earlier stuff, but why chance it.
*
* We've since discovered that the gcc shipped with NeXT systems
* as "cc" is completely broken. It claims to be __GNUC__ and so
* on, but it doesn't implement half of the things that __GNUC__
* means. In particular it's missing inline and the __attribute__
* stuff. So we hack around it. PR#1613. -djg
*/
#if !defined(__GNUC__) || __GNUC__ < 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
defined(NEXT)
#define ap_inline
#define __attribute__(__x)
#define ENUM_BITFIELD(e,n,w) signed int n : w
#else
#define ap_inline __inline__
#define USE_GNU_INLINE
#define ENUM_BITFIELD(e,n,w) e n : w
#endif
/* EAGAIN apparently isn't defined on some systems */
#ifndef HAVE_EAGAIN
#define EAGAIN EWOULDBLOCK
#endif
/*
* String and memory functions
*/
#ifndef HAVE_MEMMOVE
#define memmove(a,b,c) bcopy(b,a,c)
#endif
#ifndef HAVE_BZERO
#define bzero(a,b) memset(a,0,b)
#endif
/* Regexes */
#ifdef USE_HSREGEX
#include "hsregex.h"
#else
#include <regex.h>
#endif
/* TODO - We need to put OS detection back to make all the following work */
#if defined(SUNOS4) || defined(IRIX) || defined(NEXT) || defined(AUX3) \
|| defined (UW) || defined(LYNXOS) || defined(TPF)
/* These systems don't do well with any lingering close code; I don't know
* why -- manoj */
#define NO_LINGCLOSE
#endif
#ifdef SCO5
/* XXX - What's this for */
#define SecureWare
/* Although SCO 5 defines these in <strings.h> (note the "s") they don't have
consts. Sigh. */
extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, unsigned);
#endif /* SCO5 */
/* When we don't have the OTHER_CHILD routines (always, right now), turn off
* reliable piped_logs. */
#if !defined(HAVE_OTHER_CHILD) && defined(HAVE_RELIABLE_PIPED_LOGS)
#undef HAVE_RELIABLE_PIPED_LOGS
#endif
/* XXX - The PHP4 comments say -D_HPUX_SOURCE is obsolete. */
/* TODO - none of the dynamic linking defines are in yet, but that's because
* Manoj needs to learn what the exact ramifications of libtool on DSOs are */
/* XXX - This API_EXPORT stuff shouldn't be here. Where? *shrug* */
/* stuff marked API_EXPORT is part of the API, and intended for use
* by modules
*/
#ifndef API_EXPORT
#define API_EXPORT(type) type
#endif
/* Stuff marked API_EXPORT_NONSTD is part of the API, and intended for
* use by modules. The difference between API_EXPORT and
* API_EXPORT_NONSTD is that the latter is required for any functions
* which use varargs or are used via indirect function call. This
* is to accomodate the two calling conventions in windows dlls.
*/
#ifndef API_EXPORT_NONSTD
#define API_EXPORT_NONSTD(type) type
#endif
#ifndef MODULE_VAR_EXPORT
#define MODULE_VAR_EXPORT
#endif
#ifndef API_VAR_EXPORT
#define API_VAR_EXPORT
#endif
/* modules should not used functions marked CORE_EXPORT
* or CORE_EXPORT_NONSTD */
#ifndef CORE_EXPORT
#define CORE_EXPORT API_EXPORT
#endif
#ifndef CORE_EXPORT_NONSTD
#define CORE_EXPORT_NONSTD API_EXPORT_NONSTD
#endif
/* XXX - This XtOffset stuff shouldn't be here. But where? *shrug* */
/* Finding offsets of elements within structures.
* Taken from the X code... they've sweated portability of this stuff
* so we don't have to. Sigh...
*/
#if defined(CRAY) || (defined(__arm) && !defined(LINUX))
#ifdef __STDC__
#define XtOffset(p_type,field) _Offsetof(p_type,field)
#else
#ifdef CRAY2
#define XtOffset(p_type,field) \
(sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
#else /* !CRAY2 */
#define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
#endif /* !CRAY2 */
#endif /* __STDC__ */
#else /* ! (CRAY || __arm) */
#define XtOffset(p_type,field) \
((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
#endif /* !CRAY */
#ifdef offsetof
#define XtOffsetOf(s_type,field) offsetof(s_type,field)
#else
#define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
#endif
#endif /* AP_AC_CONFIG_H */
1.2 +3 -0 apache-2.0/src/main/config.h.stub
Index: config.h.stub
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/config.h.stub,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- config.h.stub 1999/11/29 23:45:53 1.1
+++ config.h.stub 1999/12/01 01:16:08 1.2
@@ -7,3 +7,6 @@
/* Define if we should use mmap() to read files */
#undef USE_MMAP_FILES
+
+/* Define to 'int' if <sys/resource.h> doesn't define */
+#undef rlim_t
1.2 +1 -0 apache-2.0/src/main/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/config.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- config.m4 1999/11/29 23:45:57 1.1
+++ config.m4 1999/12/01 01:16:09 1.2
@@ -30,6 +30,7 @@
dnl ## Check for typedefs, structures, and compiler characteristics.
+AC_TYPE_RLIM_T
AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1.19 +1 -1 apache-2.0/src/main/http_log.c
Index: http_log.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -u -r1.18 -r1.19
--- http_log.c 1999/11/30 23:27:29 1.18
+++ http_log.c 1999/12/01 01:16:10 1.19
@@ -618,7 +618,7 @@
/* piped log support */
-#ifndef NO_RELIABLE_PIPED_LOGS
+#ifdef HAVE_RELIABLE_PIPED_LOGS
/* forward declaration */
static void piped_log_maintenance(int reason, void *data, ap_wait_t status);
1.23 +2 -2 apache-2.0/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -u -r1.22 -r1.23
--- http_main.c 1999/11/22 14:52:17 1.22
+++ http_main.c 1999/12/01 01:16:11 1.23
@@ -136,8 +136,8 @@
#ifdef HAS_OTHER_CHILD
printf(" -D HAS_OTHER_CHILD\n");
#endif
-#ifdef NO_RELIABLE_PIPED_LOGS
- printf(" -D NO_RELIABLE_PIPED_LOGS\n");
+#ifdef HAVE_RELIABLE_PIPED_LOGS
+ printf(" -D HAVE_RELIABLE_PIPED_LOGS\n");
#endif
#ifdef BUFFERED_LOGS
printf(" -D BUFFERED_LOGS\n");
1.2 +9 -7 apache-2.0/src/os/unix/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/os/unix/config.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- config.m4 1999/11/29 23:47:33 1.1
+++ config.m4 1999/12/01 01:16:23 1.2
@@ -1,7 +1,9 @@
-AC_CHECK_FUNCS( \
-setsid \
-killpg \
-)
-
-dnl XXX - This doesn't deal with _sys_siglist. Probably have to roll our own
-AC_DECL_SYS_SIGLIST
+if test "$OS" = "unix" ; then
+ AC_CHECK_FUNCS( \
+ setsid \
+ killpg \
+ )
+
+ dnl XXX - This doesn't deal with _sys_siglist. Maybe have to roll our own
+ AC_DECL_SYS_SIGLIST
+fi
1.2 +1 -0 apache-2.0/src/regex/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/regex/config.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -u -r1.1 -r1.2
--- config.m4 1999/11/29 23:47:42 1.1
+++ config.m4 1999/12/01 01:16:32 1.2
@@ -7,6 +7,7 @@
if test $apache_cv_hsregex = yes; then
REGEX_LIB=regex/libregex.la
REGEX_DIR=regex
+ AC_DEFINE(USE_HSREGEX)
APACHE_OUTPUT(regex/Makefile)
fi
AC_MSG_RESULT($apache_cv_hsregex)
1.1 apache-2.0/src/regex/config.h.stub
Index: config.h.stub
===================================================================
/* Define this is HS regex will be used */
#undef USE_HSREGEX