You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/06/28 18:31:13 UTC
cvs commit: apache-2.0/src/lib/apr apr_common.m4 aclocal.m4 configure.in threads.m4
rbb 00/06/28 09:31:10
Modified: src acinclude.m4 configure.in
src/build build2.mk
src/lib/apr aclocal.m4 configure.in
Added: src/lib/apr apr_common.m4
Removed: src/lib/apr threads.m4
Log:
Finish the Configuration cleanup. This basically merges all of the
autoconf scripts that APR provides for other programs into apr_common.m4.
Other programs can then just include that file to get the APR checks that
are required.
Submitted by: Sascha Schumann <sa...@schumann.cx>
Revision Changes Path
1.41 +1 -32 apache-2.0/src/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- acinclude.m4 2000/06/27 23:12:23 1.40
+++ acinclude.m4 2000/06/28 16:30:55 1.41
@@ -168,7 +168,7 @@
fi
])
-sinclude(lib/apr/threads.m4)
+sinclude(lib/apr/apr_common.m4)
sinclude(lib/apr/hints.m4)
dnl
@@ -407,35 +407,4 @@
done
])
])dnl
-
-AC_DEFUN(APACHE_RUN_SUBDIR_CONFIG_NOW, [
- echo "configuring package in $1 now"
- ac_popdir=`pwd`
- ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
- apache_config_subdirs="$1"
- cd $1
-
-changequote(, )dnl
- # A "../" for each directory in /$config_subdirs.
- ac_dots=`echo $apache_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-changequote([, ])dnl
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
-
- # The eval makes quoting arguments work.
-
- if eval $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir
- then :
- echo "$1 configured properly"
- else
- echo "configure failed for $1"
- fi
-
- cd $ac_popdir
-])
1.70 +1 -1 apache-2.0/src/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/configure.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- configure.in 2000/06/28 14:33:27 1.69
+++ configure.in 2000/06/28 16:30:56 1.70
@@ -163,7 +163,7 @@
dnl ## APRVARS before Apache generates it's Makefiles and the related files.
dnl ## This allows APR to detect libraries like dl and tell Apache that it
dnl ## needs to include or not include them.
-APACHE_RUN_SUBDIR_CONFIG_NOW(lib/apr)
+RUN_SUBDIR_CONFIG_NOW(lib/apr)
. ./lib/apr/APRVARS
APACHE_GEN_CONFIG_VARS
1.15 +2 -2 apache-2.0/src/build/build2.mk
Index: build2.mk
===================================================================
RCS file: /home/cvs/apache-2.0/src/build/build2.mk,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- build2.mk 2000/06/15 17:54:37 1.14
+++ build2.mk 2000/06/28 16:31:02 1.15
@@ -81,7 +81,7 @@
libtool_m4 = $(libtool_prefix)/share/aclocal/libtool.m4
-aclocal.m4: acinclude.m4 lib/apr/threads.m4 lib/apr/hints.m4 $(libtool_m4)
+aclocal.m4: acinclude.m4 lib/apr/apr_common.m4 lib/apr/hints.m4 $(libtool_m4)
@echo rebuilding $@
@cat acinclude.m4 $(libtool_m4) > $@
@@ -108,7 +108,7 @@
@rm -f $@
(cd lib/apr && autoheader)
-$(apr_configure): lib/apr/aclocal.m4 lib/apr/configure.in lib/apr/threads.m4 lib/apr/hints.m4
+$(apr_configure): lib/apr/aclocal.m4 lib/apr/configure.in lib/apr/apr_common.m4 lib/apr/hints.m4
@echo rebuilding $@
(cd lib/apr && autoconf)
1.23 +1 -31 apache-2.0/src/lib/apr/aclocal.m4
Index: aclocal.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/aclocal.m4,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- aclocal.m4 2000/06/28 15:12:43 1.22
+++ aclocal.m4 2000/06/28 16:31:05 1.23
@@ -261,37 +261,6 @@
fi
])
-AC_DEFUN(RUN_SUBDIR_CONFIG_NOW, [
- echo "configuring package in $1 now"
- ac_popdir=`pwd`
- ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
- apr_config_subdirs="$1"
- cd $1
-
-changequote(, )dnl
- # A "../" for each directory in /$config_subdirs.
- ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-changequote([, ])dnl
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
-
- # The eval makes quoting arguments work.
-
- if eval $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir
- then :
- echo "$1 configured properly"
- else
- echo "configure failed for $1"
- fi
-
- cd $ac_popdir
-])
-
AC_DEFUN(APR_PREPARE_MM_DIR,[
dnl #----------------------------- Prepare mm directory for VPATH support
if test -n "$USE_MM" && test -n "$USE_VPATH"; then
@@ -305,4 +274,5 @@
])
sinclude(threads.m4)
+sinclude(apr_common.m4)
sinclude(hints.m4)
1.128 +1 -1 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.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- configure.in 2000/06/28 15:12:44 1.127
+++ configure.in 2000/06/28 16:31:07 1.128
@@ -3,7 +3,7 @@
dnl ##
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(threads.m4)
+AC_INIT(apr_common.m4)
AC_CONFIG_HEADER(include/apr_private.h)
AC_CONFIG_AUX_DIR_DEFAULT
1.1 apache-2.0/src/lib/apr/apr_common.m4
Index: apr_common.m4
===================================================================
AC_DEFUN(RUN_SUBDIR_CONFIG_NOW, [
echo "configuring package in $1 now"
ac_popdir=`pwd`
ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
apr_config_subdirs="$1"
cd $1
changequote(, )dnl
# A "../" for each directory in /$config_subdirs.
ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
changequote([, ])dnl
# Make the cache file name correct relative to the subdirectory.
case "$cache_file" in
/*) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file="$ac_dots$cache_file" ;;
esac
# The eval makes quoting arguments work.
if eval $ac_abs_srcdir/configure $ac_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir
then :
echo "$1 configured properly"
else
echo "configure failed for $1"
fi
cd $ac_popdir
])
dnl
dnl REENTRANCY_FLAGS
dnl
dnl Set some magic defines
dnl
AC_DEFUN(REENTRANCY_FLAGS,[
if test -z "$host_alias"; then
host_alias=`$ac_config_guess`
dnl AC_MSG_ERROR(host_alias is not set. Make sure to run 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"
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, [
if test "$GCC" = "yes"; then
SAVE_FL="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -w"
AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
CPPFLAGS="$SAVE_FL"
else
AC_CHECK_HEADERS(pthread.h, [ $1 ] , [ $2 ] )
fi
])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([
#include <pthread.h>
],[
pthread_key_t key;
void *tmp;
pthread_getspecific(key,&tmp);
],[
ac_cv_pthread_getspecific_two_args=yes
],[
ac_cv_pthread_getspecific_two_args=no
])
])
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
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([
#include <pthread.h>
],[
pthread_attr_t *attr;
pthread_attr_getdetachstate(attr);
],[
ac_cv_pthread_attr_getdetachstate_one_arg=yes
],[
ac_cv_pthread_attr_getdetachstate_one_arg=no
])
])
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
dnl Check whether the current setup can use POSIX threads calls
dnl
AC_DEFUN(PTHREADS_CHECK_COMPILE, [
AC_TRY_RUN( [
#include <pthread.h>
#include <stddef.h>
void *thread_routine(void *data) {
return data;
}
int main() {
pthread_t thd;
pthread_mutexattr_t mattr;
int data = 1;
pthread_mutexattr_init(&mattr);
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
pthreads_working="yes"
], [
pthreads_working="no"
], pthreads_working="no" ) ] )dnl
dnl
dnl PTHREADS_CHECK()
dnl
dnl Try to find a way to enable POSIX threads
dnl
AC_DEFUN(PTHREADS_CHECK,[
if test -n "$ac_cv_pthreads_lib"; then
LIBS="$LIBS -l$ac_cv_pthreads_lib"
fi
if test -n "$ac_cv_pthreads_cflags"; then
CFLAGS="$CFLAGS $ac_cv_pthreads_cflags"
fi
PTHREADS_CHECK_COMPILE
AC_CACHE_CHECK(for pthreads_cflags,ac_cv_pthreads_cflags,[
ac_cv_pthreads_cflags=""
if test "$pthreads_working" != "yes"; then
for flag in -kthread -pthread -pthreads -mthreads -Kthread -threads -mt; do
ac_save="$CFLAGS"
CFLAGS="$CFLAGS $flag"
PTHREADS_CHECK_COMPILE
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_cflags="$flag"
break
fi
CFLAGS="$ac_save"
done
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
if test "$pthreads_working" = "yes"; then
ac_cv_pthreads_lib="$lib"
break
fi
LIBS="$ac_save"
done
fi
])
if test "$pthreads_working" = "yes"; then
threads_result="POSIX Threads found"
else
threads_result="POSIX Threads not found"
fi
])dnl