fielding 01/02/19 17:53:47
Modified: . CHANGES configure.in
build apr_common.m4 apr_hints.m4 apr_network.m4
apr_threads.m4
Log:
Name protected the autoconf macros defined by APR. Moved the
REENTRANCY_FLAGS settings into apr_hints.m4. Inlined the
APR_PREPARE_MM_DIR macro because it could only be used once.
Removed the unused macros MY_TRY_RUN, MY_TRY_RUN_NATIVE, and
AC_USE_FUNCTION. Added some macro comments.
Revision Changes Path
1.65 +6 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- CHANGES 2001/02/19 23:00:38 1.64
+++ CHANGES 2001/02/20 01:53:46 1.65
@@ -1,5 +1,11 @@
Changes with APR b1
+ *) Name protected the autoconf macros defined by APR. Moved the
+ REENTRANCY_FLAGS settings into apr_hints.m4. Inlined the
+ APR_PREPARE_MM_DIR macro because it could only be used once.
+ Removed the unused macros MY_TRY_RUN, MY_TRY_RUN_NATIVE, and
+ AC_USE_FUNCTION. Added some macro comments. [Roy Fielding]
+
*) Cope with BSDi installations where the default make has been
replaced with GNU make. [Joe Orton <[EMAIL PROTECTED]>]
1.230 +72 -49 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -r1.229 -r1.230
--- configure.in 2001/02/19 23:00:39 1.229
+++ configure.in 2001/02/20 01:53:47 1.230
@@ -22,14 +22,18 @@
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
-dnl Libtool needs this symbol
-top_builddir="$abs_builddir"
-AC_SUBST(top_builddir)
-
if test "$abs_builddir" != "$abs_srcdir"; then
USE_VPATH=1
fi
+dnl Libtool needs this symbol
+if test -n "$BUILD_BASE"; then
+ top_builddir="$BUILD_BASE"
+else
+ top_builddir="$abs_builddir"
+fi
+AC_SUBST(top_builddir)
+
dnl Directory containing apr build macros, helpers, and make rules
apr_builders=$abs_srcdir/build
AC_SUBST(apr_builders)
@@ -39,8 +43,9 @@
# These added to allow default directories to be used...
DEFAULT_OSDIR="unix"
echo "(Default will be ${DEFAULT_OSDIR})"
-MODULES="file_io network_io threadproc misc locks time mmap shmem i18n user"
+apr_modules="file_io network_io threadproc misc locks time mmap shmem i18n
user"
+
dnl # Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET
@@ -107,7 +112,7 @@
config_subdirs="shmem/unix/mm"
native_mmap_emul="1"
USE_MM=yes
- AC_CHECK_DEFINE(BONE_VERSION, sys/socket.h)
+ APR_CHECK_DEFINE(BONE_VERSION, sys/socket.h)
eolstr="\\n"
file_as_socket="0"
;;
@@ -147,9 +152,17 @@
# run this on a more conditional basis.
mm_dir=shmem/unix/mm
+dnl #----------------------------- Prepare mm directory for VPATH support
if test "$USE_MM" = "yes"; then
- APR_PREPARE_MM_DIR
- RUN_SUBDIR_CONFIG_NOW($config_subdirs)
+ if test -n "$USE_VPATH"; then
+ test -d $mm_dir || $MKDIR $mm_dir
+
+ for i in shtool config.guess config.sub fbtool ltconfig \
+ ltmain.sh mm_vers.c; do
+ test -r $mm_dir/$i || ln -s $abs_srcdir/$mm_dir/$i $mm_dir/$i
+ done
+ fi
+ APR_SUBDIR_CONFIG($config_subdirs)
fi
AC_MSG_CHECKING(for Shared memory support)
@@ -185,7 +198,7 @@
AC_SUBST(filebased_shm)
AC_SUBST(keybased_shm)
-AC_CHECK_DEFINE(MM_SHMT_MMFILE, $srcdir/shmem/unix/mm/mm_conf.h)
+APR_CHECK_DEFINE(MM_SHMT_MMFILE, $srcdir/shmem/unix/mm/mm_conf.h)
if test "ac_cv_define_MM_SHMT_MMFILE" = "yes"; then
file_based="1"
@@ -431,7 +444,7 @@
socklen_t_value="int"
fi
-AC_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
+APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
@@ -441,7 +454,7 @@
ssize_t_fmt='#error Can not determine the proper size for ssize_t'
fi
-AC_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
+APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
if test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_int"; then
size_t_fmt='#define APR_SIZE_T_FMT "d"'
@@ -451,7 +464,7 @@
size_t_fmt='#error Can not determine the proper size for size_t'
fi
-AC_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_int"; then
off_t_fmt='#define APR_OFF_T_FMT "d"'
@@ -535,7 +548,7 @@
aprdso="0"
else
aprdso="1"
- MODULES="$MODULES dso"
+ apr_modules="$apr_modules dso"
fi
AC_SUBST(aprdso)
@@ -545,10 +558,10 @@
if test -z "$enable_threads"; then
AC_ARG_ENABLE(threads,
- [ --enable-threads Enable threading support in APR.],
- [ enable_threads=$enableval] ,
- [ CHECK_PTHREADS_H([ enable_threads="pthread" ] ,
- [ enable_threads="no" ] ) ] )
+ [ --enable-threads Enable threading support in APR.],
+ [ enable_threads=$enableval] ,
+ [ APR_CHECK_PTHREADS_H([ enable_threads="pthread" ] ,
+ [ enable_threads="no" ] ) ] )
fi
if test "$enable_threads" = "no"; then
@@ -557,12 +570,22 @@
pthreadh="0"
pthreadser="0"
else
- REENTRANCY_FLAGS
+#
+# Play with CPPFLAGS given what was learned from APR_PRELOAD.
+#
+# [Roy: I don't like this because it messes up an environment
+# variable that should remain pristine. However, it is needed
+# for compatibility until all flag handling can be rewritten.]
+#
+ apr_save_cppflags="$CPPFLAGS"
+ if test -n "$THREAD_CPPFLAGS"; then
+ CPPFLAGS="$CPPFLAGS $THREAD_CPPFLAGS"
+ fi
if test "$enable_threads" = "pthread"; then
# We have specified pthreads for our threading library, just make sure
# that we have everything we need
- PTHREADS_CHECK
- CHECK_PTHREADS_H([
+ APR_PTHREADS_CHECK
+ APR_CHECK_PTHREADS_H([
threads="1"
pthreadh="1"
pthreadser="1"
@@ -578,22 +601,22 @@
# We basically specified that we wanted threads, but not how to implement
# them. In this case, just look for pthreads. In the future, we can check
# for other threading libraries as well.
- PTHREADS_CHECK
- CHECK_PTHREADS_H([
+ APR_PTHREADS_CHECK
+ APR_CHECK_PTHREADS_H([
threads="1"
pthreadh="1"
pthreadser="1"
AC_DEFINE(USE_THREADS) ], [
threads="0"
pthreadser="0"
- pthreadh="0" ] )
+ pthreadh="0"
+ CPPFLAGS="$apr_save_cppflags" ] )
fi
-fi
-
-if test "$pthreadh" = "1"; then
- APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
- APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
- AC_CHECK_FUNCS(pthread_key_delete)
+ if test "$pthreadh" = "1"; then
+ APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+ APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+ AC_CHECK_FUNCS(pthread_key_delete)
+ fi
fi
ac_cv_define_READDIR_IS_THREAD_SAFE=no
@@ -693,33 +716,33 @@
AC_SUBST(have_union_semun)
dnl Checks for libraries.
-AC_CHECK_DEFINE(LOCK_EX, sys/file.h)
-AC_CHECK_DEFINE(F_SETLK, fcntl.h)
-AC_CHECK_DEFINE(CODESET, langinfo.h)
+APR_CHECK_DEFINE(LOCK_EX, sys/file.h)
+APR_CHECK_DEFINE(F_SETLK, fcntl.h)
+APR_CHECK_DEFINE(CODESET, langinfo.h)
# We are assuming that if the platform doesn't have POLLIN, it doesn't have
# any POLL definitions.
-AC_CHECK_DEFINE_FILES(POLLIN, poll.h sys/poll.h)
+APR_CHECK_DEFINE_FILES(POLLIN, poll.h sys/poll.h)
if test "$threads" = "1"; then
- AC_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
+ APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
fi
-# The last AC_DECIDE to execute sets the default
-AC_BEGIN_DECISION([apr_lock implementation method])
-AC_IFALLYES(func:semget func:semctl,
- AC_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
-AC_IFALLYES(header:sys/file.h define:LOCK_EX,
- AC_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
-AC_IFALLYES(header:fcntl.h define:F_SETLK,
- AC_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
-AC_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
+# The last APR_DECIDE to execute sets the default
+APR_BEGIN_DECISION([apr_lock implementation method])
+APR_IFALLYES(func:semget func:semctl,
+ APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
+APR_IFALLYES(header:sys/file.h define:LOCK_EX,
+ APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
+APR_IFALLYES(header:fcntl.h define:F_SETLK,
+ APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
+APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
custom:with_pthread_cross,
- AC_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
+ APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
if test "x$apr_lock_method" != "x"; then
- AC_DECISION_FORCE($apr_lock_method)
+ APR_DECISION_FORCE($apr_lock_method)
fi
-AC_END_DECISION
+APR_END_DECISION
AC_DEFINE_UNQUOTED($ac_decision)
flockser="0"
@@ -820,8 +843,8 @@
APR_CHECK_GETHOSTBYNAME_NAS
dnl # Look for a way of corking TCP...
-AC_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)
-AC_CHECK_DEFINE(TCP_NOPUSH, netinet/tcp.h)
+APR_CHECK_DEFINE(TCP_CORK, netinet/tcp.h)
+APR_CHECK_DEFINE(TCP_NOPUSH, netinet/tcp.h)
apr_tcp_nopush_flag="0"
have_corkable_tcp="0"
if test "x$ac_cv_define_TCP_CORK" = "xyes"; then
@@ -894,7 +917,7 @@
echo "${nl}Construct Makefiles and header files."
MAKEFILE1="Makefile lib/Makefile strings/Makefile passwd/Makefile
tables/Makefile"
SUBDIRS="lib strings passwd tables "
-for dir in $MODULES
+for dir in $apr_modules
do
test -d $dir || $MKDIR $dir
if test -f $srcdir/$dir/$OSDIR/Makefile.in; then
1.2 +30 -74 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_common.m4 2001/02/17 11:15:46 1.1
+++ apr_common.m4 2001/02/20 01:53:47 1.2
@@ -3,9 +3,9 @@
dnl
dnl
-dnl RUN_SUBDIR_CONFIG_NOW(dir [, sub-package-cmdline-args])
+dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args])
dnl
-AC_DEFUN(RUN_SUBDIR_CONFIG_NOW, [
+AC_DEFUN(APR_SUBDIR_CONFIG, [
# save our work to this point; this allows the sub-package to use it
AC_CACHE_SAVE
@@ -41,21 +41,9 @@
# grab any updates from the sub-package
AC_CACHE_LOAD
-])
+])dnl
-AC_DEFUN(APR_PREPARE_MM_DIR,[
-dnl #----------------------------- Prepare mm directory for VPATH support
-if test -n "$USE_MM" && test -n "$USE_VPATH"; then
- test -d $mm_dir || $MKDIR $mm_dir
-
- for i in shtool config.guess config.sub fbtool ltconfig \
- ltmain.sh mm_vers.c; do
- test -r $mm_dir/$i || ln -s $abs_srcdir/$mm_dir/$i $mm_dir/$i
- done
-fi
-])
-
dnl
dnl APR_DOEXTRA
dnl
@@ -86,6 +74,7 @@
done
])
+
dnl
dnl APR_SETIFNULL(variable, value)
dnl
@@ -98,6 +87,7 @@
fi
])
+
dnl
dnl APR_SETVAR(variable, value)
dnl
@@ -108,6 +98,7 @@
$1="$2"; export $1
])
+
dnl
dnl APR_ADDTO(variable, value)
dnl
@@ -119,15 +110,10 @@
])
-define(AC_USE_FUNCTION,[dnl
-AC_CHECK_FUNCS($1)
-if test ".$ac_func_$1" = .yes; then
-AC_DEFINE(USE_$2)
-fi
-])
-
-
-AC_DEFUN(AC_CHECK_DEFINE_FILES,[
+dnl
+dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
+dnl
+AC_DEFUN(APR_CHECK_DEFINE_FILES,[
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
ac_cv_define_$1=no
for curhdr in $2
@@ -146,7 +132,10 @@
])
-AC_DEFUN(AC_CHECK_DEFINE,[
+dnl
+dnl APR_CHECK_DEFINE( symbol, header_file )
+dnl
+AC_DEFUN(APR_CHECK_DEFINE,[
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
AC_EGREP_CPP(YES_IS_DEFINED, [
#include <$2>
@@ -161,7 +150,7 @@
])
-define(AC_IFALLYES,[dnl
+define(APR_IFALLYES,[dnl
ac_rc=yes
for ac_spec in $1; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
@@ -195,14 +184,14 @@
])
-define(AC_BEGIN_DECISION,[dnl
+define(APR_BEGIN_DECISION,[dnl
ac_decision_item='$1'
ac_decision_msg='FAILED'
ac_decision=''
])
-define(AC_DECIDE,[dnl
+define(APR_DECIDE,[dnl
ac_decision='$1'
ac_decision_msg='$2'
ac_decision_$1=yes
@@ -210,7 +199,7 @@
])
-define(AC_DECISION_OVERRIDE,[dnl
+define(APR_DECISION_OVERRIDE,[dnl
ac_decision=''
for ac_item in $1; do
eval "ac_decision_this=\$ac_decision_${ac_item}"
@@ -222,13 +211,13 @@
])
-define(AC_DECISION_FORCE,[dnl
+define(APR_DECISION_FORCE,[dnl
ac_decision="$1"
eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
])
-define(AC_END_DECISION,[dnl
+define(APR_END_DECISION,[dnl
if test ".$ac_decision" = .; then
echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
exit 1
@@ -241,50 +230,14 @@
fi
])
-dnl ### AC_TRY_RUN had some problems actually using a programs return code,
-dnl ### so I am re-working it here to be used in APR's configure script.
-dnl MY_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
-dnl [, ACTION-IF-CROSS-COMPILING]]])
-AC_DEFUN(MY_TRY_RUN,
-[if test "$cross_compiling" = yes; then
- ifelse([$4], ,
- [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without
default to allow cross compiling
-)dnl
- AC_MSG_ERROR(can not run test program while cross compiling)],
- [$4])
-else
- MY_TRY_RUN_NATIVE([$1], [$2], [$3])
-fi
-])
-
-dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
-dnl MY_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
-AC_DEFUN(MY_TRY_RUN_NATIVE,
-[cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-#include "confdefs.h"
-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-])dnl
-[$1]
-EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest;
exit) 2>/dev/null
-then
-dnl Don't remove the temporary files here, so they can be examined.
- ifelse([$2], , :, [$2])
-else
-ifelse([$3], , , [ $3
- rm -fr conftest*
-])dnl
-fi
-rm -fr conftest*])
-
+dnl
+dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
+dnl
dnl A variant of AC_CHECK_SIZEOF which allows the checking of
dnl sizes of non-builtin types
-dnl AC_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
-AC_DEFUN(AC_CHECK_SIZEOF_EXTENDED,
+dnl
+AC_DEFUN(APR_CHECK_SIZEOF_EXTENDED,
[changequote(<<,>>)dnl
dnl The name to #define
define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
@@ -309,6 +262,7 @@
undefine([AC_CV_NAME])dnl
])
+
dnl
dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
@@ -343,7 +297,9 @@
ifelse([$4], , , [rm -rf conftest*
$4])
fi
-rm -f conftest*])
+rm -f conftest*
+])dnl
+
dnl
dnl APR_CHECK_ICONV_INBUF
@@ -374,5 +330,5 @@
msg="char **"
fi
AC_MSG_RESULT([$msg])
-])
+])dnl
1.2 +17 -1 apr/build/apr_hints.m4
Index: apr_hints.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_hints.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_hints.m4 2001/02/17 11:15:46 1.1
+++ apr_hints.m4 2001/02/20 01:53:47 1.2
@@ -89,6 +89,7 @@
APR_ADDTO(CFLAGS, [-qLANGLVL=extended])
fi
APR_SETIFNULL(apr_iconv_inbuf_const, [1])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_THREAD_SAFE])
;;
*-apollo-*)
APR_ADDTO(CFLAGS, [-DAPOLLO])
@@ -105,6 +106,7 @@
*-hp-hpux11.*)
APR_ADDTO(CFLAGS, [-DHPUX11])
APR_ADDTO(LIBS, [-lpthread])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-hp-hpux10.*)
case $host in
@@ -114,9 +116,11 @@
APR_ADDTO(CFLAGS, [-DSELECT_NEEDS_CAST])
;;
esac
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-hp-hpux*)
APR_ADDTO(CFLAGS, [-DHPUX])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-linux-*)
case `uname -r` in
@@ -129,6 +133,7 @@
* )
;;
esac
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-GNU*)
APR_ADDTO(CFLAGS, [-DHURD])
@@ -141,6 +146,9 @@
*486-*-bsdi*)
APR_ADDTO(CFLAGS, [-m486])
;;
+ *-openbsd*)
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_POSIX_THREADS])
+ ;;
*-netbsd*)
APR_ADDTO(CFLAGS, [-DNETBSD])
APR_ADDTO(LIBS, [-lcrypt])
@@ -152,7 +160,8 @@
;;
esac
APR_ADDTO(LIBS, [-lcrypt])
- APR_SETIFNULL(enable_threads, [no])
+ APR_SETIFNULL(enable_threads, [no])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT -D_THREAD_SAFE])
;;
*-next-nextstep*)
APR_SETIFNULL(OPTIM, [-O])
@@ -190,20 +199,24 @@
*-sco3*)
APR_ADDTO(CFLAGS, [-DSCO -Oacgiltz])
APR_ADDTO(LIBS, [-lPW -lsocket -lmalloc -lcrypt_i])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-sco5*)
APR_ADDTO(CFLAGS, [-DSCO5])
APR_ADDTO(LIBS, [-lsocket -lmalloc -lprot -ltinfo -lx])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-sco_sv*|*-SCO_SV*)
APR_ADDTO(CFLAGS, [-DSCO])
APR_ADDTO(LIBS, [-lPW -lsocket -lmalloc -lcrypt_i])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_REENTRANT])
;;
*-solaris2*)
PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
APR_ADDTO(CFLAGS, [-DSOLARIS2=$PLATOSVERS])
APR_ADDTO(LIBS, [-lsocket -lnsl])
APR_SETIFNULL(apr_iconv_inbuf_const, [1])
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
;;
*-sunos4*)
APR_ADDTO(CFLAGS, [-DSUNOS4 -DUSEBCOPY])
@@ -332,6 +345,9 @@
APR_ADDTO(CFLAGS, [-DRISCIX])
APR_SETIFNULL(OPTIM, [-O])
APR_SETIFNULL(MAKE, [make])
+ ;;
+ *-irix*)
+ APR_ADDTO(THREAD_CPPFLAGS, [-D_POSIX_THREAD_SAFE_FUNCTIONS])
;;
*beos*)
APR_ADDTO(CFLAGS, [-DBEOS])
1.2 +12 -4 apr/build/apr_network.m4
Index: apr_network.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_network.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_network.m4 2001/02/17 11:15:46 1.1
+++ apr_network.m4 2001/02/20 01:53:47 1.2
@@ -48,6 +48,7 @@
fi
])
+
dnl
dnl check for gethostbyname() which handles numeric address strings
dnl
@@ -90,6 +91,7 @@
fi
])
+
dnl
dnl check for socklen_t, fall back to unsigned int
dnl
@@ -117,7 +119,6 @@
])
-
AC_DEFUN(APR_CHECK_INET_ADDR,[
AC_CACHE_CHECK(for inet_addr, ac_cv_func_inet_addr,[
AC_TRY_COMPILE([
@@ -195,6 +196,7 @@
fi
])
+
dnl
dnl Check to see if this platform includes sa_len in it's
dnl struct sockaddr. If it does it changes the length of sa_family
@@ -261,9 +263,7 @@
dnl
-dnl APR_CHECK_H_ERRNO_FLAG
-dnl
-dnl checks which flags are necessary for <netdb.h> to define h_errno
+dnl APR_H_ERRNO_COMPILE_CHECK
dnl
AC_DEFUN(APR_H_ERRNO_COMPILE_CHECK,[
if test x$1 != x; then
@@ -287,6 +287,13 @@
],[
ac_cv_h_errno_cflags=no
])])
+
+
+dnl
+dnl APR_CHECK_H_ERRNO_FLAG
+dnl
+dnl checks which flags are necessary for <netdb.h> to define h_errno
+dnl
AC_DEFUN(APR_CHECK_H_ERRNO_FLAG,[
AC_MSG_CHECKING([for h_errno in netdb.h])
AC_CACHE_VAL(ac_cv_h_errno_cflags,[
@@ -335,3 +342,4 @@
fi
AC_SUBST(apr_charset_ebcdic)
])
+
1.2 +25 -45 apr/build/apr_threads.m4
Index: apr_threads.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_threads.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_threads.m4 2001/02/17 11:15:46 1.1
+++ apr_threads.m4 2001/02/20 01:53:47 1.2
@@ -3,46 +3,14 @@
dnl
dnl
-dnl REENTRANCY_FLAGS
+dnl APR_CHECK_PTHREADS_H([ ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl
-dnl Set some magic defines
-dnl
-AC_DEFUN(REENTRANCY_FLAGS,[
- if test -z "$host_alias"; then
- host_alias=`$ac_config_guess`
- fi
- case "$host_alias" in
- *solaris*)
- PTHREAD_FLAGS="-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT";;
- *freebsd*)
- PTHREAD_FLAGS="-D_REENTRANT -D_THREAD_SAFE";;
- *openbsd*)
- PTHREAD_FLAGS="-D_POSIX_THREADS";;
- *linux*)
- PTHREAD_FLAGS="-D_REENTRANT";;
- *aix*)
- PTHREAD_FLAGS="-D_THREAD_SAFE";;
- *irix*)
- PTHREAD_FLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS";;
- *hpux*)
- PTHREAD_FLAGS="-D_REENTRANT";;
- *sco*)
- PTHREAD_FLAGS="-D_REENTRANT";;
-dnl Solves sigwait() problem, creates problems with u_long etc.
-dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500
-D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";;
- esac
-
- if test -n "$PTHREAD_FLAGS"; then
- CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS"
- THREAD_CPPFLAGS="$THREAD_CPPFLAGS $PTHREAD_FLAGS"
- fi
-])dnl
-
dnl gcc issues warnings when parsing AIX 4.3.3's pthread.h
dnl which causes autoconf to incorrectly conclude that
dnl pthreads is not available.
dnl Turn off warnings if we're using gcc.
-AC_DEFUN(CHECK_PTHREADS_H, [
+dnl
+AC_DEFUN(APR_CHECK_PTHREADS_H, [
if test "$GCC" = "yes"; then
SAVE_FL="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -w"
@@ -53,6 +21,10 @@
fi
])dnl
+
+dnl
+dnl APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+dnl
AC_DEFUN(APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS, [
AC_CACHE_CHECK(whether pthread_getspecific takes two arguments,
ac_cv_pthread_getspecific_two_args,[
AC_TRY_COMPILE([
@@ -71,9 +43,12 @@
if test "$ac_cv_pthread_getspecific_two_args" = "yes"; then
AC_DEFINE(PTHREAD_GETSPECIFIC_TAKES_TWO_ARGS, 1, [Define if
pthread_getspecific() has two args])
fi
-
])dnl
+
+dnl
+dnl APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+dnl
AC_DEFUN(APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG, [
AC_CACHE_CHECK(whether pthread_attr_getdetachstate takes one argument,
ac_cv_pthread_attr_getdetachstate_one_arg,[
AC_TRY_COMPILE([
@@ -91,14 +66,15 @@
if test "$ac_cv_pthread_attr_getdetachstate_one_arg" = "yes"; then
AC_DEFINE(PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG, 1, [Define if
pthread_attr_getdetachstate() has one arg])
fi
-
])dnl
+
+
dnl
-dnl PTHREADS_CHECK_COMPILE
+dnl APR_PTHREADS_CHECK_COMPILE
dnl
dnl Check whether the current setup can use POSIX threads calls
dnl
-AC_DEFUN(PTHREADS_CHECK_COMPILE, [
+AC_DEFUN(APR_PTHREADS_CHECK_COMPILE, [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
@@ -117,13 +93,16 @@
pthreads_working="yes"
], [
pthreads_working="no"
- ], pthreads_working="no" ) ] )dnl
+ ], pthreads_working="no" )
+])dnl
+
+
dnl
-dnl PTHREADS_CHECK()
+dnl APR_PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
-AC_DEFUN(PTHREADS_CHECK,[
+AC_DEFUN(APR_PTHREADS_CHECK,[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
@@ -133,7 +112,7 @@
THREAD_CFLAGS="$THREAD_CFLAGS $ac_cv_pthreads_cflags"
fi
-PTHREADS_CHECK_COMPILE
+APR_PTHREADS_CHECK_COMPILE
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=""
@@ -141,7 +120,7 @@
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt;
do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
- PTHREADS_CHECK_COMPILE
+ APR_PTHREADS_CHECK_COMPILE
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags="$flag"
dnl this was already added to CFLAGS; add to THREAD_CFLAGS, too
@@ -153,13 +132,14 @@
fi
])
+
AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[
ac_cv_pthreads_lib=""
if test "$pthreads_working" != "yes"; then
for lib in pthread pthreads c_r; do
ac_save="$LIBS"
LIBS="$LIBS -l$lib"
- PTHREADS_CHECK_COMPILE
+ APR_PTHREADS_CHECK_COMPILE
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib="$lib"
break