Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 60541 invoked by uid 500); 1 Jun 2000 01:01:18 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 60528 invoked by uid 500); 1 Jun 2000 01:01:17 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 1 Jun 2000 01:01:16 -0000 Message-ID: <20000601010116.60524.qmail@locus.apache.org> From: rbb@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/modules/standard config.m4 rbb 00/05/31 18:01:16 Modified: src/lib/apr configure.in src/lib/apr/dso/aix dso.c dso.h src/lib/apr/dso/beos dso.c dso.h src/lib/apr/dso/os2 dso.c dso.h src/lib/apr/dso/unix dso.c dso.h src/lib/apr/dso/win32 dso.c dso.h src/lib/apr/include apr.h.in src/lib/apr/misc/unix errorcodes.c src/modules/standard config.m4 Log: Fix building with DSO support. If any module is configured to be compiled for shared support then APR_HAS_DSO is enabled and -ldl is added to the LIBS variable. -ldl may need to be modified based on platform. If no modules are designated as shared then APR_HAS_DSO is disabled and nothing is added to LIBS. In basic testing this compiled without errors or warnings. Revision Changes Path 1.95 +16 -0 apache-2.0/src/lib/apr/configure.in Index: configure.in =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- configure.in 2000/05/25 18:15:38 1.94 +++ configure.in 2000/06/01 01:01:12 1.95 @@ -317,6 +317,22 @@ AC_SUBST(ssize_t_fmt) AC_SUBST(off_t_fmt) +dnl #----------------------------- Checking for DSO support +echo $ac_n "${nl}Checking for DSO...${nl}" +AC_CACHE_CHECK([for DSO support], ac_cv_enable_dso, + [ AC_ARG_ENABLE(dso, + [ --enable-dso Enable reliable child processes ], + [ ac_cv_enable_dso=$enableval], + [ aprdso="1" ] ) ] ) + +if test "$ac_cv_enable_dso" = "no"; then + aprdso="0" +else + aprdso="1" +fi + +AC_SUBST(aprdso) + dnl #----------------------------- Checking for Threads echo $ac_n "${nl}Checking for Threads...${nl}" AC_CACHE_CHECK([for threads], ac_cv_enable_threads, 1.5 +4 -0 apache-2.0/src/lib/apr/dso/aix/dso.c Index: dso.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/aix/dso.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dso.c 2000/04/14 15:58:19 1.4 +++ dso.c 2000/06/01 01:01:12 1.5 @@ -87,6 +87,8 @@ #include #include "dso.h" +#if APR_HAS_DSO + #undef FREAD #undef FWRITE #include @@ -704,3 +706,5 @@ free(buf); return ret; } + +#endif 1.5 +5 -0 apache-2.0/src/lib/apr/dso/aix/dso.h Index: dso.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/aix/dso.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dso.h 2000/04/22 06:16:13 1.4 +++ dso.h 2000/06/01 01:01:12 1.5 @@ -59,7 +59,10 @@ #include "apr_general.h" #include "apr_pools.h" #include "apr_dso.h" +#include "apr.h" +#if APR_HAS_DSO + void *dlopen(const char *path, int mode); void *dlsym(void *handle, const char *symbol); const char *dlerror(void); @@ -69,5 +72,7 @@ ap_pool_t *cont; void *handle; }; + +#endif #endif 1.5 +3 -0 apache-2.0/src/lib/apr/dso/beos/dso.c Index: dso.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/beos/dso.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dso.c 2000/04/14 15:58:19 1.4 +++ dso.c 2000/06/01 01:01:13 1.5 @@ -54,6 +54,7 @@ #include "dso.h" +#if APR_HAS_DSO ap_status_t ap_dso_init(void){ return APR_SUCCESS; @@ -97,3 +98,5 @@ return APR_SUCCESS; } + +#endif 1.7 +5 -0 apache-2.0/src/lib/apr/dso/beos/dso.h Index: dso.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/beos/dso.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- dso.h 2000/04/22 06:16:15 1.6 +++ dso.h 2000/06/01 01:01:13 1.7 @@ -60,11 +60,16 @@ #include "apr_pools.h" #include "apr_errno.h" #include "apr_dso.h" +#include "apr.h" #include +#if APR_HAS_DSO + struct ap_dso_handle_t { image_id handle; /* Handle to the DSO loaded */ ap_pool_t *cont; }; + +#endif #endif 1.10 +4 -0 apache-2.0/src/lib/apr/dso/os2/dso.c Index: dso.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/os2/dso.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dso.c 2000/05/31 02:30:23 1.9 +++ dso.c 2000/06/01 01:01:13 1.10 @@ -58,6 +58,8 @@ #include #include +#if APR_HAS_DSO + ap_status_t ap_dso_init() { return APR_SUCCESS; @@ -141,3 +143,5 @@ ap_cpystrn(buffer, message, buflen); return buffer; } + +#endif 1.10 +5 -0 apache-2.0/src/lib/apr/dso/os2/dso.h Index: dso.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/os2/dso.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dso.h 2000/05/31 02:30:23 1.9 +++ dso.h 2000/06/01 01:01:13 1.10 @@ -62,12 +62,17 @@ #include "apr_general.h" #include "apr_pools.h" #include "apr_dso.h" +#include "apr.h" +#if APR_HAS_DSO + struct ap_dso_handle_t { ap_pool_t *cont; /* Context for returning error strings */ HMODULE handle; /* Handle to the DSO loaded */ ap_status_t load_error; char *failed_module; }; + +#endif #endif 1.17 +4 -0 apache-2.0/src/lib/apr/dso/unix/dso.c Index: dso.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/unix/dso.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- dso.c 2000/05/31 02:30:24 1.16 +++ dso.c 2000/06/01 01:01:14 1.17 @@ -54,6 +54,8 @@ #include "dso.h" +#if APR_HAS_DSO + ap_status_t ap_dso_init(void){ return APR_SUCCESS; } @@ -144,3 +146,5 @@ return dso->errormsg; return "No Error"; } + +#endif 1.9 +5 -0 apache-2.0/src/lib/apr/dso/unix/dso.h Index: dso.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/unix/dso.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- dso.h 2000/05/31 02:30:24 1.8 +++ dso.h 2000/06/01 01:01:14 1.9 @@ -59,7 +59,10 @@ #include "apr_general.h" #include "apr_pools.h" #include "apr_dso.h" +#include "apr.h" +#if APR_HAS_DSO + #ifdef HAVE_DLFCN_H #include #endif @@ -87,5 +90,7 @@ void *handle; char *errormsg; }; + +#endif #endif 1.7 +4 -0 apache-2.0/src/lib/apr/dso/win32/dso.c Index: dso.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/win32/dso.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- dso.c 2000/05/31 02:30:25 1.6 +++ dso.c 2000/06/01 01:01:15 1.7 @@ -54,6 +54,8 @@ #include "dso.h" +#if APR_HAS_DSO + ap_status_t ap_dso_init(void){ return APR_SUCCESS; } @@ -101,3 +103,5 @@ { return ap_strerror(dso->load_error, buf, bufsize); } + +#endif 1.5 +5 -0 apache-2.0/src/lib/apr/dso/win32/dso.h Index: dso.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/win32/dso.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dso.h 2000/05/31 02:30:25 1.4 +++ dso.h 2000/06/01 01:01:15 1.5 @@ -59,11 +59,16 @@ #include "apr_general.h" #include "apr_pools.h" #include "apr_dso.h" +#include "apr.h" +#if APR_HAS_DSO + struct ap_dso_handle_t { ap_pool_t *cont; void *handle; ap_status_t load_error; }; + +#endif #endif 1.28 +1 -0 apache-2.0/src/lib/apr/include/apr.h.in Index: apr.h.in =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- apr.h.in 2000/05/28 02:47:08 1.27 +++ apr.h.in 2000/06/01 01:01:15 1.28 @@ -65,6 +65,7 @@ #define APR_HAS_RANDOM @rand@ #define APR_HAS_XLATE @iconv@ #define APR_HAS_OTHER_CHILD @oc@ +#define APR_HAS_DSO @aprdso@ /* This macro tells APR that it is safe to make a file masquerade as a * socket. This is necessary, because some platforms support poll'ing 1.20 +3 -1 apache-2.0/src/lib/apr/misc/unix/errorcodes.c Index: errorcodes.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/errorcodes.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- errorcodes.c 2000/05/31 02:30:27 1.19 +++ errorcodes.c 2000/06/01 01:01:16 1.20 @@ -101,12 +101,14 @@ return "No thread key structure was provided and one was required."; case APR_ENOSHMAVAIL: return "No shared memory is currently available"; +#if APR_HAS_DSO case APR_EDSOOPEN: #ifdef HAVE_LIBDL return dlerror(); #else return "DSO load failed"; -#endif +#endif /* HAVE_LIBDL */ +#endif /* APR_HAS_DSO */ case APR_INCHILD: return "Your code just forked, and you are currently executing in the " 1.16 +3 -0 apache-2.0/src/modules/standard/config.m4 Index: config.m4 =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/standard/config.m4,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- config.m4 2000/05/24 16:17:58 1.15 +++ config.m4 2000/06/01 01:01:16 1.16 @@ -57,9 +57,12 @@ APACHE_MODPATH_FINISH +ac_cv_enable_dso="no" if test "$sharedobjs" = "yes"; then LIBS="$LIBS -ldl" LTFLAGS="$LTFLAGS -export-dynamic" + ac_cv_enable_dso="yes" fi +AC_CACHE_SAVE APACHE_SUBST(STANDARD_LIBS)