httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sas...@hyperreal.org
Subject cvs commit: apache-2.0/src/modules/mpm config.m4
Date Sun, 16 Jan 2000 20:00:52 GMT
sascha      00/01/16 12:00:52

  Modified:    src      acinclude.m4 configure.in
               src/build build2.mk
               src/lib/apr aclocal.m4 configure.in
               src/modules/mpm config.m4
  Added:       src/lib/apr threads.m4
  Log:
  Move threads/reentrancy m4 macros into threads.m4. All results are now
  cached and can be made easily available to Apache and APR.
  
  Revision  Changes    Path
  1.17      +1 -63     apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -u -r1.16 -r1.17
  --- acinclude.m4	2000/01/16 18:24:39	1.16
  +++ acinclude.m4	2000/01/16 20:00:46	1.17
  @@ -141,69 +141,7 @@
     fi
   ])
   
  -dnl
  -dnl APACHE_CHECK_THREADS()
  -dnl
  -dnl Determine the best flags for linking against a threading library.
  -dnl
  -AC_DEFUN(APACHE_THREAD_TEST, [
  -AC_TRY_RUN( [
  -#include <pthread.h>
  -
  -void *thread_routine(void *data) {
  -    return data;
  -}
  -
  -int main() {
  -    pthread_t thd;
  -    int data = 1;
  -    return pthread_create(&thd, NULL, thread_routine, &data);
  -} ], [ 
  -  apache_threads_working="yes"
  -  ], [
  -  apache_threads_working="no"
  -  ], apache_threads_working="no" ) ] )
  -
  -
  -AC_DEFUN(APACHE_CHECK_THREADS,[
  -
  -APACHE_THREAD_TEST
  -
  -if test "$apache_threads_working" != "yes"; then
  -  for flag in -pthreads -pthread -mthreads; do 
  -    AC_MSG_CHECKING(whether $flag enables POSIX threads)
  -    ac_save="$CFLAGS"
  -    CFLAGS="$CFLAGS $flag"
  -    APACHE_THREAD_TEST
  -    if test "$apache_threads_working" = "yes"; then
  -      AC_MSG_RESULT(yes)
  -      REENTRANCY_CFLAGS="$REENTRANCY_CFLAGS $flag"
  -      break
  -    fi
  -    CFLAGS="$ac_save"
  -    AC_MSG_RESULT(no)
  -  done
  -fi
  -
  -if test "$apache_threads_working" != "yes"; then
  -  for lib in pthread pthreads c_r; do
  -    ac_save="$LIBS"
  -    LIBS="$LIBS -l$lib"
  -    APACHE_THREAD_TEST
  -    if test "$apache_threads_working" = "yes"; then
  -      REENTRANCY_LDFLAGS="$REENTRANCY_LDFLAGS -l$lib"
  -      break
  -    fi
  -    LIBS="$ac_save"
  -  done
  -fi
  -
  -if test "$apache_threads_working" = "yes"; then
  -  threads_result="POSIX Threads found"
  -else
  -  threads_result="POSIX Threads not found"
  -fi
  -])
  +sinclude(lib/apr/threads.m4)
   
   dnl
   dnl APACHE_INADDR_NONE
  
  
  
  1.20      +1 -11     apache-2.0/src/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -u -r1.19 -r1.20
  --- configure.in	2000/01/16 18:24:39	1.19
  +++ configure.in	2000/01/16 20:00:46	1.20
  @@ -102,15 +102,8 @@
   
   APACHE_INADDR_NONE
   
  -case "`uname -sr`" in
  -"SunOS 5"*)
  -  REENTRANCY_CFLAGS="$REENTRANCY_CFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
  -esac
  +REENTRANCY_FLAGS
   
  -REENTRANCY_CFLAGS="$REENTRANCY_CFLAGS -D_REENTRANT"
  -
  -CFLAGS="$CFLAGS $REENTRANCY_CFLAGS"
  -
   AC_FUNC_SELECT_ARGTYPES
   
   dnl Check if we'll actually need to cast select args all the time
  @@ -165,8 +158,5 @@
   dnl ## Build modules.c
   rm -f $srcdir/modules.c
   echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c
  -
  -APACHE_PASSTHRU(REENTRANCY_CFLAGS)
  -APACHE_PASSTHRU(REENTRANCY_LDFLAGS)
   
   AC_OUTPUT($APACHE_OUTPUT_FILES)
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- build2.mk	2000/01/16 18:20:17	1.3
  +++ build2.mk	2000/01/16 20:00:48	1.4
  @@ -21,7 +21,7 @@
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   #
   ##############################################################################
  -# $Id: build2.mk,v 1.3 2000/01/16 18:20:17 sascha Exp $
  +# $Id: build2.mk,v 1.4 2000/01/16 20:00:48 sascha Exp $
   
   include generated_lists
   
  @@ -73,6 +73,6 @@
   	@rm -f $@
   	(cd lib/apr && autoheader)
   
  -$(apr_configure): lib/apr/aclocal.m4 lib/apr/configure.in
  +$(apr_configure): lib/apr/aclocal.m4 lib/apr/configure.in lib/apr/threads.m4
   	@echo rebuilding $@
   	(cd lib/apr && autoconf)
  
  
  
  1.10      +2 -0      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.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- aclocal.m4	2000/01/11 12:58:46	1.9
  +++ aclocal.m4	2000/01/16 20:00:49	1.10
  @@ -187,3 +187,5 @@
     AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
   fi
   ])
  +
  +sinclude(threads.m4)
  
  
  
  1.44      +2 -6      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.43
  retrieving revision 1.44
  diff -u -u -r1.43 -r1.44
  --- configure.in	2000/01/16 18:20:57	1.43
  +++ configure.in	2000/01/16 20:00:50	1.44
  @@ -32,12 +32,8 @@
   # This macro needs to be here in case we are on an AIX box.
   AC_AIX
   
  -dnl inherit REENTRANCY_FLAGS
  -test -n "$ac_cv_pass_REENTRANCY_CFLAGS" && \
  -CFLAGS="$CFLAGS $ac_cv_pass_REENTRANCY_CFLAGS"
  -
  -test -n "$ac_cv_pass_REENTRANCY_LDFLAGS" && \
  -LDFLAGS="$LDFLAGS $ac_cv_pass_REENTRANCY_LDFLAGS"
  +REENTRANCY_FLAGS
  +PTHREADS_CHECK
   
   AC_CACHE_CHECK([for threads], ac_cv_enable_threads, 
     [ AC_ARG_ENABLE(threads,
  
  
  
  1.1                  apache-2.0/src/lib/apr/threads.m4
  
  Index: threads.m4
  ===================================================================
  dnl
  dnl REENTRANCY_FLAGS
  dnl
  dnl Set some magic defines
  dnl
  AC_DEFUN(REENTRANCY_FLAGS,[
    case "`uname -sr`" in
    "SunOS 5"*)
      CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS";;
    esac
    
  dnl This works for now..
    CFLAGS="$CFLAGS -D_REENTRANT"
  ])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>
  
  void *thread_routine(void *data) {
      return data;
  }
  
  int main() {
      pthread_t thd;
      int data = 1;
      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 -pthreads -pthread -mthreads; 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
  
  
  
  1.9       +1 -1      apache-2.0/src/modules/mpm/config.m4
  
  Index: config.m4
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/config.m4,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- config.m4	2000/01/11 13:11:03	1.8
  +++ config.m4	2000/01/16 20:00:51	1.9
  @@ -11,7 +11,7 @@
   apache_cv_mpm=$APACHE_MPM
   	
   if test "$apache_cv_mpm" != "prefork"; then
  -  APACHE_CHECK_THREADS
  +  PTHREADS_CHECK
     AC_MSG_CHECKING([for which threading library to use])
     AC_MSG_RESULT($threads_result)
   
  
  
  

Mime
View raw message